summaryrefslogtreecommitdiffstats
path: root/tdeioslave/trash/kcmtrash.cpp
blob: 4747e092a38474a6b7087c5e4f8289758145f711 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
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"