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

VIEW::GenericControl Class Reference
[Modular Widgets]

GenericControl is a widget to display the structure of Composite objects. More...

#include <genericControl.h>

Inheritance diagram for VIEW::GenericControl:

VIEW::DockWidget VIEW::ModularWidget Embeddable VIEW::ConnectionObject VIEW::DatasetControl VIEW::GeometricControl VIEW::MolecularControl List of all members.

Public Types

typedef QList< QTreeWidgetItem * > ItemList
 typedef

Public Slots

virtual void deleteCurrentItems () throw ()
 Called by if del is pressed.

Public Member Functions

Constructors and Destructors
 GenericControl (QWidget *parent=0, const char *name=0) throw ()
 Default Constructor.
virtual ~GenericControl () throw ()
 Destructor.
ItemList getSelectedItems () throw ()
QTreeWidgetItem * addRow (const QStringList &entries)
virtual void onNotify (Message *message) throw ()
 React to a DeselectControlsMessage.
virtual void initializeWidget (MainControl &main_control) throw ()
 Initialize the menu entries: - delete.

Protected Slots

virtual void deselectOtherControls_ ()
virtual void updateSelection ()
virtual void onItemClicked (QTreeWidgetItem *, int)

Protected Member Functions

virtual void removeItem_ (QTreeWidgetItem *item) throw ()

Protected Attributes

QTreeWidgetItem * context_item_
TreeWidgetlistview
bool checkable_

Detailed Description

GenericControl is a widget to display the structure of Composite objects.

It uses the datastructure QListView from the QT-libary. There are two columns. The Name column and the Type column. In the Name column the item tree will be shown and in the Type column the type of each item. There are methods available to change the structure as well as copy or paste objects into the GenericControl. Various virtual methods can be overridden to customize the behavior of these structure changing methods. To use this widget in the application just create it with MainGenericControl as parent.


Constructor & Destructor Documentation

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

Default Constructor.

(See documentation of QT-library for information concerning widgets and signal/slot mechanism.)

Calls registerWidget().
Parameters:
parent the parent widget of the GenericControl
name the name of the GenericControl
See also:
ModularWidget

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

Destructor.


Member Function Documentation

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

Initialize the menu entries: - delete.

This method is called automatically immediately before the main application is started by MainControl::show.
Parameters:
main_control the MainControl object to be initialized with this ModularWidget

Reimplemented from VIEW::DockWidget.

Reimplemented in VIEW::DatasetControl, VIEW::GeometricControl, and VIEW::MolecularControl.

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

React to a DeselectControlsMessage.

If such a message is send from other GenericControls, this GenericControl deselects all its items, so that only one GenericControl has a Selection at any time. Call this Method in the derived Classes in their onNotify().

Reimplemented from VIEW::ConnectionObject.

Reimplemented in VIEW::DatasetControl, VIEW::GeometricControl, and VIEW::MolecularControl.