Merge branch 'master' into master_merge
[qtmeetings] / src / UserInterface / Components / TimeDisplayWidget.h
1 #ifndef TIMEDISPLAYWIDGET_H_\r
2 #define TIMEDISPLAYWIDGET_H_\r
3 \r
4 #include <QWidget>\r
5 #include <QColor>\r
6 #include <QTime>\r
7 \r
8 //! Abstact. UserInterface class. Displays time.\r
9 /*!\r
10  * Abstact. UserInterface class. Offers  basic functionality to display time. Inherited by\r
11  * DigitalTimeDisplayWidget.\r
12  */\r
13 class TimeDisplayWidget : public QWidget\r
14 {\r
15         Q_OBJECT\r
16 \r
17 public:\r
18         //! Constructor.\r
19         /*!\r
20          * Basic constructor of TimeDisplayWidget.\r
21          * \param aNow Current time\r
22          * \param aParent Parent widget\r
23          */\r
24         TimeDisplayWidget( QTime aNow, QWidget *aParent = 0 );\r
25         //! Destructor\r
26         virtual ~TimeDisplayWidget();\r
27 \r
28         //! Returns the current time\r
29         /*!\r
30          * \return Current time stored be the widget\r
31          */\r
32         QTime time();\r
33 \r
34         //! Set background color\r
35         /*!\r
36          * \param aColor Color of widget backgroud\r
37          */\r
38         void setBackgroundColor( QColor aColor );\r
39         //! Set foreground color\r
40         /*!\r
41          * \param aColor Color of widget foregroud (text)\r
42          */\r
43         void setForegroundColor( QColor aColor );\r
44         //! Set frame visibility\r
45         /*!\r
46          * Pure virtual function to set the visibility of the frame\r
47          * \param aVisible True, if frame is drawn, otherwise false.\r
48          */\r
49         virtual void setFrameVisible( bool aVisible ) = 0;\r
50         //! Set size\r
51         /*!\r
52          * Pure virtual function to set the size of widget.\r
53          * \param aWidth\r
54          * \param aHeight\r
55          */\r
56         virtual void setSize( int aWidth, int aHeight ) = 0;\r
57         //! Set Font\r
58         /*!\r
59          * Pure virtual function to set the font.\r
60          * \param aFont\r
61          */\r
62         virtual void setFont( const QFont &aFont ) = 0;\r
63 \r
64 public slots:\r
65         //! Set time.\r
66         /*!\r
67          * Updates the time displayd.\r
68          * \param aNow Current time.\r
69          */\r
70         void setTime( QTime aNow );\r
71 \r
72 protected:\r
73         //! Displays the time.\r
74         /*!\r
75          * Pure virtual function to display time.\r
76          */\r
77         virtual void showTime() = 0;\r
78 \r
79 private:\r
80         //! Stores the time.\r
81         QTime iCurrentTime;\r
82 \r
83 };\r
84 \r
85 #endif /*TIMEDISPLAYWIDGET_H_*/\r