• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDEUI

krecentfilesaction.h

Go to the documentation of this file.
00001 /* This file is part of the KDE libraries
00002     Copyright (C) 1999 Reginald Stadlbauer <reggie@kde.org>
00003               (C) 1999 Simon Hausmann <hausmann@kde.org>
00004               (C) 2000 Nicolas Hadacek <haadcek@kde.org>
00005               (C) 2000 Kurt Granroth <granroth@kde.org>
00006               (C) 2000 Michael Koch <koch@kde.org>
00007               (C) 2001 Holger Freyther <freyther@kde.org>
00008               (C) 2002 Ellis Whitehead <ellis@kde.org>
00009               (C) 2003 Andras Mantia <amantia@kde.org>
00010               (C) 2005-2006 Hamish Rodda <rodda@kde.org>
00011 
00012     This library is free software; you can redistribute it and/or
00013     modify it under the terms of the GNU Library General Public
00014     License version 2 as published by the Free Software Foundation.
00015 
00016     This library is distributed in the hope that it will be useful,
00017     but WITHOUT ANY WARRANTY; without even the implied warranty of
00018     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00019     Library General Public License for more details.
00020 
00021     You should have received a copy of the GNU Library General Public License
00022     along with this library; see the file COPYING.LIB.  If not, write to
00023     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00024     Boston, MA 02110-1301, USA.
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     // Don't warn about the virtual overload. As the comment of the other
00172     // addAction() says, addAction( QAction* ) should not be used.
00173     using KSelectAction::addAction;
00174 
00175     Q_PRIVATE_SLOT( d_func(), void _k_urlSelected(QAction*) )
00176 };
00177 
00178 #endif

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal