1 #ifndef WINDOWMANAGER_H_
\r
2 #define WINDOWMANAGER_H_
\r
7 // Forward declarations
\r
13 //! UserInterface class. Manages displayed views.
\r
15 * UserInterface class. WindowManager class is responsible for displaying views that inherit the
\r
16 * ViewBase class. It also handles dialog showing. Depending on the views type the WindowManager
\r
17 * can track the views events and restore previous view if the current on is ObservedView. This
\r
18 * is a handy mechanism for screensaver etc.
\r
20 class WindowManager : public QWidget
\r
27 * Constructor of WindowManager.
\r
29 WindowManager( QWidget *aParent = 0 );
\r
31 virtual ~WindowManager();
\r
33 virtual bool event(QEvent *event);
\r
36 //! Request current status of the room.
\r
38 * Signal is emitted when there is need to check current status of room aRoom.
\r
39 * \param aRoom Meetingroom which status is requested.
\r
41 void eventDetected();
\r
43 //! The view size is changed.
\r
45 * This signal is emitted when the window managers view changes,
\r
46 * i.e. it received resized QEvent.
\r
47 * \param The new view size.
\r
49 void viewResized(const QSize &);
\r
51 //! Previous view is restored.
\r
53 * This signal is emitted when previously stored view is
\r
54 * restored. This happens when view with type ViewMode::ObservedView
\r
55 * is shown and it receives an event that initiates the view
\r
58 void previousViewRestored();
\r
60 void dialogActivated();
\r
61 void dialogDeactivated();
\r
66 * Show view that inherits ViewBase class. If the views parent is not
\r
67 * the WindowManager it will changed within this method. Depeding on the
\r
68 * views type the currently active view might be stored and restored
\r
69 * when specific event occurs in the view to be displayed.
\r
71 void showView( ViewBase *view );
\r
73 //! Shows modal dialog.
\r
75 * Shows modal dialog. Emits dialogActivated() signal prior calling
\r
76 * QDialog's exec() method and emits dialogDeactivated signal when
\r
77 * the exec() method returns.
\r
79 void showDialog( QDialog *dialog );
\r
81 //! View event is detected.
\r
83 * WindowManager connects this slot to ViewBase classes eventDetected()
\r
84 * signal and either emits eventDetected() signal if the current views
\r
85 * type is ViewMode::NormalView or restores possible previous view
\r
86 * if the current views type is ViewMode::ObservedView.
\r
88 void viewEventDetected();
\r
90 void setFullscreen();
\r
93 //! Name of the application.
\r
94 QString iApplicationName;
\r
96 //! Currently active view.
\r
97 ViewBase *iCurrentView;
\r
99 //! Stack of views previously displayed.
\r
100 QStack<ViewBase *> iViewList;
\r
104 #endif /*WINDOWMANAGER_H_*/
\r