23 #include <hstest_global.h> |
23 #include <hstest_global.h> |
24 |
24 |
25 HOMESCREEN_TEST_CLASS(TestClockWidget) |
25 HOMESCREEN_TEST_CLASS(TestClockWidget) |
26 |
26 |
27 class CEnvironmentChangeNotifier; |
27 class CEnvironmentChangeNotifier; |
|
28 class XQSettingsManager; |
|
29 class XQSettingsKey; |
|
30 |
28 class HsClockSettingsNotifier : public QObject |
31 class HsClockSettingsNotifier : public QObject |
29 { |
32 { |
30 Q_OBJECT |
33 Q_OBJECT |
31 |
34 |
32 public: |
35 public: |
33 |
36 |
34 HsClockSettingsNotifier(QObject *parent = 0); |
37 HsClockSettingsNotifier(QObject *parent = 0); |
35 ~HsClockSettingsNotifier(); |
38 ~HsClockSettingsNotifier(); |
36 |
39 |
37 QString clockFormat() const; |
40 QString clockType() const; |
38 QString timeFormat() const; |
41 QString timeFormat() const; |
39 |
42 |
40 static TInt EnvironmentChanged( TAny *aObj ); |
43 static TInt EnvironmentChanged( TAny *aObj ); |
41 |
44 |
42 signals: |
45 signals: |
43 void settingsChanged(QString clockFormat, QString timeFormat); |
46 void settingsChanged(QString clockType, QString timeFormat); |
44 |
47 |
45 private: |
48 private: |
46 void createObserver(); |
49 void createSystemChangeObserver(); |
47 QString clockFormatString()const; |
50 QString clockTypeString()const; |
48 QString timeFormatString()const; |
51 QString timeFormatString()const; |
49 |
52 |
50 private slots: |
53 private slots: |
|
54 void onClockTypeChanged( const XQSettingsKey& key, const QVariant& value ); |
51 void onSettingsChanged(); |
55 void onSettingsChanged(); |
52 |
56 |
53 private: |
57 private: |
54 CEnvironmentChangeNotifier *mDateTimeNotifier; |
58 CEnvironmentChangeNotifier *mDateTimeNotifier; |
|
59 XQSettingsManager *mSettingsManager; |
|
60 XQSettingsKey *mClockTypeSettingsKey; |
55 |
61 |
56 QString mClockFormat; |
62 QString mClockType; |
57 QString mTimeFormat; |
63 QString mTimeFormat; |
58 |
64 |
59 Q_DISABLE_COPY(HsClockSettingsNotifier) |
65 Q_DISABLE_COPY(HsClockSettingsNotifier) |
60 |
66 |
61 HOMESCREEN_TEST_FRIEND_CLASS(TestClockWidget) |
67 HOMESCREEN_TEST_FRIEND_CLASS(TestClockWidget) |