Warning, file /office/calligra/gemini/RecentFileManager.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* This file is part of the KDE project 0002 * SPDX-FileCopyrightText: 2012 Boudewijn Rempt <boud@kogmbh.com> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 #ifndef RECENTFILEMANAGER_H 0007 #define RECENTFILEMANAGER_H 0008 0009 #include <QObject> 0010 0011 /** 0012 * @brief The RecentFileManager class keeps track of recent files 0013 */ 0014 class RecentFileManager : public QObject 0015 { 0016 Q_OBJECT 0017 public: 0018 explicit RecentFileManager(QObject *parent = 0); 0019 ~RecentFileManager() override; 0020 0021 /// @return the size of the recent files list 0022 Q_INVOKABLE int size(); 0023 0024 /// @return the recent file at position index or an empty string 0025 QString recentFile(int index) const; 0026 0027 /// @return the recent filename at position index or an empty string 0028 QString recentFileName(int index) const; 0029 0030 /// @return the list of filenames without their paths 0031 QStringList recentFileNames() const; 0032 0033 /// @return the list of recent files with their paths 0034 QStringList recentFiles() const; 0035 0036 0037 Q_SIGNALS: 0038 0039 void recentFilesListChanged(); 0040 0041 public Q_SLOTS: 0042 0043 0044 /// add the given filename to the front of the list of recent filenames 0045 void addRecent(const QString &_url); 0046 0047 private: 0048 class Private; 0049 Private* d; 0050 0051 }; 0052 0053 #endif // FILEMANAGER_H