00001 /* 00002 Copyright 2010 Ulrich Weigelt <ulrich.weigelt@gmx.de> 00003 00004 This program is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU General Public License as 00006 published by the Free Software Foundation; either version 2 of 00007 the License, or (at your option) any later version. 00008 00009 This program is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 GNU General Public License for more details. 00013 00014 You should have received a copy of the GNU General Public License 00015 along with this program. If not, see <http://www.gnu.org/licenses/>. 00016 */ 00017 00018 #ifndef CONFIGGENERAL_H 00019 #define CONFIGGENERAL_H 00020 00021 //button IDs 00022 #define ID_BUTTON_SHOW_MAIL_HEADER 1 00023 #define ID_BUTTON_SHOW_MAIL_BODY 2 00024 00025 //Qt headers 00026 #include <qlayout.h> 00027 #include <qgroupbox.h> 00028 #include <qcheckbox.h> 00029 #include <qspinbox.h> 00030 #include <qtooltip.h> 00031 #include <qlabel.h> 00032 #include <QRadioButton> 00033 #include <QButtonGroup> 00034 00035 //KDE headers 00036 #include <kcmodule.h> 00037 #include <kconfig.h> 00038 #include <kgenericfactory.h> 00039 #include <kapplication.h> 00040 #include <KConfigGroup> 00041 00042 //KShowmail headers 00043 #include "constants.h" 00044 00049 class ConfigGeneral : public KCModule 00050 { 00051 Q_OBJECT 00052 00053 public: 00054 00060 explicit ConfigGeneral( QWidget *parent = 0, const QVariantList & args = QVariantList() ); 00061 00065 ~ConfigGeneral(); 00066 00072 virtual void load(); 00073 00079 virtual void defaults(); 00080 00087 virtual void save(); 00088 00089 private: 00090 00094 KSharedConfigPtr config; 00095 00099 QCheckBox* chkConfirmClose; 00100 00104 QCheckBox* chkConfirmDelete; 00105 00109 QCheckBox* chkStartMinimized; 00110 00114 QCheckBox* chkCloseToTray; 00115 00119 QCheckBox* chkShowConnectionErrors; 00120 00124 QCheckBox* chkKeepNew; 00125 00129 QCheckBox* chkAutomaticRefresh; 00130 00134 QCheckBox* chkStoreHeaders; 00135 00139 QSpinBox* spbInitial; 00140 00144 QSpinBox* spbInterval; 00145 00149 QLabel* lblTimerInterval; 00150 00154 QLabel* lblTimerInitial; 00155 00159 QSpinBox* spbTimeout; 00160 00164 QButtonGroup* grpDoubleClick; 00165 00169 QRadioButton* btnDoubleClickShowHeader; 00170 00174 QRadioButton* btnDoubleClickShowBody; 00175 00176 00177 00178 00179 00180 public slots: 00181 00186 void slotChanged(); 00187 00193 void slotAutomaticRefreshChanged( bool checked ); 00194 00195 }; 00196 00197 #endif