| 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_GENERAL_H |
|---|
| 21 | #define SETTINGS_GENERAL_H |
|---|
| 22 | |
|---|
| 23 | #include <config.h> |
|---|
| 24 | |
|---|
| 25 | #include <QObject> |
|---|
| 26 | |
|---|
| 27 | class QCheckBox; |
|---|
| 28 | class QComboBox; |
|---|
| 29 | class QFont; |
|---|
| 30 | class QGridLayout; |
|---|
| 31 | class QGroupBox; |
|---|
| 32 | class QLabel; |
|---|
| 33 | class QRadioButton; |
|---|
| 34 | class QVBoxLayout; |
|---|
| 35 | class QWidget; |
|---|
| 36 | |
|---|
| 37 | namespace LicqQtGui |
|---|
| 38 | { |
|---|
| 39 | class FontEdit; |
|---|
| 40 | class SettingsDlg; |
|---|
| 41 | |
|---|
| 42 | namespace Settings |
|---|
| 43 | { |
|---|
| 44 | |
|---|
| 45 | class General : public QObject |
|---|
| 46 | { |
|---|
| 47 | Q_OBJECT |
|---|
| 48 | |
|---|
| 49 | public: |
|---|
| 50 | General(SettingsDlg* parent); |
|---|
| 51 | virtual ~General() {} |
|---|
| 52 | |
|---|
| 53 | void load(); |
|---|
| 54 | void apply(); |
|---|
| 55 | |
|---|
| 56 | private slots: |
|---|
| 57 | void useDockToggled(bool useDock); |
|---|
| 58 | void normalFontChanged(const QFont& font); |
|---|
| 59 | |
|---|
| 60 | private: |
|---|
| 61 | /** |
|---|
| 62 | * Setup the docking settings page. |
|---|
| 63 | * |
|---|
| 64 | * @return a widget with the docking settings |
|---|
| 65 | */ |
|---|
| 66 | QWidget* createPageDocking(QWidget* parent); |
|---|
| 67 | |
|---|
| 68 | /** |
|---|
| 69 | * Setup the fonts and localization settings page. |
|---|
| 70 | * |
|---|
| 71 | * @return a widget with the fonts and localization settings |
|---|
| 72 | */ |
|---|
| 73 | QWidget* createPageFonts(QWidget* parent); |
|---|
| 74 | |
|---|
| 75 | // Widgets for docking settings |
|---|
| 76 | QVBoxLayout* myPageDockingLayout; |
|---|
| 77 | QGroupBox* myDockingBox; |
|---|
| 78 | QGridLayout* myDockingLayout; |
|---|
| 79 | QCheckBox* myUseDockCheck; |
|---|
| 80 | QCheckBox* myHiddenCheck; |
|---|
| 81 | QCheckBox* myDockFortyEightCheck; |
|---|
| 82 | QCheckBox* myDockTrayBlinkCheck; |
|---|
| 83 | QCheckBox* myTrayMsgOnlineNotify; |
|---|
| 84 | QRadioButton* myDockDefaultRadio; |
|---|
| 85 | QRadioButton* myDockThemedRadio; |
|---|
| 86 | QRadioButton* myDockTrayRadio; |
|---|
| 87 | QComboBox* myDockThemeCombo; |
|---|
| 88 | |
|---|
| 89 | // Widgets for fonts and localization settings |
|---|
| 90 | QVBoxLayout* myPageFontsLayout; |
|---|
| 91 | QGroupBox* myFontBox; |
|---|
| 92 | QGroupBox* myLocaleBox; |
|---|
| 93 | QGridLayout* myFontLayout; |
|---|
| 94 | QVBoxLayout* myLocaleLayout; |
|---|
| 95 | QLabel* myFontLabel; |
|---|
| 96 | QLabel* myEditFontLabel; |
|---|
| 97 | QLabel* myHistoryFontLabel; |
|---|
| 98 | QLabel* myFixedFontLabel; |
|---|
| 99 | FontEdit* myNormalFontEdit; |
|---|
| 100 | FontEdit* myEditFontEdit; |
|---|
| 101 | FontEdit* myHistoryFontEdit; |
|---|
| 102 | FontEdit* myFixedFontEdit; |
|---|
| 103 | QLabel* myDefaultEncodingLabel; |
|---|
| 104 | QCheckBox* myShowAllEncodingsCheck; |
|---|
| 105 | QComboBox* myDefaultEncodingCombo; |
|---|
| 106 | }; |
|---|
| 107 | |
|---|
| 108 | } // namespace Settings |
|---|
| 109 | } // namespace LicqQtGui |
|---|
| 110 | |
|---|
| 111 | #endif |
|---|