kcmdf.cpp 1.64 KB
Newer Older
1
2
/*
  kcmdf.cpp - KcmDiskFree
3

4
  Copyright (C) 1998 by Michael Kropfberger <michael.kropfberger@gmx.net>
5

6
7
8
9
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.
10

11
12
13
14
  This program 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 General Public License for more details.
15

16
17
  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
Script Kiddy's avatar
Script Kiddy committed
18
  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
19

20
21
  */

22
//
23
24
// 1999-12-05 Espen Sand
// Modified to use KCModule instead of the old and obsolete
25
26
// KControlApplication
//
27

28
29
#include "kcmdf.h"

30
#include <QVBoxLayout>
31
32
#include <KPluginFactory>
#include <kpluginfactory.h>
33

34
35
36
37
K_PLUGIN_CLASS_WITH_JSON(KDiskFreeWidget, "kcmdf.json")

KDiskFreeWidget::KDiskFreeWidget( QWidget *parent, const QVariantList &args )
        : KCModule( parent, args )
38
{
39
    setButtons(Help);
40

41
    QVBoxLayout *topLayout = new QVBoxLayout( this );
Laurent Montel's avatar
Laurent Montel committed
42
    topLayout->setContentsMargins({});
43

44
45
    mKdf = new KDFWidget( this, false );
    topLayout->addWidget( mKdf );
46
}
47

48
KDiskFreeWidget::~KDiskFreeWidget()
49
{
50
    mKdf->applySettings();
51
52
}

53
54
QString KDiskFreeWidget::quickHelp() const
{
Burkhard Lück's avatar
Burkhard Lück committed
55
56
    return i18n("A right mouse button click opens a context menu to mount/unmount a device"
                " or to open it in the file manager.");
57
58
}

59
#include "kcmdf.moc"