Loading...
Searching...
No Matches
BALL::VIEW::PluginDialog Class Reference

`#include <BALL/VIEW/DIALOGS/pluginDialog.h>`

Inheritance diagram for BALL::VIEW::PluginDialog:

## Public Member Functions

| PluginDialog (Preferences *preferences, QWidget *parent, const char *name="PluginDialog")
virtual | ~PluginDialog ()
virtual void | initializeWidget (MainControl &main_control)
virtual void | finalizeWidget (MainControl &main_control)
virtual void | writePreferenceEntries (INIFile &inifile)
| Store the settings of all registered objects.
virtual void | readPreferenceEntries (const INIFile &inifile)
| Restore the settings of all registered objects.
virtual void | registerChildEntry (PreferencesEntry *child)
virtual void | unregisterChildEntry (PreferencesEntry *child)
virtual void | restoreDefaultValues (bool=false)
| Set all registered objects to their default values.
bool | canHandle (BALLPlugin *plugin) const
bool | specificSetup_ (BALLPlugin *plugin)
bool | specificShutdown_ (BALLPlugin *plugin)
Public Member Functions inherited from BALL::VIEW::ModularWidget
| ModularWidget (const char *name="<ModularWidget>")
| ModularWidget (const ModularWidget &widget)
virtual | ~ModularWidget ()
virtual void | destroy ()
virtual void | clear ()
virtual void | checkMenu (MainControl &main_control)
QAction * | insertMenuEntry (Position parent_id, const QString &name, const QObject *receiver=0, const char *slot=0, const String &description="", QKeySequence accel=QKeySequence(), const QString &menu_hint=QString(""), UIOperationMode::OperationMode minimal_mode=UIOperationMode::MODE_ALL)
BALL_DEPRECATED void | setMenuHelp (QAction *, const String &)
virtual BALL_DEPRECATED void | registerForHelpSystem (const QObject *, const String &)
virtual void | addToolBarEntries (QToolBar *main_tb)
void | setIcon (QAction *action, const String &filename, bool add_to_main_toolbar=true)
virtual void | initializePreferencesTab (Preferences &preferences)
virtual void | finalizePreferencesTab (Preferences &preferences)
virtual void | applyPreferences ()
virtual void | fetchPreferences (INIFile &inifile)
virtual void | writePreferences (INIFile &inifile)
bool | lockComposites ()
bool | unlockComposites ()
| Unlock the Composites.
MainControl * | getMainControl () const
virtual void | setStatusbarText (const String &text, bool important=false)
virtual void | setStatusbarText (const QString &text, bool important=false)
String | getWorkingDir ()
| Implemented for convenience.
void | setWorkingDir (const String &dir)
| Implemented for convenience.
FragmentDB & | getFragmentDB () const
virtual void | dump (std::ostream &s=std::cout, Size depth=0) const
void | setWorkingDirFromFilename_ (String filename)
virtual BALL_DEPRECATED void | showHelp (const String &)
virtual bool | canHandle (const String &) const
virtual bool | openFile (const String &)
Public Member Functions inherited from BALL::Embeddable
| Embeddable (const String &identifier="<Embeddable>")
| Embeddable (const Embeddable &embeddable)
virtual | ~Embeddable ()
void | setIdentifier (const String &identifier)
const String & | getIdentifier () const
void | unregisterThis ()
virtual void | registerThis ()
Public Member Functions inherited from BALL::VIEW::ConnectionObject
| ConnectionObject ()
virtual | ~ConnectionObject ()
void | registerConnectionObject (ConnectionObject &object)
void | unregisterConnectionObject (ConnectionObject &object)
bool | isConnectionObjectRegistered (const ConnectionObject &object)
ConnectionObject * | getParent () const
ConnectionObject * | getRoot ()
virtual void | onNotify (Message *message)
virtual bool | isValid () const
Public Member Functions inherited from BALL::VIEW::PreferencesEntry
| PreferencesEntry ()
virtual | ~PreferencesEntry ()
void | setINIFileSectionName (const String &name)
| Set the name for the section in the INIFile.
const String & | getINIFileSectionName () const
| Get the name for the section in the INIFile.
void | setWidgetStackName (const String &name)
StackPages & | getStackPages ()
| Return all pages, that are to be shown in a parent QStackedWidget.
void | setWidgetStack (QStackedWidget *stack)
virtual void | showStackPage (Position nr)
| Show the specified page in the QStackedWidget.
virtual void | showStackPage (QWidget *widget)
| Show the specified page in the QStackedWidget.
virtual Position | currentStackPage () const
| Get the currently shown page in the QStackedWidget.
virtual void | storeValues ()
virtual void | restoreValues (bool all=false)
virtual void | dump (std::ostream &s=std::cout, Size depth=0) const
virtual bool | setValueAllowed (QObject *)
| Allows to prevent restoring of widgets.
Public Member Functions inherited from BALL::PluginHandler
virtual | ~PluginHandler ()
bool | startPlugin (BALLPlugin *plugin)
bool | stopPlugin (BALLPlugin *plugin)
virtual bool | isRunning (BALLPlugin *plugin) const

## Protected Slots

virtual void | addPluginDirectory ()
virtual void | removePluginDirectory ()
virtual void | directorySelectionChanged (const QModelIndex &, const QModelIndex &)
virtual void | pluginChanged (QModelIndex current, const QModelIndex &)
virtual void | togglePluginState ()

## Protected Member Functions

virtual void | setDefaultPluginDirectory ()
void | notify_ (Message *message)
void | notify_ (Message &message)
void | onNotify_ (Message *message)
Protected Member Functions inherited from BALL::VIEW::PreferencesEntry
void | registerWidgets_ ()
void | registerObject_ (QObject *widget)
void | unregisterObject_ (QObject *widget)
BALL_DEPRECATED void | registerWidgetForHelpSystem_ (const QWidget *, const String &)
void | restoreValues_ (bool all, const ValueMap &map)
void | insertStackEntry_ (QWidget *, const String &name)
bool | isSupported_ (QObject &widget)
bool | getValue_ (const QObject *widget, String &value)
bool | setValue_ (QObject *widget, const String &value)

## Additional Inherited Members

Public Types inherited from BALL::Embeddable
typedef std::vector< Embeddable * > | EmbeddableVector
Public Types inherited from BALL::VIEW::PreferencesEntry
typedef std::list< std::pair< QWidget *, String > > | StackPages
static void | registerWidget (ModularWidget *mwidget)
Protected Types inherited from BALL::VIEW::PreferencesEntry
typedef HashMap< const QObject *, String > | ValueMap
static void | registerInstance_ (const std::type_info &type, const Embeddable *instance)
static void | unregisterInstance_ (const Embeddable *instance)
static Size | countInstances_ (const std::type_info &type)
static Embeddable * | getInstance_ (const std::type_info &type, Position index)
static Embeddable * | getInstance_ (const std::type_info &type, const String &identifier)
QAction * | window_menu_entry_
bool | show_window_enty_
bool | default_visible_
QList< QAction * > | main_toolbar_actions_
Protected Attributes inherited from BALL::VIEW::PreferencesEntry
String | inifile_section_name_
HashSet< QObject * > | registered_objects_
ValueMap | default_values_
ValueMap | last_values_
QStackedWidget * | widget_stack_
StackPages | stack_pages_
Protected Attributes inherited from BALL::PluginHandler
std::list< BALLPlugin * > | running_plugins_

## Detailed Description

Dialog for handling the BALL plugins

This dialog shows all available plugins in a QListView. The user can opt to activate or deactivate any plugin and manipulate the plugin search path. Also this dialog acts as a plugin handler for VIEWPlugins. It is responsible for registering the ConfigDialog of a VIEWPlugin with the preferences system.

Definition at line 73 of file pluginDialog.h.

## Constructor & Destructor Documentation

## PluginDialog()

BALL::VIEW::PluginDialog::PluginDialog | ( | Preferences * | preferences,
|  | QWidget * | parent,
|  | const char * | name = "PluginDialog" )

## ~PluginDialog()

virtual BALL::VIEW::PluginDialog::~PluginDialog | ( |  | ) |

virtual

## Member Function Documentation

## addPluginDirectory

virtual void BALL::VIEW::PluginDialog::addPluginDirectory | ( |  | ) |

protected virtual slot

## canHandle()

bool BALL::VIEW::PluginDialog::canHandle | ( | BALLPlugin * | plugin | ) | const

virtual

This function is used to check whether this PluginHandler can initialize the passed plugin. A usual implementation would be something like:

return qobject_cast<MyPlugin*>(plugin) != 0;

Returns
  true if the handler can make use of the plugin, false otherwise

Implements BALL::PluginHandler.

## directorySelectionChanged

virtual void BALL::VIEW::PluginDialog::directorySelectionChanged | ( | const QModelIndex & | ,
|  | const QModelIndex & | )

protected virtual slot

## finalizeWidget()

virtual void BALL::VIEW::PluginDialog::finalizeWidget | ( | MainControl & | main_control | ) |

virtual

Finalization This method is called automatically before the main application is closed.

Reimplemented from BALL::VIEW::ModularWidget.

## initializeWidget()

virtual void BALL::VIEW::PluginDialog::initializeWidget | ( | MainControl & | main_control | ) |

virtual

Initialization. This method is called automatically before the main application is started. It adds the dialog's menu entries and connections.

Reimplemented from BALL::VIEW::ModularWidget.

## pluginChanged

virtual void BALL::VIEW::PluginDialog::pluginChanged | ( | QModelIndex | current,
|  | const QModelIndex & | )

protected virtual slot

## readPreferenceEntries()

virtual void BALL::VIEW::PluginDialog::readPreferenceEntries | ( | const INIFile & | inifile | ) |

virtual

Restore the settings of all registered objects.

Reimplemented from BALL::VIEW::PreferencesEntry.

## registerChildEntry()

virtual void BALL::VIEW::PluginDialog::registerChildEntry | ( | PreferencesEntry * | child | ) |

virtual

## removePluginDirectory

virtual void BALL::VIEW::PluginDialog::removePluginDirectory | ( |  | ) |

protected virtual slot

## restoreDefaultValues()

virtual void BALL::VIEW::PluginDialog::restoreDefaultValues | ( | bool | all = false | ) |

virtual

Set all registered objects to their default values.

Reimplemented from BALL::VIEW::PreferencesEntry.

## setDefaultPluginDirectory()

virtual void BALL::VIEW::PluginDialog::setDefaultPluginDirectory | ( |  | ) |

protected virtual

Tries to find and set the platform-dependend plugin default directory (relative to the location of the BALLView executable). If the default location does not exist, this function does nothing.

## specificSetup_()

bool BALL::VIEW::PluginDialog::specificSetup_ | ( | BALLPlugin * | plugin | ) |

virtual

A purely virtual function which is responsible for properly initialising the passed plugin instance.

The passed plugin may be assumed to be of a type that can be handled by this PluginHandler.

Returns
  true if the setup succeeded, false otherwise

Implements BALL::PluginHandler.

## specificShutdown_()

bool BALL::VIEW::PluginDialog::specificShutdown_ | ( | BALLPlugin * | plugin | ) |

virtual

A purely virtual function which is responsible for properly deinitialising the passed plugin instance.

The passed plugin may be assumed to be of a type that can be handled by this PluginHandler.

Returns
  true if the deinitialization succeeded, false otherwise

Implements BALL::PluginHandler.

## togglePluginState

virtual void BALL::VIEW::PluginDialog::togglePluginState | ( |  | ) |

protected virtual slot

## unregisterChildEntry()

virtual void BALL::VIEW::PluginDialog::unregisterChildEntry | ( | PreferencesEntry * | child | ) |

virtual

## writePreferenceEntries()

virtual void BALL::VIEW::PluginDialog::writePreferenceEntries | ( | INIFile & | inifile | ) |

virtual

Store the settings of all registered objects.

Reimplemented from BALL::VIEW::PreferencesEntry.