messagingapp/msgsettings/msgsettingsplugin.deprecated/inc/msgadvancedsettingsform.h
changeset 23 238255e8b033
equal deleted inserted replaced
5:4697dfb2d7ad 23:238255e8b033
       
     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     void onItemActivated(const QModelIndex &index);
       
    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 
       
    54 private:
       
    55     void initSettingModel();
       
    56     void initGroupPageName();
       
    57     void addMMSGroupItem(HbDataFormModelItem* parent);
       
    58     void addSmsMCGroupItem(HbDataFormModelItem* parent, HbDataFormModel* model);
       
    59     void addSmsEmailGroupItem(HbDataFormModelItem* parent);
       
    60     
       
    61     //mms stuff
       
    62     void activateMMSCreationMode(HbWidget* widget);
       
    63     void activateMMSRetrievalMode(HbWidget* widget);
       
    64     void activateMMSAnonymousMode(HbWidget* widget);
       
    65     void activateMMSAdverts(HbWidget* widget);
       
    66     void activateMMSAccesspoint(HbWidget* widget);
       
    67     
       
    68     //sms stuff
       
    69     void activateSMSCCenterList(HbWidget* widget);
       
    70     void activateCustomButtonListItems(HbWidget* widget, int btnIndex);
       
    71     void updateSmsCenterModel();   
       
    72     void fillServiceCenterModel();
       
    73     
       
    74     //email stuff
       
    75     void activateEmailGateway(HbWidget* widget, HbLineEdit* &edit);
       
    76     void activateEmailServiceCenterNo(HbWidget* widget, HbLineEdit* &edit);
       
    77     
       
    78 public:
       
    79     void refresh();
       
    80     
       
    81     /**
       
    82      * This is for update Email fields into settings engine
       
    83      */
       
    84     void commitEmailChanges();
       
    85     
       
    86 private:
       
    87     /**
       
    88      * different group items.
       
    89      */
       
    90     HbDataFormModelItem* mMMSGroup;
       
    91     HbDataFormModelItem* mSmsMCGroup;
       
    92     HbDataFormModelItem* mSmsEmailGroup;
       
    93 
       
    94     /**
       
    95      * groupitem string lists.
       
    96      */
       
    97     QStringList mGroupPageName;
       
    98     QStringList mmsSettingsGroup;
       
    99     QStringList mSmsMCSettingsGroup;
       
   100     QStringList mSmsEmailSettingsGroup;
       
   101 
       
   102     /**
       
   103      * The list of smsc centers.
       
   104      */
       
   105     QStringList mSmsServiceList;
       
   106 
       
   107     /**
       
   108      * model for sms service centers.
       
   109      */
       
   110     QStandardItemModel* mSmsServiceCenterModel;
       
   111 
       
   112     /**
       
   113      * engine instance to read/write settings
       
   114      */
       
   115     MsgSettingEngine* mSettingEngine;
       
   116     
       
   117     /**
       
   118      * sms service center combo box reference.
       
   119      */
       
   120     HbComboBox* mSmsCenterComboBox;
       
   121     
       
   122 	/**
       
   123 	 * Line edit for Sms Email gateway
       
   124 	 */
       
   125     HbLineEdit* mEditEmailGateway;
       
   126 	
       
   127 	/**
       
   128 	 * Line edit for Sms Email Service Number
       
   129 	 */
       
   130     HbLineEdit* mEditEmailServiceNumber;
       
   131         
       
   132     /**
       
   133      * default service center index.
       
   134      */
       
   135     int mDefaultServiceCenter;
       
   136     
       
   137     
       
   138 
       
   139 };
       
   140 
       
   141 #endif /* MSG_ADVANCEDSETTINGS_FORM_H_ */