PropertyBasedTableModel.cpp   PropertyBasedTableModel.cpp 
skipping to change at line 114 skipping to change at line 114
} }
Qt::ItemFlags PropertyBasedTableModel::flags(const QModelIndex &index) cons t Qt::ItemFlags PropertyBasedTableModel::flags(const QModelIndex &index) cons t
{ {
if (!index.isValid()) { if (!index.isValid()) {
return Qt::ItemIsEnabled; return Qt::ItemIsEnabled;
} }
return QAbstractTableModel::flags(index) | Qt::ItemIsEditable; return QAbstractTableModel::flags(index) | Qt::ItemIsEditable;
} }
void PropertyBasedTableModel::moveRowUp(int position)
{
int count = content->count();
if (count < 2 || position < 1 || position >= count)
return;
beginMoveRows(QModelIndex(), position, position, QModelIndex(), posi
tion-1);
content->move(position, position - 1);
endMoveRows();
}
void PropertyBasedTableModel::moveRowDown(int position)
{
int count = content->count();
if (count < 2 || position < 0 || position > (count - 2))
return;
beginMoveRows(QModelIndex(), position, position, QModelIndex(), posi
tion+2);
content->move(position, position + 1);
endMoveRows();
}
 End of changes. 1 change blocks. 
0 lines changed or deleted 0 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/