#include <PhosphorShellLauncher/LauncherModel.h>
|
| enum | Role {
TitleRole = Qt::UserRole + 1
, SubtitleRole
, IconNameRole
, ProviderIdRole
,
ProviderNameRole
, ProviderIconRole
, ResultIdRole
, PrimaryActionLabelRole
,
AlternateActionLabelRole
, HasAlternateActionRole
, ScoreRole
} |
◆ Role
| Enumerator |
|---|
| TitleRole | |
| SubtitleRole | |
| IconNameRole | |
| ProviderIdRole | |
| ProviderNameRole | |
| ProviderIconRole | |
| ResultIdRole | |
| PrimaryActionLabelRole | |
| AlternateActionLabelRole | |
| HasAlternateActionRole | |
| ScoreRole | |
◆ LauncherModel()
| PhosphorShellLauncher::LauncherModel::LauncherModel |
( |
QObject * | parent = nullptr | ) |
|
|
explicit |
◆ ~LauncherModel()
| PhosphorShellLauncher::LauncherModel::~LauncherModel |
( |
| ) |
|
|
override |
◆ activate()
| bool PhosphorShellLauncher::LauncherModel::activate |
( |
int | row, |
|
|
bool | alternate = false ) |
|
nodiscard |
◆ active()
| bool PhosphorShellLauncher::LauncherModel::active |
( |
| ) |
const |
|
nodiscard |
Whether the surface showing this model is on screen.
Providers stay subscribed to their sources for the whole session, because a launcher that rescanned on open would be slow exactly when the user is waiting. That means every clipboard copy and every window opening drives a recompute, and each one used to rebuild the model too: a full reset, destroying every delegate, for a surface nobody is looking at. While inactive the rebuild is deferred, and one runs when the surface comes back.
Defaults to true, so a host that never sets it behaves as before.
◆ activeChanged
| void PhosphorShellLauncher::LauncherModel::activeChanged |
( |
| ) |
|
|
signal |
◆ addProvider()
◆ alternateIsRepeatable()
| bool PhosphorShellLauncher::LauncherModel::alternateIsRepeatable |
( |
int | row | ) |
const |
|
nodiscard |
Whether row's ALTERNATE action can sensibly be repeated on the same list, which is what decides whether the surface closes after it.
The clipboard's remove is the case this exists for: pruning history is something a user does several times in a row, and closing after the first meant reopening and retyping to remove the second. False for a row out of range, and irrelevant to the primary action, which always finishes the interaction.
◆ countChanged
| void PhosphorShellLauncher::LauncherModel::countChanged |
( |
| ) |
|
|
signal |
◆ cycleProviderFilter()
| void PhosphorShellLauncher::LauncherModel::cycleProviderFilter |
( |
int | direction | ) |
|
◆ data()
| QVariant PhosphorShellLauncher::LauncherModel::data |
( |
const QModelIndex & | index, |
|
|
int | role ) const |
|
nodiscardoverride |
◆ providerFilter()
| QString PhosphorShellLauncher::LauncherModel::providerFilter |
( |
| ) |
const |
|
nodiscard |
◆ providerFilterChanged
| void PhosphorShellLauncher::LauncherModel::providerFilterChanged |
( |
| ) |
|
|
signal |
◆ providerObjects()
◆ providers()
| QVariantList PhosphorShellLauncher::LauncherModel::providers |
( |
| ) |
const |
|
nodiscard |
◆ providersChanged
| void PhosphorShellLauncher::LauncherModel::providersChanged |
( |
| ) |
|
|
signal |
◆ query()
| QString PhosphorShellLauncher::LauncherModel::query |
( |
| ) |
const |
|
nodiscard |
◆ queryChanged
| void PhosphorShellLauncher::LauncherModel::queryChanged |
( |
| ) |
|
|
signal |
◆ roleNames()
| QHash< int, QByteArray > PhosphorShellLauncher::LauncherModel::roleNames |
( |
| ) |
const |
|
nodiscardoverride |
◆ rowCount()
| int PhosphorShellLauncher::LauncherModel::rowCount |
( |
const QModelIndex & | parent = QModelIndex() | ) |
const |
|
nodiscardoverride |
◆ setActive()
| void PhosphorShellLauncher::LauncherModel::setActive |
( |
bool | active | ) |
|
◆ setProviderFilter()
| void PhosphorShellLauncher::LauncherModel::setProviderFilter |
( |
const QString & | providerId | ) |
|
◆ setQuery()
| void PhosphorShellLauncher::LauncherModel::setQuery |
( |
const QString & | query | ) |
|
The documentation for this class was generated from the following file: