phonesettings/cpphonesettingsplugins/barringplugin/inc/cpbarringplugingroup.h
changeset 27 2f8f8080a020
parent 22 6bb1b21d2484
child 30 ebdbd102c78a
equal deleted inserted replaced
22:6bb1b21d2484 27:2f8f8080a020
    22 #include <psetcallbarringwrapper.h>
    22 #include <psetcallbarringwrapper.h>
    23 
    23 
    24 class PSetWrapper;
    24 class PSetWrapper;
    25 class QModelIndex;
    25 class QModelIndex;
    26 class CpPhoneNotes;
    26 class CpPhoneNotes;
       
    27 class QValidator;
       
    28 class QTranslator;
    27 
    29 
    28 /*!
    30 /*!
    29     \class CpBarringPluginGroup
    31     \class CpBarringPluginGroup
    30     \brief The class CpBarringPluginGroup defines items shown on UI. 
    32     \brief The class CpBarringPluginGroup defines barring items shown on UI. 
    31  */
    33  */
    32 class CpBarringPluginGroup : public CpSettingFormItemData
    34 class CpBarringPluginGroup : public CpSettingFormItemData
    33 {
    35 {
    34     Q_OBJECT
    36     Q_OBJECT
    35     
    37     
    43     void itemShown(const QModelIndex& item);
    45     void itemShown(const QModelIndex& item);
    44     
    46     
    45 private:
    47 private:
    46     
    48     
    47     void setupLocalization();
    49     void setupLocalization();
    48     void connectToWrapper();
    50     void setupConnectionsToWrapper();
    49     
    51     
    50     void createAllOutgoingBarringItem();
    52     void createBarringItems();
    51     void createOutgoingInternationalBarringItem();
    53     CpSettingFormItemData *createBarringItem(
    52     void createOutgoingInternationalExceptToHomeCountryBarringItem();
    54         const HbDataFormModelItem::DataItemType &itemType,
    53     void createAllIncomingBarringItem();
    55         const QString &label,
    54     void createIncomingWhenRoamingBarringItem();
    56         const QString &widgetTextData,
       
    57         const PSetCallBarringWrapper::BarringType &barringType);
    55     
    58     
    56     void processBarringStatusRequestQueue();
    59     void processBarringStatusRequestQueue();
    57     void revertCheckStateForItem(CpSettingFormItemData *barringItem);
    60     bool updateDependentBarringProgramStatuses(
    58 
    61         const CpSettingFormItemData &changedBarringItem);
       
    62     CpSettingFormItemData &barringItemByProgram(
       
    63         const PSetCallBarringWrapper::BarringType &barringProgram);
       
    64     void revertCheckStateOfItem(
       
    65         CpSettingFormItemData *barringItem);
       
    66     void updateCheckStateOfItem(
       
    67         CpSettingFormItemData &barringItem, 
       
    68         const Qt::CheckState &newState);
       
    69     
    59 private slots:
    70 private slots:
    60 
    71 
    61     void barringStatusRequestCompleted(
    72     void barringStatusRequestCompleted(
    62         int result,
    73         int result,
    63         const QList<unsigned char> & basicServiceGroupIds,
    74         const QList<unsigned char> & basicServiceGroupIds,
    73         int result,
    84         int result,
    74         PSetCallBarringWrapper::BarringType barringType,
    85         PSetCallBarringWrapper::BarringType barringType,
    75         PSetCallBarringWrapper::BarringStatus barringStatus, 
    86         PSetCallBarringWrapper::BarringStatus barringStatus, 
    76         bool plural);
    87         bool plural);
    77     
    88     
       
    89     void barringPasswordChangeRequestCompleted(int result);
       
    90     
    78     void changeBarringStateRequested(int checkState);
    91     void changeBarringStateRequested(int checkState);
       
    92     
       
    93     void changeBarringPasswordRequested(bool checked = false);
    79     
    94     
    80 private: 
    95 private: 
    81     
    96     
    82     CpItemDataHelper &m_helper;
    97     CpItemDataHelper &m_helper;
    83     PSetWrapper *m_pSetWrapper;
    98     QScopedPointer<QTranslator> m_translator;
       
    99     QScopedPointer<PSetWrapper> m_pSetWrapper;
    84     PSetCallBarringWrapper *m_barringWrapper;
   100     PSetCallBarringWrapper *m_barringWrapper;
    85     CpSettingFormItemData *m_allOutgoingBarringItem;
   101     CpSettingFormItemData *m_editBarringPasswordItem;
    86     CpSettingFormItemData *m_outgoingInternationalBarringItem;
       
    87     CpSettingFormItemData *m_outgoingInternationalExceptToHomeCountryBarringItem;
       
    88     CpSettingFormItemData *m_allIncomingBarringItem;
       
    89     CpSettingFormItemData *m_incomingWhenRoamingBarringItem;
       
    90     QQueue<CpSettingFormItemData *> m_barringRequestQueue;
   102     QQueue<CpSettingFormItemData *> m_barringRequestQueue;
    91     bool m_barringStatusRequestOngoing;
   103     bool m_barringStatusRequestOngoing;
    92     int m_activeNoteId;
   104     int m_activeNoteId;
    93     CpPhoneNotes* m_phoneNotes;
   105     CpPhoneNotes* m_phoneNotes;
       
   106     QValidator *m_barringPasswordValidator;
       
   107     bool m_delayedBarringActivationNote;
    94 };
   108 };
    95 
   109 
    96 #endif // CPBARRINGPLUGINGROUP_H
   110 #endif // CPBARRINGPLUGINGROUP_H