Loading...
Searching...
No Matches
geometricControl.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
#ifndef BALL_VIEW_WIDGETS_GEOMETRICCONTROL_H
#define BALL_VIEW_WIDGETS_GEOMETRICCONTROL_H
#ifndef BALL_COMMON_H
# include <BALL/common.h>
#endif
#ifndef BALL_VIEW_WIDGETS_GENERICCONTROL_H
# include <BALL/VIEW/WIDGETS/genericControl.h>
#endif
#ifndef BALL_VIEW_KERNEL_COMMON_H
# include <BALL/VIEW/KERNEL/common.h>
#endif
#include <QtCore/QPoint>
#include <QtWidgets/QMenu>
namespace BALL
{
namespace VIEW
{
class Representation;
class ModifyRepresentationDialog;
class ClippingPlane;
class TransformationMessage;
class BALL_VIEW_EXPORT GeometricControl
: public GenericControl
{
Q_OBJECT
public:
BALL_EMBEDDABLE(GeometricControl, GenericControl)
//@{
GeometricControl(QWidget* parent = 0, const char* name = 0);
virtual ~GeometricControl();
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);
void moveItems(const TransformationMessage& msg);
void updateClippingPlanes();
public Q_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();
ModifyRepresentationDialog* getModifySurfaceDialog();
protected Q_SLOTS:
virtual void modifyRepresentation_();
virtual void generateListViewItem_(Representation& rep);
virtual void deleteCurrentItems();
virtual void setupProximityLight();
protected Q_SLOTS:
virtual void onItemClicked(QTreeWidgetItem* item, int col);
void showGuestContextMenu(const QPoint& pos);
protected:
void addItem_(const String& text, const char* member, QWidget* widget = 0);
// only for Python Interface
GeometricControl(const GeometricControl& control);
enum ColumnID
{
COLUMN_ID__TYPE = 0,
COLUMN_ID__Properties
};
void setClippingPlane_(const Vector3& n);
// the context menu
QMenu context_menu_;
QMenu clipping_plane_context_menu_;
Representation* context_representation_;
ClippingPlane* context_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_;
ModifyRepresentationDialog* modify_rep_dialog_;
bool creating_representations_;
bool ignore_change_;
QAction* menu_clipping_plane_, *menu_load_surface_, *modify_surface_;
vector<QAction*> context_menu_actions_;
};
} } // namespaces
#endif // BALL_VIEW_WIDGETS_GEOMETRICCONTROL_H
BALL_VIEW_EXPORT
#define BALL_VIEW_EXPORT
Definition COMMON/global.h:52
common.h
BALL::HashMap
HashMap class based on the STL map (containing serveral convenience functions).
Definition hashMap.h:74
BALL::String
Definition string.h:57
BALL::VIEW::ClippingPlane
Definition clippingPlane.h:26
BALL::VIEW::GenericControl::GenericControl
GenericControl(QWidget *parent=0, const char *name=0)
BALL::VIEW::GeometricControl::initializeWidget
virtual void initializeWidget(MainControl &main_control)
BALL::VIEW::GeometricControl::onNotify
virtual void onNotify(Message *message)
BALL::VIEW::GeometricControl::representation_to_item_
HashMap< Representation *, QTreeWidgetItem * > representation_to_item_
Definition geometricControl.h:237
BALL::VIEW::GeometricControl::setClippingPlaneX
virtual void setClippingPlaneX()
BALL::VIEW::GeometricControl::ColumnID
ColumnID
Definition geometricControl.h:223
BALL::VIEW::GeometricControl::COLUMN_ID__TYPE
@ COLUMN_ID__TYPE
Definition geometricControl.h:224
BALL::VIEW::GeometricControl::COLUMN_ID__Properties
@ COLUMN_ID__Properties
Definition geometricControl.h:225
BALL::VIEW::GeometricControl::setClippingPosition
virtual void setClippingPosition()
BALL::VIEW::GeometricControl::addRepresentation
virtual void addRepresentation(Representation &rep)
BALL::VIEW::GeometricControl::clear
virtual void clear()
Definition geometricControl.h:77
BALL::VIEW::GeometricControl::setClippingPlaneY
virtual void setClippingPlaneY()
BALL::VIEW::GeometricControl::saveSurface
void saveSurface()
BALL::VIEW::GeometricControl::modify_surface_
QAction * modify_surface_
Definition geometricControl.h:247
BALL::VIEW::GeometricControl::item_to_plane_
HashMap< QTreeWidgetItem *, ClippingPlane * > item_to_plane_
Definition geometricControl.h:240
BALL::VIEW::GeometricControl::getModifySurfaceDialog
ModifyRepresentationDialog * getModifySurfaceDialog()
BALL::VIEW::GeometricControl::context_plane_
ClippingPlane * context_plane_
Definition geometricControl.h:235
BALL::VIEW::GeometricControl::hideShowClippingPlane
void hideShowClippingPlane()
BALL::VIEW::GeometricControl::buildContextMenu
virtual void buildContextMenu()
BALL::VIEW::GeometricControl::renameRepresentation
virtual void renameRepresentation()
BALL::VIEW::GeometricControl::updateClippingPlanes
void updateClippingPlanes()
BALL::VIEW::GeometricControl::setupProximityLight
virtual void setupProximityLight()
BALL::VIEW::GeometricControl::updateSelection
virtual void updateSelection()
BALL::VIEW::GeometricControl::moveItems
void moveItems(const TransformationMessage &msg)
BALL::VIEW::GeometricControl::context_representation_
Representation * context_representation_
Definition geometricControl.h:234
BALL::VIEW::GeometricControl::checkMenu
virtual void checkMenu(MainControl &main_control)
Overloaded from ModularWidget.
BALL::VIEW::GeometricControl::setClippingPlaneZ
virtual void setClippingPlaneZ()
BALL::VIEW::GeometricControl::removeRepresentation
virtual void removeRepresentation(Representation &rep)
BALL::VIEW::GeometricControl::generateListViewItem_
virtual void generateListViewItem_(Representation &rep)
BALL::VIEW::GeometricControl::item_to_representation_
HashMap< QTreeWidgetItem *, Representation * > item_to_representation_
Definition geometricControl.h:239
BALL::VIEW::GeometricControl::context_menu_
QMenu context_menu_
Definition geometricControl.h:231
BALL::VIEW::GeometricControl::showGuestContextMenu
void showGuestContextMenu(const QPoint &pos)
BALL::VIEW::GeometricControl::selectClipRepresentations
virtual void selectClipRepresentations()
BALL::VIEW::GeometricControl::selectAtoms
virtual void selectAtoms()
BALL::VIEW::GeometricControl::menu_load_surface_
QAction * menu_load_surface_
Definition geometricControl.h:247
BALL::VIEW::GeometricControl::flipClippingPlane
virtual void flipClippingPlane()
BALL::VIEW::GeometricControl::GeometricControl
GeometricControl(QWidget *parent=0, const char *name=0)
BALL::VIEW::GeometricControl::ignore_change_
bool ignore_change_
Definition geometricControl.h:245
BALL::VIEW::GeometricControl::flipClippingCapping
virtual void flipClippingCapping()
BALL::VIEW::GeometricControl::duplicate
void duplicate()
BALL::VIEW::GeometricControl::enterMoveMode
virtual void enterMoveMode()
BALL::VIEW::GeometricControl::onItemClicked
virtual void onItemClicked(QTreeWidgetItem *item, int col)
BALL::VIEW::GeometricControl::addItem_
void addItem_(const String &text, const char *member, QWidget *widget=0)
BALL::VIEW::GeometricControl::clipping_plane_context_menu_
QMenu clipping_plane_context_menu_
Definition geometricControl.h:232
BALL::VIEW::GeometricControl::selectedRepresentation
virtual void selectedRepresentation(Representation &representation, bool state)
BALL::VIEW::GeometricControl::plane_to_item_
HashMap< ClippingPlane *, QTreeWidgetItem * > plane_to_item_
Definition geometricControl.h:238
BALL::VIEW::GeometricControl::creating_representations_
bool creating_representations_
Definition geometricControl.h:244
BALL::VIEW::GeometricControl::context_menu_actions_
vector< QAction * > context_menu_actions_
Definition geometricControl.h:248
BALL::VIEW::GeometricControl::deleteCurrentItems
virtual void deleteCurrentItems()
Overloaded from GenericControl.
BALL::VIEW::GeometricControl::GeometricControl
GeometricControl(const GeometricControl &control)
BALL::VIEW::GeometricControl::modify_rep_dialog_
ModifyRepresentationDialog * modify_rep_dialog_
Definition geometricControl.h:242
BALL::VIEW::GeometricControl::focus
virtual void focus()
BALL::VIEW::GeometricControl::loadSurface
void loadSurface()
BALL::VIEW::GeometricControl::menu_clipping_plane_
QAction * menu_clipping_plane_
Definition geometricControl.h:247
BALL::VIEW::GeometricControl::createNewClippingPlane
void createNewClippingPlane()
BALL::VIEW::GeometricControl::setClippingPlane_
void setClippingPlane_(const Vector3 &n)
BALL::VIEW::GeometricControl::getHighlightedRepresentations
std::list< Representation * > getHighlightedRepresentations() const
BALL::VIEW::GeometricControl::updateRepresentation
virtual void updateRepresentation(Representation &rep, bool force=false)
BALL::VIEW::MainControl
Definition mainControl.h:118
BALL::VIEW::Message
Definition message.h:53
BALL::VIEW::ModifyRepresentationDialog
Definition modifyRepresentationDialog.h:55
BALL::VIEW::Representation
Definition representation.h:59
BALL::VIEW::TransformationMessage
Definition message.h:736
QTreeWidgetItem
QWidget
common.h
BALL_EMBEDDABLE
#define BALL_EMBEDDABLE(TYPE, BASE)
Definition embeddable.h:31
genericControl.h
BALL::VIEW
Definition constraints.h:35
BALL
Definition constants.h:13
BALL::Vector3
TVector3< float > Vector3
Definition vector3.h:1084