MNE-CPP  beta 1.0
tmsielectrodeitem.h
Go to the documentation of this file.
1 //=============================================================================================================
37 #ifndef TMSIELECTRODEITEM_H
38 #define TMSIELECTRODEITEM_H
39 
40 //*************************************************************************************************************
41 //=============================================================================================================
42 // INCLUDES
43 //=============================================================================================================
44 
45 #include <iostream>
46 
47 
48 //*************************************************************************************************************
49 //=============================================================================================================
50 // QT INCLUDES
51 //=============================================================================================================
52 
53 #include <QGraphicsItem>
54 #include <QString>
55 #include <QColor>
56 #include <QPainter>
57 #include <QStaticText>
58 
59 
60 //*************************************************************************************************************
61 //=============================================================================================================
62 // DEFINE NAMESPACE TMSIPlugin
63 //=============================================================================================================
64 
65 namespace TMSIPlugin
66 {
67 
68 //*************************************************************************************************************
69 //=============================================================================================================
70 // USED NAMESPACES
71 //=============================================================================================================
72 
73 
74 //=============================================================================================================
80 class TMSIElectrodeItem : public QGraphicsItem
81 {
82 
83 public:
84  //=========================================================================================================
88  TMSIElectrodeItem(QString electrodeName, QPointF electrodePosition, QColor electrodeColor, int channelIndex);
89 
90  //=========================================================================================================
94  void setColor(QColor electrodeColor);
95 
96  //=========================================================================================================
100  QRectF boundingRect() const;
101 
102  //=========================================================================================================
106  void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
107 
108  //=========================================================================================================
112  QString getElectrodeName();
113 
114  //=========================================================================================================
118  void setImpedanceValue(double impedanceValue);
119 
120  //=========================================================================================================
124  double getImpedanceValue();
125 
126  //=========================================================================================================
130  void setPosition(QPointF newPosition);
131 
132  //=========================================================================================================
136  QPointF getPosition();
137 
138  //=========================================================================================================
142  int getChannelIndex();
143 
144 private:
145  QString m_sElectrodeName;
146  QPointF m_qpElectrodePosition;
147  QColor m_cElectrodeColor;
148  double m_dImpedanceValue;
149  int m_iChannelIndex;
150 };
151 
152 } // NAMESPACE
153 
154 #endif // TMSIELECTRODEITEM_H
The TMSIElectrodeItem class provides a new data structure for impedance values.
void setPosition(QPointF newPosition)
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
TMSIElectrodeItem(QString electrodeName, QPointF electrodePosition, QColor electrodeColor, int channelIndex)
void setImpedanceValue(double impedanceValue)
void setColor(QColor electrodeColor)