Source Code (Use browser search to find items of interest.)
Class Index
qt'QToolButtonPrivate (./qt-2.1.0/src/widgets/qtoolbutton.cpp:44)
class QToolButtonPrivate
{
// ### add tool tip magic here
public:
QGuardedPtr<QPopupMenu> popup;
QTimer* popupTimer;
int delay;
bool autoraise, repeat;
Qt::ArrowType arrow;
};
// NOT REVISED
/*!
\class QToolButton qtoolbutton.h
\brief The QToolButton class provides a quick-access button to
specific commands or options, usually used inside a QToolBar.
\ingroup basic
A tool button is a special button that provides quick-access to
specific commands or options. As opposed to a normal command button,
a tool button usually doesn't show a text label, but an icon. Its
classic usage is to select tools, for example the "pen"-tool in a
drawing program. This would be implemented with a QToolButton as
toggle button (see setToggleButton() ).
QToolButton supports auto-raising. In auto-raise mode, the button
draws a 3D frame only when the mouse points at it. The feature is
automatically turned on when a button is used inside a QToolBar.
Change it with setAutoRaise().
A tool button's icon is set as QIconSet. This makes it possible to
specify different pixmaps for the disabled and active state. The
disabled pixmap is used when the button's functionality is not
available. The active pixmap is displayed when the button is
auto-raised because the user is pointing at it.
The button's look and dimension is adjustable with
setUsesBigPixmap() and setUsesTextLabel(). When used inside a
QToolBar, the button automatically adjusts to QMainWindow's settings
(see QMainWindow::setUsesTextLabel() and
QMainWindow::setUsesBigPixmaps()).
A tool button can offer additional choices in a popup menu. The
feature is sometimes used with the "Back" button in a web browsers:
After pressing the button down for a while, a menu pops up showing
all possible pages to browse back. With QToolButton, you can set a
popup menu using setPopup(). The default delay is 600ms, you may
adjust it with setPopupDelay().
\sa QPushButton QToolBar QMainWindow
<a href="guibooks.html#fowler">GUI Design Handbook: Push Button</a>
*/
/*!
Constructs an empty tool button.
*/