Settings view fixed.
[qtmeetings] / src / UserInterface / Views / SettingsView.h
1 #ifndef SETTINGSVIEW_H_
2 #define SETTINGSVIEW_H_
3
4 #include "ViewBase.h"
5
6 class QTabWidget;
7 class QPushButton;
8 class QLineEdit;
9 class QTimeEdit;
10 class QRadioButton;
11 class QCheckBox;
12 class QSize;
13
14 //! User interface class. Shows the settings view and handles configuration changes.
15 class SettingsView : public ViewBase
16 {
17         Q_OBJECT
18
19 public:
20         //! Constructor.
21         /*!
22          * Constructor to initialize and prepare the settings view. This calls internally
23          * the helper methods to initialize individual setting tabs.
24          * \param Parent component.
25          */
26         SettingsView( QWidget *aParent = 0 );
27         //! Destructor.
28         virtual ~SettingsView();
29         
30 signals:
31         void okClicked();
32         
33         void cancelClicked();
34         
35 public slots:
36         void viewResized(const QSize &newSize, const QSize &oldSize);
37
38 private slots:
39         //! Slot to handle the Ok button pressing.
40         void handleOkClicked();
41         //! Slot to handle the Cancel button pressing.
42         void handleCancelClicked();
43
44 private:
45         //! Initialize "Settings" tab.
46         QWidget *initSettingsTab();
47         //! Initialize "Week View" tab.
48         QWidget *initWeekViewTab();
49         //! Intialize "Resources" tab.
50         QWidget *initResourcesTab();
51         //! Initialize "KIOSK Mode" tab.
52         QWidget *initKioskModeTab();
53         //! Set values to fields
54         void setValues();
55
56         //! The tabbed settings view component.
57         QTabWidget *iTabWidget;
58         //! OK button to dismiss the settings view with saving the settings.
59         QPushButton *iOkButton;
60         //! Cancel button to dismiss the settings view without saving the settings
61         QPushButton *iCancelButton;
62         //! Settings tab.
63         QWidget *iSettingsTab;
64         //! Week View tab.
65         QWidget *iWeekViewTab;
66         //! Resources tab.
67         QWidget *iResourcesTab;
68         //! KIOSK Mode tab.
69         QWidget *iKioskModeTab;
70
71         //! User name to the remote server.
72         QLineEdit *iUserName;
73         //! Password to the remote server.
74         QLineEdit *iPassword;
75         //! Remote server address.
76         QLineEdit *iServerAddress;
77         //! Refresh interval in seconds.
78         QLineEdit *iRefreshInterval;
79         //! When the day starts in the calendar view.
80         QTimeEdit *iDayStartTime;
81         //! When the day ends in the calendar view.
82         QTimeEdit *iDayEndTime;
83         //! Selection for showing five days in the calendar.
84         QRadioButton *iFiveDays;
85         //! Selection for showing seven days in the calendar.
86         QRadioButton *iSevenDays;
87         //! Power saving enabling.
88         QCheckBox *iPowerSaveEnabled;
89         //! Start time for activating power save.
90         QTimeEdit *iPowerSaveStartTime;
91         //! End time for deactivating power save.
92         QTimeEdit *iPowerSaveEndTime;
93 };
94
95 #endif /*SETTINGSVIEW_H_*/