KConfigWidgets
krecentfilesaction.cpp
84 clearAction = q->menu()->addAction(QIcon::fromTheme(QStringLiteral("edit-clear-history")), i18n("Clear List"), q, &KRecentFilesAction::clear);
98 action.mimeType = QMimeDatabase().mimeTypeForFile(action.url.path(), QMimeDatabase::MatchExtension);
179 cutValue = fontMetrics.elidedText(value, Qt::ElideMiddle, maxWidthForTitles - nameValueMaxWidth);
230 if (bus.isConnected() && bus.interface()->isServiceRegistered(QStringLiteral("org.kde.ActivityManager"))) {
233 const static QString activityResouceInferface = QStringLiteral("org.kde.ActivityManager.Resources");
234 const QMimeType mimeType = QMimeDatabase().mimeTypeForFile(url.path(), QMimeDatabase::MatchExtension);
238 QDBusMessage::createMethodCall(activityService, activityResources, activityResouceInferface, QStringLiteral("RegisterResourceEvent"));
239 message.setArguments({qApp->desktopFileName(), uint(0) /* WinId */, urlString, uint(0) /* eventType Accessed */});
242 message = QDBusMessage::createMethodCall(activityService, activityResources, activityResouceInferface, QStringLiteral("RegisterResourceMimetype"));
246 message = QDBusMessage::createMethodCall(activityService, activityResources, activityResouceInferface, QStringLiteral("RegisterResourceTitle"));
QString name() const
void deleteGroup(const QString &group, WriteConfigFlags flags=Normal)
void writePathEntry(const char *Key, const QString &path, WriteConfigFlags pFlags=Normal)
QString readPathEntry(const char *key, const QString &aDefault) const
KConfig * config()
void addAction(QAction *action, const QUrl &url, const QString &name, const QMimeType &mimeType=QMimeType())
Adds action to the list of URLs, with url and title name.
Definition krecentfilesaction.cpp:257
KRecentFilesAction(QObject *parent)
Constructs an action with the specified parent.
Definition krecentfilesaction.cpp:41
void removeUrl(const QUrl &url)
Remove an URL from the recent files list.
Definition krecentfilesaction.cpp:273
QAction * removeAction(QAction *action) override
Reimplemented for internal reasons.
Definition krecentfilesaction.cpp:264
QList< QUrl > urls() const
Retrieve a list of all URLs in the recent files list.
Definition krecentfilesaction.cpp:284
void recentListCleared()
This signal gets emitted when the user clear list.
void addUrl(const QUrl &url, const QString &name=QString())
Add URL to the recent files list.
Definition krecentfilesaction.cpp:189
void setMaxItems(int maxItems)
Sets the maximum of items in the recent files list.
Definition krecentfilesaction.cpp:137
void loadEntries(const KConfigGroup &config)
Loads the recent files entries from a given KConfigGroup object.
Definition krecentfilesaction.cpp:317
void saveEntries(const KConfigGroup &config)
Saves the current recent files entries to a given KConfigGroup object.
Definition krecentfilesaction.cpp:376
virtual QAction * removeAction(QAction *action)
void clear()
MenuMode
QList< QAction * > actions() const
QActionGroup * selectableActionGroup() const
QAction * action(const QString &text, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
void actionTriggered(QAction *action)
QString i18n(const char *text, const TYPE &arg...)
KCOREADDONS_EXPORT QString tildeCollapse(const QString &path)
QAction(QObject *parent)
void setEnabled(bool)
void setIcon(const QIcon &icon)
void setText(const QString &text)
QDBusPendingCall asyncCall(const QDBusMessage &message, int timeout) const const
QDBusConnectionInterface * interface() const const
bool isConnected() const const
QDBusConnection sessionBus()
QDBusReply< bool > isServiceRegistered(const QString &serviceName) const const
QDBusMessage createMethodCall(const QString &service, const QString &path, const QString &interface, const QString &method)
void setArguments(const QList< QVariant > &arguments)
QString tempPath()
QString toNativeSeparators(const QString &pathName)
QRect boundingRect(QChar ch) const const
QString elidedText(const QString &text, Qt::TextElideMode mode, int width, int flags) const const
QList< QScreen * > screens()
QIcon fromTheme(const QString &name)
void reserve(qsizetype size)
MatchExtension
QMimeType mimeTypeForFile(const QFileInfo &fileInfo, MatchMode mode) const const
Q_EMITQ_EMIT
int width() const const
QString arg(Args &&... args) const const
bool isEmpty() const const
bool isNull() const const
bool startsWith(QChar c, Qt::CaseSensitivity cs) const const
ElideMiddle
PreferLocalFile
QString fileName(ComponentFormattingOptions options) const const
QUrl fromUserInput(const QString &userInput, const QString &workingDirectory, UserInputResolutionOptions options)
bool isLocalFile() const const
QString path(ComponentFormattingOptions options) const const
QString toDisplayString(FormattingOptions options) const const
QString toLocalFile() const const
QString toString(FormattingOptions options) const const
QString url(FormattingOptions options) const const
void insertAction(QAction *before, QAction *action)
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 4 2024 12:03:47 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 4 2024 12:03:47 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.