19 #ifndef RECENTFILEMENU_H
20 #define RECENTFILEMENU_H
24 #include <QStringList>
25 #include "pencildef.h"
34 Q_PROPERTY ( QStringList recentFiles
36 WRITE setRecentFiles )
38 explicit RecentFileMenu(QString title = tr(
"Open Recent"), QWidget *parent = 0);
41 static const int MAX_RECENT_FILES = 10;
43 QStringList getRecentFiles() {
return mRecentFiles; }
44 void setRecentFiles(QStringList filenames);
46 void addRecentFile(QString filename);
47 void removeRecentFile(QString filename);
53 void loadRecentFile(QString filename);
59 void onRecentFileTriggered();
62 QStringList mRecentFiles;
63 std::map<QString, QAction*> mRecentActions;
64 QAction* mClearAction =
nullptr;
65 QAction* mClearSeparator =
nullptr;
68 #endif // RECENTFILEMENU_H