BALL 1.5.0
Public Types | List of all members
BALL::VIEW::GenericControl Class Reference

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

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

Public Types

typedef QList< QTreeWidgetItem * > ItemList
 typedef More...
 
- Public Types inherited from BALL::Embeddable
typedef std::vector< Embeddable * > EmbeddableVector
 

Constructors and Destructors

Embeddable Macro.

QTreeWidgetItemcontext_item_
 
TreeWidgetlistview
 
bool checkable_
 
 GenericControl (QWidget *parent=0, const char *name=0)
 
virtual ~GenericControl ()
 
ItemList getSelectedItems ()
 
QTreeWidgetItemaddRow (const QStringList &entries)
 
virtual void onNotify (Message *message)
 
virtual void initializeWidget (MainControl &main_control)
 
virtual void deleteCurrentItems ()
 Called by if del is pressed. More...
 
virtual void deselectOtherControls_ ()
 
virtual void updateSelection ()
 
virtual void onItemClicked (QTreeWidgetItem *, int)
 
virtual void removeItem_ (QTreeWidgetItem *item)
 

Additional Inherited Members

- Public Slots inherited from BALL::VIEW::DockWidget
virtual void dropEvent (QDropEvent *e)
 
virtual void dragEnterEvent (QDragEnterEvent *e)
 
virtual void showGuestContextMenu (const QPoint &)
 
- 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 initializeWidget (MainControl &main_control)
 
virtual void fetchPreferences (INIFile &inifile)
 
virtual void writePreferences (INIFile &inifile)
 
virtual void setWidgetVisible (bool state)
 For usage with Python: More...
 
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 ()
 
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 ()
 
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)
 
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
 
void setWorkingDirFromFilename_ (String filename)
 
virtual BALL_DEPRECATED void showHelp (const String &)
 
virtual void finalizeWidget (MainControl &main_control)
 
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 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
 
- Static Public Member Functions inherited from BALL::VIEW::ModularWidget
static void registerWidget (ModularWidget *mwidget)
 
- Protected Member Functions inherited from BALL::VIEW::DockWidget
 DockWidget ()
 
 DockWidget (const DockWidget &)
 
- Protected Member Functions inherited from BALL::VIEW::ConnectionObject
void notify_ (Message *message)
 
void notify_ (Message &message)
 
void onNotify_ (Message *message)
 
- 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)
 
- 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_
 
QList< QAction * > main_toolbar_actions_
 

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.

Definition at line 50 of file genericControl.h.

Member Typedef Documentation

◆ ItemList

typedef

Definition at line 58 of file genericControl.h.

Constructor & Destructor Documentation

◆ GenericControl()

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

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

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

◆ ~GenericControl()

virtual BALL::VIEW::GenericControl::~GenericControl ( )
virtual

Destructor.

Member Function Documentation

◆ addRow()

QTreeWidgetItem * BALL::VIEW::GenericControl::addRow ( const QStringList &  entries)

◆ deleteCurrentItems

virtual void BALL::VIEW::GenericControl::deleteCurrentItems ( )
inlinevirtualslot

Called by if del is pressed.

Reimplemented in BALL::VIEW::DatasetControl.

Definition at line 114 of file genericControl.h.

◆ deselectOtherControls_

virtual void BALL::VIEW::GenericControl::deselectOtherControls_ ( )
protectedvirtualslot

◆ getSelectedItems()

ItemList BALL::VIEW::GenericControl::getSelectedItems ( )

◆ initializeWidget()

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

Initialize the menu entries:

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

Reimplemented from BALL::VIEW::DockWidget.

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

◆ onItemClicked

virtual void BALL::VIEW::GenericControl::onItemClicked ( QTreeWidgetItem ,
int   
)
inlineprotectedvirtualslot

Definition at line 125 of file genericControl.h.

◆ onNotify()

virtual void BALL::VIEW::GenericControl::onNotify ( Message message)
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 BALL::VIEW::ConnectionObject.

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

◆ removeItem_()

virtual void BALL::VIEW::GenericControl::removeItem_ ( QTreeWidgetItem item)
protectedvirtual

◆ updateSelection

virtual void BALL::VIEW::GenericControl::updateSelection ( )
protectedvirtualslot

Member Data Documentation

◆ checkable_

bool BALL::VIEW::GenericControl::checkable_
protected

Definition at line 133 of file genericControl.h.

◆ context_item_

QTreeWidgetItem* BALL::VIEW::GenericControl::context_item_
protected

Definition at line 131 of file genericControl.h.

◆ listview

TreeWidget* BALL::VIEW::GenericControl::listview
protected

Definition at line 132 of file genericControl.h.