Medical Imaging Interaction Toolkit  2023.12.00
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
QmitkHistogram.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef QmitkHistogram_h
14 #define QmitkHistogram_h
15 
16 #include <qcolor.h>
17 #include <qglobal.h>
18 
19 #include <qwt_plot_item.h>
20 #include <qwt_series_data.h>
21 #include <qwt_text.h>
22 
28 class QmitkHistogram : public QwtPlotItem
29 {
30 public:
31  explicit QmitkHistogram(const QString &title = QString::null);
32  explicit QmitkHistogram(const QwtText &title);
33  ~QmitkHistogram() override;
34 
35  void setData(const QwtIntervalSeriesData &data);
36  const QwtIntervalSeriesData &data() const;
37 
38  void setColor(const QColor &);
39  QColor color() const;
40 
41  QRectF boundingRect() const override;
42 
43  void draw(QPainter *, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &) const override;
44 
45  void setBaseline(double reference);
46  double baseline() const;
47 
48 protected:
49  virtual void drawBar(QPainter *, Qt::Orientation o, const QRect &) const;
50 
51 private:
52  void init();
53 
54  class HistogramData;
55  HistogramData *m_Data;
56 };
57 
58 #endif
QmitkHistogram::drawBar
virtual void drawBar(QPainter *, Qt::Orientation o, const QRect &) const
QmitkHistogram::setColor
void setColor(const QColor &)
QmitkHistogram
Used to create a histogram that can be shown in a Qwt Plot. See QmitkHistogramWidget for an example o...
Definition: QmitkHistogram.h:28
QmitkHistogram::draw
void draw(QPainter *, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &) const override
QmitkHistogram::QmitkHistogram
QmitkHistogram(const QString &title=QString::null)
QmitkHistogram::color
QColor color() const
QmitkHistogram::~QmitkHistogram
~QmitkHistogram() override
QmitkHistogram::setBaseline
void setBaseline(double reference)
QmitkHistogram::boundingRect
QRectF boundingRect() const override
QmitkHistogram::baseline
double baseline() const
QmitkHistogram::setData
void setData(const QwtIntervalSeriesData &data)
QmitkHistogram::data
const QwtIntervalSeriesData & data() const