deviceupdatesui/deviceupdates/src/serversettingsview.cpp
changeset 24 408f75ba5bc2
parent 21 c707676bf59f
child 42 aa33c2cb9a50
equal deleted inserted replaced
21:c707676bf59f 24:408f75ba5bc2
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 #include <hblineedit.h>
    18 #include <hblineedit.h>
    19 #include <hbmessagebox.h>
    19 #include <hbmessagebox.h>
       
    20 #include <hbnamespace.h>
    20 #include "serversettingsview.h"
    21 #include "serversettingsview.h"
    21 #include "dmadvancedview.h"
    22 #include "dmadvancedview.h"
    22 #include "settingsdataformcustomitem.h"
    23 #include "settingsdataformcustomitem.h"
    23 
    24 
    24 ServerSettingsView::ServerSettingsView(HbMainWindow* mainWindow, DmAdvancedView* serversview, QString& header, QGraphicsItem* parent): HbView(parent), iMainWindow(mainWindow),
    25 ServerSettingsView::ServerSettingsView(HbMainWindow* mainWindow, DmAdvancedView* serversview, QString& header, QGraphicsItem* parent): HbView(parent), iMainWindow(mainWindow),
   158         //iMainWindow->removeSoftKeyAction(Hb::SecondarySoftKey,backaction);
   159         //iMainWindow->removeSoftKeyAction(Hb::SecondarySoftKey,backaction);
   159         dataformmodel->clear();
   160         dataformmodel->clear();
   160         }
   161         }
   161     else
   162     else
   162         {
   163         {
   163         HbMessageBox note(HbMessageBox::MessageTypeInformation);
   164         HbMessageBox *note = new HbMessageBox(HbMessageBox::MessageTypeInformation);
   164         note.setText(hbTrId(
   165         note->setText(hbTrId(
   165                 "txt_device_update_dialog_enter_mandatory_field_values"));
   166                 "txt_device_update_dialog_enter_mandatory_field_values"));
   166         note.setPrimaryAction(new HbAction("OK"));
   167         note->setAttribute( Qt::WA_DeleteOnClose);         
   167         note.setTimeout(HbPopup::NoTimeout);
   168         note->setTimeout(HbPopup::NoTimeout);
   168         note.exec();
   169         note->open();
   169         }        
   170         }        
   170     }
   171     }
   171 
   172 
   172 void ServerSettingsView::checkServerIdvalue()
   173 void ServerSettingsView::checkServerIdvalue()
   173     {
   174     {
   174     QString srvid = serverid->contentWidgetData(QString("text")).toString();
   175     QString srvid = serverid->contentWidgetData(QString("text")).toString();
   175     if(serversView->checkServerId(srvid))
   176     if(serversView->checkServerId(srvid))
   176         {
   177         {
   177     serverid->setContentWidgetData(QString("text"), QString("")); 
   178     serverid->setContentWidgetData(QString("text"), QString("")); 
   178     HbMessageBox note(HbMessageBox::MessageTypeInformation);
   179     HbMessageBox *note= new HbMessageBox(HbMessageBox::MessageTypeInformation);
   179            note.setText(hbTrId("txt_device_update_dialog_invalid_server_id"));           
   180            note->setText(hbTrId("txt_device_update_dialog_invalid_server_id")); 
   180            note.setTimeout(HbPopup::NoTimeout);
   181            note->setAttribute( Qt::WA_DeleteOnClose);                   
   181            note.exec();         
   182            note->setTimeout(HbPopup::NoTimeout);
       
   183            note->open();         
   182         }          
   184         }          
   183     }
   185     }
   184 
   186 
   185 void ServerSettingsView::setBackButtonBehavior()
   187 void ServerSettingsView::setBackButtonBehavior()
   186     {    
   188     {