1/*
2kwikdisk.cpp - KDiskFree
3
4Copyright (C) 1999 by Michael Kropfberger <michael.kropfberger@gmx.net>
5 2009 Dario Andres Rodriguez <andresbajotierra@gmail.com>
6
7This program is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation; either version 2 of the License, or
10(at your option) any later version.
11
12This program is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with this program; if not, write to the Free Software
19Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20
21*/
22
23// With changes by Espen Sand and Stanislav Karchebny.
24
25#ifndef KWIKDISK_H
26#define KWIKDISK_H
27
28#include <ksystemtrayicon.h>
29
30#include "disklist.h"
31#include "stdoption.h"
32#include "optiondialog.h"
33
34class QActionGroup;
35
36/**
37* @short Application Main Window (however in Tray)
38* @version 0.2
39*/
40
41class KwikDisk : public KSystemTrayIcon
42{
43 Q_OBJECT
44
45 public:
46 KwikDisk();
47
48 private Q_SLOTS:
49 void updateDFDone();
50 void criticallyFull(DiskEntry*);
51 void toggleMount(QAction*);
52 void loadSettings();
53 void changeSettings();
54 void startKDF();
55 void invokeHelp();
56 void slotActivated(QSystemTrayIcon::ActivationReason reason);
57 void clearDeviceActions();
58
59 private:
60 void timerEvent(QTimerEvent *);
61 void enterEvent(QEvent *);
62 void leaveEvent(QEvent *);
63
64 void setUpdateFrequency(int frequency);
65
66 void updateDF();
67
68 DiskList m_diskList;
69 CStdOption m_options;
70 bool m_readingDF;
71 bool m_dirty;
72 bool m_menuVisible;
73 bool m_inside;
74 COptionDialog *m_optionDialog;
75 QActionGroup * m_actionGroup;
76 QAction * m_actionSeparator;
77};
78
79#endif // _KWIKDISK_H_
80
81