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
60//SUB-ITEMS
61#define BIDS_AVERAGE 20
62#define BIDS_EVENT 21
63#define BIDS_DIPOLE 22
64
65#define BIDS_UNKNOWN 99
66
67//=============================================================================================================
68// INCLUDES
69//=============================================================================================================
70
71#include "../../disp_global.h"
72
73//=============================================================================================================
74// QT INCLUDES
75//=============================================================================================================
76
77#include <QStandardItemModel>
78
79//=============================================================================================================
80// FORWARD DECLARATIONS
81//=============================================================================================================
82
83//=============================================================================================================
84// DEFINE NAMESPACE ANSHAREDLIB
85//=============================================================================================================
86
87namespace DISPLIB
88{
89
90//=============================================================================================================
91// ANSHAREDLIB FORWARD DECLARATIONS
92//=============================================================================================================
93
94//=============================================================================================================
95// ENUMERATIONS
96//=============================================================================================================
97
98//=========================================================================================================
104class DISPSHARED_EXPORT BidsViewModel : public QStandardItemModel
105{
106 Q_OBJECT
107
108public:
109 typedef QSharedPointer<BidsViewModel> SPtr;
110 typedef QSharedPointer<const BidsViewModel> ConstSPtr;
111
112 //=========================================================================================================
116 BidsViewModel(QObject* pParent = Q_NULLPTR);
117
118 //=========================================================================================================
123
124public slots:
125 //=========================================================================================================
132 void addData(QModelIndex selectedItem,
133 QStandardItem *pNewItem,
134 int iDataType);
135
136 //=========================================================================================================
143 void addToData(QStandardItem *pNewItem,
144 const QModelIndex &parentIndex,
145 int iDataType);
146
147 //=========================================================================================================
155 QModelIndex addSubject(const QString &sSubjectName);
156
157 //=========================================================================================================
166 QModelIndex addSessionToSubject(const QString &sSubjectName,
167 const QString &sSessionName);
168
169 //=========================================================================================================
178 QModelIndex addSessionToSubject(QModelIndex subjectIndex,
179 const QString &sSessionName);
180
181 //=========================================================================================================
190 QModelIndex addDataToSession(QModelIndex sessionIndex,
191 QStandardItem* pNewItem,
192 int iDataType);
193
194 //=========================================================================================================
202 QModelIndex moveSessionToSubject(QModelIndex subjectIndex,
203 QModelIndex sessionIndex);
204
205 //=========================================================================================================
214 QModelIndex moveDataToSession(QModelIndex sessionIndex,
215 QModelIndex dataIndex);
216
217 //=========================================================================================================
225 bool removeItem(QModelIndex itemIndex);
226
227signals:
228
229 //=========================================================================================================
235 void newItemIndex(QModelIndex itemIndex);
236
237};
238
239} //Namespace
240
241#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)