Add per-tool settings and gesture customization
This commit is contained in:
@@ -72,3 +72,22 @@ QVector<int> logicalTaskRows(const QAbstractItemModel &model, bool separateLaunc
|
||||
}
|
||||
return rows;
|
||||
}
|
||||
|
||||
int initialCyclePosition(const QAbstractItemModel &model, int row, bool startWithFirst, bool backwards)
|
||||
{
|
||||
const QModelIndex group = model.index(row, 0);
|
||||
const int childCount = model.rowCount(group);
|
||||
if (childCount == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!startWithFirst) {
|
||||
for (int child = 0; child < childCount; ++child) {
|
||||
if (model.index(child, 0, group).data(AbstractTasksModel::IsActive).toBool()) {
|
||||
return child + (backwards ? -1 : 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return backwards ? childCount - 1 : 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user