~ubuntu-branches/ubuntu/warty/kdebase/warty

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones
  • Date: 2004-09-16 04:51:45 UTC
  • Revision ID: james.westby@ubuntu.com-20040916045145-9vr63kith3k1cpza
Tags: upstream-3.2.2
ImportĀ upstreamĀ versionĀ 3.2.2

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 version 2 of the GNU General Public
 
8
    License as published by the Free Software Foundation.
 
9
 
 
10
    This program is distributed in the hope that it will be useful,
 
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
    GNU General Public License for more details.
 
14
 
 
15
    You should have received a copy of the GNU General Public License
 
16
    along with this program; if not, write to the Free Software
 
17
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
18
 
 
19
        $Id: LogFile.h,v 1.6 2003/07/12 13:36:05 mlaurent Exp $
 
20
*/
 
21
 
 
22
#ifndef _LogFile_h
 
23
#define _LogFile_h
 
24
 
 
25
#define MAXLINES 500
 
26
 
 
27
class QFile;
 
28
class QListBox;
 
29
 
 
30
#include <qdom.h>
 
31
#include <qpopupmenu.h>
 
32
#include <qstring.h>
 
33
#include <qstringlist.h>
 
34
 
 
35
#include <SensorDisplay.h>
 
36
 
 
37
#include "LogFileSettings.h"
 
38
 
 
39
class LogFile : public KSGRD::SensorDisplay
 
40
{
 
41
        Q_OBJECT
 
42
public:
 
43
        LogFile(QWidget *parent = 0, const char *name = 0, const QString& title = 0);
 
44
        ~LogFile(void);
 
45
 
 
46
        bool addSensor(const QString& hostName, const QString& sensorName,
 
47
                                   const QString& sensorType, const QString& sensorDescr);
 
48
        void answerReceived(int id, const QString& answer);
 
49
        void resizeEvent(QResizeEvent*);
 
50
 
 
51
        bool restoreSettings(QDomElement& element);
 
52
        bool saveSettings(QDomDocument& doc, QDomElement& element, bool save = true);
 
53
 
 
54
        void updateMonitor(void);
 
55
 
 
56
        void configureSettings(void);
 
57
 
 
58
        virtual void timerEvent(QTimerEvent*)
 
59
        {
 
60
                updateMonitor();
 
61
        }
 
62
 
 
63
        virtual bool hasSettingsDialog() const
 
64
        {
 
65
                return (true);
 
66
        }
 
67
 
 
68
public slots:
 
69
        void applySettings();
 
70
        void applyStyle();
 
71
 
 
72
        void settingsFontSelection();
 
73
        void settingsAddRule();
 
74
        void settingsDeleteRule();
 
75
        void settingsChangeRule();
 
76
        void settingsRuleListSelected(int index);
 
77
 
 
78
private:
 
79
        LogFileSettings* lfs;
 
80
        QListBox* monitor;
 
81
        QStringList filterRules;
 
82
 
 
83
        unsigned long logFileID;
 
84
};
 
85
 
 
86
#endif // _LogFile_h