Tool BarButton

The KToolBarButton widget is used internally by the KToolBar widget to display buttons that respond to the mouse.

The KToolBarButton is constructed by calling one of the insertButton() methods of KToolBar. Using the ID number, a call to the KToolBar method getButton() can be used to retrieve a pointer to the button, making the methods listed here available.

File

#include <ktoolbarbutton.h> Base Classes

QButton QObject QPaintDevice QWidget Qt Constructors

KToolBarButton(const QString &icon, int id, QWidget *parent, const char *name = 0L, const QString &txt = QString::null); KToolBarButton(const QPixmap &pixmap, int id, QWidget *parent, const char *name = 0L, const QString &txt = QString::null); KToolBarButton(QWidget *parent = 0L, const char *name = 0L);

Methods void on(bool flag = true); QPopupMenu *popup();

virtual void setDefaultIcon(const QString &icon);

virtual void setDefaultPixmap(const QPixmap &pixmap);

void setDelayedPopup(QPopupMenu *p, bool toggle = false);

virtual void setDisabledIcon(const QString &icon);

virtual void setDisabledPixmap(const QPixmap &pixmap);

void setEnabled(bool enable = true);

virtual void setIcon(const QString &icon);

virtual void setIcon(const QString &icon, bool generate);

void setNoStyle(bool no_style = true);

virtual void setPixmap(const QPixmap &pixmap);

virtual void setPixmap(const QPixmap &pixmap, bool generate);

void setPopup(QPopupMenu *p);

void setRadio(bool f = true);

virtual void setText(const QString &text);

void setToggle(bool toggle = true);

void toggle();

Slots void modeChange(); Signals void clicked(int);

void doubleClicked(int);

void highlighted(int, bool);

void pressed(int);

void released(int);

void toggled(int);

KToolBar.

Cross- Chapter 6 includes examples of creating KTool BarButton widgets inside a

The KWizard widget can be used to create a dialog that guides the user through a sequence of steps. Each step consists of a single window. The KWizard widget provides the paging mechanism and the control buttons. This widget extends QWizard to include a set of standard KDE methods for dialogs. It is the base class on which

KDialogBase is built.

#include <kwizard.h> Base Classes

QDialog QObject QPaintDevice QWidget QWizard Qt Constructors

KWizard(QWidget *parent = 0, const char *name = 0, bool modal = false, WFlags f = 0);

The following example displays the empty KWizard widget shown in Figure 19-54:

/* showwizard.cpp */ #include <kapp.h> #include <kwizard.h>

int main(int argc,char **argv)

QApplication app(argc,argv); KWizard *wizard = new KWizard(); wizard->show(); app.setMainWidget(wizard); return(app.exec());

KToolBar.

Was this article helpful?

0 0

Post a comment