iRoCS Toolbox  1.1.0
PointMarkerOrthoViewRenderer.hh
Go to the documentation of this file.
1 /**************************************************************************
2  *
3  * This file belongs to the iRoCS Toolbox.
4  *
5  * Copyright (C) 2015 Thorsten Falk
6  *
7  * Image Analysis Lab, University of Freiburg, Germany
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 3 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software Foundation,
21  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22  *
23  **************************************************************************/
24 
25 #ifndef POINTMARKERORTHOVIEWRENDERER_HH
26 #define POINTMARKERORTHOVIEWRENDERER_HH
27 
28 #ifdef HAVE_CONFIG_H
29 #include <config.hh>
30 #endif
31 
33 
34 #include <QtCore/QLineF>
35 
36 class PointMarker;
37 class OrthoViewWidget;
38 
39 
40 /*======================================================================*/
46 /*======================================================================*/
48 {
49 
50 public:
51 
56 
57 /*======================================================================*/
63 /*======================================================================*/
64  virtual MarkerOrthoViewRendererCache *clone() const;
65 
66 /*======================================================================*/
77 /*======================================================================*/
78  virtual void render(QPainter *painter) const;
79 
80 /*======================================================================*/
87 /*======================================================================*/
88  void setCross(blitz::TinyVector<QLineF,2> const &cross);
89 
90 /*======================================================================*/
97 /*======================================================================*/
98  void setPoint(QPointF const &point);
99 
100 protected:
101 
103  blitz::TinyVector<QLineF,2> _cross;
104  QPointF _point;
105 
106 };
107 
108 
110 {
111 
112 Q_OBJECT
113 
114 public:
115 
118  virtual ~PointMarkerOrthoViewRenderer();
119 
120  virtual MarkerRenderer *clone() const;
121 
122  virtual void render(
123  QXmlStreamWriter &svgStream,
124  blitz::TinyVector<double,3> const &shapePx,
125  blitz::TinyVector<double,3> const &lowerBoundUm,
126  blitz::TinyVector<double,3> const &upperBoundUm,
127  std::string const &font, double fontSizePt,
128  iRoCS::ProgressReporter *pr = NULL) const;
129 
130  virtual void userInteractionEvent(UserInteractionEvent *event);
131 
132 public slots:
133 
134 /*======================================================================*/
151 /*======================================================================*/
152  virtual void updateCache(int direction) const;
153 
154 };
155 
156 #endif
The MarkerOrthoViewRendererCache class specifies the interface to store and replay marker geometry in...
void setCross(blitz::TinyVector< QLineF, 2 > const &cross)
Set the cross lines to the given lines.
virtual void render(QPainter *painter) const
Render the content of the cache into the given painter.
The PointMarkerOrthoViewRendererCache class stores and replays point marker geometry information usin...
void setPoint(QPointF const &point)
Set the point to the given QPoint.
virtual MarkerOrthoViewRendererCache * clone() const
Get a new copy of this cache.