is this a type of initialization? the constructor ButtonWidget(int widgets) seems doesnt initialize int widget. could anyone explain it in detail=? thank you.
I donot understand the code in buttonwidget.cpp
Qt Code:
  1. //buttonwidget.cpp
  2. ButtonWidget::ButtonWidget( int widgets )
  3. : QWidget()
  4. {
  5. QVBoxLayout *vbox = new QVBoxLayout();
  6.  
  7. if ( widgets & ButtonWidget::ComboBoxes )
  8. vbox->addWidget( comboBoxes() );
  9.  
  10. if ( widgets & ButtonWidget::SpinBoxes )
  11. vbox->addWidget( spinBoxes( widgets & ButtonWidget::SpinBoxexUpdateButton ) );
  12.  
  13. if ( widgets & ButtonWidget::CheckBoxes )
  14. vbox->addWidget( checkBoxes() );
  15.  
  16. if ( widgets & ButtonWidget::ParetoBoxes )
  17. vbox->addWidget( paretoBoxes() );
  18.  
  19. if ( widgets & ButtonWidget::MarknDiffBoxes )
  20. vbox->addWidget( markndiffBoxes() );
  21.  
  22. vbox->addStretch();
  23.  
  24. setLayout(vbox);
  25. }
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. //buttonwidget.h
  2. ........
  3. class ButtonWidget : public QWidget
  4. {
  5. Q_OBJECT
  6.  
  7. public:
  8. enum Widgets
  9. {
  10. ComboBoxes = 1,
  11. SpinBoxes = 2,
  12. SpinBoxexUpdateButton = 4,
  13. CheckBoxes = 8,
  14. ParetoBoxes = 16,
  15. MarknDiffBoxes = 32
  16. };
  17.  
  18. ButtonWidget( int widgets );
  19. ~ButtonWidget();
  20. .........
  21. private:
  22. QGroupBox* comboBoxes();
  23. QGroupBox* spinBoxes( bool updateButton );
  24. QGroupBox* checkBoxes();
  25. QGroupBox* paretoBoxes();
  26. QGroupBox* markndiffBoxes();
To copy to clipboard, switch view to plain text mode 

I just know the initialization as below. What kind of initialization is it in button.cpp?
Qt Code:
  1. class Something
  2. 02 {
  3. 03 private:
  4. 04 int m_nValue;
  5. 05 double m_dValue;
  6. 06 int *m_pnValue;
  7. 07
  8. 08 public:
  9. 09 Something()
  10. 10 {
  11. 11 m_nValue = 0;
  12. 12 m_dValue = 0.0;
  13. 13 m_pnValue = 0;
  14. 14 }
  15. 15 };
To copy to clipboard, switch view to plain text mode