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