Add per-tool settings and gesture customization
This commit is contained in:
1 parent
d6f30c5735
commit
38142b9499
26 files changed
+1383
-83
No files matched your search
@@ -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