X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2FBusinessLogic%2FEngine.h;fp=src%2FBusinessLogic%2FEngine.h;h=70afcbc8c70b0ab03a50aa93069b63c2b7ebb727;hb=f51d61d96002d4b5ad5d52699c6d52a4dea07159;hp=461b437a98bc5eba173e3e0419ed3b3210739e75;hpb=deb6aee06a80416a24a64c2ac6349a2341acdc39;p=qtmeetings diff --git a/src/BusinessLogic/Engine.h b/src/BusinessLogic/Engine.h index 461b437..70afcbc 100644 --- a/src/BusinessLogic/Engine.h +++ b/src/BusinessLogic/Engine.h @@ -5,13 +5,19 @@ #include #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;