MNE-CPP  0.1.9
A Framework for Electrophysiology
metatreeitem.cpp
Go to the documentation of this file.
1 //=============================================================================================================
35 //=============================================================================================================
36 // INCLUDES
37 //=============================================================================================================
38 
39 #include "metatreeitem.h"
40 
41 //=============================================================================================================
42 // QT INCLUDES
43 //=============================================================================================================
44 
45 #include <QVector3D>
46 
47 //=============================================================================================================
48 // EIGEN INCLUDES
49 //=============================================================================================================
50 
51 #include <Eigen/Core>
52 
53 //=============================================================================================================
54 // USED NAMESPACES
55 //=============================================================================================================
56 
57 using namespace DISP3DLIB;
58 
59 //=============================================================================================================
60 // DEFINE MEMBER METHODS
61 //=============================================================================================================
62 
63 MetaTreeItem::MetaTreeItem(int iType, const QString& text)
64 : AbstractTreeItem(iType, text)
65 {
66  initItem();
67 }
68 
69 //=============================================================================================================
70 
72 {
73  QString sToolTip;
74 
75  switch(m_iType) {
76  case MetaTreeItemTypes::FileName:
77  sToolTip = "File name";
78  break;
79  case MetaTreeItemTypes::FilePath:
80  sToolTip = "File path";
81  break;
82  case MetaTreeItemTypes::SurfaceColorGyri:
83  sToolTip = "Color Gyri";
84  break;
85  case MetaTreeItemTypes::SurfaceColorSulci:
86  sToolTip = "Color Sulci";
87  break;
88  case MetaTreeItemTypes::StreamStatus:
89  sToolTip = "Turn real time data streaming on/off";
90  break;
91  case MetaTreeItemTypes::SourceSpaceType:
92  sToolTip = "The source space type";
93  break;
94  case MetaTreeItemTypes::ColormapType:
95  sToolTip = "The color map type";
96  break;
97  case MetaTreeItemTypes::StreamingTimeInterval:
98  sToolTip = "The m seconds waited when displaying the data";
99  break;
100  case MetaTreeItemTypes::LoopedStreaming:
101  sToolTip = "Turn looped streaming on/off";
102  break;
103  case MetaTreeItemTypes::NumberAverages:
104  sToolTip = "The number of samples averaged together (downsampling)";
105  break;
106  case MetaTreeItemTypes::DataThreshold:
107  sToolTip = "The threshold used to scale the data";
108  break;
109  case MetaTreeItemTypes::VisualizationType:
110  sToolTip = "The visualization type";
111  break;
112  case MetaTreeItemTypes::Color:
113  sToolTip = "Color item";
114  break;
115  case MetaTreeItemTypes::AlphaValue:
116  sToolTip = "The alpha value";
117  break;
118  case MetaTreeItemTypes::SurfaceTessInner:
119  sToolTip = "Surface inner tesselation value";
120  break;
121  case MetaTreeItemTypes::SurfaceTessOuter:
122  sToolTip = "Surface outer tesselation value";
123  break;
124  case MetaTreeItemTypes::SurfaceTriangleScale:
125  sToolTip = "Surface triangle scale value";
126  break;
127  case MetaTreeItemTypes::TranslateX:
128  sToolTip = "x translation value";
129  break;
130  case MetaTreeItemTypes::TranslateY:
131  sToolTip = "y translation value";
132  break;
133  case MetaTreeItemTypes::TranslateZ:
134  sToolTip = "z translation value";
135  break;
136  case MetaTreeItemTypes::NetworkMatrix:
137  sToolTip = "The network distance matrix";
138  break;
139  case MetaTreeItemTypes::NumberDipoles:
140  sToolTip = "The number of dipoles";
141  break;
142  case MetaTreeItemTypes::MaterialType:
143  sToolTip = "The surface material";
144  break;
145  case MetaTreeItemTypes::Scale:
146  sToolTip = "The scaling value";
147  break;
148  case MetaTreeItemTypes::CancelDistance:
149  sToolTip = "The cancel distance";
150  break;
151  case MetaTreeItemTypes::InterpolationFunction:
152  sToolTip = "The function used for interpolation";
153  break;
154  default: // do nothing;
155  break;
156  }
157 
158  this->setToolTip(sToolTip);
159 }
160 
161 //=============================================================================================================
162 
163 void MetaTreeItem::setData(const QVariant& value, int role)
164 {
165  AbstractTreeItem::setData(value, role);
166 
167  if(role >= Qt::UserRole) {
168  emit dataChanged(value);
169  }
170 }
171 
DISP3DLIB::MetaTreeItem::initItem
void initItem()
Definition: metatreeitem.cpp:71
DISP3DLIB::AbstractTreeItem::m_iType
int m_iType
Definition: abstracttreeitem.h:157
metatreeitem.h
MetaTreeItem class declaration.
DISP3DLIB::MetaTreeItem::dataChanged
void dataChanged(const QVariant &data)
DISP3DLIB::AbstractTreeItem
Provides the basic tree item.
Definition: abstracttreeitem.h:76
DISP3DLIB::AbstractTreeItem::setData
void setData(const QVariant &value, int role=Qt::UserRole+1)
Definition: abstracttreeitem.cpp:78
DISP3DLIB::MetaTreeItem::MetaTreeItem
MetaTreeItem(int iType=MetaTreeItemTypes::UnknownItem, const QString &text="")
Definition: metatreeitem.cpp:63
DISP3DLIB::MetaTreeItem::setData
void setData(const QVariant &value, int role=Qt::UserRole+1)
Definition: metatreeitem.cpp:163