KDEUI
krecentfilesaction.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef KRECENTFILESACTION_H
00028 #define KRECENTFILESACTION_H
00029
00030 #include <kselectaction.h>
00031 #include <kurl.h>
00032
00033 class KConfigGroup;
00034 class KRecentFilesActionPrivate;
00035
00046 class KDEUI_EXPORT KRecentFilesAction : public KSelectAction
00047 {
00048 Q_OBJECT
00049 Q_PROPERTY( int maxItems READ maxItems WRITE setMaxItems )
00050 Q_DECLARE_PRIVATE(KRecentFilesAction)
00051
00052 public:
00058 explicit KRecentFilesAction(QObject *parent);
00059
00072 KRecentFilesAction(const QString &text, QObject *parent);
00073
00085 KRecentFilesAction(const KIcon &icon, const QString &text, QObject *parent);
00086
00090 virtual ~KRecentFilesAction();
00091
00098 void addAction(QAction* action, const KUrl& url, const QString& name);
00099
00103 virtual QAction* removeAction(QAction* action);
00104
00108 virtual void clear();
00109
00113 int maxItems() const;
00114
00123 void setMaxItems( int maxItems );
00124
00131 void loadEntries( const KConfigGroup &config );
00132
00139 void saveEntries( const KConfigGroup &config );
00140
00147 void addUrl( const KUrl& url, const QString& name = QString() );
00148
00154 void removeUrl( const KUrl& url );
00155
00159 KUrl::List urls() const;
00160
00161 Q_SIGNALS:
00167 void urlSelected( const KUrl& url );
00168
00169 private:
00170
00171
00172
00173 using KSelectAction::addAction;
00174
00175 Q_PRIVATE_SLOT( d_func(), void _k_urlSelected(QAction*) )
00176 };
00177
00178 #endif