Phosphor
Qt6 / Wayland library suite for window-management tools
Loading...
Searching...
No Matches
PhosphorShellLauncher::AppsProvider Class Reference

#include <PhosphorShellLauncher/AppsProvider.h>

Inheritance diagram for PhosphorShellLauncher::AppsProvider:
[legend]

Signals

void entriesChanged ()
Signals inherited from PhosphorRegistry::ILauncherProvider
void resultsChanged ()

Public Member Functions

 AppsProvider (QObject *parent=nullptr)
 AppsProvider (QStringList directories, QString locale, QStringList currentDesktop, QObject *parent=nullptr)
 ~AppsProvider () override
QString id () const override
QString displayName () const override
QString iconName () const override
bool listsOnEmptyQuery () const override
void setListOnEmptyQuery (bool enabled)
void setQuery (const QString &query) override
QList< PhosphorRegistry::LauncherResult > results () const override
bool activate (const QString &resultId, Activation activation) override
void setMaximumResults (int count)
 Retunable by a host, though no host in this repo does: the default is what the shell ships with.
int maximumResults () const
QList< DesktopEntry > entries () const
void rescan ()
Public Member Functions inherited from PhosphorRegistry::ILauncherProvider
 ILauncherProvider (QObject *parent=nullptr)
 ~ILauncherProvider () override=default

Static Public Member Functions

static bool launch (const DesktopEntry &entry)
 Launch one entry directly, bypassing the id lookup activate() does.

Static Public Attributes

static constexpr int SecondaryFieldPenalty = FuzzyMatcher::ScoreMatch / 4

Additional Inherited Members

Public Types inherited from PhosphorRegistry::ILauncherProvider
enum class  Activation { Primary , Alternate }

Constructor & Destructor Documentation

◆ AppsProvider() [1/2]

PhosphorShellLauncher::AppsProvider::AppsProvider ( QObject * parent = nullptr)
explicit

◆ AppsProvider() [2/2]

PhosphorShellLauncher::AppsProvider::AppsProvider ( QStringList directories,
QString locale,
QStringList currentDesktop,
QObject * parent = nullptr )

◆ ~AppsProvider()

PhosphorShellLauncher::AppsProvider::~AppsProvider ( )
override

Member Function Documentation

◆ activate()

bool PhosphorShellLauncher::AppsProvider::activate ( const QString & resultId,
Activation activation )
nodiscardoverridevirtual

◆ displayName()

QString PhosphorShellLauncher::AppsProvider::displayName ( ) const
nodiscardoverridevirtual

◆ entries()

QList< DesktopEntry > PhosphorShellLauncher::AppsProvider::entries ( ) const
nodiscard

◆ entriesChanged

void PhosphorShellLauncher::AppsProvider::entriesChanged ( )
signal

◆ iconName()

QString PhosphorShellLauncher::AppsProvider::iconName ( ) const
nodiscardoverridevirtual

◆ id()

QString PhosphorShellLauncher::AppsProvider::id ( ) const
nodiscardoverridevirtual

◆ launch()

bool PhosphorShellLauncher::AppsProvider::launch ( const DesktopEntry & entry)
staticnodiscard

Launch one entry directly, bypassing the id lookup activate() does.

PUBLIC for a host that has a DesktopEntry in hand from somewhere other than this provider's own results: a recent-apps list, a file manager's open-with. Nothing in this repo calls it, so it is API surface rather than used code, and it is the one place a caller can launch something this provider never offered.

◆ listsOnEmptyQuery()

bool PhosphorShellLauncher::AppsProvider::listsOnEmptyQuery ( ) const
inlinenodiscardoverridevirtual

◆ maximumResults()

int PhosphorShellLauncher::AppsProvider::maximumResults ( ) const
nodiscard

◆ rescan()

void PhosphorShellLauncher::AppsProvider::rescan ( )

◆ results()

QList< PhosphorRegistry::LauncherResult > PhosphorShellLauncher::AppsProvider::results ( ) const
nodiscardoverridevirtual

◆ setListOnEmptyQuery()

void PhosphorShellLauncher::AppsProvider::setListOnEmptyQuery ( bool enabled)

◆ setMaximumResults()

void PhosphorShellLauncher::AppsProvider::setMaximumResults ( int count)

Retunable by a host, though no host in this repo does: the default is what the shell ships with.

Each provider carries its own, because a launcher wants more windows in view than clipboard entries, so there is no single number to hoist.

◆ setQuery()

void PhosphorShellLauncher::AppsProvider::setQuery ( const QString & query)
overridevirtual

Member Data Documentation

◆ SecondaryFieldPenalty

int PhosphorShellLauncher::AppsProvider::SecondaryFieldPenalty = FuzzyMatcher::ScoreMatch / 4
staticconstexpr

The documentation for this class was generated from the following file:
  • phosphor-shell-launcher/include/PhosphorShellLauncher/AppsProvider.h