koFrameButton.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
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
This file is part of the documentation for lib Library Version 1.3.5.