24 /*! |
24 /*! |
25 \class NmIpsSettingsLabelItem |
25 \class NmIpsSettingsLabelItem |
26 \brief The class implements a custom HbDataFormViewItem that combines a HbComboBox and HbLabel |
26 \brief The class implements a custom HbDataFormViewItem that combines a HbComboBox and HbLabel |
27 widgets that are linked. I.e. When the user selects changes the combobox's value, the label |
27 widgets that are linked. I.e. When the user selects changes the combobox's value, the label |
28 text is updated accordingly. |
28 text is updated accordingly. |
29 |
|
30 */ |
29 */ |
31 |
30 |
32 // ======== MEMBER FUNCTIONS ======== |
31 // ======== MEMBER FUNCTIONS ======== |
33 |
32 |
34 /*! |
33 /*! |
35 Constructor of NmIpsSettingsLabeledComboBox. |
34 Constructor of NmIpsSettingsLabeledComboBox. |
36 */ |
35 */ |
37 NmIpsSettingsLabeledComboBox::NmIpsSettingsLabeledComboBox(QGraphicsItem *parent, Qt::WindowFlags wFlags) |
36 NmIpsSettingsLabeledComboBox::NmIpsSettingsLabeledComboBox( |
|
37 QGraphicsItem *parent, Qt::WindowFlags wFlags) |
38 : HbWidget(parent, wFlags) |
38 : HbWidget(parent, wFlags) |
39 { |
39 { |
40 // Create widget layout. |
40 // Create widget layout. |
41 QGraphicsLinearLayout* layout = new QGraphicsLinearLayout(Qt::Vertical); |
41 QGraphicsLinearLayout* layout = new QGraphicsLinearLayout(Qt::Vertical); |
42 this->setLayout(layout); // Takes ownership |
42 this->setLayout(layout); // Takes ownership |
52 HbFontSpec spec(HbFontSpec::PrimarySmall); |
52 HbFontSpec spec(HbFontSpec::PrimarySmall); |
53 mLabel->setFontSpec(spec); |
53 mLabel->setFontSpec(spec); |
54 layout->addItem(mLabel); // Takes ownership |
54 layout->addItem(mLabel); // Takes ownership |
55 |
55 |
56 // Connect signals and slots. |
56 // Connect signals and slots. |
57 connect(mComboBox, SIGNAL(currentIndexChanged(int)), |
57 connect(mComboBox, SIGNAL(currentIndexChanged(int)), |
58 this, SLOT(comboBoxIndexChanged(int)), Qt::UniqueConnection); |
58 this, SLOT(comboBoxIndexChanged(int)), Qt::UniqueConnection); |
|
59 |
59 connect(mComboBox, SIGNAL(currentIndexChanged(int)), |
60 connect(mComboBox, SIGNAL(currentIndexChanged(int)), |
60 this, SIGNAL(currentIndexChanged(int)), Qt::UniqueConnection); |
61 this, SIGNAL(currentIndexChanged(int)), Qt::UniqueConnection); |
61 } |
62 } |
62 |
63 |
63 /*! |
64 /*! |