controls.h
Go to the documentation of this file.00001 #ifndef __CONTROLS_H
00002 #define __CONTROLS_H
00003
00004 #include <qguardedptr.h>
00005
00006 #include <kaction.h>
00007 #include <ktoolbar.h>
00008 #include <qslider.h>
00009 #include <qstringlist.h>
00010
00011 class QComboBox;
00012 class QLabel;
00013
00022 class L33tSlider : public QSlider
00023 {
00024 Q_OBJECT
00025 public:
00026 L33tSlider(QWidget * parent, const char * name=0);
00027 L33tSlider(Orientation, QWidget * parent, const char * name=0);
00028 L33tSlider(int minValue, int maxValue, int pageStep, int value,
00029 Orientation, QWidget * parent, const char * name=0);
00030
00031 bool currentlyPressed() const;
00032 signals:
00036 void userChanged(int value);
00037
00038 public slots:
00039 virtual void setValue(int);
00040
00041 protected:
00042 virtual void mousePressEvent(QMouseEvent*);
00043 virtual void mouseReleaseEvent(QMouseEvent*);
00044 virtual void wheelEvent(QWheelEvent *);
00045
00046 private:
00047 bool pressed;
00048 };
00049
00055 class SliderAction : public KAction
00056 {
00057 Q_OBJECT
00058 public:
00059 SliderAction(const QString& text, int accel, const QObject *receiver,
00060 const char *member, QObject* parent, const char* name );
00061 virtual int plug( QWidget *w, int index = -1 );
00062 virtual void unplug( QWidget *w );
00063 QSlider* slider() const { return m_slider; }
00064
00065 signals:
00066 void plugged();
00067
00068 public slots:
00069 void toolbarMoved(KToolBar::BarPosition pos);
00070
00071 private:
00072 QGuardedPtr<QSlider> m_slider;
00073 QStringList m_items;
00074 const QObject *m_receiver;
00075 const char *m_member;
00076 };
00077
00078 #endif
This file is part of the documentation for Noatun 2.6.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Oct 22 00:20:36 2004 by
doxygen 1.3.8-20040913 written by
Dimitri van Heesch, © 1997-2003