Image Component Library (ICL)
LowLevelPlotWidget.h
Go to the documentation of this file.
1 /********************************************************************
2 ** Image Component Library (ICL) **
3 ** **
4 ** Copyright (C) 2006-2013 CITEC, University of Bielefeld **
5 ** Neuroinformatics Group **
6 ** Website: www.iclcv.org and **
7 ** http://opensource.cit-ec.de/projects/icl **
8 ** **
9 ** File : ICLQt/src/ICLQt/LowLevelPlotWidget.h **
10 ** Module : ICLQt **
11 ** Authors: Christof Elbrechter **
12 ** **
13 ** **
14 ** GNU LESSER GENERAL PUBLIC LICENSE **
15 ** This file may be used under the terms of the GNU Lesser General **
16 ** Public License version 3.0 as published by the **
17 ** **
18 ** Free Software Foundation and appearing in the file LICENSE.LGPL **
19 ** included in the packaging of this file. Please review the **
20 ** following information to ensure the license requirements will **
21 ** be met: http://www.gnu.org/licenses/lgpl-3.0.txt **
22 ** **
23 ** The development of this software was supported by the **
24 ** Excellence Cluster EXC 277 Cognitive Interaction Technology. **
25 ** The Excellence Cluster EXC 277 is a grant of the Deutsche **
26 ** Forschungsgemeinschaft (DFG) in the context of the German **
27 ** Excellence Initiative. **
28 ** **
29 ********************************************************************/
30 
31 #pragma once
32 
33 #include <ICLUtils/CompatMacros.h>
35 
36 namespace icl{
37  namespace qt{
38 
39 
41 
200 
203 
209 
213 
225 
239 
247  class Data;
248  Data *data;
249 
250  class DrawState;
251  protected:
252 
254  virtual void drawLegend(QPainter &p,const utils::Rect &where, bool horizontal);
255 
257  virtual bool drawSeriesData(QPainter &p, const DrawState &state);
258 
260  virtual bool drawScatterData(QPainter &p, const DrawState &state);
261 
263  virtual bool drawBarPlotData(QPainter &p, const DrawState &state);
264 
266  virtual bool drawData(QPainter &p);
267 
269  virtual utils::Range32f estimateDataXRange() const;
270 
272  virtual utils::Range32f estimateDataYRange() const;
273 
274  public:
275 
277  LowLevelPlotWidget(QWidget *parent=0);
278 
281 
283 
284  virtual utils::Rect32f getDataViewPort() const;
285 
287 
299  void addSeriesData(const float *data, int len,
300  const AbstractPlotWidget::PenPtr &style = new AbstractPlotWidget::Pen(QColor(255,0,0)),
301  const std::string &name="", int stride=1, bool deepCopy=true, bool passOwnerShip=false);
302 
303 
305 
308  void addBarPlotData(const float *data, int len,
309  const AbstractPlotWidget::PenPtr &style = new AbstractPlotWidget::Pen(QColor(255,0,0)),
310  const std::string &name="", int stride=1, bool deepCopy=true, bool passOwnerShip=false);
311 
313 
334  void addScatterData(char symbol, const float *xs, const float *ys, int num,
335  const std::string &name = "",
336  int r=255, int g=0, int b=0, int size=5, bool connectingLine=false,
337  int xStride=1, int yStride=1, bool filled = false,
338  bool deepCopyData=true, bool passDataOwnerShip=false);
339 
341  void clearScatterData();
342 
344  void clearSeriesData();
345 
347  void clearBarPlotData();
348 
350  void clear();
351 
352 
353 
354 
355  };
356  } // namespace qt
357 }
358 
The PlotWidget is an abstract base class for 2D plotting components.
Definition: AbstractPlotWidget.h:86
undocument this line if you encounter any issues!
Definition: Any.h:37
Floating point precision implementation of the Rect class.
Definition: Rect32f.h:45
ICLQt_API ImgROI data(ImgQ &r)
creates full ROI ROI-struct
#define ICLQt_API
Definition: CompatMacros.h:178
Rectangle class of the ICL used e.g. for the Images ROI-rect.
Definition: Rect.h:95
Data * data
pimpl
Definition: LowLevelPlotWidget.h:247
Specialization of the SmartPtrBase class for Pointers.
Definition: SmartPtr.h:75
Utility structure for styles usend in subclasses.
Definition: AbstractPlotWidget.h:147
Default AbstractPlotWidget implementation for plotting different kinds of data.
Definition: LowLevelPlotWidget.h:246