qtmeetings sources to Maemo garage
[qtmeetings] / src / Domain / Configuration / DisplaySettings.h
1 #ifndef DISPLAYSETTINGS_H_
2 #define DISPLAYSETTINGS_H_
3
4 #include <QDateTime>
5
6 //! Domain class. Stores display settings.
7 /*!
8  * Domain class. Stores display settings such as date and time format, number of days shown
9  * in week calendar.
10  */
11 class DisplaySettings
12 {
13 public:
14         //! Enumeration of days shown in week calendar.
15         /*!
16          * Enumeration of days shown in week calendar.
17          */
18         enum DaysInSchedule
19         {
20                 WeekdaysInSchedule = 5,  /*!< Display days from Monday till Friday. */
21                 WholeWeekInSchedule = 7 /*!< Display days from Monday till Sunday. */
22         };
23
24         //! Enumeration of used date format.
25         /*!
26          * Enumeration of used date format.
27          */
28         enum DateFormat
29         {
30                 LongDateFormat, /*!< Date displayed like "Monday 6 April 2009". */
31                 ShortDateFormat /*!< Date displayed like "Mon 6 Apr". */
32         };
33
34         //! Enumeration of used time format.
35         /*!
36          * Enumeration of used time format.
37          */
38         enum TimeFormat
39         {
40                 TwelveHoursTimeFormat, /*!< Time displayed like "01:34 pm". */
41                 TwentyFourHoursTimeFormat /*!< Time displayed like "13:34". */
42         };
43
44 public:
45         //! Constructor
46         /*!
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.
54          */
55         DisplaySettings( DateFormat aDateFormat, TimeFormat aTimeFormat, DaysInSchedule aDaysInSchedule, QTime aDayStartsAt, QTime aDayEndsAt, int aScreensaver );
56         //! Destructor.
57         virtual ~DisplaySettings();
58
59
60         //! Gets date format.
61         /*!
62          * Gets date format.
63          * \return Format string to display date.
64          */
65         QString dateFormat();
66         //! Gets time format.
67         /*!
68          * Gets time format.
69          * \return Format string to display time.
70          */
71         QString timeFormat();
72         //! Gets number of days in week calendar.
73         /*!
74          * Gets number of days in week calendar.
75          * \return Number of days to be shown.
76          */
77         DaysInSchedule daysInSchedule();
78         //! Gets first hour to be shown in calendar.
79         /*!
80          * Gets first hour to be shown in calendar.
81          * \return First visible hour in calendar.
82          */
83         QTime dayStartsAt();
84         //! Gets last hour to be shown in calendar.
85         /*!
86          * Gets last hour to be shown in calendar.
87          * \return Last visible hour in calendar.
88          */
89         QTime dayEndsAt();
90
91         //! Gets minutes to wait before screensaver launches.
92         /*!
93          * Gets minutes to wait before screensaver launches.
94          * \return Waiting time in minutes.
95          */
96         int screensaver();
97
98         //! Sets date format.
99         /*!
100          * Sets date format.
101          * \param aDateFormat Enumeration of date format.
102          */
103         void setDateFormat( DateFormat aDateFormat );
104         //! Sets time format.
105         /*!
106          * Sets time format.
107          * \param aTimeFormat Enumeration of time format.
108          */
109         void setTimeFormat( TimeFormat aTimeFormat );
110         //! Sets number of days in week calendar.
111         /*!
112          * Sets number of days in week calendar.
113          * \param aDaysInSchedule Number of days to be shown.
114          */
115         void setDaysInSchedule( DaysInSchedule aDaysInSchedule );
116         //! Sets first hour to be shown in calendar.
117         /*!
118          * Sets first hour to be shown in calendar.
119          * \param aDayStartsAt First visible hour in calendar.
120          */
121         void setDayStartsAt( QTime aDayStartsAt );
122         //! Sets last hour to be shown in calendar.
123         /*!
124          * Sets last hour to be shown in calendar.
125          * \param aDayEndsAt Last visible hour in calendar.
126          */
127         void setDayEndsAt( QTime aDayEndsAt );
128         //! Sets minutes to wait before screensaver launches.
129         /*!
130          * Sets minutes to wait before screensaver launches.
131          * \param aWaitTime Waiting time as minutes.
132          */
133         void setScreensaver( int aWaitTime = 1 );
134
135 private:
136         DateFormat iDateFormat;
137         TimeFormat iTimeFormat;
138         DaysInSchedule iDaysInSchedule;
139         QTime iDayStartsAt;
140         QTime iDayEndsAt;
141         int iScreensaver;
142
143 };
144
145 #endif /*DISPLAYSETTINGS_H_*/