41 class CmApplSettingsUi; |
41 class CmApplSettingsUi; |
42 |
42 |
43 |
43 |
44 // Constant for User Defined sync profile (EmailProfileOffsetUD) |
44 // Constant for User Defined sync profile (EmailProfileOffsetUD) |
45 // \sa ipssettingkeys.h - Currently used sync profile |
45 // \sa ipssettingkeys.h - Currently used sync profile |
46 const int NmIpsSettingsReceivingScheduleUserDefinedProfile = 3; |
46 const int NmIpsSettingsReceivingScheduleUserDefinedProfile(3); |
47 |
47 |
48 class NmIpsSettingsHelper : public QObject |
48 class NmIpsSettingsHelper : public QObject |
49 { |
49 { |
50 Q_OBJECT |
50 Q_OBJECT |
51 |
51 |
61 bool isOffline(); |
61 bool isOffline(); |
62 |
62 |
63 void setReceivingScheduleGroupItem(HbDataFormModelItem *item); |
63 void setReceivingScheduleGroupItem(HbDataFormModelItem *item); |
64 void setServerInfoGroupItem(HbDataFormModelItem *item); |
64 void setServerInfoGroupItem(HbDataFormModelItem *item); |
65 void createOrUpdateReceivingScheduleGroupDynamicItem(IpsServices::SettingItem item); |
65 void createOrUpdateReceivingScheduleGroupDynamicItem(IpsServices::SettingItem item); |
66 void createServerInfoGroupDynamicItems(); |
66 void createServerInfoGroupDynamicItems(bool hiddenItem); |
67 |
67 |
68 int getCorrectPortRadioButtonIndex(int currentPort); |
68 int getCorrectIncomingPortRadioButtonIndex(); |
69 int getCorrectSecureRadioButtonIndex(QVariant secureSockets, QVariant secureSSLWrapper); |
69 int getCorrectIncomingSecureRadioButtonIndex(); |
70 int getCorrectInboxPathRadioButtonIndex(QVariant folderPath); |
70 int getCorrectOutgoingSecureRadioButtonIndex(); |
71 int getCorrectOutgoingPortRadioButtonIndex(int currentPort); |
71 int getCorrectFolderPathRadioButtonIndex(); |
|
72 int getCorrectOutgoingPortRadioButtonIndex(); |
72 int getCorrectOutgoingAuthenticationRadioButtonIndex(); |
73 int getCorrectOutgoingAuthenticationRadioButtonIndex(); |
73 void handleReceivingScheduleSettingChange(IpsServices::SettingItem settingItem, |
74 void handleReceivingScheduleSettingChange(IpsServices::SettingItem settingItem, |
74 const QVariant &settingValue); |
75 const QVariant &settingValue); |
75 QString destinationNameFromIdentifier(uint identifier); |
76 QString destinationNameFromIdentifier(uint identifier); |
76 |
77 |
101 void receivingScheduleChange(int index); |
102 void receivingScheduleChange(int index); |
102 void saveIncomingMailServer(); |
103 void saveIncomingMailServer(); |
103 void incomingMailServerTextChange(const QString &text); |
104 void incomingMailServerTextChange(const QString &text); |
104 void saveOutgoingMailServer(); |
105 void saveOutgoingMailServer(); |
105 void outgoingMailServerTextChange(const QString &text); |
106 void outgoingMailServerTextChange(const QString &text); |
|
107 void handleModelDataChange(QModelIndex startIn, QModelIndex endIn); |
106 void incomingPortChange(int index); |
108 void incomingPortChange(int index); |
107 void incomingPortPress(const QModelIndex &index); |
|
108 void incomingSecureConnectionItemChange(int index); |
109 void incomingSecureConnectionItemChange(int index); |
109 void incomingSecureConnectionPress(const QModelIndex &index); |
|
110 void folderPathChange(int index); |
110 void folderPathChange(int index); |
111 void folderPathPress(const QModelIndex &index); |
|
112 void outgoingPortChange(int index); |
111 void outgoingPortChange(int index); |
113 void outgoingPortPress(const QModelIndex &index); |
|
114 void outgoingSecureConnectionItemChange(int index); |
112 void outgoingSecureConnectionItemChange(int index); |
115 void outgoingSecureConnectionPress(const QModelIndex &index); |
|
116 void outgoingAuthenticationChange(int index); |
113 void outgoingAuthenticationChange(int index); |
117 void outgoingAuthenticationPress(const QModelIndex &index); |
|
118 void connectionButtonPress(); |
114 void connectionButtonPress(); |
119 |
115 |
120 private slots: |
116 private slots: |
121 |
117 |
122 void receivingWeekdaysModified(); |
118 void receivingWeekdaysModified(); |
130 void handleUserDefinedOutgoingPortInput(HbAction *action); |
126 void handleUserDefinedOutgoingPortInput(HbAction *action); |
131 void handleConnectionSelected(uint status); |
127 void handleConnectionSelected(uint status); |
132 |
128 |
133 private: |
129 private: |
134 |
130 |
|
131 enum AppLibUpdateOperation |
|
132 { |
|
133 UnregisterMailbox, |
|
134 UpdateMailboxName |
|
135 }; |
|
136 |
135 void updateShowMailInMailbox(); |
137 void updateShowMailInMailbox(); |
136 void deleteReceivingScheduleGroupDynamicItem(IpsServices::SettingItem item); |
138 void deleteReceivingScheduleGroupDynamicItem(IpsServices::SettingItem item); |
137 void deleteServerInfoGroupDynamicItems(); |
139 void deleteServerInfoGroupDynamicItems(); |
138 void showIncomingPortInputDialog(); |
140 void showIncomingPortInputDialog(); |
139 void showFolderPathInputDialog(); |
141 void showFolderPathInputDialog(); |
140 void showOutgoingPortInputDialog(); |
142 void showOutgoingPortInputDialog(); |
141 void copyReceivingScheduleSettingsFromActiveProfile(int profileMode); |
143 void copyReceivingScheduleSettingsFromActiveProfile(int profileMode); |
|
144 void updateAppLib(AppLibUpdateOperation op, QString mailboxName = QString()); |
|
145 void noReceptionWeekdaysSelected(); |
142 |
146 |
143 Q_DISABLE_COPY(NmIpsSettingsHelper) |
147 Q_DISABLE_COPY(NmIpsSettingsHelper) |
144 |
148 |
145 private: // data |
149 private: // data |
146 |
150 |
159 HbInputDialog *mFolderPathInputDialog; // Owned. |
163 HbInputDialog *mFolderPathInputDialog; // Owned. |
160 HbInputDialog *mOutgoingPortInputDialog; // Owned. |
164 HbInputDialog *mOutgoingPortInputDialog; // Owned. |
161 HbValidator *mOutgoingPortInputValidator; // Owned. |
165 HbValidator *mOutgoingPortInputValidator; // Owned. |
162 CmApplSettingsUi *mDestinationDialog; // Owned. |
166 CmApplSettingsUi *mDestinationDialog; // Owned. |
163 bool mServerInfoDynamicItemsVisible; |
167 bool mServerInfoDynamicItemsVisible; |
164 int mRadioButtonPreviousIndex; |
168 bool mAbortDynamicRSItemHandling; |
165 }; |
169 }; |
166 |
170 |
167 #endif // NMIPSSETTINGSHELPER_H |
171 #endif // NMIPSSETTINGSHELPER_H |