src/headerhistorymodel.cpp

Fri, 23 Mar 2018 21:36:37 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Fri, 23 Mar 2018 21:36:37 +0200
changeset 1314
d94cf95608ac
parent 1307
adb9d32a1426
child 1323
05b3e173c900
permissions
-rw-r--r--

added stream operators to Vertex

1291
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
1 #include "headerhistorymodel.h"
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
2 #include "lddocument.h"
1292
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
3 #include "generics/migrate.h"
1291
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
4
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
5 HeaderHistoryModel::HeaderHistoryModel(LDHeader* header, QObject* parent) :
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
6 QAbstractTableModel {parent},
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
7 header {header} {}
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
8
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
9 int HeaderHistoryModel::rowCount(const QModelIndex&) const
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
10 {
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
11 if (this->header)
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
12 return this->header->history.size();
1307
adb9d32a1426 fixed warning
Teemu Piippo <teemu@hecknology.net>
parents: 1292
diff changeset
13 else
adb9d32a1426 fixed warning
Teemu Piippo <teemu@hecknology.net>
parents: 1292
diff changeset
14 return 0;
1291
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
15 }
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
16
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
17 int HeaderHistoryModel::columnCount(const QModelIndex&) const
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
18 {
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
19 return 3;
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
20 }
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
21
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
22 QVariant HeaderHistoryModel::data(const QModelIndex& index, int role) const
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
23 {
1292
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
24 if (this->header and (role == Qt::DisplayRole || role == Qt::EditRole))
1291
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
25 {
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
26 const auto& entry = this->header->history[index.row()];
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
27 switch (static_cast<Column>(index.column()))
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
28 {
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
29 case DateColumn:
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
30 return entry.date;
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
31
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
32 case AuthorColumn:
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
33 return entry.author;
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
34
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
35 case DescriptionColumn:
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
36 return entry.description;
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
37
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
38 default:
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
39 return {};
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
40 }
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
41 }
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
42 else
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
43 {
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
44 return {};
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
45 }
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
46 }
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
47
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
48 QVariant HeaderHistoryModel::headerData(int section, Qt::Orientation orientation, int role) const
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
49 {
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
50 if (orientation == Qt::Horizontal and role == Qt::DisplayRole)
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
51 {
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
52 switch (static_cast<Column>(section))
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
53 {
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
54 case DateColumn:
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
55 return tr("Date");
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
56
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
57 case AuthorColumn:
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
58 return tr("Author");
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
59
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
60 case DescriptionColumn:
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
61 return tr("Description");
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
62
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
63 default:
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
64 return {};
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
65 }
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
66 }
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
67 else
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
68 {
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
69 return {};
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
70 }
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
71 }
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
72
1292
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
73 Qt::ItemFlags HeaderHistoryModel::flags(const QModelIndex& index) const
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
74 {
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
75 Qt::ItemFlags flags = QAbstractTableModel::flags(index);
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
76
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
77 if (index.isValid())
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
78 flags |= Qt::ItemIsEditable;
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
79
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
80 return flags;
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
81 }
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
82
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
83 bool HeaderHistoryModel::setData(const QModelIndex& index, const QVariant& value, int role)
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
84 {
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
85 if (role == Qt::EditRole)
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
86 {
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
87 LDHeader::HistoryEntry& entry = this->header->history[index.row()];
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
88
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
89 switch (static_cast<Column>(index.column()))
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
90 {
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
91 case DateColumn:
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
92 entry.date = value.toDate();
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
93 return true;
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
94
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
95 case AuthorColumn:
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
96 entry.author = value.toString();
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
97 return true;
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
98
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
99 case DescriptionColumn:
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
100 entry.description = value.toString();
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
101 return true;
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
102
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
103 default:
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
104 return false;
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
105 }
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
106 }
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
107 else
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
108 {
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
109 return false;
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
110 }
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
111 }
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
112
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
113 bool HeaderHistoryModel::moveRows(
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
114 const QModelIndex&,
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
115 int sourceRow,
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
116 int count,
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
117 const QModelIndex&,
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
118 int destinationRow
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
119 ) {
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
120 int sourceRowLast = sourceRow + count - 1;
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
121 this->beginMoveRows({}, sourceRow, sourceRowLast, {}, destinationRow);
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
122 ::migrate(this->header->history, sourceRow, sourceRowLast, destinationRow);
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
123 this->endMoveRows();
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
124 return true;
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
125 }
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
126
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
127 bool HeaderHistoryModel::removeRows(int row, int count, const QModelIndex&)
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
128 {
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
129 if (row >= 0 and row + count - 1 < this->rowCount())
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
130 {
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
131 this->beginRemoveRows({}, row, row + count - 1);
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
132 this->header->history.remove(row, count);
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
133 this->endRemoveRows();
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
134 return true;
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
135 }
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
136 else
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
137 {
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
138 return false;
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
139 }
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
140 }
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
141
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
142 bool HeaderHistoryModel::insertRows(int startRow, int count, const QModelIndex&)
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
143 {
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
144 if (startRow >= 0 and startRow <= this->rowCount())
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
145 {
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
146 this->beginInsertRows({}, startRow, startRow + count - 1);
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
147
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
148 for (int row : range(startRow, startRow + 1, startRow + count - 1))
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
149 {
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
150 this->header->history.insert(row, {});
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
151 this->header->history[row].date = QDate::currentDate();
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
152 this->header->history[row].author = ::config->defaultUser();
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
153 }
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
154
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
155 this->endInsertRows();
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
156 return true;
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
157 }
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
158 else
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
159 {
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
160 return false;
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
161 }
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
162 }
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
163
1291
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
164 void HeaderHistoryModel::setHeader(LDHeader* header)
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
165 {
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
166 emit layoutAboutToBeChanged();
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
167 this->header = header;
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
168 emit layoutChanged();
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
169 }

mercurial