Albert
|
Classes | |
class | Action |
Action used by result items (Item). More... | |
class | BackgroundExecutor |
Provides a lean interface for recurring indexing tasks. More... | |
class | Dependency |
Base class for StrongDependency and WeakDependency. More... | |
class | Extension |
Abstract extension class. More... | |
class | ExtensionPlugin |
Convenience base class for extension plugins. More... | |
class | ExtensionRegistry |
The common extension pool. More... | |
class | ExtensionWatcher |
Non-QObject extension registry observer. More... | |
class | FallbackHandler |
Abstract fallback provider. More... | |
class | Frontend |
The interface for albert frontends. More... | |
class | GlobalQueryHandler |
Abstract global query handler. More... | |
class | IndexItem |
An item utlized by ItemIndex. More... | |
class | IndexQueryHandler |
Index query handler class. More... | |
class | InputHistory |
Input history class. More... | |
class | Item |
Result items displayed in the query results list. More... | |
class | Match |
The Match class. More... | |
class | Matcher |
The Matcher class. More... | |
class | Notification |
The notification class. More... | |
class | PluginInstance |
Abstract plugin instance class. More... | |
class | PluginLoader |
Plugin loader interface class. More... | |
class | PluginMetaData |
Common plugin metadata of plugins. More... | |
class | PluginProvider |
Plugin provider interface class. More... | |
class | Query |
Common query object. More... | |
class | RankItem |
Scored item Used to rank item results of mutliple handlers. More... | |
class | StandardItem |
General purpose value type Item implememtation. More... | |
class | StrongDependency |
Convenience holder class for plugin hard dependencies. More... | |
class | TriggerQueryHandler |
Abstract trigger query handler. More... | |
class | WeakDependency |
Convenience holder class for plugin soft dependencies. More... | |
Enumerations | |
enum class | ItemRoles { TextRole = Qt::DisplayRole , SubTextRole = Qt::UserRole , InputActionRole , IconUrlsRole , ActionsListRole } |
Convention on the item roles passed around. More... | |
Functions | |
QPixmap | pixmapFromUrl (const QString &url, const QSize &requestedSize) |
URL based icon factory. | |
QPixmap | pixmapFromUrls (const QStringList &urls, const QSize &requestedSize) |
URL list based icon factory. | |
QIcon | iconFromUrl (const QString &url) |
URL based icon factory. | |
QIcon | iconFromUrls (const QStringList &urls) |
URL list based icon factory. | |
QPixmap | genericPixmap (int size, const QColor &bgcolor={}, const QColor &fgcolor=Qt::black, const QString &text={}, float scalar=1.) |
Generic pixmap factory. | |
QIcon | genericIcon (int size, const QColor &bgcolor={}, const QColor &fgcolor=Qt::black, const QString &text={}, float scalar=1.) |
Generic icon factory. | |
QIcon | fileIcon (const QString &path) |
Create an icon for a file using QFileIconProvider. | |
QNetworkAccessManager * | network () |
The global QNetworkAccessManager. | |
void | showSettings (QString plugin_id={}) |
Open/Show the settings window (of plugin). | |
QString | configLocation () |
The app config location. | |
QString | cacheLocation () |
The app cache location. | |
QString | dataLocation () |
The app data location. | |
std::unique_ptr< QSettings > | settings () |
Persistent app settings storage. | |
std::unique_ptr< QSettings > | state () |
The persistent app state storage. | |
void | openWebsite () |
Open the albert website in default browser. | |
void | openUrl (const QUrl &url) |
Open the specified url in default browser. | |
void | openUrl (const QString &url) |
Open the specified url in default browser. | |
void | setClipboardText (const QString &text) |
Set the system clipboard. | |
bool | havePasteSupport () |
Check paste support of the platform. | |
void | setClipboardTextAndPaste (const QString &text) |
Set the system clipboard and paste the content to the front-most window. | |
long long | runDetachedProcess (const QStringList &commandline, const QString &working_dir={}) |
Run a detached process. | |
|
strong |
QString albert::cacheLocation | ( | ) |
The app cache location.
The path to the directory where cache files should be stored.
QString albert::configLocation | ( | ) |
The app config location.
The path to the directory where configuration files should be stored.
QString albert::dataLocation | ( | ) |
The app data location.
The path to the directory where data files should be stored.
QIcon albert::fileIcon | ( | const QString & | path | ) |
Create an icon for a file using QFileIconProvider.
path | The path to the file. |
QIcon albert::genericIcon | ( | int | size, |
const QColor & | bgcolor = {} , |
||
const QColor & | fgcolor = Qt::black , |
||
const QString & | text = {} , |
||
float | scalar = 1. |
||
) |
Generic icon factory.
Supports drawing a background circle with some text on it.
bgcolor | The background color. Default: none. |
fgcolor | The text color. Default: black. |
text | The text to display. Default: empty. |
scalar | Scalar for the default font size which is the pixmap height. Default: 1. |
QPixmap albert::genericPixmap | ( | int | size, |
const QColor & | bgcolor = {} , |
||
const QColor & | fgcolor = Qt::black , |
||
const QString & | text = {} , |
||
float | scalar = 1. |
||
) |
Generic pixmap factory.
Supports drawing a background circle with some text on it.
bgcolor | The background color. Default: none. |
fgcolor | The text color. Default: black. |
text | The text to display. Default: empty. |
scalar | Scalar for the default font size which is the pixmap height. Default: 1. |
bool albert::havePasteSupport | ( | ) |
Check paste support of the platform.
QIcon albert::iconFromUrl | ( | const QString & | url | ) |
URL based icon factory.
url | The icon URL. |
QIcon albert::iconFromUrls | ( | const QStringList & | urls | ) |
URL list based icon factory.
See iconFromUrl(const QString &url).
urls | The icon URLs. |
QNetworkAccessManager * albert::network | ( | ) |
The global QNetworkAccessManager.
void albert::openUrl | ( | const QString & | url | ) |
Open the specified url in default browser.
url | The url to open |
void albert::openUrl | ( | const QUrl & | url | ) |
Open the specified url in default browser.
url | The url to open |
void albert::openWebsite | ( | ) |
Open the albert website in default browser.
QPixmap albert::pixmapFromUrl | ( | const QString & | url, |
const QSize & | requestedSize | ||
) |
URL based icon factory.
Supported URL schemes:
<path>
orfile:<path>
Use the file at path as icon.:<path>
orqrc:<path>
Use the file at path in the resource collection as icon.qfip:<path>
Uses fileIcon(const QString &path)qsp:<pixmap enumerator>
Get an icon from QStyle::StandardPixmap enum.xdg:<icon name>
Uses xdgIconLookup(const QString &name);gen:<>
Uses genericPixmapFactory. See also QColor::fromString.Examples
/absolute/path/to/a/local/image/file.png file:/absolute/path/to/a/local/image/file.png :path-to-a-qresource-file qrc:path-to-a-qresource-file qfip:/path/to/any/file/for/example/a.pdf qsp:SP_TrashIcon xdg:some-themed-icon-name gen:?background=blue&foreground=red&text=Hi&fontscalar=0.5
url | The icon URL. |
requestedSize | The size the pixmap should have if possible. |
QPixmap albert::pixmapFromUrls | ( | const QStringList & | urls, |
const QSize & | requestedSize | ||
) |
URL list based icon factory.
See pixmapFromUrl(const QString &url, QSize *size, const QSize &requestedSize).
urls | The icon URLs. |
requestedSize | The size the pixmap should have if possible. |
long long albert::runDetachedProcess | ( | const QStringList & | commandline, |
const QString & | working_dir = {} |
||
) |
Run a detached process.
commandline | The command line to run |
working_dir | The working directory |
void albert::setClipboardText | ( | const QString & | text | ) |
Set the system clipboard.
text | The text to set |
void albert::setClipboardTextAndPaste | ( | const QString & | text | ) |
Set the system clipboard and paste the content to the front-most window.
Check albert::havePasteSupport before using this function.
text | The text to set and paste |
std::unique_ptr< QSettings > albert::settings | ( | ) |
Persistent app settings storage.
void albert::showSettings | ( | QString | plugin_id = {} | ) |
Open/Show the settings window (of plugin).
plugin_id | Id of the plugin whose settings should be displayed. |
std::unique_ptr< QSettings > albert::state | ( | ) |
The persistent app state storage.