messagingapp/msgsettings/settingsview/inc/msgsettingsform.h
branchRCL_3
changeset 57 ebe688cedc25
equal deleted inserted replaced
54:fa1df4b99609 57:ebe688cedc25
       
     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 first form view for msg settings  
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef MSG_SETTINGSFORM_H
       
    19 #define MSG_SETTINGSFORM_H
       
    20 
       
    21 #include <hbdataform.h>
       
    22 #include "msgsettingengine.h"
       
    23 #include "msgsettingsview.h"
       
    24 
       
    25 class HbDataFormModelItem;
       
    26 class HbDataFormModel;
       
    27 
       
    28 class MsgSettingsForm : public HbDataForm
       
    29 {
       
    30 Q_OBJECT
       
    31 public:
       
    32     explicit MsgSettingsForm(
       
    33             MsgSettingsView::SettingsView settingsView = MsgSettingsView::DefaultView,
       
    34             QGraphicsItem *parent = 0);
       
    35     ~MsgSettingsForm();
       
    36     void refreshViewForm();
       
    37     
       
    38 signals:
       
    39     void newSMSCCenterClicked(int);
       
    40         
       
    41 private:
       
    42     void initSettingModel(MsgSettingsView::SettingsView settingsView);
       
    43     void addMMSGroupItem(HbDataFormModelItem* parent);
       
    44     void addSmsMCGroupItem(HbDataFormModelItem* parent);
       
    45     void updateSmsMCGroupItem(HbDataFormModelItem* parent);
       
    46     void expandGroup(HbDataFormModelItem* group,bool expand);
       
    47     
       
    48 private slots:
       
    49     void onPressedCustomButton();
       
    50     void changeCharEncoding(int index);
       
    51     void changeAccessPoint(int index);
       
    52     void onSMSCurrentIndexChanged(int index);
       
    53     void changeMMSRetrievalMode(int index);
       
    54     void allowAnonymousMMS();
       
    55     void allowMMSAdverts();
       
    56 
       
    57 private:
       
    58     
       
    59     HbDataFormModel *settingsModel;
       
    60     
       
    61     /**
       
    62      * SmsGroup model item
       
    63      */
       
    64     HbDataFormModelItem* mSmsMCGroup;
       
    65 
       
    66     /**
       
    67      * SMS Center gropu list
       
    68      */
       
    69     QStringList mSmsMCSettingsGroup;
       
    70 
       
    71     /**
       
    72      * The list of smsc centers.
       
    73      */
       
    74     QStringList mSmsServiceList;
       
    75 
       
    76     //msg engine reference
       
    77     MsgSettingEngine* mSettingEngine;
       
    78     
       
    79     HbDataFormModelItem *smsMessageCenter;
       
    80 
       
    81 };
       
    82 #endif // MSG_SETTINGSFORM_H