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 //=========================================================================================================
109 BidsViewModel(QObject* pParent = Q_NULLPTR);
110
111 //=========================================================================================================
116
117public slots:
118 //=========================================================================================================
127 void addData(QModelIndex selectedItem,
128 QStandardItem* pNewItem,
129 int iDataType);
130
131 //=========================================================================================================
138 void addToData(QStandardItem* pNewItem,
139 const QModelIndex& parentIndex,
140 int iDataType);
141
142 //=========================================================================================================
150 QModelIndex addSubject(const QString& sSubjectName);
151
152 //=========================================================================================================
161 QModelIndex addSessionToSubject(const QString& sSubjectName,
162 const QString& sSessionName);
163
164 //=========================================================================================================
173 QModelIndex addSessionToSubject(QModelIndex subjectIndex,
174 const QString& sSessionName);
175
176 //=========================================================================================================
185 QModelIndex addDataToSession(QModelIndex sessionIndex,
186 QStandardItem* pNewItem,
187 int iDataType);
188
189 //=========================================================================================================
197 QModelIndex moveSessionToSubject(QModelIndex subjectIndex,
198 QModelIndex sessionIndex);
199
200 //=========================================================================================================
209 QModelIndex moveDataToSession(QModelIndex sessionIndex,
210 QModelIndex dataIndex);
211
212 //=========================================================================================================
220 bool removeItem(QModelIndex itemIndex);
221
222signals:
223
224 //=========================================================================================================
230 void newItemIndex(QModelIndex itemIndex);
231};
232
233} //Namespace
234
235#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)