MNE-CPP  beta 1.0
realtimemultisamplearraydelegate.h
Go to the documentation of this file.
1 //=============================================================================================================
36 #ifndef REALTIMEMULTISAMPLEARRAYDELEGATE_H
37 #define REALTIMEMULTISAMPLEARRAYDELEGATE_H
38 
39 //*************************************************************************************************************
40 //=============================================================================================================
41 // QT INCLUDES
42 //=============================================================================================================
43 
44 #include <QAbstractItemDelegate>
45 #include <QTableView>
46 #include <QMap>
47 
48 
49 //*************************************************************************************************************
50 //=============================================================================================================
51 // DEFINE NAMESPACE XDISPLIB
52 //=============================================================================================================
53 
54 namespace XDISPLIB
55 {
56 
57 
58 //=============================================================================================================
64 class RealTimeMultiSampleArrayDelegate : public QAbstractItemDelegate
65 {
66  Q_OBJECT
67 public:
68  //=========================================================================================================
74  RealTimeMultiSampleArrayDelegate(QObject *parent = 0);
75 
76  //=========================================================================================================
86  virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
87 
88  //=========================================================================================================
95  virtual QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
96 
97 private:
98  //=========================================================================================================
105  void createPlotPath(const QModelIndex &index, const QStyleOptionViewItem &option, QPainterPath& path, QPainterPath& lastPath, QVector<float>& data, QVector<float>& lastData) const;
106 
107  //=========================================================================================================
114  void createGridPath(const QModelIndex &index, const QStyleOptionViewItem &option, QPainterPath& path, QList< QVector<float> >& data) const;
115 
116  //Settings
117 // QSettings m_qSettings;
118 
119  // Scaling
120  float m_fMaxValue;
121  float m_fScaleY;
122 };
123 
124 } // NAMESPACE
125 
126 #endif // REALTIMEMULTISAMPLEARRAYDELEGATE_H
virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
The RealTimeMultiSampleArrayDelegate class represents a RTMSA delegate which creates the plot paths...
virtual QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const