Merged
[qtmeetings] / src / BusinessLogic / Engine.h
index 461b437..70afcbc 100644 (file)
@@ -5,13 +5,19 @@
 #include <QDateTime>
 #include "Room.h"
 #include "WindowManager.h"
+#include "DeviceManager.h"
+#include "PasswordDialog.h"
 
 class QTimer;
 class Clock;
 class Configuration;
 class CommunicationManager;
 class Meeting;
-class DeviceManager;
+class WeeklyViewWidget;
+class SettingsView;
+class RoomStatusIndicatorWidget;
+class PasswordDialog;
+class MeetingInfoDialog;
 
 //! BusinessLogic class. Contains all the business logic of the application.
 /*!
@@ -53,11 +59,6 @@ private slots:
         * \param aRoom The room which availability information is needed.
         */
        void roomStatusInfoNeeded( Room *aRoom );
-       //! Slot. Indicates that some user event has happened.
-       /*!
-        * Slot. Indicates that some user event has happened.
-        */
-       void observedEventDetected();
        //! Slot. Asks the communication to fetch new meeting data.
        /*!
         * Slot. Asks the communication to fetch new meeting data.
@@ -131,6 +132,29 @@ private slots:
         */
        void fetchMeetingDetailsCancelled();
        
+       void handleViewEvent();
+       void previousViewRestored();
+       void settingsViewRequested();
+       
+       void idleTimerTimeout();
+       
+       void settingsOkClicked();
+       
+       //! Slot for dialog activation signal.
+       /*!
+        * This slot is used to inform that dialog is activated. It stops
+        * the idle time counter so screensaver is not activated while the
+        * dialog is displayed.
+        */
+       void dialogActivated();
+       //! Slot for dialog deactivation signal.
+       /*!
+        * This slot is used to inform that dialog is deactivated. It restarts
+        * the idle time counter so that the screensaver is being activated again
+        * as needed.
+        */
+       void dialogDeactivated();
+       
 private:
        //! Provides the index of the Meeting instance which is at the specified time.
        /*!
@@ -166,11 +190,50 @@ private:
         * \param aIn The room which meetings need to be fetched.
         */
        void fetchMeetings( const QDateTime &aFrom, const QDateTime &aUntil, const Room *aIn );
+       //! Initialize configuration package.
+       /*!
+        * This method initializes configuration classes and
+        * connects signals from and to the engine.
+        */
+       void initConfiguration();
+       //! Initialize device package.
+       /*!
+        * This method initializes device manager and
+        * connects signals from and to the engine.
+        */
+       void initDevice();
+       //! Initialize communication package.
+       /*!
+        * This method initializes the communication manager and
+        * connects signals from and to the engine.
+        */
+       void initCommunication();
+       //! Initialize user interface package.
+       /*!
+        * This method initializes the user interface and
+        * connects signals from and to the engine. This method
+        * makes the window manager visible and shows weekly
+        * view as the first view.
+        */
+       void initUserInterface();
+       //! Connects signal between objects.
+       /*!
+        * Signals that could not be connected while initializing different
+        * packages are connected here.
+        */
+       void connectSignals();
 
 private:
        static QTime endOfTheDay;
 
        WindowManager *iWindowManager;
+       WeeklyViewWidget *iWeeklyView;
+       SettingsView *iSettingsView;
+       RoomStatusIndicatorWidget *iRoomStatusIndicator;
+       
+       PasswordDialog *iPasswordDialog;
+       MeetingInfoDialog *iMeetingInfoDialog;
+       
        QTimer *iIdleTimeCounter;
        Clock *iClock;
        Configuration *iConfiguration;