lib Library API Documentation

koFrameButton.h

00001 /* This file is part of the KDE project
00002   Copyright (c) 1999 Matthias Elter (me@kde.org)
00003   Copyright (c) 2001 Igor Jansen (rm@kde.org)
00004 
00005    This library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Library General Public
00007    License as published by the Free Software Foundation; either
00008    version 2 of the License, or (at your option) any later version.
00009 
00010    This library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00018    Boston, MA 02111-1307, USA.
00019 */
00020 
00021 #ifndef __ko_framebutton_h__
00022 #define __ko_framebutton_h__
00023 
00024 #include <qlabel.h>
00025 
00026 class QPixmap;
00027 class QString;
00028 
00029 class KoFrameButton : public QLabel
00030 {
00031   Q_OBJECT
00032 public:
00033   KoFrameButton(QWidget *parent = 0, const char *name = 0);
00034   KoFrameButton(const QString &text, QWidget *parent = 0, const char *name = 0);
00035   KoFrameButton(const QPixmap &pixmap, QWidget *parent = 0, const char *name = 0);
00036 
00037   bool isOn() {return mActive; }
00038   void setOn(bool v);
00039 
00040   bool isToggleButton() {return mToggle; }
00041   void setToggleButton(bool v);
00042 
00043   QString text() {return mText; }
00044   virtual void setText(const QString &t);
00045 
00046 signals:
00047   void clicked();
00048   void clicked(const QString &);
00049 
00050 protected:
00051   void mousePressEvent(QMouseEvent *);
00052   void mouseReleaseEvent(QMouseEvent *);
00053 
00054 private:
00055   bool     mActive;
00056   bool     mToggle;
00057   QString  mText;
00058 };
00059 
00060 #endif
KDE Logo
This file is part of the documentation for lib Library Version 1.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Mon Feb 13 09:40:01 2006 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003