calendarui/caleneditor/inc/caleneditor_p.h
changeset 75 7ac58b2aae6f
parent 70 a5ed90760192
child 83 5aadd1120515
equal deleted inserted replaced
72:27feeedec790 75:7ac58b2aae6f
    26 #include <QDateTime>
    26 #include <QDateTime>
    27 
    27 
    28 //user includes
    28 //user includes
    29 #include <AgendaEntry>
    29 #include <AgendaEntry>
    30 #include <caleneditor.h>
    30 #include <caleneditor.h>
       
    31 #include "calennotificationhandler.h"
    31 
    32 
    32 #include "caleneditorcommon.h"
    33 #include "caleneditorcommon.h"
    33 
    34 
    34 //forward declarations
    35 //forward declarations
    35 class QFile;
    36 class QFile;
    50 class CalenEditorDocLoader;
    51 class CalenEditorDocLoader;
    51 class CalenEditorCustomItem;
    52 class CalenEditorCustomItem;
    52 class CalenEditorReminderField;
    53 class CalenEditorReminderField;
    53 class CalenEditorRepeatField;
    54 class CalenEditorRepeatField;
    54 class CalenEditorDataHandler;
    55 class CalenEditorDataHandler;
       
    56 class CEnvironmentChangeNotifier;		// Receive system event notifications
    55 
    57 
    56 // Constants
    58 // Constants
    57 const int KNoOfDaysInWeek = 7;
    59 const int KNoOfDaysInWeek = 7;
    58 
    60 
    59 class CalenEditorPrivate : public QObject
    61 class CalenEditorPrivate : public QObject
   114 	void setCurrentIndexOfReminderField(int index);
   116 	void setCurrentIndexOfReminderField(int index);
   115 	int getReminderCount();
   117 	int getReminderCount();
   116 	bool isEditRangeThisOnly();
   118 	bool isEditRangeThisOnly();
   117 	bool isAllDayFieldAdded();
   119 	bool isAllDayFieldAdded();
   118 	void forcedSaveEntry();
   120 	void forcedSaveEntry();
       
   121 
       
   122 	/**
       
   123 	 * Called from CEnvironmentChangeNotifier when the
       
   124 	 * system environment changes
       
   125 	 * @param aThisPtr self pointer
       
   126 	 * @return EFalse
       
   127 	 */
       
   128 	static TInt EnvChangeCallbackL( TAny* aThisPtr );
       
   129 	TInt DoEnvChange();
       
   130 	
   119 private:
   131 private:
   120 	void edit(const QFile &handle, bool launchCalendar);
   132 	void edit(const QFile &handle, bool launchCalendar);
   121 	void edit(AgendaEntry entry, bool launchCalendar);
   133 	void edit(AgendaEntry entry, bool launchCalendar);
   122 	void edit(ulong id, bool launchCalendar);
   134 	void edit(ulong id, bool launchCalendar);
   123 	void create(CalenEditor::CreateType type, QDateTime newEntryDateTime, 
   135 	void create(CalenEditor::CreateType type, QDateTime newEntryDateTime, 
   155 	void deleteEntry(bool close = false);
   167 	void deleteEntry(bool close = false);
   156 	bool handleAllDayToSave();
   168 	bool handleAllDayToSave();
   157 	void enableFromTotimeFileds(bool, QDateTime, QDateTime);
   169 	void enableFromTotimeFileds(bool, QDateTime, QDateTime);
   158 	QDateTime defaultTimeSameDay( );
   170 	QDateTime defaultTimeSameDay( );
   159 	void refreshTimeForUncheckAllDay();
   171 	void refreshTimeForUncheckAllDay();
       
   172 	void launchDialog(QString title);
   160 	
   173 	
   161 private slots:
   174 private slots:
   162 	void handleSubjectChange(const QString subject);
   175 	void handleSubjectChange(const QString subject);
   163 	void handleAllDayChange(int state);
   176 	void handleAllDayChange(int state);
   164 	void saveFromDateTime(QDateTime& fromDateTime);
   177 	void saveFromDateTime(QDateTime& fromDateTime);
   227 	bool mIsChild;
   240 	bool mIsChild;
   228 	bool mIsAllDayItemAdded;
   241 	bool mIsAllDayItemAdded;
   229 	bool mOwnsAgendaUtil;
   242 	bool mOwnsAgendaUtil;
   230 	bool mLaunchCalendar;
   243 	bool mLaunchCalendar;
   231 	bool mMenuItemAdded;
   244 	bool mMenuItemAdded;
   232 	
   245 
       
   246 	// Notifications about locale and time changes
       
   247 	CEnvironmentChangeNotifier* iEnvChangeNotifier;
       
   248 	bool iIgnoreFirstLocaleChange;
   233 private:
   249 private:
   234 	friend class CalenEditor;
   250 	friend class CalenEditor;
   235 #ifdef TESTCALENEDITOR
   251 #ifdef TESTCALENEDITOR
   236 	friend class TestCalenEditor;
   252 	friend class TestCalenEditor;
   237 #endif
   253 #endif