add more spacing
[personal-kdebase.git] / workspace / ksysguard / gui / SensorDisplayLib / DancingBarsSettings.h
blob40450467cf2a2f75588dcd76ffcae4622363b242
1 /*
2 KSysGuard, the KDE System Guard
4 Copyright (c) 2003 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 KSG_DANCINGBARSSETTINGS_H
23 #define KSG_DANCINGBARSSETTINGS_H
25 #include <QtCore/QList>
27 #include <kpagedialog.h>
29 #include "SensorModel.h"
31 class KColorButton;
32 class QDoubleSpinBox;
33 class KIntNumInput;
34 class KLineEdit;
36 class QCheckBox;
37 class QPushButton;
38 class QTreeView;
40 class DancingBarsSettings : public KPageDialog
42 Q_OBJECT
44 public:
45 explicit DancingBarsSettings( QWidget* parent = 0, const char* name = 0 );
46 ~DancingBarsSettings();
48 void setTitle( const QString& title );
49 QString title() const;
51 void setMinValue( double min );
52 double minValue() const;
54 void setMaxValue( double max );
55 double maxValue() const;
57 void setUseLowerLimit( bool value );
58 bool useLowerLimit() const;
60 void setLowerLimit( double limit );
61 double lowerLimit() const;
63 void setUseUpperLimit( bool value );
64 bool useUpperLimit() const;
66 void setUpperLimit( double limit );
67 double upperLimit() const;
69 void setForegroundColor( const QColor &color );
70 QColor foregroundColor() const;
72 void setAlarmColor( const QColor &color );
73 QColor alarmColor() const;
75 void setBackgroundColor( const QColor &color );
76 QColor backgroundColor() const;
78 void setFontSize( int size );
79 int fontSize() const;
81 void setSensors( const SensorModelEntry::List &list );
82 SensorModelEntry::List sensors() const;
84 private Q_SLOTS:
85 void editSensor();
86 void removeSensor();
88 private:
89 KColorButton *mForegroundColor;
90 KColorButton *mAlarmColor;
91 KColorButton *mBackgroundColor;
92 QDoubleSpinBox *mMinValue;
93 QDoubleSpinBox *mMaxValue;
94 QDoubleSpinBox *mLowerLimit;
95 QDoubleSpinBox *mUpperLimit;
96 KLineEdit *mTitle;
97 KIntNumInput *mFontSize;
99 QCheckBox *mUseLowerLimit;
100 QCheckBox *mUseUpperLimit;
101 QPushButton *mEditButton;
102 QPushButton *mRemoveButton;
104 QTreeView *mView;
105 SensorModel *mModel;
108 #endif