| 1 | /* |
|---|
| 2 | * This file is part of Licq, an instant messaging client for UNIX. |
|---|
| 3 | * Copyright (C) 2007 Licq developers |
|---|
| 4 | * |
|---|
| 5 | * Licq is free software; you can redistribute it and/or modify |
|---|
| 6 | * it under the terms of the GNU General Public License as published by |
|---|
| 7 | * the Free Software Foundation; either version 2 of the License, or |
|---|
| 8 | * (at your option) any later version. |
|---|
| 9 | * |
|---|
| 10 | * Licq is distributed in the hope that it will be useful, |
|---|
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 13 | * GNU General Public License for more details. |
|---|
| 14 | * |
|---|
| 15 | * You should have received a copy of the GNU General Public License |
|---|
| 16 | * along with Licq; if not, write to the Free Software |
|---|
| 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
|---|
| 18 | */ |
|---|
| 19 | |
|---|
| 20 | #ifndef SETTINGS_STATUS_H |
|---|
| 21 | #define SETTINGS_STATUS_H |
|---|
| 22 | |
|---|
| 23 | #include <config.h> |
|---|
| 24 | |
|---|
| 25 | #include <QObject> |
|---|
| 26 | |
|---|
| 27 | class QCheckBox; |
|---|
| 28 | class QComboBox; |
|---|
| 29 | class QGridLayout; |
|---|
| 30 | class QGroupBox; |
|---|
| 31 | class QLabel; |
|---|
| 32 | class QPushButton; |
|---|
| 33 | class QSpinBox; |
|---|
| 34 | class QVBoxLayout; |
|---|
| 35 | |
|---|
| 36 | namespace LicqQtGui |
|---|
| 37 | { |
|---|
| 38 | class MLEdit; |
|---|
| 39 | class SettingsDlg; |
|---|
| 40 | |
|---|
| 41 | namespace Settings |
|---|
| 42 | { |
|---|
| 43 | class Status : public QObject |
|---|
| 44 | { |
|---|
| 45 | Q_OBJECT |
|---|
| 46 | |
|---|
| 47 | public: |
|---|
| 48 | Status(SettingsDlg* parent); |
|---|
| 49 | virtual ~Status() {} |
|---|
| 50 | |
|---|
| 51 | void load(); |
|---|
| 52 | void apply(); |
|---|
| 53 | |
|---|
| 54 | private slots: |
|---|
| 55 | void sarMsgChanged(int msg); |
|---|
| 56 | void sarGroupChanged(int group); |
|---|
| 57 | void saveSar(); |
|---|
| 58 | void showSarHints(); |
|---|
| 59 | |
|---|
| 60 | private: |
|---|
| 61 | /** |
|---|
| 62 | * Setup the status page. |
|---|
| 63 | * |
|---|
| 64 | * @return a widget with the status settings |
|---|
| 65 | */ |
|---|
| 66 | QWidget* createPageStatus(QWidget* parent); |
|---|
| 67 | |
|---|
| 68 | /** |
|---|
| 69 | * Setup the response messages page. |
|---|
| 70 | * |
|---|
| 71 | * @return a widget with the response message settings |
|---|
| 72 | */ |
|---|
| 73 | QWidget* createPageRespMsg(QWidget* parent); |
|---|
| 74 | |
|---|
| 75 | void buildAutoStatusCombos(bool firstTime); |
|---|
| 76 | |
|---|
| 77 | // Widgets for status settings |
|---|
| 78 | QGroupBox* myGeneralBox; |
|---|
| 79 | QVBoxLayout* myGeneralLayout; |
|---|
| 80 | QCheckBox* myDelayStatusChangeCheck; |
|---|
| 81 | QVBoxLayout* myPageStatusLayout; |
|---|
| 82 | QGroupBox* myAutoLogonBox; |
|---|
| 83 | QGroupBox* myAutoAwayBox; |
|---|
| 84 | QVBoxLayout* myAutoLogonLayout; |
|---|
| 85 | QGridLayout* myAutoAwayLayout; |
|---|
| 86 | QComboBox* myAutoLogonCombo; |
|---|
| 87 | QCheckBox* myAutoLogonInvisibleCheck; |
|---|
| 88 | QLabel* myAutoAwayLabel; |
|---|
| 89 | QLabel* myAutoNaLabel; |
|---|
| 90 | QLabel* myAutoOfflineLabel; |
|---|
| 91 | QSpinBox* myAutoAwaySpin; |
|---|
| 92 | QSpinBox* myAutoNaSpin; |
|---|
| 93 | QSpinBox* myAutoOfflineSpin; |
|---|
| 94 | QComboBox* myAutoAwayMessCombo; |
|---|
| 95 | QComboBox* myAutoNaMessCombo; |
|---|
| 96 | |
|---|
| 97 | // Widgets for response message settings |
|---|
| 98 | QVBoxLayout* myPageRespMsgLayout; |
|---|
| 99 | QGroupBox* myDefRespMsgBox; |
|---|
| 100 | QGridLayout* myDefRespMsgLayout; |
|---|
| 101 | QLabel* mySarGroupLabel; |
|---|
| 102 | QLabel* mySarMsgLabel; |
|---|
| 103 | QComboBox* mySarGroupCombo; |
|---|
| 104 | QComboBox* mySarMsgCombo; |
|---|
| 105 | MLEdit* mySartextEdit; |
|---|
| 106 | QPushButton* mySarsaveButton; |
|---|
| 107 | QPushButton* mySarhintsButton; |
|---|
| 108 | }; |
|---|
| 109 | |
|---|
| 110 | } // namespace Settings |
|---|
| 111 | } // namespace LicqQtGui |
|---|
| 112 | |
|---|
| 113 | #endif |
|---|