Developer Documentation
Statusbar Interface

The StatusbarInterface can be used by plugins to send messages to OpenFlippers statusbar. The statusbar is located below the GL viewer.

Messages can be controlled via StatusbarInterface::setStatus(),StatusbarInterface::clearStatusMessage()

Additionally it is possible to add small widgets to it ( StatusbarInterface::addWidgetToStatusbar).

A small icon can be controlled to indicate OpenFlippers status via StatusbarInterface::setStatus().

To use the StatusbarInterface:

  • include StatusbarInterface.hh in your plugins header file
  • derive your plugin from the class StatusbarInterface
  • add Q_INTERFACES(StatusbarInterface) to your plugin class
  • And add the signals or slots you want to use to your plugin class (You don't need to implement all of them)

The following code shows a simple example to send a message to the statusbar.

void ExamplePlugin::function()
// Print the text "Your Status Message" for 4 seconds in the statusBar
emit showStatusMessage( tr("Your Status Message"), 4000 );

The following code shows a simple example to add a widget to the statusbar. Usually you should implement the BaseInterface::pluginsInitialized() function from BaseInterface. In this function you can setup your widget for the status bar.

void ExamplePlugin::pluginsInitialized()
// Create the widget
QWidget* infoBar = new QWidget();
// Setup buttons or anything else in your widget
// Add the new widget to the statusBar
emit addWidgetToStatusbar(infoBar);