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 CONFIGACTIONS_H 00019 #define CONFIGACTIONS_H 00020 00021 #include <string.h> 00022 00023 //QT headers 00024 #include <qlayout.h> 00025 #include <qgroupbox.h> 00026 #include <qcheckbox.h> 00027 #include <Phonon/AudioOutput> 00028 #include <Phonon/MediaObject> 00029 00030 00031 //KDE headers 00032 #include <kcmodule.h> 00033 #include <kgenericfactory.h> 00034 #include <kpushbutton.h> 00035 #include <klineedit.h> 00036 #include <kdebug.h> 00037 #include <kapplication.h> 00038 #include <kfiledialog.h> 00039 #include <kprocess.h> 00040 #include <kmessagebox.h> 00041 #include <kstandarddirs.h> 00042 00043 //kshowmail headers 00044 #include "constants.h" 00045 00051 class ConfigActions : public KCModule 00052 { 00053 Q_OBJECT 00054 00055 public: 00061 explicit ConfigActions( QWidget *parent = 0, const QVariantList & args = QVariantList() ); 00062 00066 ~ConfigActions(); 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* chkNewMailsAlertWindow; 00101 00105 QCheckBox* chkNewMailsMainWindow; 00106 00110 QCheckBox* chkNewMailsBeep; 00111 00115 QCheckBox* chkNewMailsSound; 00116 00120 QCheckBox* chkNewMailsCommand; 00121 00125 KPushButton* btnNewMailsPlaySound; 00126 00130 KPushButton* btnNewMailsExecCommand; 00131 00135 KLineEdit* txtNewMailsSound; 00136 00140 KLineEdit* txtNewMailsCommand; 00141 00145 KPushButton* btnNewMailsChooseSound; 00146 00150 KPushButton* btnNewMailsChooseCommand; 00151 00155 QCheckBox* chkNoNewMailsMinimize; 00156 00160 QCheckBox* chkNoNewMailsTerminate; 00161 00162 private slots: 00163 00169 void slotChooseSound(); 00170 00176 void slotChooseCommand(); 00177 00182 void slotPlaySound(); 00183 00188 void slotExecuteCommand(); 00189 00195 void slotSoundToggled( bool on ); 00196 00202 void slotCommandToggled( bool on ); 00203 00208 void slotChanged(); 00209 }; 00210 00211 #endif