KDEUI
krecentfilesaction.cpp
Go to the documentation of this file.
127 maxWidthForTitles = qMin(maxWidthForTitles, desktopWidget.availableGeometry(i).width() * 3 / 4);
140 cutValue = fontMetrics.elidedText(value, Qt::ElideMiddle, maxWidthForTitles - nameValueMaxWidth);
160 if ( url.isLocalFile() && KGlobal::dirs()->relativeLocation("tmp", url.toLocalFile()) != url.toLocalFile() )
164 const QString file = url.isLocalFile() ? QDir::toNativeSeparators( url.pathOrUrl() ) : url.pathOrUrl();
173 const QString tmpFileName = url.isLocalFile() ? QDir::toNativeSeparators( d->m_urls[action].pathOrUrl() ) : d->m_urls[action].pathOrUrl();
234 for (QMap<QAction*, KUrl>::ConstIterator it = d->m_urls.constBegin(); it != d->m_urls.constEnd(); ++it)
virtual QAction * removeAction(QAction *action)
Reimplemented for internal reasons.
Definition: krecentfilesaction.cpp:220
QString i18n(const char *text)
void setMaxItems(int maxItems)
Sets the maximum of items in the recent files list.
Definition: krecentfilesaction.cpp:107
QString readPathEntry(const QString &pKey, const QString &aDefault) const
void writePathEntry(const QString &pKey, const QString &path, WriteConfigFlags pFlags=Normal)
int maxItems() const
Returns the maximum of items in the recent files list.
Creates a button which pops up a menu when interacted with, as defined by toolButtonPopupMode().
Definition: kselectaction.h:108
KStandardDirs * dirs()
const char * name(StandardAction id)
This will return the internal name of a given standard action.
Definition: kstandardaction.cpp:223
QString toLocalFile(AdjustPathOption trailing=LeaveTrailingSlash) const
void deleteGroup(WriteConfigFlags pFlags=Normal)
virtual QAction * removeAction(QAction *action)
Remove the specified action from this action selector.
Definition: kselectaction.cpp:278
void addUrl(const KUrl &url, const QString &name=QString())
Add URL to recent files list.
Definition: krecentfilesaction.cpp:150
void recentListCleared()
This signal gets emitted when the user clear list.
void saveEntries(const KConfigGroup &config)
Saves the current recent files entries to a given KConfigGroup object.
Definition: krecentfilesaction.cpp:322
QStringList items() const
Convenience function which returns the items that can be selected with this action.
void addAction(QAction *action, const KUrl &url, const QString &name)
Adds action to the list of URLs, with url and title name.
Definition: krecentfilesaction.cpp:200
QString relativeLocation(const char *type, const QString &absPath)
QString pathOrUrl() const
KAction * clear(const QObject *recvr, const char *slot, QObject *parent)
Clear the content of the focus widget.
Definition: kstandardaction.cpp:314
QList< QAction * > actions() const
Returns the list of selectable actions.
Definition: kselectaction.cpp:110
QString name() const
KRecentFilesAction(QObject *parent)
Constructs an action with the specified parent.
Definition: krecentfilesaction.cpp:47
QActionGroup * selectableActionGroup() const
The action group used to create exclusivity between the actions associated with this action...
Definition: kselectaction.cpp:104
KConfig * config()
KUrl::List urls() const
Retrieve a list of all URLs in the recent files list.
Definition: krecentfilesaction.cpp:241
QAction * action(int index) const
Returns the action at index, if one exists.
Definition: kselectaction.cpp:162
void removeUrl(const KUrl &url)
Remove an URL from the recent files list.
Definition: krecentfilesaction.cpp:231
QString fileName(const DirectoryOptions &options=IgnoreTrailingSlash) const
bool isLocalFile() const
static QString titleWithSensibleWidth(const QString &nameValue, const QString &value)
Definition: krecentfilesaction.cpp:118
void loadEntries(const KConfigGroup &config)
Loads the recent files entries from a given KConfigGroup object.
Definition: krecentfilesaction.cpp:265
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:15 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:15 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.