1
/* This file is part of the KDE Project
2
Copyright (c) 2006 Lukas Tinkl <ltinkl@suse.cz>
3
Copyright (c) 2008 Lubos Lunak <l.lunak@suse.cz>
4
Copyright (c) 2009 Ivo Anjo <knuckles@gmail.com>
6
This program is free software; you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation; either version 2 of the License, or
9
(at your option) any later version.
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
16
You should have received a copy of the GNU General Public License
17
along with this program. If not, see <http://www.gnu.org/licenses/>.
20
#ifndef _FREESPACENOTIFIER_H_
21
#define _FREESPACENOTIFIER_H_
23
#include <QtCore/QTimer>
24
#include <QtDBus/QDBusInterface>
26
#include <KNotification>
28
class FreeSpaceNotifier
33
FreeSpaceNotifier( QObject* parent = NULL );
34
virtual ~FreeSpaceNotifier();
36
void checkFreeDiskSpace();
37
void resetLastAvailable();
38
void openFileManager();
39
void showConfiguration();
40
void cleanupNotification();
41
void configDialogClosed();
44
QTimer* lastAvailTimer;
45
KNotification *notification;
46
qint64 lastAvail; // used to suppress repeated warnings when available space hasn't changed
48
void disableFSNotifier();
49
bool dbusError( QDBusInterface &iface );