v2.0.0
Loading...
Searching...
No Matches
bidsviewmodel.h
Go to the documentation of this file.
1//=============================================================================================================
20
21#ifndef BIDSVIEWMODEL_H
22#define BIDSVIEWMODEL_H
23
24//=============================================================================================================
25// DEFINE MACROS
26//=============================================================================================================
27
28//USER ROLES
29#define BIDS_ITEM_TYPE Qt::UserRole+2
30#define BIDS_ITEM_SUBJECT Qt::UserRole+3
31#define BIDS_ITEM_SESSION Qt::UserRole+4
32
33//ITEM TYPES
34
35//CONTAINERS
36#define BIDS_SUBJECT 01
37#define BIDS_SESSION 02
38#define BIDS_FOLDER 03
39
40//DATA TYPES
41#define BIDS_FUNCTIONALDATA 10
42#define BIDS_ANATOMICALDATA 11
43#define BIDS_BEHAVIORALDATA 12
44#define BIDS_IEEGDATA 13
45
46//SUB-ITEMS
47#define BIDS_AVERAGE 20
48#define BIDS_EVENT 21
49#define BIDS_DIPOLE 22
50#define BIDS_ELECTRODES 23
51#define BIDS_COORDSYSTEM 24
52
53#define BIDS_UNKNOWN 99
54
55//=============================================================================================================
56// INCLUDES
57//=============================================================================================================
58
59#include "../../disp_global.h"
60
61//=============================================================================================================
62// QT INCLUDES
63//=============================================================================================================
64
65#include <QStandardItemModel>
66
67//=============================================================================================================
68// FORWARD DECLARATIONS
69//=============================================================================================================
70
71//=============================================================================================================
72// DEFINE NAMESPACE ANSHAREDLIB
73//=============================================================================================================
74
75namespace DISPLIB
76{
77
78//=============================================================================================================
79// ANSHAREDLIB FORWARD DECLARATIONS
80//=============================================================================================================
81
82//=============================================================================================================
83// ENUMERATIONS
84//=============================================================================================================
85
86//=============================================================================================================
95class DISPSHARED_EXPORT BidsViewModel : public QStandardItemModel
96{
97 Q_OBJECT
98
99public:
100 typedef QSharedPointer<BidsViewModel> SPtr;
101 typedef QSharedPointer<const BidsViewModel> ConstSPtr;
102
103 //=========================================================================================================
107 BidsViewModel(QObject* pParent = Q_NULLPTR);
108
109 //=========================================================================================================
114
115public slots:
116 //=========================================================================================================
123 void addData(QModelIndex selectedItem,
124 QStandardItem *pNewItem,
125 int iDataType);
126
127 //=========================================================================================================
134 void addToData(QStandardItem *pNewItem,
135 const QModelIndex &parentIndex,
136 int iDataType);
137
138 //=========================================================================================================
146 QModelIndex addSubject(const QString &sSubjectName);
147
148 //=========================================================================================================
157 QModelIndex addSessionToSubject(const QString &sSubjectName,
158 const QString &sSessionName);
159
160 //=========================================================================================================
169 QModelIndex addSessionToSubject(QModelIndex subjectIndex,
170 const QString &sSessionName);
171
172 //=========================================================================================================
181 QModelIndex addDataToSession(QModelIndex sessionIndex,
182 QStandardItem* pNewItem,
183 int iDataType);
184
185 //=========================================================================================================
193 QModelIndex moveSessionToSubject(QModelIndex subjectIndex,
194 QModelIndex sessionIndex);
195
196 //=========================================================================================================
205 QModelIndex moveDataToSession(QModelIndex sessionIndex,
206 QModelIndex dataIndex);
207
208 //=========================================================================================================
216 bool removeItem(QModelIndex itemIndex);
217
218signals:
219
220 //=========================================================================================================
226 void newItemIndex(QModelIndex itemIndex);
227
228};
229
230} //Namespace
231
232#endif //BIDSVIEWMODEL_H
Export macros and build-info hooks for the DISPLIB shared library.
#define DISPSHARED_EXPORT
Definition disp_global.h:38
2-D display widgets and visualisation helpers (charts, topography, colour maps).
QModelIndex addDataToSession(QModelIndex sessionIndex, QStandardItem *pNewItem, int iDataType)
bool removeItem(QModelIndex itemIndex)
QSharedPointer< BidsViewModel > SPtr
BidsViewModel(QObject *pParent=nullptr)
QModelIndex moveSessionToSubject(QModelIndex subjectIndex, QModelIndex sessionIndex)
void newItemIndex(QModelIndex itemIndex)
QModelIndex moveDataToSession(QModelIndex sessionIndex, QModelIndex dataIndex)
QModelIndex addSubject(const QString &sSubjectName)
QSharedPointer< const BidsViewModel > ConstSPtr
void addToData(QStandardItem *pNewItem, const QModelIndex &parentIndex, int iDataType)
QModelIndex addSessionToSubject(const QString &sSubjectName, const QString &sSessionName)
void addData(QModelIndex selectedItem, QStandardItem *pNewItem, int iDataType)