~ubuntu-branches/ubuntu/utopic/kde-workspace/utopic-proposed

« back to all changes in this revision

Viewing changes to ksysguard/gui/SensorDisplayLib/LogFile.h

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-07-09 08:31:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110709083115-ohyxn6z93mily9fc
Tags: upstream-4.6.90
Import upstream version 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    KSysGuard, the KDE System Guard
 
3
 
 
4
        Copyright (c) 2001 Tobias Koenig <tokoe@kde.org>
 
5
 
 
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.
 
10
 
 
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.
 
15
 
 
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.
 
19
 
 
20
*/
 
21
 
 
22
#ifndef _LogFile_h
 
23
#define _LogFile_h
 
24
 
 
25
#define MAXLINES 500
 
26
 
 
27
class QListWidget;
 
28
 
 
29
#include <QtXml/qdom.h>
 
30
 
 
31
#include <QTimerEvent>
 
32
 
 
33
#include <SensorDisplay.h>
 
34
 
 
35
class Ui_LogFileSettings;
 
36
 
 
37
class LogFile : public KSGRD::SensorDisplay
 
38
{
 
39
        Q_OBJECT
 
40
public:
 
41
        LogFile(QWidget *parent, const QString& title, SharedSettings *workSheetSettings);
 
42
        ~LogFile(void);
 
43
 
 
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);
 
47
 
 
48
        bool restoreSettings(QDomElement& element);
 
49
        bool saveSettings(QDomDocument& doc, QDomElement& element);
 
50
 
 
51
        void updateMonitor(void);
 
52
 
 
53
        void configureSettings(void);
 
54
 
 
55
        virtual void timerTick()
 
56
        {
 
57
                updateMonitor();
 
58
        }
 
59
 
 
60
        virtual bool hasSettingsDialog() const
 
61
        {
 
62
                return true;
 
63
        }
 
64
 
 
65
public Q_SLOTS:
 
66
        void applySettings();
 
67
        void applyStyle();
 
68
 
 
69
        void settingsAddRule();
 
70
        void settingsDeleteRule();
 
71
        void settingsChangeRule();
 
72
        void settingsRuleListSelected(int index);
 
73
 
 
74
private:
 
75
        Ui_LogFileSettings* lfs;
 
76
        QListWidget* monitor;
 
77
        QStringList filterRules;
 
78
 
 
79
        unsigned long logFileID;
 
80
};
 
81
 
 
82
#endif // _LogFile_h