|
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 * Header file for class ClockRegionalSettingsView. |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef CLOCKREGIONALSETTINGSVIEW_H |
|
20 #define CLOCKREGIONALSETTINGSVIEW_H |
|
21 |
|
22 // System includes |
|
23 #include <QObject> |
|
24 #include <QPointer> |
|
25 #include <QModelIndex> |
|
26 |
|
27 // User includes |
|
28 #include "settingsutility.h" |
|
29 |
|
30 // Forward declarations |
|
31 class HbView; |
|
32 class HbAction; |
|
33 class HbDataForm; |
|
34 class HbDataFormModel; |
|
35 class HbDataFormModelItem; |
|
36 class HbListWidget; |
|
37 class HbComboBox; |
|
38 class QTranslator; |
|
39 class ClockSettingsDocLoader; |
|
40 class SettingsCustomItem; |
|
41 |
|
42 class ClockRegionalSettingsView : public QObject |
|
43 { |
|
44 Q_OBJECT |
|
45 |
|
46 public: |
|
47 ClockRegionalSettingsView(SettingsUtility &utility, QObject *parent = 0); |
|
48 virtual ~ClockRegionalSettingsView(); |
|
49 |
|
50 public: |
|
51 void showView(); |
|
52 |
|
53 private slots: |
|
54 void handleBackAction(); |
|
55 void handleItemDisplayed(const QModelIndex &index); |
|
56 |
|
57 void handleTimeFormatChange(); |
|
58 void handleTimeSeparatorChange(); |
|
59 void handleDateFormatChange(QString); |
|
60 void handleDateSeparatorChange(QString); |
|
61 void handleDataChanged( |
|
62 const QModelIndex& topLeft, const QModelIndex& bottomRight); |
|
63 |
|
64 private: |
|
65 void createModel(); |
|
66 void populateFormModel(); |
|
67 QStringList weekdayList(); |
|
68 |
|
69 private: |
|
70 QStringList mTimeFormatStringList; |
|
71 QStringList mTimeSeparatorStringList; |
|
72 QStringList mDateFormatStringList; |
|
73 QStringList mDateSeparatorStringList; |
|
74 |
|
75 HbView *mView; |
|
76 HbAction *mBackAction; |
|
77 |
|
78 QPointer<HbDataForm> mForm; |
|
79 QPointer<HbDataFormModel> mFormModel; |
|
80 |
|
81 HbDataFormModelItem *mTimeFormatItem; |
|
82 HbDataFormModelItem *mTimeSeparatorItem; |
|
83 HbDataFormModelItem *mDateFormatItem; |
|
84 HbDataFormModelItem *mDateSeparatorItem; |
|
85 QPointer<HbComboBox> mStartOfWeekItem; |
|
86 QPointer<HbListWidget> mWorkdaysItem; |
|
87 |
|
88 ClockSettingsDocLoader *mLoader; |
|
89 SettingsUtility &mSettingsUtility; |
|
90 SettingsCustomItem *mCustomPrototype; |
|
91 QTranslator *mTranslator; |
|
92 }; |
|
93 |
|
94 #endif // CLOCKREGIONALSETTINGSVIEW_H |
|
95 |
|
96 // End of file --Don't remove this. |