kstars
toggleaction.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef KSTARS_TOGGLEACTION_H
00019 #define KSTARS_TOGGLEACTION_H
00020
00029 #include <qiconset.h>
00030 #include <kaction.h>
00031
00032 class ToggleAction : public KAction {
00033 Q_OBJECT
00034
00035 public:
00037 ToggleAction(const QString& ontext, const QIconSet& onpix, const QString& offtext, const QIconSet& offpix, int accel, const QObject* receiver, const char* slot, QObject* parent = 0, const char* name = 0 ) ;
00039 ToggleAction(const QString& ontext, const QString& offtext, int accel, const QObject* receiver, const char* slot, QObject* parent = 0, const char* name = 0 ) ;
00040
00044 void setOnToolTip(QString tip);
00045
00049 void setOffToolTip(QString tip);
00050
00051 public slots:
00053 void turnOff();
00055 void turnOn();
00056
00057 private:
00058 QIconSet officon;
00059 QIconSet onicon;
00060 QString offcap;
00061 QString oncap;
00062 QString onTip;
00063 QString offTip;
00064 bool state;
00065 };
00066
00067
00068 #endif