-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcomponentDataModel.cpp
More file actions
39 lines (32 loc) · 843 Bytes
/
componentDataModel.cpp
File metadata and controls
39 lines (32 loc) · 843 Bytes
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
#include "component.h"
#include "componentDataModel.h"
namespace CutePathSim
{
ComponentDataModel::ComponentDataModel(Component *component, QObject *parent) : QAbstractItemModel(parent)
{
m_component = component;
}
ComponentDataModel::~ComponentDataModel()
{
}
int ComponentDataModel::columnCount(const QModelIndex & parent) const
{
return 0;
}
QVariant ComponentDataModel::data(const QModelIndex & index, int role) const
{
return QVariant();
}
QModelIndex ComponentDataModel::index(int row, int column, const QModelIndex & parent) const
{
return QModelIndex();
}
QModelIndex ComponentDataModel::parent(const QModelIndex & index) const
{
return QModelIndex();
}
int ComponentDataModel::rowCount(const QModelIndex & parent) const
{
return m_component->m_data.size();
}
}