KIO
kurifiltersearchprovideractions.cpp
51 auto *job = new KIO::CommandLauncherJob(QStringLiteral("kcmshell6"), {QStringLiteral("webshortcuts")});
77 webShortcutsMenu->setIcon(QIcon::fromTheme(QStringLiteral("preferences-web-browser-shortcuts")));
83 connect(actionGroup, &QActionGroup::triggered, this, &KUriFilterSearchProviderActions::slotHandleWebShortcutAction);
85 QAction *action = new QAction(i18nc("@action:inmenu Search for <text> with", "%1", searchProvider), webShortcutsMenu);
86 action->setIcon(QIcon::fromTheme(filterData.iconNameForPreferredSearchProvider(searchProvider)));
94 QAction *action = new QAction(i18nc("@action:inmenu", "Configure Web Shortcuts…"), webShortcutsMenu);
96 connect(action, &QAction::triggered, this, &KUriFilterSearchProviderActions::slotConfigureWebShortcuts);
CommandLauncherJob runs a command and watches it while running.
Definition commandlauncherjob.h:45
void addWebShortcutsToMenu(QMenu *menu)
addWebShortcutsToMenu Manage to add web shortcut actions to existing menu.
Definition kurifiltersearchprovideractions.cpp:56
KUriFilterSearchProviderActions(QObject *parent=nullptr)
Constructs a webshorts menu manager.
Definition kurifiltersearchprovideractions.cpp:31
QString selectedText() const
return the selected text
Definition kurifiltersearchprovideractions.cpp:39
void setSelectedText(const QString &selectedText)
Set selected text.
Definition kurifiltersearchprovideractions.cpp:44
AutoHandlingEnabled
void setUiDelegate(KJobUiDelegate *delegate)
This class is a basic messaging class used to exchange filtering information between the filter plugi...
Definition kurifilter.h:153
void setSearchFilteringOptions(SearchFilterOptions options)
Sets the options used by search filter plugins to filter requests.
Definition kurifilter.cpp:360
QString iconNameForPreferredSearchProvider(const QString &provider) const
Returns the icon associated with the given preferred search provider.
Definition kurifilter.cpp:275
QStringList preferredSearchProviders() const
Returns a list of the names of preferred or available search providers.
Definition kurifilter.cpp:241
QString queryForPreferredSearchProvider(const QString &provider) const
Returns the web shortcut url for the given preferred search provider.
Definition kurifilter.cpp:257
QString i18nc(const char *context, const char *text, const TYPE &arg...)
QString i18n(const char *text, const TYPE &arg...)
KCOREADDONS_EXPORT QString rsqueeze(const QString &str, int maxlen=40)
QVariant data() const const
void setIcon(const QIcon &icon)
void setData(const QVariant &data)
void triggered(bool checked)
QAction * addAction(QAction *action)
bool openUrl(const QUrl &url)
QIcon fromTheme(const QString &name)
bool isEmpty() const const
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
QString findExecutable(const QString &executableName, const QStringList &paths)
bool isEmpty() const const
QString toString() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:16:28 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:16:28 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.