/
CQCreatorDM.h
50 lines (40 loc) · 1.66 KB
/
CQCreatorDM.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// Copyright (C) 2017 - 2018 by Pedro Mendes, Virginia Tech Intellectual
// Properties, Inc., University of Heidelberg, and University of
// of Connecticut School of Medicine.
// All rights reserved.
// Copyright (C) 2010 - 2016 by Pedro Mendes, Virginia Tech Intellectual
// Properties, Inc., University of Heidelberg, and The University
// of Manchester.
// All rights reserved.
// Copyright (C) 2009 by Pedro Mendes, Virginia Tech Intellectual
// Properties, Inc., EML Research, gGmbH, University of Heidelberg,
// and The University of Manchester.
// All rights reserved.
#ifndef CQCreatorDM_H
#define CQCreatorDM_H
#include "UI/CQBaseDataModel.h"
class CMIRIAMInfo;
#define COL_FAMILY_NAME 1
#define COL_GIVEN_NAME 2
#define COL_EMAIL 3
#define COL_ORG 4
#define TOTAL_COLS_CREATORS 5
class CQCreatorDM : public CQBaseDataModel
{
Q_OBJECT
public:
CQCreatorDM(CMIRIAMInfo* MIRIAMInfo, QObject *parent = 0);
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const override;
virtual int columnCount(const QModelIndex &parent = QModelIndex()) const override;
QVariant data(const QModelIndex &index, int role) const;
QVariant headerData(int section, Qt::Orientation orientation,
int role = Qt::DisplayRole) const;
bool setData(const QModelIndex &index, const QVariant &value,
int role = Qt::EditRole);
bool removeRows(QModelIndexList rows, const QModelIndex &index = QModelIndex());
protected:
virtual bool insertRows(int position, int rows, const QModelIndex & source);
virtual bool removeRows(int position, int rows);
CMIRIAMInfo* mpMIRIAMInfo;
};
#endif //CQCreatorDM_H