178 // If there are no active connections, then the dialog is not shown to the user |
180 // If there are no active connections, then the dialog is not shown to the user |
179 mConnectionCount = activeConfigurations.count(); |
181 mConnectionCount = activeConfigurations.count(); |
180 |
182 |
181 // Toolbar is shown only if there are more than one connections active |
183 // Toolbar is shown only if there are more than one connections active |
182 if (mConnectionCount > 1) { |
184 if (mConnectionCount > 1) { |
183 mToolBar->show(); |
185 mMainView->setItemVisible(Hb::ToolBarItem, true); |
184 } else { |
186 } else { |
185 mToolBar->hide(); |
187 mMainView->setItemVisible(Hb::ToolBarItem, false); |
186 } |
188 } |
187 |
189 |
188 // if there are connections, the main view with the connections is shown |
190 // if there are connections, the main view with the connections is shown |
189 if (mConnectionCount > 0) { |
191 if (mConnectionCount > 0) { |
190 setCurrentView(mMainView); |
192 setCurrentView(mMainView); |
314 |
316 |
315 // Create the horizontal layout for the labels |
317 // Create the horizontal layout for the labels |
316 QGraphicsLinearLayout *labelLayout = new QGraphicsLinearLayout(Qt::Horizontal); |
318 QGraphicsLinearLayout *labelLayout = new QGraphicsLinearLayout(Qt::Horizontal); |
317 labelLayout->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
319 labelLayout->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
318 HbLabel *typeLabel = new HbLabel(hbTrId("txt_occ_list_name")); |
320 HbLabel *typeLabel = new HbLabel(hbTrId("txt_occ_list_name")); |
|
321 |
|
322 // get the pixel size matching the spesified 18 units using the HbDeviceProfile |
|
323 // and set the width of the label |
|
324 HbDeviceProfile profile = HbDeviceProfile::profile(mMainView); |
|
325 typeLabel->setPreferredWidth(typeLabelWidth*profile.unitValue()); |
|
326 typeLabel->setObjectName("mConnectionLabel"); |
|
327 |
319 HbLabel *nameLabel = new HbLabel(iapName); |
328 HbLabel *nameLabel = new HbLabel(iapName); |
320 nameLabel->setAlignment(Qt::AlignRight); |
329 nameLabel->setAlignment(Qt::AlignRight); |
|
330 nameLabel->setObjectName("mConnectionLabel"); |
321 labelLayout->addItem(typeLabel); |
331 labelLayout->addItem(typeLabel); |
322 labelLayout->addItem(nameLabel); |
332 labelLayout->addItem(nameLabel); |
323 |
333 |
324 HbWidget *labelWidget = new HbWidget(); |
334 HbWidget *labelWidget = new HbWidget(); |
325 labelWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
335 labelWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |