Merge branch 'master' of https://git.maemo.org/projects/qtmeetings
[qtmeetings] / src / UserInterface / WindowManager.h
index 2f46050..aa736cf 100644 (file)
-#ifndef WINDOWMANAGER_H_\r
-#define WINDOWMANAGER_H_\r
-\r
-#include <QWidget>\r
-#include <QStack>\r
-\r
-// Forward declarations\r
-class ViewBase;\r
-class QEvent;\r
-class QSize;\r
-class QDialog;\r
-class QString;\r
-\r
-//! UserInterface class. Manages displayed views.\r
-/*!\r
- * UserInterface class. WindowManager class is responsible for displaying views that inherit the\r
- * ViewBase class. It also handles dialog showing. Depending on the views type the WindowManager\r
- * can track the views events and restore previous view if the current on is ObservedView. This\r
- * is a handy mechanism for screensaver etc.\r
- */\r
-class WindowManager : public QWidget\r
-{\r
-       Q_OBJECT\r
-\r
-public:\r
-       //! Constructor.\r
-       /*!\r
-        * Constructor of WindowManager.\r
-        */\r
-       WindowManager( QWidget *aParent = 0 );\r
-       //! Destructor.\r
-       virtual ~WindowManager();\r
-       \r
-       virtual bool event(QEvent *event);\r
-\r
-signals:\r
-       //! Request current status of the room.\r
-       /*!\r
-        * Signal is emitted when there is need to check current status of room aRoom.\r
-        * \param aRoom Meetingroom which status is requested.\r
-        */\r
-       void eventDetected();\r
-       \r
-       //! The view size is changed.\r
-       /*!\r
-        * This signal is emitted when the window managers view changes,\r
-        * i.e. it received resized QEvent.\r
-        * \param The new view size.\r
-        */\r
-       void viewResized(const QSize &newSize, const QSize &oldSize);\r
-       \r
-       //! Previous view is restored.\r
-       /*!\r
-        * This signal is emitted when previously stored view is\r
-        * restored. This happens when view with type ViewMode::ObservedView\r
-        * is shown and it receives an event that initiates the view\r
-        * restoring chain.\r
-        */\r
-       void previousViewRestored();\r
-       \r
-       void dialogActivated();\r
-       void dialogDeactivated();\r
-\r
-public slots:\r
-       //! Shows the view.\r
-       /*!\r
-        * Show view that inherits ViewBase class. If the views parent is not\r
-        * the WindowManager it will changed within this method. Depeding on the\r
-        * views type the currently active view might be stored and restored\r
-        * when specific event occurs in the view to be displayed.\r
-        */\r
-       void showView( ViewBase *view );\r
-       \r
-       //! Shows modal dialog.\r
-       /*!\r
-        * Shows modal dialog. Emits dialogActivated() signal prior calling\r
-        * QDialog's exec() method and emits dialogDeactivated signal when\r
-        * the exec() method returns.\r
-        */\r
-       void showDialog( QDialog *aDialog, bool blocking = true, bool aSendSignal = true );\r
-       \r
-       //! View event is detected.\r
-       /*!\r
-        * WindowManager connects this slot to ViewBase classes eventDetected()\r
-        * signal and either emits eventDetected() signal if the current views\r
-        * type is ViewMode::NormalView or restores possible previous view\r
-        * if the current views type is ViewMode::ObservedView.\r
-        */\r
-       void viewEventDetected();\r
-       \r
-       void setFullscreen();\r
-       \r
-       void error( const QString &aErrorMessage );\r
-\r
-private:\r
-       //! Name of the application.\r
-       QString iApplicationName;\r
-       \r
-       //! Currently active view.\r
-       ViewBase *iCurrentView;\r
-       \r
-       //! Stack of views previously displayed.\r
-       QStack<ViewBase *> iViewList;\r
-\r
-};\r
-\r
-#endif /*WINDOWMANAGER_H_*/\r
+#ifndef WINDOWMANAGER_H_
+#define WINDOWMANAGER_H_
+
+#include <QWidget>
+#include <QStack>
+
+// Forward declarations
+class ViewBase;
+class QEvent;
+class QSize;
+class QDialog;
+class QString;
+
+//! UserInterface class. Manages displayed views.
+/*!
+ * UserInterface class. WindowManager class is responsible for displaying views that inherit the
+ * ViewBase class. It also handles dialog showing. Depending on the views type the WindowManager
+ * can track the views events and restore previous view if the current on is ObservedView. This
+ * is a handy mechanism for screensaver etc.
+ */
+class WindowManager : public QWidget
+{
+       Q_OBJECT
+
+public:
+       //! Constructor.
+       /*!
+        * Constructor of WindowManager.
+        */
+       WindowManager( QWidget *aParent = 0 );
+       //! Destructor.
+       virtual ~WindowManager();
+       
+       virtual bool event(QEvent *event);
+
+signals:
+       //! Request current status of the room.
+       /*!
+        * Signal is emitted when there is need to check current status of room aRoom.
+        * \param aRoom Meetingroom which status is requested.
+        */
+       void eventDetected();
+       
+       //! The view size is changed.
+       /*!
+        * This signal is emitted when the window managers view changes,
+        * i.e. it received resized QEvent.
+        * \param The new view size.
+        */
+       void viewResized(const QSize &newSize, const QSize &oldSize);
+       
+       //! Previous view is restored.
+       /*!
+        * This signal is emitted when previously stored view is
+        * restored. This happens when view with type ViewMode::ObservedView
+        * is shown and it receives an event that initiates the view
+        * restoring chain.
+        */
+       void previousViewRestored();
+       
+       void dialogActivated();
+       void dialogDeactivated();
+
+public slots:
+       //! Shows the view.
+       /*!
+        * Show view that inherits ViewBase class. If the views parent is not
+        * the WindowManager it will changed within this method. Depeding on the
+        * views type the currently active view might be stored and restored
+        * when specific event occurs in the view to be displayed.
+        */
+       void showView( ViewBase *view );
+       
+       //! Shows modal dialog.
+       /*!
+        * Shows modal dialog. Emits dialogActivated() signal prior calling
+        * QDialog's exec() method and emits dialogDeactivated signal when
+        * the exec() method returns.
+        */
+       void showDialog( QDialog *aDialog, bool blocking = true, bool aSendSignal = true );
+       
+       //! View event is detected.
+       /*!
+        * WindowManager connects this slot to ViewBase classes eventDetected()
+        * signal and either emits eventDetected() signal if the current views
+        * type is ViewMode::NormalView or restores possible previous view
+        * if the current views type is ViewMode::ObservedView.
+        */
+       void viewEventDetected();
+       
+       void setFullscreen();
+       
+       void error( const QString &aErrorMessage );
+
+private:
+       //! Name of the application.
+       QString iApplicationName;
+       
+       //! Currently active view.
+       ViewBase *iCurrentView;
+       
+       //! Stack of views previously displayed.
+       QStack<ViewBase *> iViewList;
+
+};
+
+#endif /*WINDOWMANAGER_H_*/