gui::ToolBar Class Reference

Application toolbar. More...

#include <toolbar.h>

List of all members.

Public Slots

void slotClicked (int id)
void receiveHelpText (const QString &message)

Signals

void itemClicked (int id)
void helpText (const QString &message)

Public Member Functions

 ToolBar (const QString &label, QMainWindow *mainWindow)
 ToolBar (QMainWindow *parent, const char *name=0)
void addButton (ToolButton *qb)

Detailed Description

Application toolbar.

Class wrapping QToolBar, providing "click forwarding" from TButtons. Buttons must be added with addButton() for this to work properly


Constructor & Destructor Documentation

gui::ToolBar::ToolBar ( const QString &  label,
QMainWindow *  mainWindow 
)

Same constructor as QToolBar

Parameters:
label Caption of toolbar
mainWindow Main window in which toolbar will be managed
gui::ToolBar::ToolBar ( QMainWindow *  parent,
const char *  name = 0 
)

Same constructor as QToolBar

Parameters:
parent Main window in which toolbar will be managed
name Name of toolbar (for debugging)

Member Function Documentation

void gui::ToolBar::addButton ( ToolButton qb  ) 

Add button to toolbar and link slots, so clicks from buttons are passed along with button ID to the application

Parameters:
qb Button to add to this toolbar

References helpText(), receiveHelpText(), and slotClicked().

void gui::ToolBar::helpText ( const QString &  message  )  [signal]

Send help message when mouse cursor enters/leaves on of toolbar buttons. Help message is sent on entering and QString::null on leaving.

Parameters:
message Help message

Referenced by addButton(), and receiveHelpText().

void gui::ToolBar::itemClicked ( int  id  )  [signal]

Signal emitted when clicked on one of toolbar buttons. Send ID number associated with it.

Parameters:
id ID of button

Referenced by slotClicked().

void gui::ToolBar::receiveHelpText ( const QString &  message  )  [slot]

Signal called when receiving help message. Forward the message via helpText

Parameters:
message Help message

References helpText().

Referenced by addButton().

void gui::ToolBar::slotClicked ( int  id  )  [slot]

slot that will emit clicked with ID of button

Parameters:
id Id of button

References itemClicked().

Referenced by addButton().


The documentation for this class was generated from the following files: