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.
55 //! Shows the progress bar.
57 * Shows the progress bar with given text.
59 void showProgressBar( QString aText );
65 //! Handles setting view request.
67 * Handles request to show settings view. Makes the
68 * view visible and stops the idle time counter.
70 void settingsViewRequest();
71 //! Handles setting views ok clicked.
73 * Handles the setting views Ok button clicked
74 * signal. Sets the weekly view visible and starts
75 * the idle time counter.
77 void settingsOkClicked();
78 //! Handles room status indicator view request.
80 * Handles the request to show room status indicator
81 * view. Sets the view visible and stops the idle
82 * time counter. The WindowManager handles restoring
83 * what ever view was previously visible.
85 void roomStatusIndicatorRequested();
86 //! Handles previousViewRestored signal.
88 * Handles the restoring of previous view. This is usually
89 * signaled by WindowManager when room status indicator
90 * view is being hidden.
92 void previousViewRestored();
93 //! Handle change mode order.
95 * Handles change mode order. Displays the password query dialog
96 * and waits for its response.
98 void changeModeOrdered( DeviceManager::OperationMode aMode );
99 //! Handles select room change.
101 * Handles the changing of currently select room. Engine is requested
102 * to start fetching new meetings for currently shown week.
104 void currentRoomChanged( Room *aRoom );
106 //! Shows any view specific indicators for connection error
107 void connectionLost();
109 //! Removes any view specific indicators for connection error
110 void connectionEstablished();
115 void meetingsFetched( const QList<Meeting*> &aMeetings );
116 void meetingDetailsFetched( Meeting &aDetailedMeeting );
117 void progressBarCancelled();
118 void updateTime( QDateTime aDateTime );
119 void passwordEntered( PasswordDialog::PasswordStatus aStatus );
120 void showMeetingProgressBar( Meeting *aMeeting );
121 void updateProgressBarText( const QString &aText );
122 void hideProgressBar();
126 void createWeeklyView();
127 void createSettingsView();
128 void createRoomStatusIndicator();
129 void createPasswordDialog();
130 void createProgressBar();
131 void createMeetingInfoDialog();
135 WindowManager *iWindowManager;
137 WeeklyViewWidget *iWeeklyView;
138 SettingsView *iSettingsView;
139 RoomStatusIndicatorWidget *iRoomStatusIndicator;
140 PasswordDialog *iPasswordDialog;
141 ProgressBar *iProgressBar;
142 MeetingInfoDialog *iMeetingInfo;
145 #endif /*UIMANAGER_H_*/