You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
82 lines
2.2 KiB
82 lines
2.2 KiB
6 years ago
|
/*
|
||
|
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.
|
||
|
*/
|
||
|
|
||
6 years ago
|
#include "kcmtrash.h"
|
||
6 years ago
|
#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 *)
|
||
|
{
|
||
6 years ago
|
return new TrashModule(parent, "kcmtrash");
|
||
6 years ago
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
TrashModule::TrashModule(TQWidget *parent, const char *name)
|
||
|
: TDECModule(parent, name)
|
||
|
{
|
||
6 years ago
|
TDEAboutData * about = new TDEAboutData("kcmtrash",
|
||
6 years ago
|
I18N_NOOP("Trash"), "1",
|
||
|
I18N_NOOP("Trash Control Panel Module"),
|
||
|
TDEAboutData::License_GPL_V2,
|
||
|
I18N_NOOP("(c) 2019 Michele Calgaro"));
|
||
|
setAboutData( about );
|
||
6 years ago
|
TDEGlobal::locale()->insertCatalogue("tdeio_trash");
|
||
6 years ago
|
|
||
|
tab = new TQTabWidget(this);
|
||
|
|
||
|
policyWidget = new KTrashPropsWidget(this);
|
||
6 years ago
|
tab->addTab(policyWidget, i18n("&Trash Policy"));
|
||
6 years ago
|
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. ");
|
||
|
}
|
||
|
|
||
6 years ago
|
#include "kcmtrash.moc"
|