1 #ifndef WINDOWMANAGER_H_
\r
2 #define WINDOWMANAGER_H_
\r
7 // Forward declarations
\r
14 //! UserInterface class. Manages displayed views.
\r
16 * UserInterface class. WindowManager class is responsible for displaying views that inherit the
\r
17 * ViewBase class. It also handles dialog showing. Depending on the views type the WindowManager
\r
18 * can track the views events and restore previous view if the current on is ObservedView. This
\r
19 * is a handy mechanism for screensaver etc.
\r
21 class WindowManager : public QWidget
\r
28 * Constructor of WindowManager.
\r
30 WindowManager( QWidget *aParent = 0 );
\r
32 virtual ~WindowManager();
\r
34 virtual bool event(QEvent *event);
\r
37 //! Request current status of the room.
\r
39 * Signal is emitted when there is need to check current status of room aRoom.
\r
40 * \param aRoom Meetingroom which status is requested.
\r
42 void eventDetected();
\r
44 //! The view size is changed.
\r
46 * This signal is emitted when the window managers view changes,
\r
47 * i.e. it received resized QEvent.
\r
48 * \param The new view size.
\r
50 void viewResized(const QSize &);
\r
52 //! Previous view is restored.
\r
54 * This signal is emitted when previously stored view is
\r
55 * restored. This happens when view with type ViewMode::ObservedView
\r
56 * is shown and it receives an event that initiates the view
\r
59 void previousViewRestored();
\r
61 void dialogActivated();
\r
62 void dialogDeactivated();
\r
67 * Show view that inherits ViewBase class. If the views parent is not
\r
68 * the WindowManager it will changed within this method. Depeding on the
\r
69 * views type the currently active view might be stored and restored
\r
70 * when specific event occurs in the view to be displayed.
\r
72 void showView( ViewBase *view );
\r
74 //! Shows modal dialog.
\r
76 * Shows modal dialog. Emits dialogActivated() signal prior calling
\r
77 * QDialog's exec() method and emits dialogDeactivated signal when
\r
78 * the exec() method returns.
\r
80 void showDialog( QDialog *dialog );
\r
82 //! View event is detected.
\r
84 * WindowManager connects this slot to ViewBase classes eventDetected()
\r
85 * signal and either emits eventDetected() signal if the current views
\r
86 * type is ViewMode::NormalView or restores possible previous view
\r
87 * if the current views type is ViewMode::ObservedView.
\r
89 void viewEventDetected();
\r
91 void setFullscreen();
\r
93 void error( const QString &aErrorMessage );
\r
96 //! Name of the application.
\r
97 QString iApplicationName;
\r
99 //! Currently active view.
\r
100 ViewBase *iCurrentView;
\r
102 //! Stack of views previously displayed.
\r
103 QStack<ViewBase *> iViewList;
\r
107 #endif /*WINDOWMANAGER_H_*/
\r