29 viewspecificmenu = new HbMenu(); |
29 viewspecificmenu = new HbMenu(); |
30 help = viewspecificmenu->addAction(hbTrId("txt_common_menu_help")); |
30 help = viewspecificmenu->addAction(hbTrId("txt_common_menu_help")); |
31 exit = viewspecificmenu->addAction(hbTrId("txt_common_menu_exit")); |
31 exit = viewspecificmenu->addAction(hbTrId("txt_common_menu_exit")); |
32 connect(exit, SIGNAL(triggered()), QCoreApplication::instance(), SLOT(quit())); |
32 connect(exit, SIGNAL(triggered()), QCoreApplication::instance(), SLOT(quit())); |
33 setMenu(viewspecificmenu); |
33 setMenu(viewspecificmenu); |
|
34 iPort = 0; |
34 } |
35 } |
35 ServerSettingsView::~ServerSettingsView() |
36 ServerSettingsView::~ServerSettingsView() |
36 { |
37 { |
37 |
38 |
38 } |
39 } |
84 if(currentap >= 0) |
85 if(currentap >= 0) |
85 accesspoint->setContentWidgetData(QString("currentIndex"), currentap); |
86 accesspoint->setContentWidgetData(QString("currentIndex"), currentap); |
86 else |
87 else |
87 accesspoint->setContentWidgetData(QString("currentIndex"), apdata.count()-1); |
88 accesspoint->setContentWidgetData(QString("currentIndex"), apdata.count()-1); |
88 form->addConnection(accesspoint, SIGNAL(currentIndexChanged (int ) ),this, SLOT(accessPointItemChanged(int))); |
89 form->addConnection(accesspoint, SIGNAL(currentIndexChanged (int ) ),this, SLOT(accessPointItemChanged(int))); |
89 hostaddress->setContentWidgetData(QString("text"),settingdatalist[3]); |
90 hostaddress->setContentWidgetData(QString("text"),settingdatalist[3]); |
90 port->setContentWidgetData(QString("text"),portnum);//Integer only setting needs to be done |
91 iPort = portnum; |
|
92 port->setContentWidgetData(QString("text"),iPort);//Integer only setting needs to be done |
|
93 form->addConnection(port, SIGNAL(textChanged (QString) ),this, SLOT(portItemChanged(QString))); |
91 username->setContentWidgetData(QString("text"),settingdatalist[4]); |
94 username->setContentWidgetData(QString("text"),settingdatalist[4]); |
92 userpwd->setContentWidgetData(QString("echoMode"),HbLineEdit::Password ); |
95 userpwd->setContentWidgetData(QString("echoMode"),HbLineEdit::Password ); |
93 userpwd->setContentWidgetData(QString("text"),settingdatalist[5]); |
96 userpwd->setContentWidgetData(QString("text"),settingdatalist[5]); |
94 QStringList yesnoList; |
97 QStringList yesnoList; |
95 yesnoList <<hbTrId("txt_device_update_button_yes"); |
98 yesnoList <<hbTrId("txt_device_update_button_yes"); |
145 netauthval = true; |
148 netauthval = true; |
146 //check server name , server id, host addr & usrname |
149 //check server name , server id, host addr & usrname |
147 if ((itemlist[0].length() > 0) && (itemlist[1].length() > 0) |
150 if ((itemlist[0].length() > 0) && (itemlist[1].length() > 0) |
148 && (itemlist[3].length() > 0) && (itemlist[4].length() > 0)) |
151 && (itemlist[3].length() > 0) && (itemlist[4].length() > 0)) |
149 { |
152 { |
150 serversView->saveProfile(itemlist, sessmode, curriap, portval, |
153 serversView->saveProfile(itemlist, sessmode, curriap, iPort, |
151 netauthval); |
154 netauthval); |
152 qDebug("omadm before crash"); |
|
153 form->removeConnection(accesspoint, |
155 form->removeConnection(accesspoint, |
154 SIGNAL(currentIndexChanged (int ) ), this, |
156 SIGNAL(currentIndexChanged (int ) ), this, |
155 SLOT(accessPointItemChanged(int))); |
157 SLOT(accessPointItemChanged(int))); |
156 qDebug("omadm after crash"); |
|
157 iMainWindow->setCurrentView(serversView); |
158 iMainWindow->setCurrentView(serversView); |
158 //Form wk08 soft key owned by view |
159 //Form wk08 soft key owned by view |
159 //iMainWindow->removeSoftKeyAction(Hb::SecondarySoftKey,backaction); |
160 //iMainWindow->removeSoftKeyAction(Hb::SecondarySoftKey,backaction); |
160 dataformmodel->clear(); |
161 dataformmodel->clear(); |
161 } |
162 } |
162 else |
163 else |
163 { |
164 { |
|
165 TInt x = itemlist.count(); |
|
166 TInt valSet=0; |
|
167 int i=0; |
|
168 for(i=0;i<x;i++) |
|
169 { |
|
170 if(itemlist[i].length()>0) |
|
171 { |
|
172 valSet=1; |
|
173 break; |
|
174 } |
|
175 } |
|
176 if(valSet==1) |
|
177 { |
164 HbMessageBox *note = new HbMessageBox(HbMessageBox::MessageTypeInformation); |
178 HbMessageBox *note = new HbMessageBox(HbMessageBox::MessageTypeInformation); |
165 note->setText(hbTrId( |
179 note->setText(hbTrId( |
166 "txt_device_update_dialog_enter_mandatory_field_values")); |
180 "txt_device_update_dialog_enter_mandatory_field_values")); |
167 note->setAttribute( Qt::WA_DeleteOnClose); |
181 note->setAttribute( Qt::WA_DeleteOnClose); |
168 note->setTimeout(HbPopup::NoTimeout); |
182 note->setTimeout(HbPopup::NoTimeout); |
169 note->open(); |
183 note->open(); |
|
184 } |
|
185 else |
|
186 { |
|
187 form->removeConnection(accesspoint,SIGNAL(currentIndexChanged (int ) ), this,SLOT(accessPointItemChanged(int))); |
|
188 iMainWindow->setCurrentView(serversView); |
|
189 //Form wk08 soft key owned by view |
|
190 //iMainWindow->removeSoftKeyAction(Hb::SecondarySoftKey,backaction); |
|
191 dataformmodel->clear(); |
|
192 } |
|
193 |
170 } |
194 } |
171 } |
195 } |
172 |
196 |
173 void ServerSettingsView::checkServerIdvalue() |
197 void ServerSettingsView::checkServerIdvalue() |
174 { |
198 { |