47 #ifndef _MIRA_VISUALIZATION2DVIEW_H_ 48 #define _MIRA_VISUALIZATION2DVIEW_H_ 51 #include <serialization/adapters/Qt/QColor> 56 #include <QGraphicsView> 57 #include <QMessageBox> 71 (
"Description",
"2D view for channel data")
72 (
"Category" ,
"Visualization")
73 (
"Visualization",
"mira::Visualization2D"))
89 template <
typename Reflector>
93 r.property(
"BackgroundColor", mBackgroundColor, setter<QColor>(&Visualization2DView::setBackgroundColor,
this),
"The color", QColor(Qt::white));
94 r.property(
"Camera", mCameraSettings,
"Camera view",
Camera());
96 r.property(
"SaveContentMinPictureSize", mSaveContentMinPictureSize,
97 "Minimum width or height of the image saved by rendering the viewport at an appropriate resolution.", 2048);
136 virtual void setCamera(
const Camera& camera);
142 void setBackgroundColor(
const QColor& color);
153 void setupVisualizations();
157 void populateDefaultVisualizations();
158 void createDefaultVisualization(
const std::string& className,
const std::string& displayName);
162 QGraphicsScene* mScene;
163 QColor mBackgroundColor;
166 uint mSaveContentMinPictureSize;
182 void setCenter(
const QPointF& centerPoint);
183 QPointF
getCenter()
const {
return mCurrentCenterPoint; }
191 virtual void dropEvent(QDropEvent *event);
204 QPointF mCurrentCenterPoint;
virtual void saveContentToFile()
virtual void addTool(VisualizationTool *tool)
Adds an existing tool to this view.
virtual void wheelEvent(QWheelEvent *event)
virtual void moveDownVisualization(Visualization *vis)
Change order of visualizations in the view, move the specified visualization down.
Definition: Visualization2D.h:73
specialize cv::DataType for our ImgPixel and inherit from cv::DataType<Vec>
Definition: IOService.h:67
Abstract base class for all derived visualizations, namely Visualization3D and Visualization2D.
Definition: Visualization.h:90
void readdVisualizationItems()
#define MIRA_REFLECT_BASE(reflector, BaseClass)
Macro that can be used to reflect the base class easily.
Definition: ReflectorInterface.h:912
Class object which supports some kind of class reflection.
Definition: Class.h:97
virtual float getToolBaseZValue() const
Obtains the Z value all tools should adhere to to ensure that they will always be above regular visua...
virtual const std::string & getFixedFrame() const
Definition: Visualization2DView.h:127
void destroyVisualizations()
void reflect(Reflector &r)
Definition: Visualization2DView.h:90
2D view of a scene that may contain different visualization objects which show the actual content of ...
Definition: Visualization2DView.h:67
Provides MIRA_CLASS_SERIALIZATION macro and includes the major headers of the serialization framework...
virtual void setCamera(const Camera &camera)
Sets the current camera settings (position, orientation, etc.) of the views own camera.
Definition: Visualization2DView.h:171
virtual const Camera & getCamera() const
Obtains the current camera settings (position, orientation, etc.) of the views own camera...
#define MIRA_META_OBJECT(classIdentifier, MetaInfo)
Use this MACRO instead of MIRA_OBJECT if you like to add meta information to your class...
Definition: FactoryMacros.h:204
Use this class to represent time durations.
Definition: Time.h:106
virtual void update(Duration dt)
Is called by this class within the update timer event to update the view.
virtual const std::string & getCameraFrame() const
Definition: Visualization2DView.h:131
virtual void addVisualization(Visualization *vis)
Adds an existing visualization to this view.
virtual void dragMoveEvent(QDragMoveEvent *event)
virtual const Class & supportedVisualizationToolClass() const
Derived visualization views may return the base class of their supported tools.
Definition: Visualization2D.h:64
virtual ~UI()
Definition: Visualization2DView.h:178
UI(Visualization2DView *parent)
virtual QGraphicsView * getViewManager()
virtual void mouseReleaseEvent(QMouseEvent *event)
virtual void moveUpVisualization(Visualization *vis)
Change order of visualizations in the view, move the specified visualization up.
virtual void dragEnterEvent(QDragEnterEvent *event)
virtual void mousePressEvent(QMouseEvent *event)
Declaration of Visualization2D and related classes.
virtual QWidget * createVisualizationPart()
virtual QGraphicsScene * getSceneManager()
Visualization2DView * vis
Definition: Visualization2DView.h:201
QPointF getCenter() const
Definition: Visualization2DView.h:183
virtual const Class & supportedVisualizationClass() const
Derived visualization views must return the base class of their supported visualizations.
Declaration of VisualizationView and VisualizationViewTransformable.
virtual void dropEvent(QDropEvent *event)
friend class UI
Definition: Visualization2DView.h:151
virtual void mouseMoveEvent(QMouseEvent *event)
void setCenter(const QPointF ¢erPoint)