equal
deleted
inserted
replaced
34 class HbDataFormModel; |
34 class HbDataFormModel; |
35 class HbDataFormModelItem; |
35 class HbDataFormModelItem; |
36 class HbAction; |
36 class HbAction; |
37 class HbDateTimePicker; |
37 class HbDateTimePicker; |
38 class HbDialog; |
38 class HbDialog; |
|
39 class HbTranslator; |
39 class XQSettingsManager; |
40 class XQSettingsManager; |
40 class XQSettingsKey; |
41 class XQSettingsKey; |
41 class AlarmClient; |
42 class AlarmClient; |
42 class TimezoneClient; |
43 class TimezoneClient; |
43 class ClockAlarmCustomItem; |
44 class ClockAlarmCustomItem; |
44 class QTranslator; |
|
45 |
45 |
46 class ClockAlarmEditor : public HbView |
46 |
|
47 class ClockAlarmEditor : public QObject |
47 { |
48 { |
48 Q_OBJECT |
49 Q_OBJECT |
49 |
50 |
50 public: |
51 public: |
51 CLOCKALARMEDITOR_EXPORT ClockAlarmEditor( |
52 CLOCKALARMEDITOR_EXPORT ClockAlarmEditor( |
52 int alarmId = 0, QGraphicsWidget *parent = 0); |
53 AlarmClient& alarmClient, |
|
54 int alarmId = 0, |
|
55 QObject *parent = 0); |
53 CLOCKALARMEDITOR_EXPORT virtual ~ClockAlarmEditor(); |
56 CLOCKALARMEDITOR_EXPORT virtual ~ClockAlarmEditor(); |
54 |
57 |
55 public: |
58 public: |
56 CLOCKALARMEDITOR_EXPORT void showAlarmEditor(); |
59 CLOCKALARMEDITOR_EXPORT void showAlarmEditor(); |
57 |
60 |
59 void handleDoneAction(); |
62 void handleDoneAction(); |
60 void handleDeleteAction(); |
63 void handleDeleteAction(); |
61 void handleDiscardAction(); |
64 void handleDiscardAction(); |
62 void handleTimeChange(const QString &text); |
65 void handleTimeChange(const QString &text); |
63 void handleOccurenceChanged(int index); |
66 void handleOccurenceChanged(int index); |
64 void handleCancelAction(); |
|
65 void handleOkAction(); |
67 void handleOkAction(); |
66 void launchTimePicker(); |
68 void launchTimePicker(); |
67 void handleAlarmSoundChanged(); |
69 void handleAlarmSoundChanged(int checkedState); |
|
70 void selectedAction(HbAction *action); |
68 |
71 |
69 signals: |
72 signals: |
70 void alarmSet(); |
73 void alarmSet(); |
71 |
74 |
72 private: |
75 private: |
73 void initModel(); |
76 void initModel(); |
74 void populateModelItems(); |
77 void populateModelItems(); |
75 void initAlarmInfo(); |
78 void initAlarmInfo(); |
76 void createMenu(); |
|
77 void createToolbar(); |
79 void createToolbar(); |
78 void setAlarm( |
80 void setAlarm( |
79 QString timeInfo, QString descInfo, int repeatType, |
81 QString timeInfo, QString descInfo, int repeatType, |
80 int alarmDayIndex); |
82 int alarmDayIndex); |
81 QTime getPreviousAlarmTime(); |
83 QTime getPreviousAlarmTime(); |
83 void closeAlarmEditor(); |
85 void closeAlarmEditor(); |
84 void displayDSTRollOverNote(AlarmInfo& alarmInfo); |
86 void displayDSTRollOverNote(AlarmInfo& alarmInfo); |
85 void displayRemainingTimeNote(AlarmInfo& alarmInfo); |
87 void displayRemainingTimeNote(AlarmInfo& alarmInfo); |
86 void getDayText(int alarmDay,QString& dayText); |
88 void getDayText(int alarmDay,QString& dayText); |
87 int getRemainingSeconds(QDateTime& alarmDateTime); |
89 int getRemainingSeconds(QDateTime& alarmDateTime); |
|
90 void launchDialog(QString title, QString text = 0); |
|
91 void sortAlarmDaysList(QStringList& alarmDays); |
88 |
92 |
89 private: |
93 private: |
90 int mAlarmId; |
94 int mAlarmId; |
|
95 int mStartOfWeek; |
91 bool mAlarmDayItemInserted; |
96 bool mAlarmDayItemInserted; |
92 QString mTimeFormat; |
97 QString mTimeFormat; |
93 |
98 |
94 HbDataForm *mAlarmEditorForm; |
99 HbDataForm *mAlarmEditorForm; |
95 HbDataFormModel *mAlarmEditorModel; |
100 HbDataFormModel *mAlarmEditorModel; |
97 HbDataFormModelItem *mAlarmOccurenceItem; |
102 HbDataFormModelItem *mAlarmOccurenceItem; |
98 HbDataFormModelItem *mAlarmDayItem; |
103 HbDataFormModelItem *mAlarmDayItem; |
99 HbDataFormModelItem *mAlarmSoundItem; |
104 HbDataFormModelItem *mAlarmSoundItem; |
100 HbDataFormModelItem *mAlarmDescription; |
105 HbDataFormModelItem *mAlarmDescription; |
101 |
106 |
102 HbView *mPreviousView; |
107 HbView *mAlarmEditorView; |
103 HbAction *mDiscardAction; |
108 HbAction *mDiscardAction; |
104 HbAction *mDeleteAction; |
109 HbAction *mDeleteAction; |
105 HbAction *mDoneAction; |
110 HbAction *mDoneAction; |
106 HbAction *mOkAction; |
111 HbAction *mOkAction; |
107 HbAction *mCancelAction; |
112 HbAction *mCancelAction; |
109 QPointer<HbDialog> mTimePickerDialog; |
114 QPointer<HbDialog> mTimePickerDialog; |
110 |
115 |
111 XQSettingsManager *mSettingsManager; |
116 XQSettingsManager *mSettingsManager; |
112 XQSettingsKey *mPreviosAlarmTime; |
117 XQSettingsKey *mPreviosAlarmTime; |
113 |
118 |
114 AlarmClient *mAlarmClient; |
119 AlarmClient &mAlarmClient; |
115 AlarmInfo mAlarmInfo; |
120 AlarmInfo mAlarmInfo; |
116 TimezoneClient *mTimezoneClient; |
121 TimezoneClient *mTimezoneClient; |
117 QTranslator *mTranslator; |
122 HbTranslator *mTranslator; |
118 }; |
123 }; |
119 |
124 |
120 #endif // CLOCKALARMEDITOR_H |
125 #endif // CLOCKALARMEDITOR_H |
121 |
126 |
122 // End of file --Don't remove this. |
127 // End of file --Don't remove this. |