messagingapp/msgsettings/settingsview/inc/msgadvancedsettingsform.h
changeset 25 84d9eb65b26f
parent 23 238255e8b033
child 27 e4592d119491
child 37 518b245aa84c
child 79 2981cb3aa489
equal deleted inserted replaced
23:238255e8b033 25:84d9eb65b26f
     1 /*
       
     2  * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3  * All rights reserved.
       
     4  * This component and the accompanying materials are made available
       
     5  * under the terms of "Eclipse Public License v1.0"
       
     6  * which accompanies this distribution, and is available
       
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8  *
       
     9  * Initial Contributors:
       
    10  * Nokia Corporation - initial contribution.
       
    11  *
       
    12  * Contributors:
       
    13  *
       
    14  * Description:This class is for drawing form for advanced view 
       
    15  * settings  
       
    16  *
       
    17  */
       
    18 
       
    19 #ifndef MSG_ADVANCEDSETTINGS_FORM_H_
       
    20 #define MSG_ADVANCEDSETTINGS_FORM_H_
       
    21 
       
    22 #include <hbdataform.h>
       
    23 
       
    24 class HbDataFormModelItem;
       
    25 class HbDataFormModel;
       
    26 class HbComboBox;
       
    27 class QStandardItemModel;
       
    28 class MsgSettingEngine;
       
    29 class HbLineEdit;
       
    30 
       
    31 class MsgAdvancedSettingsForm : public HbDataForm
       
    32 {
       
    33 Q_OBJECT
       
    34 public:
       
    35     explicit MsgAdvancedSettingsForm(QGraphicsItem *parent = 0);
       
    36 
       
    37     ~MsgAdvancedSettingsForm();
       
    38 
       
    39 signals:
       
    40     void newSMSCCenterClicked(int);
       
    41 
       
    42 private slots:
       
    43     
       
    44     void onPressedCustomButton();
       
    45     void changeAccessPoint(int index);
       
    46     void onSMSCurrentIndexChanged(int index);
       
    47     void createServiceCenterModel();
       
    48     void changeMMSCreationMode(int index);
       
    49     void changeMMSRetrievalMode(int index);
       
    50     void allowAnonymousMMS();
       
    51     void allowMMSAdverts();
       
    52     void onLongPress(QPointF point);
       
    53     void onDataChanged(const QModelIndex& topLeft,const QModelIndex& bottomRight);
       
    54 
       
    55 private:
       
    56     void initSettingModel();
       
    57     void initGroupPageName();
       
    58     void addMMSGroupItem(HbDataFormModelItem* parent);
       
    59     void addSmsMCGroupItem(HbDataFormModelItem* parent, HbDataFormModel* model);
       
    60     void addSmsEmailGroupItem(HbDataFormModelItem* parent);
       
    61     
       
    62     //sms stuff
       
    63     void activateSMSCCenterList(HbWidget* widget);
       
    64     void activateCustomButtonListItems(HbWidget* widget, int btnIndex);
       
    65     void updateSmsCenterModel();   
       
    66     void fillServiceCenterModel();
       
    67     
       
    68     //email stuff
       
    69     void activateEmailGateway(HbWidget* widget, HbLineEdit* &edit);
       
    70     void activateEmailServiceCenterNo(HbWidget* widget, HbLineEdit* &edit);
       
    71     
       
    72 public:
       
    73     void refresh();
       
    74     
       
    75     /**
       
    76      * This is for update Email fields into settings engine
       
    77      */
       
    78     void commitEmailChanges();
       
    79     
       
    80 private:
       
    81     /**
       
    82      * different group items.
       
    83      */
       
    84     HbDataFormModelItem* mMMSGroup;
       
    85     HbDataFormModelItem* mSmsMCGroup;
       
    86     HbDataFormModelItem* mSmsEmailGroup;
       
    87 
       
    88     /**
       
    89      * groupitem string lists.
       
    90      */
       
    91     QStringList mGroupPageName;
       
    92     QStringList mmsSettingsGroup;
       
    93     QStringList mSmsMCSettingsGroup;
       
    94     QStringList mSmsEmailSettingsGroup;
       
    95 
       
    96     /**
       
    97      * The list of smsc centers.
       
    98      */
       
    99     QStringList mSmsServiceList;
       
   100 
       
   101     /**
       
   102      * model for sms service centers.
       
   103      */
       
   104     QStandardItemModel* mSmsServiceCenterModel;
       
   105 
       
   106     /**
       
   107      * engine instance to read/write settings
       
   108      */
       
   109     MsgSettingEngine* mSettingEngine;
       
   110     
       
   111     /**
       
   112      * sms service center combo box reference.
       
   113      */
       
   114     HbComboBox* mSmsCenterComboBox;
       
   115     
       
   116 	/**
       
   117 	 * Line edit for Sms Email gateway
       
   118 	 */
       
   119     HbLineEdit* mEditEmailGateway;
       
   120 	
       
   121 	/**
       
   122 	 * Line edit for Sms Email Service Number
       
   123 	 */
       
   124     HbLineEdit* mEditEmailServiceNumber;
       
   125         
       
   126     /**
       
   127      * default service center index.
       
   128      */
       
   129     int mDefaultServiceCenter;
       
   130     
       
   131     HbDataFormModelItem *emailGateway;
       
   132     HbDataFormModelItem *emailService;
       
   133     
       
   134     
       
   135 
       
   136 };
       
   137 
       
   138 #endif /* MSG_ADVANCEDSETTINGS_FORM_H_ */