Main Page | Modules | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members

VIEW::DatasetControl Class Reference
[Modular Widgets]

DatasetControl is a widget to manage and manipulate arbitrary data types. More...

#include <datasetControl.h>

Inheritance diagram for VIEW::DatasetControl:

VIEW::GenericControl VIEW::DockWidget VIEW::ModularWidget Embeddable VIEW::ConnectionObject List of all members.

Public Member Functions

 DatasetControl (QWidget *parent=0, const char *name=0) throw ()
 Default Constructor.
virtual ~DatasetControl () throw ()
 Destructor.
virtual void onNotify (Message *message) throw ()
 Overload this method to react to further messages Reacts to DatasetMessage, it will be passed on to the corresponding DatasetController.
virtual void initializeWidget (MainControl &main_control) throw ()
 Initialize the widget.
virtual void checkMenu (MainControl &main_control) throw ()
 Check the menu entries.
virtual bool canHandle (const String &fileformat) const
 Test if this ModularWidget can handle a given file format.
virtual bool openFile (const String &filename)
 Tell this ModularWidget to open a given file.
virtual bool registerController (DatasetController *con)
 Register a DatasetController.
DatasetControllergetController (const String &type)
 Return the registered DatasetController with the given type.
DatasetControllergetController (QTreeWidgetItem *item)
 Get the DatasetController, that is responsible for the item.
vector< Dataset * > getDatasets (const String &type)
 Get all Datasets with one type.
Size getSelectionSize ()
 Return the number of selected entries.
String getType (QTreeWidgetItem *item)
 Get the type for one QTreeWidgetItem.

Protected Slots

virtual void showGuestContextMenu (const QPoint &pos)
void updateSelection () throw ()
 Called when the item selection changes.

Protected Member Functions

 DatasetControl (const DatasetControl &control) throw ()

Protected Attributes

vector< DatasetController * > controllers_

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


Constructor & Destructor Documentation

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

Default Constructor.

Calls registerWidget().

Parameters:
parent the parent widget of the DatasetControl
name the name of the DatasetControl
See also:
ModularWidget

virtual VIEW::DatasetControl::~DatasetControl  )  throw () [virtual]
 

Destructor.


Member Function Documentation

virtual bool 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 VIEW::ModularWidget.

virtual void VIEW::DatasetControl::checkMenu MainControl main_control  )  throw () [virtual]
 

Check the menu entries.

Calls DatasetController::checkMenu

Reimplemented from VIEW::ModularWidget.

DatasetController* VIEW::DatasetControl::getController QTreeWidgetItem *  item  ) 
 

Get the DatasetController, that is responsible for the item.

DatasetController* VIEW::DatasetControl::getController const String type  ) 
 

Return the registered DatasetController with the given type.

vector<Dataset*> VIEW::DatasetControl::getDatasets const String type  ) 
 

Get all Datasets with one type.

See also:
Datset::getType

DatasetController::getType

virtual void VIEW::DatasetControl::initializeWidget MainControl main_control  )  throw () [virtual]
 

Initialize the widget.

Reimplemented from VIEW::GenericControl.

virtual void VIEW::DatasetControl::onNotify Message message  )  throw () [virtual]
 

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

Reimplemented from VIEW::GenericControl.

virtual bool 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 VIEW::ModularWidget.

virtual bool 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.

void VIEW::DatasetControl::updateSelection  )  throw () [protected, virtual, slot]
 

Called when the item selection changes.

Sends a DatasetMessage with type DatasetMessage::SELECTED.

Reimplemented from VIEW::GenericControl.