|
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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CALENSETTINGS_H |
|
19 #define CALENSETTINGS_H |
|
20 |
|
21 #include <QObject> |
|
22 #include <QHash> |
|
23 |
|
24 class QPersistentModelIndex; |
|
25 class QModelIndex; |
|
26 class HbDataForm; |
|
27 class HbDataFormModel; |
|
28 class HbDataFormModelItem; |
|
29 class HbComboBox; |
|
30 class HbPushButton; |
|
31 class HbAbstractButton; |
|
32 class HbLineEdit; |
|
33 class XQSettingsManager; |
|
34 class XQSettingsKey; |
|
35 class MCalenServices; |
|
36 |
|
37 |
|
38 #ifdef CALENSETTINGS_DLL |
|
39 #define CALENSETTINGS_EXPORT Q_DECL_EXPORT |
|
40 #else |
|
41 #define CALENSETTINGS_EXPORT Q_DECL_IMPORT |
|
42 #endif |
|
43 |
|
44 class CALENSETTINGS_EXPORT CalenSettings : public QObject |
|
45 { |
|
46 Q_OBJECT |
|
47 |
|
48 public: |
|
49 CalenSettings(MCalenServices& services, HbDataForm *form, QObject *parent = 0); |
|
50 ~CalenSettings(); |
|
51 |
|
52 void createModel(); |
|
53 void populateSettingList(); |
|
54 void addWeekNumberItem(); |
|
55 bool isPluginEnabled(); |
|
56 |
|
57 private: |
|
58 void updateShowWeekItem(); |
|
59 void addRegionalInfoItem(); |
|
60 void removeRegionalInfoItem(); |
|
61 void populateRegionalInfo(); |
|
62 |
|
63 public slots: |
|
64 void handleAlarmSnoozeTimeChange(int index); |
|
65 void handleWeekNumberChange(); |
|
66 void handleRegionalInfoChange(); |
|
67 //set the start day of the week to the locale |
|
68 void setStartDayOfWeek(const int index); |
|
69 |
|
70 private: |
|
71 MCalenServices &mServices; |
|
72 HbDataForm *mSettingsForm; |
|
73 HbDataFormModel *mSettingsModel; |
|
74 HbDataFormModelItem *mAlarmSnoozeTimeItem; |
|
75 HbDataFormModelItem* mShowWeekNumberItem; |
|
76 HbDataFormModelItem* mShowRegionalInfoItem; |
|
77 HbDataFormModelItem* mShowWeekStartOnInfoItem; |
|
78 HbComboBox* mStartOfWeekItem; |
|
79 QHash<int, int> mAlarmSnoozeTimeHash; |
|
80 XQSettingsManager *mSettingsManager; |
|
81 XQSettingsKey *mAlarmSnoozeCenrepKey; |
|
82 XQSettingsKey *mWeekNumberCenrepKey; |
|
83 XQSettingsKey *mShowRegionalInfoKey; |
|
84 int mStartOfWeek; |
|
85 bool mWeekNumberItemAdded; |
|
86 bool mRegionalpluginActive; |
|
87 }; |
|
88 |
|
89 #endif // CALENSETTINGS_H |
|
90 |
|
91 // End of file |