Loading...
Searching...
No Matches
BALL::VIEW::DatasetControl Class Reference
Visualisation » Modular Widgets

`#include <BALL/VIEW/WIDGETS/datasetControl.h>`

Inheritance diagram for BALL::VIEW::DatasetControl:

## Public Member Functions

| DatasetControl (QWidget *parent=0, const char *name=0)
virtual | ~DatasetControl ()
virtual void | onNotify (Message *message)
virtual void | initializeWidget (MainControl &main_control)
virtual void | checkMenu (MainControl &main_control)
virtual bool | canHandle (const String &fileformat) const
virtual bool | openFile (const String &filename)
virtual bool | registerController (DatasetController *con)
DatasetController * | getController (const String &type)
DatasetController * | getController (QTreeWidgetItem *item)
vector< Dataset * > | getDatasets (const String &type)
Size | getSelectionSize ()
| Return the number of selected entries.
String | getType (QTreeWidgetItem *item)
| Get the type for one QTreeWidgetItem.
virtual void | deleteCurrentItems ()
| Deletes the currently selected items.
| GenericControl (QWidget *parent=0, const char *name=0)
virtual | ~GenericControl ()
ItemList | getSelectedItems ()
QTreeWidgetItem * | addRow (const QStringList &entries)
Public Member Functions inherited from BALL::VIEW::DockWidget
| DockWidget (QWidget *parent, const char *title=0)
| Use this constructor!
virtual | ~DockWidget ()
void | setGuest (QWidget &guest)
virtual void | fetchPreferences (INIFile &inifile)
virtual void | writePreferences (INIFile &inifile)
virtual void | setWidgetVisible (bool state)
| For usage with Python:
QGridLayout * | getGuestLayout ()
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 ()
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 ()
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 void | finalizeWidget (MainControl &main_control)
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 bool | isValid () const

## Protected Slots

virtual void | showGuestContextMenu (const QPoint &pos)
void | updateSelection ()
virtual void | deselectOtherControls_ ()
virtual void | updateSelection ()
virtual void | onItemClicked (QTreeWidgetItem *, int)

## Protected Member Functions

| DatasetControl (const DatasetControl &control)
virtual void | removeItem_ (QTreeWidgetItem *item)
Protected Member Functions inherited from BALL::VIEW::DockWidget
| DockWidget ()
| DockWidget (const DockWidget &)
void | notify_ (Message *message)
void | notify_ (Message &message)
void | onNotify_ (Message *message)

## Protected Attributes

vector< DatasetController * > | controllers_
QTreeWidgetItem * | context_item_
TreeWidget * | listview
bool | checkable_
Protected Attributes inherited from BALL::VIEW::DockWidget
QWidget * | container_
QWidget * | guest_
QGridLayout * | layout_
QAction * | window_menu_entry_
bool | show_window_enty_
bool | default_visible_
QList< QAction * > | main_toolbar_actions_

## Additional Inherited Members

Public Types inherited from BALL::VIEW::GenericControl
typedef QList< QTreeWidgetItem * > | ItemList
| typedef
Public Types inherited from BALL::Embeddable
typedef std::vector< Embeddable * > | EmbeddableVector
Public Slots inherited from BALL::VIEW::DockWidget
virtual void | dropEvent (QDropEvent *e)
virtual void | dragEnterEvent (QDragEnterEvent *e)
virtual void | showGuestContextMenu (const QPoint &)
static void | registerWidget (ModularWidget *mwidget)
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)

## Detailed Description

DatasetControl is a widget to manage and manipulate arbitrary data types. For each type a derived DatasetController class must be registered. The DatasetControl has three columns: Name, from (Composite) and Type.

See also
  DatasetControl
  Dataset
  DatasetMessage

Definition at line 36 of file datasetControl.h.

## Constructor & Destructor Documentation

## DatasetControl() [1/2]

BALL::VIEW::DatasetControl::DatasetControl | ( | QWidget * | parent = 0,
|  | const char * | name = 0 )

Default Constructor. Calls registerWidget().

Parameters

  parent | the parent widget of the DatasetControl
  name | the name of the DatasetControl

See also
  ModularWidget

## ~DatasetControl()

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

virtual

Destructor.

## DatasetControl() [2/2]

BALL::VIEW::DatasetControl::DatasetControl | ( | const DatasetControl & | control | ) |

protected

## Member Function Documentation

## canHandle()

virtual bool BALL::VIEW::DatasetControl::canHandle | ( | const String & | fileformat | ) | const

virtual

Test if this ModularWidget can handle a given file format. (Overloaded from ModularWidget) Calls DatasetControl::getSupportedFileFormats.

Parameters

  fileform | short string with the file extension (e.g. PDB)

See also
  openFile

Reimplemented from BALL::VIEW::ModularWidget.

## checkMenu()

virtual void BALL::VIEW::DatasetControl::checkMenu | ( | MainControl & | main_control | ) |

virtual

Check the menu entries. Calls DatasetController::checkMenu

Reimplemented from BALL::VIEW::ModularWidget.

## deleteCurrentItems()

virtual void BALL::VIEW::DatasetControl::deleteCurrentItems | ( |  | ) |

virtual

Deletes the currently selected items.

Reimplemented from BALL::VIEW::GenericControl.

## getController() [1/2]

DatasetController * BALL::VIEW::DatasetControl::getController | ( | const String & | type | ) |

Return the registered DatasetController with the given type.

## getController() [2/2]

DatasetController * BALL::VIEW::DatasetControl::getController | ( | QTreeWidgetItem * | item | ) |

Get the DatasetController, that is responsible for the item.

## getDatasets()

vector< Dataset * > BALL::VIEW::DatasetControl::getDatasets | ( | const String & | type | ) |

Get all Datasets with one type

See also
  Datset::getType
  DatasetController::getType

## getSelectionSize()

Size BALL::VIEW::DatasetControl::getSelectionSize | ( |  | ) |

Return the number of selected entries.

## getType()

String BALL::VIEW::DatasetControl::getType | ( | QTreeWidgetItem * | item | ) |

Get the type for one QTreeWidgetItem.

## initializeWidget()

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

virtual

Initialize the widget.

Reimplemented from BALL::VIEW::GenericControl.

## onNotify()

virtual void BALL::VIEW::DatasetControl::onNotify | ( | Message * | message | ) |

virtual

Overload this method to react to further messages Reacts to DatasetMessage, it will be passed on to the corresponding DatasetController.

Reimplemented from BALL::VIEW::GenericControl.

## openFile()

virtual bool BALL::VIEW::DatasetControl::openFile | ( | const String & | filename | ) |

virtual

Tell this ModularWidget to open a given file. (Overloaded from ModularWidget) Will call DatasetController::openFile.

See also
  canHandle

Reimplemented from BALL::VIEW::ModularWidget.

## registerController()

virtual bool BALL::VIEW::DatasetControl::registerController | ( | DatasetController * | con | ) |

virtual

Register a DatasetController. The DatasetController must be created on the heap and will be deleted together with the DatasetControl.

## showGuestContextMenu

virtual void BALL::VIEW::DatasetControl::showGuestContextMenu | ( | const QPoint & | pos | ) |

protected virtual slot

## updateSelection

void BALL::VIEW::DatasetControl::updateSelection | ( |  | ) |

protected slot

Called when the item selection changes. Sends a DatasetMessage with type DatasetMessage::SELECTED.

## Member Data Documentation

## controllers_

vector<DatasetController*> BALL::VIEW::DatasetControl::controllers_

protected

Definition at line 136 of file datasetControl.h.