equal
deleted
inserted
replaced
133 this, SIGNAL(goOffline(const NmId &))); |
133 this, SIGNAL(goOffline(const NmId &))); |
134 |
134 |
135 connect(mSettingsHelper, SIGNAL(createUserDefinedMode()), |
135 connect(mSettingsHelper, SIGNAL(createUserDefinedMode()), |
136 this, SLOT(createUserDefinedMode())); |
136 this, SLOT(createUserDefinedMode())); |
137 |
137 |
|
138 connect(mForm, SIGNAL(pressed(QModelIndex)), |
|
139 this, SLOT(itemPress(QModelIndex))); |
138 // Get the value if some ui items need to be hidden. |
140 // Get the value if some ui items need to be hidden. |
139 QVariant data; |
141 QVariant data; |
140 mSettingsManager->readSetting(IpsServices::UserNameHidden, data); |
142 mSettingsManager->readSetting(IpsServices::UserNameHidden, data); |
141 mHiddenItem = data.toBool(); |
143 mHiddenItem = data.toBool(); |
142 // Add items to the model. |
144 // Add items to the model. |
653 mSettingsHelper->handleReceivingScheduleSettingChange( |
655 mSettingsHelper->handleReceivingScheduleSettingChange( |
654 IpsServices::ReceptionInboxSyncWindow, selectedValue); |
656 IpsServices::ReceptionInboxSyncWindow, selectedValue); |
655 } |
657 } |
656 } |
658 } |
657 |
659 |
|
660 /*! |
|
661 Called when item is pressed on the view. |
|
662 |
|
663 \param index Index to the pressed item. |
|
664 */ |
|
665 void NmIpsSettingsPlugin::itemPress(const QModelIndex &index) |
|
666 { |
|
667 NM_FUNCTION; |
|
668 |
|
669 int type(index.data(HbDataFormModelItem::ItemTypeRole).toInt()); |
|
670 |
|
671 if (type == HbDataFormModelItem::GroupItem) { |
|
672 // Scroll the groupitem to top if needed. |
|
673 HbDataFormViewItem *item = static_cast<HbDataFormViewItem *>(mForm->itemByIndex(index)); |
|
674 bool expanded = item->isExpanded(); |
|
675 |
|
676 if (!expanded) { |
|
677 mForm->scrollTo(index, HbAbstractItemView::PositionAtTop); |
|
678 } |
|
679 } |
|
680 |
|
681 if (type == HbDataFormModelItem::TextItem) { |
|
682 // Turn off predictive input for line-edit. |
|
683 HbDataFormViewItem *item = static_cast<HbDataFormViewItem *>(mForm->itemByIndex(index)); |
|
684 HbWidget *widget = item->dataItemContentWidget(); |
|
685 widget->setInputMethodHints(Qt::ImhNoPredictiveText); |
|
686 } |
|
687 } |
658 Q_EXPORT_PLUGIN2(nmipssettings, NmIpsSettingsPlugin); |
688 Q_EXPORT_PLUGIN2(nmipssettings, NmIpsSettingsPlugin); |