messagingapp/msgsettings/settingsview/src/msgsettingsform.cpp
changeset 41 25fe1fe642e3
parent 37 518b245aa84c
child 46 b1f0785c289d
equal deleted inserted replaced
40:224522e33db9 41:25fe1fe642e3
   155     this->setModel(settingsModel);
   155     this->setModel(settingsModel);
   156     
   156     
   157     if (settingsView == MsgSettingsView::MMSView)
   157     if (settingsView == MsgSettingsView::MMSView)
   158     {
   158     {
   159         //set MMS Settings as expanded
   159         //set MMS Settings as expanded
   160         QModelIndex index_mms = settingsModel->indexFromItem(mmsGroup);
       
   161         //TODO: dataform issue on expanding one group item
   160         //TODO: dataform issue on expanding one group item
   162         //this->setExpanded(index_mms, true);
   161 //        expandGroup(mmsGroup,true);
   163     }
   162     }
   164     else if(settingsView == MsgSettingsView::SMSView)
   163     
   165     {
       
   166         //expandSMSSettings();
       
   167     }
       
   168         
       
   169 }
   164 }
   170 
   165 
   171 void MsgSettingsForm::refreshViewForm()
   166 void MsgSettingsForm::refreshViewForm()
   172 {
   167 {
   173     updateSmsMCGroupItem(mSmsMCGroup);
   168     updateSmsMCGroupItem(mSmsMCGroup);
   225         this->addConnection(newChild,
   220         this->addConnection(newChild,
   226                             SIGNAL(clicked()),
   221                             SIGNAL(clicked()),
   227                             this,
   222                             this,
   228                             SLOT(onPressedCustomButton()));
   223                             SLOT(onPressedCustomButton()));
   229     }    
   224     }    
       
   225     
   230 }
   226 }
   231 
   227 
   232 void MsgSettingsForm::addMMSGroupItem(HbDataFormModelItem* parent)
   228 void MsgSettingsForm::addMMSGroupItem(HbDataFormModelItem* parent)
   233 {
   229 {
   234     //read settings
   230     //read settings
   487 {
   483 {
   488     //set into msg settings
   484     //set into msg settings
   489     mSettingEngine->setSMSMessageCenter(index);
   485     mSettingEngine->setSMSMessageCenter(index);
   490 }
   486 }
   491 
   487 
   492 void MsgSettingsForm::expandSMSSettings()
   488 void MsgSettingsForm::expandGroup(HbDataFormModelItem* group,bool expand)
   493 {
   489 {
   494     QModelIndex index_sms = settingsModel->indexFromItem(mSmsMCGroup);
   490     QModelIndex index = settingsModel->indexFromItem(group);
   495 
   491 
   496     this->setExpanded(index_sms, true);
   492     if(index.isValid())
       
   493     {
       
   494         this->setExpanded(index, expand);
       
   495     }
   497 }
   496 }
   498 //EOF
   497 //EOF