QtGui/qabstractbutton.h Source File
Go to the documentation of this file.
42 #ifndef QABSTRACTBUTTON_H
43 #define QABSTRACTBUTTON_H
56 class QAbstractButtonPrivate;
65 #ifndef QT_NO_SHORTCUT
68 Q_PROPERTY(
bool checkable READ isCheckable WRITE setCheckable)
69 Q_PROPERTY(
bool checked READ isChecked WRITE setChecked DESIGNABLE isCheckable NOTIFY toggled USER true)
70 Q_PROPERTY(
bool autoRepeat READ autoRepeat WRITE setAutoRepeat)
71 Q_PROPERTY(
bool autoExclusive READ autoExclusive WRITE setAutoExclusive)
72 Q_PROPERTY(
int autoRepeatDelay READ autoRepeatDelay WRITE setAutoRepeatDelay)
73 Q_PROPERTY(
int autoRepeatInterval READ autoRepeatInterval WRITE setAutoRepeatInterval)
74 Q_PROPERTY(
bool down READ isDown WRITE setDown DESIGNABLE false)
80 void setText(const
QString &text);
83 void setIcon(const
QIcon &icon);
86 QSize iconSize() const;
88 #ifndef QT_NO_SHORTCUT
93 void setCheckable(
bool);
94 bool isCheckable()
const;
96 bool isChecked()
const;
101 void setAutoRepeat(
bool);
102 bool autoRepeat()
const;
104 void setAutoRepeatDelay(
int);
105 int autoRepeatDelay()
const;
107 void setAutoRepeatInterval(
int);
108 int autoRepeatInterval()
const;
110 void setAutoExclusive(
bool);
111 bool autoExclusive()
const;
113 #ifndef QT_NO_BUTTONGROUP
114 QButtonGroup *group()
const;
119 void animateClick(
int msec = 100);
122 void setChecked(
bool);
127 void clicked(
bool checked =
false);
128 void toggled(
bool checked);
132 virtual bool hitButton(
const QPoint &pos)
const;
133 virtual void checkStateSet();
134 virtual void nextCheckState();
144 void changeEvent(
QEvent *e);
149 QT3_SUPPORT_CONSTRUCTOR
QAbstractButton(QWidget *parent,
const char *
name, Qt::WindowFlags
f=0);
150 inline QT3_SUPPORT
bool isOn()
const {
return isChecked(); }
151 inline QT3_SUPPORT
const QPixmap *
pixmap()
const {
return 0; }
152 inline QT3_SUPPORT
void setPixmap(
const QPixmap &
p ) {
154 setIconSize(p.
size());
156 QT3_SUPPORT
QIcon *iconSet()
const;
157 inline QT3_SUPPORT
void setIconSet(
const QIcon &icon) { setIcon(icon); }
158 inline QT3_SUPPORT
bool isToggleButton()
const {
return isCheckable(); }
159 inline QT3_SUPPORT
void setToggleButton(
bool b) { setCheckable(b); }
160 inline QT3_SUPPORT
void setAccel(
const QKeySequence &key) { setShortcut(key); }
161 inline QT3_SUPPORT
QKeySequence accel()
const {
return shortcut(); }
164 inline QT_MOC_COMPAT
void setOn(
bool b) { setChecked(b); }
173 friend class QButtonGroup;
180 #endif // QABSTRACTBUTTON_H
GLXFBConfig Pixmap pixmap
#define QT_BEGIN_NAMESPACE
GLuint const GLchar * name