42 #ifndef QABSTRACTBUTTON_H 43 #define QABSTRACTBUTTON_H 45 #include <QtGui/qicon.h> 46 #include <QtGui/qkeysequence.h> 47 #include <QtGui/qwidget.h> 65 #ifndef QT_NO_SHORTCUT 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 118 void setIconSize(
const QSize &size);
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();
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(); }
180 #endif // QABSTRACTBUTTON_H
The QKeyEvent class describes a key event.
#define QT_END_NAMESPACE
This macro expands to.
QSize size() const
Returns the size of the pixmap.
virtual void timerEvent(QTimerEvent *)
This event handler can be reimplemented in a subclass to receive timer events for the object...
#define Q_DISABLE_COPY(Class)
Disables the use of copy constructors and assignment operators for the given Class.
The QString class provides a Unicode character string.
#define QT_BEGIN_NAMESPACE
This macro expands to.
The QMouseEvent class contains parameters that describe a mouse event.
The QKeySequence class encapsulates a key sequence as used by shortcuts.
The QTimerEvent class contains parameters that describe a timer event.
The QPoint class defines a point in the plane using integer precision.
The QPixmap class is an off-screen image representation that can be used as a paint device...
The QSize class defines the size of a two-dimensional object using integer point precision.
#define Q_DECLARE_PRIVATE(Class)
The QPaintEvent class contains event parameters for paint events.
The QEvent class is the base class of all event classes.
The QFocusEvent class contains event parameters for widget focus events.
The QIcon class provides scalable icons in different modes and states.