-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrcompositemapobjectmodel.cpp
More file actions
executable file
·46 lines (39 loc) · 1.69 KB
/
rcompositemapobjectmodel.cpp
File metadata and controls
executable file
·46 lines (39 loc) · 1.69 KB
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
#include "rcompositemapobjectmodel.h"
//--------------------------------------------------------------------------------------
RCompositeMapObjectModel::RCompositeMapObjectModel(QObject *parent) :
RMapObjectModel(parent),
text(tr(""))
{}
//--------------------------------------------------------------------------------------
RCompositeMapObjectModel::~RCompositeMapObjectModel()
{}
//--------------------------------------------------------------------------------------
RCompositeMapObjectModel *RCompositeMapObjectModel::clone() const
{
RCompositeMapObjectModel *m = new RCompositeMapObjectModel;
initModel(m);
return m;
}
//--------------------------------------------------------------------------------------
void RCompositeMapObjectModel::initModel(RCompositeMapObjectModel *m) const
{ RMapObjectModel::initModel(m); }
//--------------------------------------------------------------------------------------
int RCompositeMapObjectModel::rowCount(const QModelIndex &parent) const
{ return RMapObjectModel::EN_SECTIONS_COUNT; }
//--------------------------------------------------------------------------------------
const QString &RCompositeMapObjectModel::caption() const
{ return text; }
//--------------------------------------------------------------------------------------
bool RCompositeMapObjectModel::setData(const QModelIndex &index, const QVariant &value, int role)
{
if (index.isValid() && role == Qt::EditRole) {
switch (index.row()) {
case EN_WIDTH:
case EN_HEIGHT:
return false;
default:
return RMapObjectModel::setData(index, value, role);
}
}
return false;
}