v2.0.0
Loading...
Searching...
No Matches
bidsviewmodel.h
Go to the documentation of this file.
1//=============================================================================================================
35
36#ifndef BIDSVIEWMODEL_H
37#define BIDSVIEWMODEL_H
38
39//=============================================================================================================
40// DEFINE MACROS
41//=============================================================================================================
42
43//USER ROLES
44#define BIDS_ITEM_TYPE Qt::UserRole+2
45#define BIDS_ITEM_SUBJECT Qt::UserRole+3
46#define BIDS_ITEM_SESSION Qt::UserRole+4
47
48//ITEM TYPES
49
50//CONTAINERS
51#define BIDS_SUBJECT 01
52#define BIDS_SESSION 02
53#define BIDS_FOLDER 03
54
55//DATA TYPES
56#define BIDS_FUNCTIONALDATA 10
57#define BIDS_ANATOMICALDATA 11
58#define BIDS_BEHAVIORALDATA 12
59#define BIDS_IEEGDATA 13
60
61//SUB-ITEMS
62#define BIDS_AVERAGE 20
63#define BIDS_EVENT 21
64#define BIDS_DIPOLE 22
65#define BIDS_ELECTRODES 23
66#define BIDS_COORDSYSTEM 24
67
68#define BIDS_UNKNOWN 99
69
70//=============================================================================================================
71// INCLUDES
72//=============================================================================================================
73
74#include "../../disp_global.h"
75
76//=============================================================================================================
77// QT INCLUDES
78//=============================================================================================================
79
80#include <QStandardItemModel>
81
82//=============================================================================================================
83// FORWARD DECLARATIONS
84//=============================================================================================================
85
86//=============================================================================================================
87// DEFINE NAMESPACE ANSHAREDLIB
88//=============================================================================================================
89
90namespace DISPLIB
91{
92
93//=============================================================================================================
94// ANSHAREDLIB FORWARD DECLARATIONS
95//=============================================================================================================
96
97//=============================================================================================================
98// ENUMERATIONS
99//=============================================================================================================
100
101//=========================================================================================================
107class DISPSHARED_EXPORT BidsViewModel : public QStandardItemModel
108{
109 Q_OBJECT
110
111public:
112 typedef QSharedPointer<BidsViewModel> SPtr;
113 typedef QSharedPointer<const BidsViewModel> ConstSPtr;
114
115 //=========================================================================================================
119 BidsViewModel(QObject* pParent = Q_NULLPTR);
120
121 //=========================================================================================================
126
127public slots:
128 //=========================================================================================================
135 void addData(QModelIndex selectedItem,
136 QStandardItem *pNewItem,
137 int iDataType);
138
139 //=========================================================================================================
146 void addToData(QStandardItem *pNewItem,
147 const QModelIndex &parentIndex,
148 int iDataType);
149
150 //=========================================================================================================
158 QModelIndex addSubject(const QString &sSubjectName);
159
160 //=========================================================================================================
169 QModelIndex addSessionToSubject(const QString &sSubjectName,
170 const QString &sSessionName);
171
172 //=========================================================================================================
181 QModelIndex addSessionToSubject(QModelIndex subjectIndex,
182 const QString &sSessionName);
183
184 //=========================================================================================================
193 QModelIndex addDataToSession(QModelIndex sessionIndex,
194 QStandardItem* pNewItem,
195 int iDataType);
196
197 //=========================================================================================================
205 QModelIndex moveSessionToSubject(QModelIndex subjectIndex,
206 QModelIndex sessionIndex);
207
208 //=========================================================================================================
217 QModelIndex moveDataToSession(QModelIndex sessionIndex,
218 QModelIndex dataIndex);
219
220 //=========================================================================================================
228 bool removeItem(QModelIndex itemIndex);
229
230signals:
231
232 //=========================================================================================================
238 void newItemIndex(QModelIndex itemIndex);
239
240};
241
242} //Namespace
243
244#endif //BIDSVIEWMODEL_H
disp library export/import macros.
#define DISPSHARED_EXPORT
Definition disp_global.h:51
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)