00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef KSG_DANCINGBARS_H
00025 #define KSG_DANCINGBARS_H
00026
00027 #include <SensorDisplay.h>
00028 #include <tqbitarray.h>
00029
00030 class KIntNumInput;
00031
00032 class TQGroupBox;
00033 class TQLineEdit;
00034 class TQListViewItem;
00035
00036 class BarGraph;
00037 class DancingBarsSettings;
00038
00039 class DancingBars : public KSGRD::SensorDisplay
00040 {
00041 Q_OBJECT
00042
00043 public:
00044 DancingBars( TQWidget *parent = 0, const char *name = 0,
00045 const TQString &title = TQString::null, int min = 0,
00046 int max = 100, bool noFrame = false, bool isApplet = false );
00047 virtual ~DancingBars();
00048
00049 void configureSettings();
00050
00051 bool addSensor( const TQString &hostName, const TQString &name,
00052 const TQString &type, const TQString &title );
00053 bool removeSensor( uint pos );
00054
00055 void updateSamples( const TQMemArray<double> &samples );
00056
00057 virtual TQSize sizeHint();
00058
00059 virtual void answerReceived( int id, const TQString &answer );
00060
00061 bool restoreSettings( TQDomElement& );
00062 bool saveSettings( TQDomDocument&, TQDomElement&, bool save = true );
00063
00064 virtual bool hasSettingsDialog() const;
00065
00066 public slots:
00067 void applySettings();
00068 virtual void applyStyle();
00069
00070 protected:
00071 virtual void resizeEvent( TQResizeEvent* );
00072
00073 private:
00074 uint mBars;
00075
00076 BarGraph* mPlotter;
00077
00078 DancingBarsSettings* mSettingsDialog;
00079
00086 TQMemArray<double> mSampleBuffer;
00087 TQBitArray mFlags;
00088 };
00089
00090 #endif