Commit 1c644268 authored by Jan Möbius's avatar Jan Möbius

OptionsInterface Documentation

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@11126 383ad7c9-94d9-4d36-a494-682f7c89f535
parent de18cddf
......@@ -46,17 +46,21 @@
#include <QtGui>
/**
* This Interface should be used by plugins which will provide their own options.
* For your options to show up in OpenFlippers Options window implement the initializeOptionsWidget() slot.
* The widget you return with this slot will be integrated into the options window and when
* the user hits the apply- or ok-button in the options window the slot applyOptions() is called and
* thus enables you to store the changes in your options.
/** \file OptionsInterface.hh
*
* Interface for adding a widget to OpenFlippers Options dialog .\ref optionsInterfacePage
*/
/** \brief Options Dialog interface
*
* \ref optionsInterfacePage "Detailed description"
* \n
*
* This interface can be used to by plugins to add their own widget to OpenFlippers Options Dialog.
*/
class OptionsInterface {
private slots :
public :
/// Destructor
......@@ -91,6 +95,58 @@ class OptionsInterface {
};
/** \page optionsInterfacePage Options Widget Interface
\image html OptionsInterface.png
\n
The OptionsInterface can be used by plugins to add an own widget to OpenFlippers
Options dialog.
This Interface should be used by plugins which will provide their own options widget in OpenFlippers Options Dialog.
For your options to show up in OpenFlippers Options window implement the initializeOptionsWidget() function.
The widget you return with this slot will be integrated into the options window and when
the user hits the apply- or ok-button in the options window the slot applyOptions() is called and
thus enables you to store the changes in your options.
To use the OptionsInterface:
<ul>
<li> include OptionsInterface in your plugins header file
<li> derive your plugin from the class OptionsInterface
<li> add Q_INTERFACES(OptionsInterface) to your plugin class
<li> Implement all functions from this interface
</ul>
\code
bool ExamplePlugin::initializeOptionsWidget(QWidget*& _widget){
// Global variable .. in header file: QWidget* optionswidget_;
optionsWidget_ = new QWidget();
// Setup widget here
//connect the signals
connect(optionsWidget_->setA, SIGNAL( clicked() ), this, SLOT( slotSetA() ) );
_widget = optionsWidget_;
return true;
}
void ExamplePlugin::applyOptions(){
// Get some value from the widget
int value = optionsWidget_->getValue();
//
...
}
\endcode
*/
Q_DECLARE_INTERFACE(OptionsInterface,"OpenFlipper.OptionsInterface/1.0")
#endif // OPTIONSINTERFACE_HH
......@@ -59,7 +59,6 @@ FileInterface
IniInterface
KeyInterface
LoadSaveInterface
OptionsInterface
PickingInterface
ProcessInterface
SecurityInterface
......@@ -107,12 +106,6 @@ Specify own view modes ( ViewModeInterface )
\image html ViewInterface.png
This interface is used to add additional view widgets ( ViewInterface ).
\subsection OptionsPlugin Options Interface
\image html OptionsInterface.png
This Interface is used by plugins which will provide their own options by
integrating its own options widget into OpenFlipper's options window. ( OptionsInterface )
\subsection BackupPlugin Backup Interface
\image html BackupInterface.png
Use this interface to backup data ( BackupInterface )
......@@ -145,6 +138,13 @@ This is an Interface for Logging to the included log widget. You can log to diff
Provides a function to create entries in the menubar ( \ref menuInterfacePage ).
\n
\subpage optionsInterfacePage
\image html OptionsInterface.png
This Interface is used by plugins which will provide their own options by
integrating an options widget into OpenFlipper's options window ( \ref optionsInterfacePage ).
\n
\subpage statusbarInterfacePage
\image html StatusbarInterface.png
This interface is used to display messages in the status bar or adding widgets to it ( \ref statusbarInterfacePage ).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment