summaryrefslogtreecommitdiffstats
path: root/tdeioslave/trash/kcmtrash.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2019-04-15 00:06:17 +0900
committerMichele Calgaro <[email protected]>2019-04-15 00:06:17 +0900
commit563adb52cbe17faf30ddbb720cb5707eac66fd95 (patch)
tree697c1fe99d810d45a8ab25f1266eab7ead2acb80 /tdeioslave/trash/kcmtrash.cpp
parent85e0371c0e2a969d01347ddb5ec8f0e273084994 (diff)
downloadtdebase-563adb52cbe17faf30ddbb720cb5707eac66fd95.tar.gz
tdebase-563adb52cbe17faf30ddbb720cb5707eac66fd95.zip
Renamed kcm_trash to kcmtrash and minor fixup to previous commits.
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'tdeioslave/trash/kcmtrash.cpp')
-rw-r--r--tdeioslave/trash/kcmtrash.cpp81
1 files changed, 81 insertions, 0 deletions
diff --git a/tdeioslave/trash/kcmtrash.cpp b/tdeioslave/trash/kcmtrash.cpp
new file mode 100644
index 000000000..4747e092a
--- /dev/null
+++ b/tdeioslave/trash/kcmtrash.cpp
@@ -0,0 +1,81 @@
+/*
+ This file is part of the TDE Project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License version 2 as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "kcmtrash.h"
+#include "ktrashpropswidget.h"
+
+#include <tqlayout.h>
+#include <tqtabwidget.h>
+#include <tdelocale.h>
+#include <tdeglobal.h>
+#include <tdeaboutdata.h>
+#include <kdialog.h>
+
+
+extern "C"
+{
+ KDE_EXPORT TDECModule *create_trash(TQWidget *parent, const char *)
+ {
+ return new TrashModule(parent, "kcmtrash");
+ }
+}
+
+
+TrashModule::TrashModule(TQWidget *parent, const char *name)
+ : TDECModule(parent, name)
+{
+ TDEAboutData * about = new TDEAboutData("kcmtrash",
+ I18N_NOOP("Trash"), "1",
+ I18N_NOOP("Trash Control Panel Module"),
+ TDEAboutData::License_GPL_V2,
+ I18N_NOOP("(c) 2019 Michele Calgaro"));
+ setAboutData( about );
+ TDEGlobal::locale()->insertCatalogue("tdeio_trash");
+
+ tab = new TQTabWidget(this);
+
+ policyWidget = new KTrashPropsWidget(this);
+ tab->addTab(policyWidget, i18n("&Trash Policy"));
+ connect(policyWidget, TQT_SIGNAL(changed(bool)), TQT_SIGNAL(changed(bool)));
+
+ TQVBoxLayout *top = new TQVBoxLayout(this);
+ top->addWidget(tab);
+}
+
+void TrashModule::load()
+{
+ policyWidget->load();
+}
+
+void TrashModule::save()
+{
+ policyWidget->save();
+}
+
+void TrashModule::defaults()
+{
+ policyWidget->setDefaultValues();
+}
+
+TQString TrashModule::quickHelp() const
+{
+ return i18n("<h1>Trash</h1> Here you can choose the settings "
+ "for your Trash Bin size and clean up policy. ");
+}
+
+#include "kcmtrash.moc"