8 #include "DeviceManager.h"
9 #include "PasswordDialog.h"
13 class WeeklyViewWidget;
15 class RoomStatusIndicatorWidget;
17 class MeetingInfoDialog;
18 class CommunicationManager;
21 //! User Interface manager class.
23 * User Interface manager class that is responsible for handling
24 * UI actions. It creates the needed views and connects signals
25 * accordingly. All interactions with the UI is handled by this
26 * class. The Engine class handles the basic logic and does not
27 * know or care about the UI and this class does not know or care
28 * about the basic logic only UI related actions (signals, events etc.).
30 class UIManager : public QObject
35 UIManager( Engine *aEngine, WindowManager *aWindowManager );
38 //! Connects Device Managers signals.
40 * This method connects Device Managers signals directly to UI
41 * components or to it selft.
43 void connectDeviceManager( DeviceManager *aDeviceManager );
44 //! Connects Communication Managers signals.
46 * This method connects Communication Managers signals directly to UI
47 * components or to it selft.
49 void connectCommunicationManager( CommunicationManager *aCommunicationManager );
50 //! Shows the main view.
52 * Makes the main view visible trough WindowManager.
60 //! Handles setting view request.
62 * Handles request to show settings view. Makes the
63 * view visible and stops the idle time counter.
65 void settingsViewRequest();
66 //! Handles setting views ok clicked.
68 * Handles the setting views Ok button clicked
69 * signal. Sets the weekly view visible and starts
70 * the idle time counter.
72 void settingsOkClicked();
73 //! Handles room status indicator view request.
75 * Handles the request to show room status indicator
76 * view. Sets the view visible and stops the idle
77 * time counter. The WindowManager handles restoring
78 * what ever view was previously visible.
80 void roomStatusIndicatorRequested();
81 //! Handles previousViewRestored signal.
83 * Handles the restoring of previous view. This is usually
84 * signaled by WindowManager when room status indicator
85 * view is being hidden.
87 void previousViewRestored();
88 //! Handle change mode order.
90 * Handles change mode order. Displays the password query dialog
91 * and waits for its response.
93 void changeModeOrdered( DeviceManager::OperationMode aMode );
94 //! Handles select room change.
96 * Handles the changing of currently select room. Engine is requested
97 * to start fetching new meetings for currently shown week.
99 void currentRoomChanged( Room *aRoom );
103 void meetingsFetched( const QList<Meeting*> &aMeetings );
104 void meetingDetailsFetched( Meeting &aDetailedMeeting );
105 void progressBarCancelled();
106 void updateTime( QDateTime aDateTime );
107 void passwordEntered( PasswordDialog::PasswordStatus aStatus );
108 void showMeetingProgressBar( Meeting *aMeeting );
109 void updateProgressBarText( const QString &aText );
110 void hideProgressBar();
114 void createWeeklyView();
115 void createSettingsView();
116 void createRoomStatusIndicator();
117 void createPasswordDialog();
118 void createProgressBar();
119 void createMeetingInfoDialog();
123 WindowManager *iWindowManager;
125 WeeklyViewWidget *iWeeklyView;
126 SettingsView *iSettingsView;
127 RoomStatusIndicatorWidget *iRoomStatusIndicator;
128 PasswordDialog *iPasswordDialog;
129 ProgressBar *iProgressBar;
130 MeetingInfoDialog *iMeetingInfo;
133 #endif /*UIMANAGER_H_*/