1 #ifndef DISPLAYSETTINGS_H_
2 #define DISPLAYSETTINGS_H_
6 //! Domain class. Stores display settings.
8 * Domain class. Stores display settings such as date and time format, number of days shown
14 //! Enumeration of days shown in week calendar.
16 * Enumeration of days shown in week calendar.
20 WeekdaysInSchedule = 5, /*!< Display days from Monday till Friday. */
21 WholeWeekInSchedule = 7 /*!< Display days from Monday till Sunday. */
24 //! Enumeration of used date format.
26 * Enumeration of used date format.
30 LongDateFormat, /*!< Date displayed like "Monday 6 April 2009". */
31 ShortDateFormat /*!< Date displayed like "Mon 6 Apr". */
34 //! Enumeration of used time format.
36 * Enumeration of used time format.
40 TwelveHoursTimeFormat, /*!< Time displayed like "01:34 pm". */
41 TwentyFourHoursTimeFormat /*!< Time displayed like "13:34". */
47 * Constuctor to initialize DisplaySettings instance.
48 * \param aDateFormat DateFormat type variable to eliminate the date format in use.
49 * \param aTimeFormat TimeFormat type variable to eliminate the time in use.
50 * \param aDaysInSchedule Indicates how many days are shown in the schedule.
51 * \param aDayStartsAt Time which the schedule starts with.
52 * \param aDayEndsAt Time which the schedule ends with.
53 * \param aScreensaver Minutes for timer to launch screensaver.
55 DisplaySettings( DateFormat aDateFormat, TimeFormat aTimeFormat, DaysInSchedule aDaysInSchedule, QTime aDayStartsAt, QTime aDayEndsAt, int aScreensaver );
57 virtual ~DisplaySettings();
63 * \return Format string to display date.
69 * \return Format string to display time.
72 //! Gets number of days in week calendar.
74 * Gets number of days in week calendar.
75 * \return Number of days to be shown.
77 DaysInSchedule daysInSchedule();
78 //! Gets first hour to be shown in calendar.
80 * Gets first hour to be shown in calendar.
81 * \return First visible hour in calendar.
84 //! Gets last hour to be shown in calendar.
86 * Gets last hour to be shown in calendar.
87 * \return Last visible hour in calendar.
91 //! Gets minutes to wait before screensaver launches.
93 * Gets minutes to wait before screensaver launches.
94 * \return Waiting time in minutes.
101 * \param aDateFormat Enumeration of date format.
103 void setDateFormat( DateFormat aDateFormat );
104 //! Sets time format.
107 * \param aTimeFormat Enumeration of time format.
109 void setTimeFormat( TimeFormat aTimeFormat );
110 //! Sets number of days in week calendar.
112 * Sets number of days in week calendar.
113 * \param aDaysInSchedule Number of days to be shown.
115 void setDaysInSchedule( DaysInSchedule aDaysInSchedule );
116 //! Sets first hour to be shown in calendar.
118 * Sets first hour to be shown in calendar.
119 * \param aDayStartsAt First visible hour in calendar.
121 void setDayStartsAt( QTime aDayStartsAt );
122 //! Sets last hour to be shown in calendar.
124 * Sets last hour to be shown in calendar.
125 * \param aDayEndsAt Last visible hour in calendar.
127 void setDayEndsAt( QTime aDayEndsAt );
128 //! Sets minutes to wait before screensaver launches.
130 * Sets minutes to wait before screensaver launches.
131 * \param aWaitTime Waiting time as minutes.
133 void setScreensaver( int aWaitTime = 1 );
136 DateFormat iDateFormat;
137 TimeFormat iTimeFormat;
138 DaysInSchedule iDaysInSchedule;
145 #endif /*DISPLAYSETTINGS_H_*/