delay a few things on startup, such as setting the visibility mode, which ensures...
[personal-kdebase.git] / runtime / kioslave / trash / kcmtrash.h
blobe062450b36e1451cb5765ec04b30001da43d4e5c
1 /***************************************************************************
2 * Copyright (C) 2008 by Tobias Koenig <tokoe@kde.org> *
3 * *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 * *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
13 * *
14 * You should have received a copy of the GNU General Public License *
15 * along with this program; if not, write to the *
16 * Free Software Foundation, Inc., *
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
18 ***************************************************************************/
20 #ifndef TRASHCONFIGMODULE_H
21 #define TRASHCONFIGMODULE_H
23 #include <kcmodule.h>
25 class QCheckBox;
26 class QComboBox;
27 class QDoubleSpinBox;
28 class QFrame;
29 class QLabel;
30 class QListWidgetItem;
31 class QSpinBox;
32 class TrashImpl;
34 /**
35 * @brief Allow to configure the trash.
37 class TrashConfigModule : public KCModule
39 Q_OBJECT
41 public:
42 TrashConfigModule( QWidget* parent, const QVariantList& args );
43 virtual ~TrashConfigModule();
45 virtual void save();
46 virtual void defaults();
48 private Q_SLOTS:
49 void percentChanged( double );
50 void trashChanged( QListWidgetItem* );
51 void trashChanged( int );
52 void useTypeChanged();
54 private:
55 void readConfig();
56 void writeConfig();
57 void setupGui();
59 QCheckBox *mUseTimeLimit;
60 QSpinBox *mDays;
61 QCheckBox *mUseSizeLimit;
62 QWidget *mSizeWidget;
63 QDoubleSpinBox *mPercent;
64 QLabel *mSizeLabel;
65 QComboBox *mLimitReachedAction;
67 TrashImpl *mTrashImpl;
68 QString mCurrentTrash;
69 bool trashInitialize;
70 typedef struct {
71 bool useTimeLimit;
72 int days;
73 bool useSizeLimit;
74 double percent;
75 int actionType;
76 } ConfigEntry;
78 typedef QMap<QString, ConfigEntry> ConfigMap;
79 ConfigMap mConfigMap;
82 #endif