Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

oclickablelabel.h

Go to the documentation of this file.
00001 #ifndef CLICKABLELABEL
00002 #define CLICKABLELABEL
00003 
00004 #include <qlabel.h>
00005 
00026 class OClickableLabel: public QLabel
00027 {
00028   Q_OBJECT
00029 public:
00030     OClickableLabel(QWidget* parent = 0, const char* name = 0,
00031                    WFlags fl = 0);
00032     void setToggleButton(bool t);
00033 
00034  protected:
00036     void mousePressEvent( QMouseEvent *e );
00038     void mouseReleaseEvent( QMouseEvent *e );
00040     void mouseMoveEvent( QMouseEvent *e );
00041 
00042  public slots:
00043     void setOn(bool on);
00044  signals:
00048     void clicked();
00049 
00054     void toggled(bool on);
00055  private:
00056     bool isToggle : 1;
00057     bool isDown : 1;
00058     bool textInverted : 1;
00059 
00060     void showState(bool on);
00061     void setInverted(bool on);
00062     
00063  private:
00064     class Private;
00065     Private *d; // private d pointer
00066 };
00067 
00068 #endif

Generated on Sat Nov 5 16:16:25 2005 for OPIE by  doxygen 1.4.2