dtor first
[personal-kdebase.git] / workspace / ksysguard / gui / SensorDisplayLib / LogFile.h
blob88b9b017f197813ea220dca77ad8e879f5c73f06
1 /*
2 KSysGuard, the KDE System Guard
4 Copyright (c) 2001 Tobias Koenig <tokoe@kde.org>
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (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, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 #ifndef _LogFile_h
23 #define _LogFile_h
25 #define MAXLINES 500
27 class QListWidget;
29 #include <QtXml/qdom.h>
31 #include <QTimerEvent>
33 #include <SensorDisplay.h>
35 class Ui_LogFileSettings;
37 class LogFile : public KSGRD::SensorDisplay
39 Q_OBJECT
40 public:
41 LogFile(QWidget *parent, const QString& title, SharedSettings *workSheetSettings);
42 ~LogFile(void);
44 bool addSensor(const QString& hostName, const QString& sensorName,
45 const QString& sensorType, const QString& sensorDescr);
46 void answerReceived(int id, const QList<QByteArray>& answer);
48 bool restoreSettings(QDomElement& element);
49 bool saveSettings(QDomDocument& doc, QDomElement& element);
51 void updateMonitor(void);
53 void configureSettings(void);
55 virtual void timerTick()
57 updateMonitor();
60 virtual bool hasSettingsDialog() const
62 return true;
65 public Q_SLOTS:
66 void applySettings();
67 void applyStyle();
69 void settingsAddRule();
70 void settingsDeleteRule();
71 void settingsChangeRule();
72 void settingsRuleListSelected(int index);
74 private:
75 Ui_LogFileSettings* lfs;
76 QListWidget* monitor;
77 QStringList filterRules;
79 unsigned long logFileID;
82 #endif // _LogFile_h