40 Constructor of NmIpsSettingsMultiSelectionItem. |
40 Constructor of NmIpsSettingsMultiSelectionItem. |
41 */ |
41 */ |
42 NmIpsSettingsMultiSelectionItem::NmIpsSettingsMultiSelectionItem( |
42 NmIpsSettingsMultiSelectionItem::NmIpsSettingsMultiSelectionItem( |
43 QGraphicsItem *parent, Qt::WindowFlags wFlags) |
43 QGraphicsItem *parent, Qt::WindowFlags wFlags) |
44 : HbWidget(parent, wFlags), |
44 : HbWidget(parent, wFlags), |
45 mButton(0), |
45 mButton(NULL), |
46 mSelectionDialog(0) |
46 mSelectionDialog(NULL) |
47 { |
47 { |
48 // Create widget layout. |
48 // Create widget layout. |
49 QScopedPointer<QGraphicsLinearLayout> layout(new QGraphicsLinearLayout(Qt::Vertical, this)); |
49 QScopedPointer<QGraphicsLinearLayout> layout(new QGraphicsLinearLayout(Qt::Vertical, this)); |
|
50 layout->setContentsMargins(0,0,0,0); |
50 this->setLayout(layout.data()); |
51 this->setLayout(layout.data()); |
51 |
52 |
52 // Create button. |
53 // Create button. |
53 mButton = new HbPushButton(); |
54 mButton = new HbPushButton(this); |
54 layout->addItem(mButton); |
55 layout->addItem(mButton); |
55 |
|
56 connect(mButton, SIGNAL(clicked()), this, SLOT(launchSelectionDialog())); |
56 connect(mButton, SIGNAL(clicked()), this, SLOT(launchSelectionDialog())); |
57 (void)layout.take(); |
57 (void)layout.take(); |
58 } |
58 } |
59 |
59 |
60 /*! |
60 /*! |
153 */ |
153 */ |
154 void NmIpsSettingsMultiSelectionItem::launchSelectionDialog() |
154 void NmIpsSettingsMultiSelectionItem::launchSelectionDialog() |
155 { |
155 { |
156 if (mSelectionDialog) { |
156 if (mSelectionDialog) { |
157 delete mSelectionDialog; |
157 delete mSelectionDialog; |
158 mSelectionDialog = 0; |
158 mSelectionDialog = NULL; |
159 } |
159 } |
160 |
160 |
161 // Create the dialog. |
161 // Create the dialog. |
162 mSelectionDialog = new HbSelectionDialog(); |
162 mSelectionDialog = new HbSelectionDialog(); |
163 mSelectionDialog->setSelectionMode(HbAbstractItemView::MultiSelection); |
163 mSelectionDialog->setSelectionMode(HbAbstractItemView::MultiSelection); |