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 CONFIGLOG_H 00019 #define CONFIGLOG_H 00020 00021 //button IDs 00022 #define ID_BUTTON_REMOVE_AT_EXIT 1 00023 #define ID_BUTTON_REMOVE_AFTER_DAYS 2 00024 00025 //qt headers 00026 #include <qlayout.h> 00027 #include <qgroupbox.h> 00028 #include <qtooltip.h> 00029 #include <qcheckbox.h> 00030 #include <qradiobutton.h> 00031 #include <qbuttongroup.h> 00032 #include <qspinbox.h> 00033 #include <QStyle> 00034 00035 //KDE headers 00036 #include <kcmodule.h> 00037 #include <kconfig.h> 00038 #include <kgenericfactory.h> 00039 #include <kapplication.h> 00040 #include <kconfiggroup.h> 00041 00042 //Kshowmail headers 00043 #include "constants.h" 00044 00045 00050 class ConfigLog : public KCModule 00051 { 00052 Q_OBJECT 00053 00054 public: 00055 00061 explicit ConfigLog( QWidget *parent = 0, const QVariantList & args = QVariantList() ); 00062 00066 ~ConfigLog(); 00067 00073 virtual void load(); 00074 00080 virtual void defaults(); 00081 00088 virtual void save(); 00089 00090 private: 00091 00095 KSharedConfigPtr config; 00096 00100 QCheckBox* chkLogDeletedMails; 00101 00105 QCheckBox* chkLogMovedMails; 00106 00110 QCheckBox* chkLogManualDeletedMails; 00111 00115 QButtonGroup* grpDelMailsRemove; 00116 00120 QButtonGroup* grpMovMailsRemove; 00121 00125 QButtonGroup* grpManualDelMailsRemove; 00126 00130 QSpinBox* spbDelDays; 00131 00135 QSpinBox* spbMovDays; 00136 00140 QSpinBox* spbManualDelDays; 00141 00145 QRadioButton* btnDelMailsRemoveExit; 00146 00150 QRadioButton* btnDelMailsRemoveDays; 00151 00155 QRadioButton* btnMovMailsRemoveExit; 00156 00160 QRadioButton* btnMovMailsRemoveDays; 00161 00165 QRadioButton* btnManualDelMailsRemoveExit; 00166 00170 QRadioButton* btnManualDelMailsRemoveDays; 00171 00172 private slots: 00173 00178 void slotChanged(); 00179 00184 void slotChangeItems(); 00185 }; 00186 00187 #endif