91 void property_changed(
const Property &);
131 virtual void paintEvent(QPaintEvent *evt);
134 virtual void keyPressEvent(QKeyEvent *event);
137 void renderTo(QPainter &p);
140 void setBackground(
const QBrush &bgBrush);
143 void setPen(PenType p,
const QPen &pen);
171 Pen(
const QPen &linePen=Qt::NoPen,
172 const QPen &symbolPen=Qt::NoPen,
175 const QBrush &fillBrush=Qt::NoBrush):
176 linePen(linePen),symbolPen(symbolPen),symbol(symbol),symbolSize(symbolSize),fillBrush(fillBrush){}
189 inline void render() { updateFromOtherThread(); }
210 void setDataViewPort(
const utils::Range32f &xrange,
const utils::Range32f &yrange);
250 void addAnnotations(
const char type,
const float *
data,
int num=1,
251 const QPen &linePen = QColor(255,0,0),
252 const QBrush &brush = Qt::NoBrush,
253 const std::string &
text=
"",
const std::string &textDelim=
",");
256 void clearAnnotations();
260 virtual void clear() { clearAnnotations(); }
282 void updateBackgroundFunction();
285 void removeBackgroundFunction();
290 bool isZoomed()
const;
293 virtual void mouseDoubleClickEvent(QMouseEvent *event);
296 virtual void mouseMoveEvent(QMouseEvent *event);
299 virtual void mousePressEvent(QMouseEvent *event);
302 virtual void mouseReleaseEvent(QMouseEvent *event);
305 virtual void enterEvent(QEvent *event);
308 virtual void leaveEvent(QEvent *event);
312 virtual bool drawData(QPainter &p) = 0;
315 virtual void drawLegend(QPainter &p,
const utils::Rect &where,
bool horizontal);
319 void drawDefaultLedgend(QPainter &p,
const utils::Rect &where,
bool horizontal,
320 const std::vector<std::string> &rowNames,
321 const std::vector<PenPtr> &pens);
327 template<
char s>
static inline void draw_symbol(QPainter &p,
int size,
float x,
float y){
332 float winToDrawX(
int winX)
const;
335 float winToDrawY(
int winY)
const;
341 int drawToWinX(
float drawX)
const;
344 int drawToWinY(
float drawY)
const;
368 p.drawLine(QPoint(x,y),QPoint(x,y));
371 template<>
inline void AbstractPlotWidget::draw_symbol<'x'>(QPainter &p,
int size,
float x,
float y){
372 p.drawLine(QPoint(x-size,y-size),QPoint(x+size,y+size));
373 p.drawLine(QPoint(x-size,y+size),QPoint(x+size,y-size));
376 template<>
inline void AbstractPlotWidget::draw_symbol<'+'>(QPainter &p,
int size,
float x,
float y){
377 p.drawLine(QPoint(x,y-size),QPoint(x,y+size));
378 p.drawLine(QPoint(x-size,y),QPoint(x+size,y));
381 template<>
inline void AbstractPlotWidget::draw_symbol<'*'>(QPainter &p,
int size,
float x,
float y){
382 draw_symbol<'+'>(p,(size*2)/3,x,y);
383 draw_symbol<'x'>(p,size,x,y);
387 template<>
inline void AbstractPlotWidget::draw_symbol<'o'>(QPainter &p,
int size,
float x,
float y){
388 p.drawEllipse(QRect(x-size,y-size,2*size,2*size));
391 template<>
inline void AbstractPlotWidget::draw_symbol<'s'>(QPainter &p,
int size,
float x,
float y){
392 p.drawRect(QRect(x-size,y-size,2*size,2*size));
395 template<>
inline void AbstractPlotWidget::draw_symbol<'t'>(QPainter &p,
int size,
float x,
float y){
396 const QPoint e[3] = { QPoint(x,y-size),QPoint(x+size,y+size),QPoint(x-size,y+size) };
397 p.drawConvexPolygon(e,3);
400 template<>
inline void AbstractPlotWidget::draw_symbol<'d'>(QPainter &p,
int size,
float x,
float y){
401 const QPoint e[4] = { QPoint(x,y-size),QPoint(x+size,y),QPoint(x,y+size), QPoint(x-size,y) };
402 p.drawConvexPolygon(e,4);
The General Function Template.
Definition: Function.h:284
undocument this line if you encounter any issues!
Definition: Any.h:37
ICLQt_API void text(ImgQ &image, int x, int y, const string &text)
renders a text into an image (only available with Qt-Support)
Floating point precision implementation of the Rect class.
Definition: Rect32f.h:45
ICLQt_API ImgROI data(ImgQ &r)
creates full ROI ROI-struct
MouseEvent Handler.
Definition: MouseHandler.h:92
#define ERROR_LOG(x)
Definition: Macros.h:111
Single precission 3D Vectors Point class of the ICL.
Definition: Point32f.h:41
#define ICLQt_API
Definition: CompatMacros.h:178
Point class of the ICL used e.g. for the Images ROI offset.
Definition: Point.h:58
Interface for classes that can be configured from configuration-files and GUI-Components.
Definition: Configurable.h:194
Rectangle class of the ICL used e.g. for the Images ROI-rect.
Definition: Rect.h:95
Represents a single property.
Definition: Configurable.h:200
Specialization of the SmartPtrBase class for Pointers.
Definition: SmartPtr.h:75