Preview task-group selections until Meta is released
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QAbstractItemModel>
|
||||
#include <QPersistentModelIndex>
|
||||
|
||||
// A preview is not an activation: only the final selection enters focus history.
|
||||
class PendingSelection : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit PendingSelection(QAbstractItemModel &model);
|
||||
void select(const QModelIndex &task, bool defer);
|
||||
void finish();
|
||||
void cancel();
|
||||
|
||||
Q_SIGNALS:
|
||||
void previewRequested(const QModelIndex &task);
|
||||
void previewHidden();
|
||||
void activationRequested(const QModelIndex &task);
|
||||
|
||||
private:
|
||||
QPersistentModelIndex m_task;
|
||||
};
|
||||
Reference in New Issue
Block a user