45 #include <QtGui/qabstractbutton.h> 53 #ifndef QT_NO_TOOLBUTTON 71 enum ToolButtonPopupMode {
89 void setMenu(
QMenu* menu);
92 void setPopupMode(ToolButtonPopupMode mode);
93 ToolButtonPopupMode popupMode()
const;
98 void setAutoRaise(
bool enable);
99 bool autoRaise()
const;
106 void setDefaultAction(
QAction *);
143 ,
Right = BesideIcon,
151 QObject * receiver,
const char* slot,
153 inline QT3_SUPPORT
void setPixmap(
const QPixmap &pixmap) {
setIcon(static_cast<QIcon>(pixmap)); }
154 QT3_SUPPORT
void setOnIconSet(
const QIcon&);
155 QT3_SUPPORT
void setOffIconSet(
const QIcon&);
156 inline QT3_SUPPORT
void setIconSet(
const QIcon &icon){
setIcon(icon);}
157 QT3_SUPPORT
void setIconSet(
const QIcon &,
bool on);
158 inline QT3_SUPPORT
void setTextLabel(
const QString &
text,
bool tooltip =
true) {
160 #ifndef QT_NO_TOOLTIP 167 inline QT3_SUPPORT
QString textLabel()
const {
return text(); }
168 QT3_SUPPORT
QIcon onIconSet()
const;
169 QT3_SUPPORT
QIcon offIconSet()
const;
170 QT3_SUPPORT
QIcon iconSet(
bool on)
const;
171 inline QT3_SUPPORT
QIcon iconSet()
const {
return icon(); }
172 inline QT3_SUPPORT
void openPopup() { showMenu(); }
173 inline QT3_SUPPORT
void setPopup(
QMenu* popup) {setMenu(popup); }
174 inline QT3_SUPPORT
QMenu* popup()
const {
return menu(); }
175 inline QT3_SUPPORT
bool usesBigPixmap()
const {
return iconSize().
height() > 22; }
177 inline QT3_SUPPORT TextPosition textPosition()
const 179 QT3_SUPPORT
void setPopupDelay(
int delay);
180 QT3_SUPPORT
int popupDelay()
const;
187 QT_MOC_COMPAT void setTextPosition(QToolButton::TextPosition pos)
193 #endif // QT_NO_TOOLBUTTON 199 #endif // QTOOLBUTTON_H
#define QT_END_NAMESPACE
This macro expands to.
#define Q_DISABLE_COPY(Class)
Disables the use of copy constructors and assignment operators for the given Class.
#define Q_PRIVATE_SLOT(d, signature)
The QActionEvent class provides an event that is generated when a QAction is added, removed, or changed.
The QString class provides a Unicode character string.
The QObject class is the base class of all Qt objects.
#define QT_BEGIN_NAMESPACE
This macro expands to.
The QMouseEvent class contains parameters that describe a mouse event.
The QTimerEvent class contains parameters that describe a timer event.
The QPoint class defines a point in the plane using integer precision.
int height() const
Returns the height.
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.
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
The QAction class provides an abstract user interface action that can be inserted into widgets...
The QIcon class provides scalable icons in different modes and states.