BALL  1.5.0
List of all members
BALL::VIEW::GeometricControl Class Reference

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

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

Public Slots

Public slots
virtual void renameRepresentation ()
 
virtual void selectAtoms ()
 
virtual void selectedRepresentation (Representation &representation, bool state)
 
virtual void updateSelection ()
 
virtual void focus ()
 
virtual void enterMoveMode ()
 
virtual void flipClippingCapping ()
 
virtual void flipClippingPlane ()
 
virtual void setClippingPosition ()
 
virtual void setClippingPlaneX ()
 
virtual void setClippingPlaneY ()
 
virtual void setClippingPlaneZ ()
 
void hideShowClippingPlane ()
 
virtual void selectClipRepresentations ()
 
void createNewClippingPlane ()
 
void duplicate ()
 
void saveSurface ()
 
void loadSurface ()
 
ModifyRepresentationDialoggetModifySurfaceDialog ()
 
- Public Slots inherited from BALL::VIEW::GenericControl
virtual void deleteCurrentItems ()
 Called by if del is pressed. More...
 
- 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

Constructors and Destructors
 GeometricControl (QWidget *parent=0, const char *name=0)
 
virtual ~GeometricControl ()
 Destructor. More...
 
virtual void clear ()
 
virtual void initializeWidget (MainControl &main_control)
 
virtual void addRepresentation (Representation &rep)
 
virtual void removeRepresentation (Representation &rep)
 
virtual void updateRepresentation (Representation &rep, bool force=false)
 
std::list< Representation * > getHighlightedRepresentations () const
 
virtual void onNotify (Message *message)
 
virtual void buildContextMenu ()
 
virtual void checkMenu (MainControl &main_control)
 Overloaded from ModularWidget. More...
 
void moveItems (const TransformationMessage &msg)
 
void updateClippingPlanes ()
 
- 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...
 
QGridLayout * getGuestLayout ()
 
- Public Member Functions inherited from BALL::VIEW::ModularWidget
 ModularWidget (const char *name="<ModularWidget>")
 
 ModularWidget (const ModularWidget &widget)
 
virtual ~ModularWidget ()
 
virtual void destroy ()
 
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
 

Protected members *‍/

‍**

enum  ColumnID { COLUMN_ID__TYPE = 0 , COLUMN_ID__Properties }
 
QMenu context_menu_
 
QMenu clipping_plane_context_menu_
 
Representationcontext_representation_
 
ClippingPlanecontext_plane_
 
HashMap< Representation *, QTreeWidgetItem * > representation_to_item_
 
HashMap< ClippingPlane *, QTreeWidgetItem * > plane_to_item_
 
HashMap< QTreeWidgetItem *, Representation * > item_to_representation_
 
HashMap< QTreeWidgetItem *, ClippingPlane * > item_to_plane_
 
ModifyRepresentationDialogmodify_rep_dialog_
 
bool creating_representations_
 
bool ignore_change_
 
QAction * menu_clipping_plane_
 
QAction * menu_load_surface_
 
QAction * modify_surface_
 
vector< QAction * > context_menu_actions_
 
virtual void modifyRepresentation_ ()
 
virtual void generateListViewItem_ (Representation &rep)
 
virtual void deleteCurrentItems ()
 Overloaded from GenericControl. More...
 
virtual void setupProximityLight ()
 
virtual void onItemClicked (QTreeWidgetItem *item, int col)
 
void showGuestContextMenu (const QPoint &pos)
 
void addItem_ (const String &text, const char *member, QWidget *widget=0)
 
 GeometricControl (const GeometricControl &control)
 
void setClippingPlane_ (const Vector3 &n)
 

Additional Inherited Members

- Public Types inherited from BALL::VIEW::GenericControl
typedef QList< QTreeWidgetItem * > ItemList
 typedef More...
 
- Public Types inherited from BALL::Embeddable
typedef std::vector< Embeddable * > EmbeddableVector
 
- Static Public Member Functions inherited from BALL::VIEW::ModularWidget
static void registerWidget (ModularWidget *mwidget)
 
- Protected Slots inherited from BALL::VIEW::GenericControl
virtual void deselectOtherControls_ ()
 
virtual void updateSelection ()
 
virtual void onItemClicked (QTreeWidgetItem *, int)
 
- 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 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::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_
 
QList< QAction * > main_toolbar_actions_
 

Detailed Description

GeometricControl is a widget to display the list of representations. There are methods available to modify the representations. The method buildContextMenu is a means to create a customizable context menu entries. To use this widget in the application just create it with MainControl as parent and all in the RepresentationManager created Representation objects will show up in the GeometricControl.

Definition at line 41 of file geometricControl.h.

Member Enumeration Documentation

◆ ColumnID

Enumerator
COLUMN_ID__TYPE 
COLUMN_ID__Properties 

Definition at line 222 of file geometricControl.h.

Constructor & Destructor Documentation

◆ GeometricControl() [1/2]

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

Default Constructor. There are two columns for this control. The Type column and the Properties column. The Type column shows the model type (e.g. LineModel), while the Properties column contains the number of Composites and GeometricObjects. There is a connection from the signal rightButtonClicked from the QT-library to the method onContextMenu. See documentation of QT-library for information concerning signal/slot mechanism. Calls registerWidget.

Parameters
parentthe parent widget of this control (See documentation of QT-library for information concerning widgets)
namethe name of this control
See also
QListView
ModularWidget
onContextMenu

◆ ~GeometricControl()

virtual BALL::VIEW::GeometricControl::~GeometricControl ( )
virtual

Destructor.

◆ GeometricControl() [2/2]

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

Member Function Documentation

◆ addItem_()

void BALL::VIEW::GeometricControl::addItem_ ( const String text,
const char *  member,
QWidget widget = 0 
)
protected

◆ addRepresentation()

virtual void BALL::VIEW::GeometricControl::addRepresentation ( Representation rep)
virtual

Insert a Representation.

◆ buildContextMenu()

virtual void BALL::VIEW::GeometricControl::buildContextMenu ( )
virtual

Build a context menu for the Representation object the QListViewItem object.

Parameters
representationthe Representation object for that a context menu should be created
See also
insertContextMenuEntry
onContextMenu

◆ checkMenu()

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

Overloaded from ModularWidget.

Reimplemented from BALL::VIEW::ModularWidget.

◆ clear()

virtual void BALL::VIEW::GeometricControl::clear ( )
inlinevirtual

Explicit default initialization. Empty for further purpose.

Reimplemented from BALL::VIEW::ModularWidget.

Definition at line 77 of file geometricControl.h.

◆ createNewClippingPlane

void BALL::VIEW::GeometricControl::createNewClippingPlane ( )
slot

◆ deleteCurrentItems

virtual void BALL::VIEW::GeometricControl::deleteCurrentItems ( )
protectedvirtualslot

Overloaded from GenericControl.

◆ duplicate

void BALL::VIEW::GeometricControl::duplicate ( )
slot

◆ enterMoveMode

virtual void BALL::VIEW::GeometricControl::enterMoveMode ( )
virtualslot

◆ flipClippingCapping

virtual void BALL::VIEW::GeometricControl::flipClippingCapping ( )
virtualslot

◆ flipClippingPlane

virtual void BALL::VIEW::GeometricControl::flipClippingPlane ( )
virtualslot

◆ focus

virtual void BALL::VIEW::GeometricControl::focus ( )
virtualslot

◆ generateListViewItem_

virtual void BALL::VIEW::GeometricControl::generateListViewItem_ ( Representation rep)
protectedvirtualslot

Generate the item for a representation.

◆ getHighlightedRepresentations()

std::list<Representation*> BALL::VIEW::GeometricControl::getHighlightedRepresentations ( ) const

Mutable inspection of the selection. Non-mutable inspection of the selection.

◆ getModifySurfaceDialog

ModifyRepresentationDialog* BALL::VIEW::GeometricControl::getModifySurfaceDialog ( )
slot

◆ hideShowClippingPlane

void BALL::VIEW::GeometricControl::hideShowClippingPlane ( )
slot

◆ initializeWidget()

virtual void BALL::VIEW::GeometricControl::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::GenericControl.

◆ loadSurface

void BALL::VIEW::GeometricControl::loadSurface ( )
slot

◆ modifyRepresentation_

virtual void BALL::VIEW::GeometricControl::modifyRepresentation_ ( )
protectedvirtualslot

◆ moveItems()

void BALL::VIEW::GeometricControl::moveItems ( const TransformationMessage msg)

◆ onItemClicked

virtual void BALL::VIEW::GeometricControl::onItemClicked ( QTreeWidgetItem item,
int  col 
)
protectedvirtualslot

◆ onNotify()

virtual void BALL::VIEW::GeometricControl::onNotify ( Message message)
virtual

Message handling.

See also
Message

Reimplemented from BALL::VIEW::GenericControl.

◆ removeRepresentation()

virtual void BALL::VIEW::GeometricControl::removeRepresentation ( Representation rep)
virtual

Remove a Representation.

◆ renameRepresentation

virtual void BALL::VIEW::GeometricControl::renameRepresentation ( )
virtualslot

◆ saveSurface

void BALL::VIEW::GeometricControl::saveSurface ( )
slot

◆ selectAtoms

virtual void BALL::VIEW::GeometricControl::selectAtoms ( )
virtualslot

◆ selectClipRepresentations

virtual void BALL::VIEW::GeometricControl::selectClipRepresentations ( )
virtualslot

◆ selectedRepresentation

virtual void BALL::VIEW::GeometricControl::selectedRepresentation ( Representation representation,
bool  state 
)
virtualslot

◆ setClippingPlane_()

void BALL::VIEW::GeometricControl::setClippingPlane_ ( const Vector3 n)
protected

◆ setClippingPlaneX

virtual void BALL::VIEW::GeometricControl::setClippingPlaneX ( )
virtualslot

◆ setClippingPlaneY

virtual void BALL::VIEW::GeometricControl::setClippingPlaneY ( )
virtualslot

◆ setClippingPlaneZ

virtual void BALL::VIEW::GeometricControl::setClippingPlaneZ ( )
virtualslot

◆ setClippingPosition

virtual void BALL::VIEW::GeometricControl::setClippingPosition ( )
virtualslot

◆ setupProximityLight

virtual void BALL::VIEW::GeometricControl::setupProximityLight ( )
protectedvirtualslot

◆ showGuestContextMenu

void BALL::VIEW::GeometricControl::showGuestContextMenu ( const QPoint &  pos)
protectedslot

◆ updateClippingPlanes()

void BALL::VIEW::GeometricControl::updateClippingPlanes ( )

◆ updateRepresentation()

virtual void BALL::VIEW::GeometricControl::updateRepresentation ( Representation rep,
bool  force = false 
)
virtual

Update a Representation.

◆ updateSelection

virtual void BALL::VIEW::GeometricControl::updateSelection ( )
virtualslot

Member Data Documentation

◆ clipping_plane_context_menu_

QMenu BALL::VIEW::GeometricControl::clipping_plane_context_menu_
protected

Definition at line 232 of file geometricControl.h.

◆ context_menu_

QMenu BALL::VIEW::GeometricControl::context_menu_
protected

Definition at line 231 of file geometricControl.h.

◆ context_menu_actions_

vector<QAction*> BALL::VIEW::GeometricControl::context_menu_actions_
protected

Definition at line 248 of file geometricControl.h.

◆ context_plane_

ClippingPlane* BALL::VIEW::GeometricControl::context_plane_
protected

Definition at line 235 of file geometricControl.h.

◆ context_representation_

Representation* BALL::VIEW::GeometricControl::context_representation_
protected

Definition at line 234 of file geometricControl.h.

◆ creating_representations_

bool BALL::VIEW::GeometricControl::creating_representations_
protected

Definition at line 244 of file geometricControl.h.

◆ ignore_change_

bool BALL::VIEW::GeometricControl::ignore_change_
protected

Definition at line 245 of file geometricControl.h.

◆ item_to_plane_

HashMap<QTreeWidgetItem*, ClippingPlane*> BALL::VIEW::GeometricControl::item_to_plane_
protected

Definition at line 240 of file geometricControl.h.

◆ item_to_representation_

HashMap<QTreeWidgetItem*, Representation*> BALL::VIEW::GeometricControl::item_to_representation_
protected

Definition at line 239 of file geometricControl.h.

◆ menu_clipping_plane_

QAction* BALL::VIEW::GeometricControl::menu_clipping_plane_
protected

Definition at line 247 of file geometricControl.h.

◆ menu_load_surface_

QAction * BALL::VIEW::GeometricControl::menu_load_surface_
protected

Definition at line 247 of file geometricControl.h.

◆ modify_rep_dialog_

ModifyRepresentationDialog* BALL::VIEW::GeometricControl::modify_rep_dialog_
protected

Definition at line 242 of file geometricControl.h.

◆ modify_surface_

QAction * BALL::VIEW::GeometricControl::modify_surface_
protected

Definition at line 247 of file geometricControl.h.

◆ plane_to_item_

HashMap<ClippingPlane*, QTreeWidgetItem*> BALL::VIEW::GeometricControl::plane_to_item_
protected

Definition at line 238 of file geometricControl.h.

◆ representation_to_item_

HashMap<Representation*, QTreeWidgetItem*> BALL::VIEW::GeometricControl::representation_to_item_
protected

Definition at line 237 of file geometricControl.h.