BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | List of all members
BALL::VIEW::DatasetControl Class Reference

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

Inheritance diagram for BALL::VIEW::DatasetControl:
BALL::VIEW::GenericControl BALL::VIEW::DockWidget QDockWidget BALL::VIEW::ModularWidget BALL::Embeddable BALL::VIEW::ConnectionObject

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)
 
DatasetControllergetController (const String &type)
 
DatasetControllergetController (QTreeWidgetItem *item)
 
vector< Dataset * > getDatasets (const String &type)
 
Size getSelectionSize ()
 Return the number of selected entries. More...
 
String getType (QTreeWidgetItem *item)
 Get the type for one QTreeWidgetItem. More...
 
virtual void deleteCurrentItems ()
 Deletes the currently selected items. More...
 
- Public Member Functions inherited from BALL::VIEW::GenericControl
 GenericControl (QWidget *parent=0, const char *name=0)
 
virtual ~GenericControl ()
 
ItemList getSelectedItems ()
 
QTreeWidgetItemaddRow (const QStringList &entries)
 
- Public Member Functions inherited from BALL::VIEW::DockWidget
 DockWidget (QWidget *parent, const char *title=0)
 Use this constructor! More...
 
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: More...
 
virtual void registerForHelpSystem (const QObject *widget, const String &url)
 
QGridLayout * getGuestLayout ()
 
- Public Member Functions inherited from BALL::VIEW::ModularWidget
void setWorkingDirFromFilename_ (String filename)
 
virtual void showHelp (const String &url)
 
 ModularWidget (const char *name="<ModularWidget>")
 
 ModularWidget (const ModularWidget &widget)
 
virtual ~ModularWidget ()
 
virtual void destroy ()
 
virtual void clear ()
 
QAction * insertMenuEntry (Position parent_id, const String &name, const QObject *receiver=0, const char *slot=0, const String &description="", QKeySequence accel=QKeySequence())
 
void setMenuHint (const String &hint)
 
void setMenuHelp (const String &url)
 
virtual void addToolBarEntries (QToolBar *main_tb)
 
void setIcon (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. More...
 
MainControlgetMainControl () const
 
virtual void setStatusbarText (const String &text, bool important=false)
 
virtual void setStatusbarText (const QString &text, bool important=false)
  More...
 
String getWorkingDir ()
 Implemented for convenience. More...
 
void setWorkingDir (const String &dir)
 Implemented for convenience. More...
 
FragmentDBgetFragmentDB () const
 
virtual void dump (std::ostream &s=std::cout, Size depth=0) const
 
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 StringgetIdentifier () 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)
 
ConnectionObjectgetParent () const
 
ConnectionObjectgetRoot ()
 
virtual bool isValid () const
 

Protected Slots

virtual void showGuestContextMenu (const QPoint &pos)
 
void updateSelection ()
 
- Protected Slots inherited from BALL::VIEW::GenericControl
virtual void deselectOtherControls_ ()
 
virtual void updateSelection ()
 
virtual void onItemClicked (QTreeWidgetItem *, int)
 

Protected Member Functions

 DatasetControl (const DatasetControl &control)
 
- Protected Member Functions inherited from BALL::VIEW::GenericControl
virtual void removeItem_ (QTreeWidgetItem *item)
 
- Protected Member Functions inherited from BALL::VIEW::DockWidget
 DockWidget ()
 
 DockWidget (const DockWidget &)
 

Protected Attributes

vector< DatasetController * > controllers_
 
- Protected Attributes inherited from BALL::VIEW::GenericControl
QTreeWidgetItemcontext_item_
 
TreeWidgetlistview
 
bool checkable_
 
- Protected Attributes inherited from BALL::VIEW::DockWidget
QWidgetcontainer_
 
QWidgetguest_
 
QGridLayout * layout_
 
- Protected Attributes inherited from BALL::VIEW::ModularWidget
QAction * window_menu_entry_
 
bool show_window_enty_
 
bool default_visible_
 
QAction * last_action_
 
QList< QAction * > main_toolbar_actions_
 

Additional Inherited Members

- Public Types inherited from BALL::VIEW::GenericControl
typedef QList< QTreeWidgetItem * > ItemList
 typedef More...
 
- Public Slots inherited from BALL::VIEW::GenericControl
- Static Public Member Functions inherited from BALL::VIEW::ModularWidget
static void registerWidget (ModularWidget *mwidget) throw (Exception::NullPointer)
 
- Static Protected Member Functions inherited from BALL::Embeddable
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 EmbeddablegetInstance_ (const std::type_info &type, Position index)
 
static EmbeddablegetInstance_ (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

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

Default Constructor. Calls registerWidget().

Parameters
parentthe parent widget of the DatasetControl
namethe name of the DatasetControl
See Also
ModularWidget
virtual BALL::VIEW::DatasetControl::~DatasetControl ( )
virtual

Destructor.

BALL::VIEW::DatasetControl::DatasetControl ( const DatasetControl control)
protected

Member Function Documentation

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
fileformshort string with the file extension (e.g. PDB)
See Also
openFile

Reimplemented from BALL::VIEW::ModularWidget.

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

Check the menu entries. Calls DatasetController::checkMenu

Reimplemented from BALL::VIEW::ModularWidget.

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

Deletes the currently selected items.

Reimplemented from BALL::VIEW::GenericControl.

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

Return the registered DatasetController with the given type.

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

Get the DatasetController, that is responsible for the item.

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

Get all Datasets with one type

See Also
Datset::getType
DatasetController::getType
Size BALL::VIEW::DatasetControl::getSelectionSize ( )

Return the number of selected entries.

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

Get the type for one QTreeWidgetItem.

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

Initialize the widget.

Reimplemented from BALL::VIEW::GenericControl.

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.

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.

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.

virtual void BALL::VIEW::DatasetControl::showGuestContextMenu ( const QPoint &  pos)
protectedvirtualslot
void BALL::VIEW::DatasetControl::updateSelection ( )
protectedslot

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

Member Data Documentation

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

Definition at line 136 of file datasetControl.h.