BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Protected Types | Protected Slots | Protected Member Functions | Protected Attributes | 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...
 
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 ()
 
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)
 
void setMenuHelp (QAction *action, const String &url)
 
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
 
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 Types

enum  ColumnID { COLUMN_ID__TYPE = 0, COLUMN_ID__Properties }
 

Protected Slots

virtual void onItemClicked (QTreeWidgetItem *item, int col)
 
void showGuestContextMenu (const QPoint &pos)
 
Protected members
virtual void modifyRepresentation_ ()
 
virtual void generateListViewItem_ (Representation &rep)
 
virtual void deleteCurrentItems ()
 Overloaded from GenericControl. More...
 
virtual void setupProximityLight ()
 
- Protected Slots inherited from BALL::VIEW::GenericControl
virtual void deselectOtherControls_ ()
 
virtual void updateSelection ()
 
virtual void onItemClicked (QTreeWidgetItem *, int)
 

Protected Member Functions

void addItem_ (const String &text, const char *member, QWidget *widget=0)
 
 GeometricControl (const GeometricControl &control)
 
void setClippingPlane_ (const Vector3 &n)
 
- 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 onNotify_ (Message *message)
 
void notify_ (Message *message)
 
void notify_ (Message &message)
 

Protected Attributes

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_
 
- 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_
 

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) 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

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

Enumerator
COLUMN_ID__TYPE 
COLUMN_ID__Properties 

Definition at line 222 of file geometricControl.h.

Constructor & Destructor Documentation

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
virtual BALL::VIEW::GeometricControl::~GeometricControl ( )
virtual

Destructor.

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

Member Function Documentation

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

Insert a Representation.

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
virtual void BALL::VIEW::GeometricControl::checkMenu ( MainControl main_control)
virtual

Overloaded from ModularWidget.

Reimplemented from BALL::VIEW::ModularWidget.

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.

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

Overloaded from GenericControl.

void BALL::VIEW::GeometricControl::duplicate ( )
slot
virtual void BALL::VIEW::GeometricControl::enterMoveMode ( )
virtualslot
virtual void BALL::VIEW::GeometricControl::flipClippingCapping ( )
virtualslot
virtual void BALL::VIEW::GeometricControl::flipClippingPlane ( )
virtualslot
virtual void BALL::VIEW::GeometricControl::focus ( )
virtualslot
virtual void BALL::VIEW::GeometricControl::generateListViewItem_ ( Representation rep)
protectedvirtualslot

Generate the item for a representation.

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

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

ModifyRepresentationDialog* BALL::VIEW::GeometricControl::getModifySurfaceDialog ( )
slot
void BALL::VIEW::GeometricControl::hideShowClippingPlane ( )
slot
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.

void BALL::VIEW::GeometricControl::loadSurface ( )
slot
virtual void BALL::VIEW::GeometricControl::modifyRepresentation_ ( )
protectedvirtualslot
void BALL::VIEW::GeometricControl::moveItems ( const TransformationMessage msg)
virtual void BALL::VIEW::GeometricControl::onItemClicked ( QTreeWidgetItem item,
int  col 
)
protectedvirtualslot
virtual void BALL::VIEW::GeometricControl::onNotify ( Message message)
virtual

Message handling.

See also
Message

Reimplemented from BALL::VIEW::GenericControl.

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

Remove a Representation.

virtual void BALL::VIEW::GeometricControl::renameRepresentation ( )
virtualslot
void BALL::VIEW::GeometricControl::saveSurface ( )
slot
virtual void BALL::VIEW::GeometricControl::selectAtoms ( )
virtualslot
virtual void BALL::VIEW::GeometricControl::selectClipRepresentations ( )
virtualslot
virtual void BALL::VIEW::GeometricControl::selectedRepresentation ( Representation representation,
bool  state 
)
virtualslot
void BALL::VIEW::GeometricControl::setClippingPlane_ ( const Vector3 n)
protected
virtual void BALL::VIEW::GeometricControl::setClippingPlaneX ( )
virtualslot
virtual void BALL::VIEW::GeometricControl::setClippingPlaneY ( )
virtualslot
virtual void BALL::VIEW::GeometricControl::setClippingPlaneZ ( )
virtualslot
virtual void BALL::VIEW::GeometricControl::setClippingPosition ( )
virtualslot
virtual void BALL::VIEW::GeometricControl::setupProximityLight ( )
protectedvirtualslot
void BALL::VIEW::GeometricControl::showGuestContextMenu ( const QPoint &  pos)
protectedslot
void BALL::VIEW::GeometricControl::updateClippingPlanes ( )
virtual void BALL::VIEW::GeometricControl::updateRepresentation ( Representation rep,
bool  force = false 
)
virtual

Update a Representation.

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

Member Data Documentation

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

Definition at line 232 of file geometricControl.h.

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

Definition at line 231 of file geometricControl.h.

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

Definition at line 248 of file geometricControl.h.

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

Definition at line 235 of file geometricControl.h.

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

Definition at line 234 of file geometricControl.h.

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

Definition at line 244 of file geometricControl.h.

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

Definition at line 245 of file geometricControl.h.

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

Definition at line 240 of file geometricControl.h.

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

Definition at line 239 of file geometricControl.h.

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

Definition at line 247 of file geometricControl.h.

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

Definition at line 247 of file geometricControl.h.

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

Definition at line 242 of file geometricControl.h.

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

Definition at line 247 of file geometricControl.h.

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

Definition at line 238 of file geometricControl.h.

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

Definition at line 237 of file geometricControl.h.