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 //! Shows any view specific indicators for connection error
38 void connectionLost();
40 //! Removes any view specific indicators for connection error
41 void connectionEstablished();
44 //! Request current status of the room.
46 * Signal is emitted when there is need to check current status of room aRoom.
47 * \param aRoom Meetingroom which status is requested.
51 //! The view size is changed.
53 * This signal is emitted when the window managers view changes,
54 * i.e. it received resized QEvent.
55 * \param The new view size.
57 void viewResized(const QSize &newSize, const QSize &oldSize);
59 //! Previous view is restored.
61 * This signal is emitted when previously stored view is
62 * restored. This happens when view with type ViewMode::ObservedView
63 * is shown and it receives an event that initiates the view
66 void previousViewRestored();
68 void dialogActivated();
69 void dialogDeactivated();
74 * Show view that inherits ViewBase class. If the views parent is not
75 * the WindowManager it will changed within this method. Depeding on the
76 * views type the currently active view might be stored and restored
77 * when specific event occurs in the view to be displayed.
79 void showView( ViewBase *view );
81 //! Shows modal dialog.
83 * Shows modal dialog. Emits dialogActivated() signal prior calling
84 * QDialog's exec() method and emits dialogDeactivated signal when
85 * the exec() method returns.
87 void showDialog( QDialog *aDialog, bool blocking = true, bool aSendSignal = true );
89 //! View event is detected.
91 * WindowManager connects this slot to ViewBase classes eventDetected()
92 * signal and either emits eventDetected() signal if the current views
93 * type is ViewMode::NormalView or restores possible previous view
94 * if the current views type is ViewMode::ObservedView.
96 void viewEventDetected();
100 void error( const QString &aErrorMessage );
103 //! Name of the application.
104 QString iApplicationName;
106 //! Currently active view.
107 ViewBase *iCurrentView;
109 //! Stack of views previously displayed.
110 QStack<ViewBase *> iViewList;
114 #endif /*WINDOWMANAGER_H_*/