1 #ifndef TIMEDISPLAYWIDGET_H_
\r
2 #define TIMEDISPLAYWIDGET_H_
\r
4 #include "ObservedWidget.h"
\r
9 //! Abstact. UserInterface class. Displays time.
\r
11 * Abstact. UserInterface class. Offers basic functionality to display time. Inherited by
\r
12 * DigitalTimeDisplayWidget.
\r
14 class TimeDisplayWidget : public ObservedWidget
\r
21 * Basic constructor of TimeDisplayWidget.
\r
22 * \param aNow Current time
\r
23 * \param aParent Parent widget
\r
25 TimeDisplayWidget( QTime aNow, QWidget *aParent = 0 );
\r
27 virtual ~TimeDisplayWidget();
\r
29 //! Returns the current time
\r
31 * \return Current time stored be the widget
\r
35 //! Set background color
\r
37 * \param aColor Color of widget backgroud
\r
39 void setBackgroundColor( QColor aColor );
\r
40 //! Set foreground color
\r
42 * \param aColor Color of widget foregroud (text)
\r
44 void setForegroundColor( QColor aColor );
\r
45 //! Set frame visibility
\r
47 * Pure virtual function to set the visibility of the frame
\r
48 * \param aVisible True, if frame is drawn, otherwise false.
\r
50 virtual void setFrameVisible( bool aVisible ) = 0;
\r
53 * Pure virtual function to set the size of widget.
\r
57 virtual void setSize( int aWidth, int aHeight ) = 0;
\r
60 * Pure virtual function to set the font.
\r
63 virtual void setFont( const QFont &aFont ) = 0;
\r
68 * Updates the time displayd.
\r
69 * \param aNow Current time.
\r
71 void setTime( QTime aNow );
\r
74 //! Displays the time.
\r
76 * Pure virtual function to display time.
\r
78 virtual void showTime() = 0;
\r
81 //! Stores the time.
\r
86 #endif /*TIMEDISPLAYWIDGET_H_*/
\r