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 version 2 or at your option version 3 as published by
9 the Free Software Foundation.
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.
24 #include <QStandardItemModel>
27 #include <SensorDisplay.h>
29 class ListViewSettings
;
32 class ListView
: public KSGRD::SensorDisplay
36 ListView(QWidget
* parent
, const QString
& title
, SharedSettings
*workSheetSettings
);
39 bool addSensor(const QString
& hostName
, const QString
& sensorName
, const QString
& sensorType
, const QString
& sensorDescr
);
40 void answerReceived(int id
, const QList
<QByteArray
>& answerlist
);
43 bool restoreSettings(QDomElement
& element
);
44 bool saveSettings(QDomDocument
& doc
, QDomElement
& element
);
46 virtual bool hasSettingsDialog() const
51 virtual void timerTickEvent()
56 void configureSettings();
64 typedef enum { Text
, Int
, Float
, Time
, DiskStat
} ColumnType
;
66 QStandardItemModel mModel
;
68 ListViewSettings
* lvs
;
69 QByteArray mHeaderSettings
;
71 QList
<ColumnType
> mColumnTypes
;
72 ColumnType
convertColumnType(const QString
&type
) const;