#include <Shared/QRecentFileList.h>
Uses the Singleton design pattern to ensure there is only one list per application instance.
Signals | |
| void | fileListChanged (const QString &file) |
| Qt Signal emitted when the list of files has changed. | |
Public Member Functions | |
| QStringList | fileList () |
| Returns the current list of 'Recent Files' for this application. | |
| void | addFile (const QString &file) |
| Adds a file to the recent files. | |
| void | writeList (QSettings &prefs) |
| Writes the list of files to a preference file. | |
| void | readList (QSettings &prefs) |
| Reads the list of Recent Files from the preferences file. | |
Static Public Member Functions | |
| static QRecentFileList * | instance () |
| Returns the singleton instance of this class. | |
| static QString | strippedName (const QString &fullfilepath) |
| Stripps the path from a file argument given as a full path. | |
| static QString | parentAndFileName (const QString &file) |
| Returns the Filename plus it's parent folder name. | |
Protected Member Functions | |
| void | removeFile (const QString &file) |
| Removes a file from the list of recent files. | |
| bool | contains (const QString &file) |
| Returns true if the list already contains the file. | |
| QRecentFileList * QRecentFileList::instance | ( | ) | [static] |
Returns the singleton instance of this class.
| QString QRecentFileList::strippedName | ( | const QString & | fullfilepath | ) | [static] |
Stripps the path from a file argument given as a full path.
| fullfilepath | The filename to extract |
| QString QRecentFileList::parentAndFileName | ( | const QString & | file | ) | [static] |
Returns the Filename plus it's parent folder name.
| file | The path to the file including its filename |
| QStringList QRecentFileList::fileList | ( | ) |
Returns the current list of 'Recent Files' for this application.
| void QRecentFileList::addFile | ( | const QString & | file | ) |
Adds a file to the recent files.
| file | The file to add to the list |
| void QRecentFileList::writeList | ( | QSettings & | prefs | ) |
Writes the list of files to a preference file.
| prefs | The QSettings object to use. |
| void QRecentFileList::readList | ( | QSettings & | prefs | ) |
Reads the list of Recent Files from the preferences file.
| prefs | The QSettins object to use |
| void QRecentFileList::fileListChanged | ( | const QString & | file | ) | [signal] |
Qt Signal emitted when the list of files has changed.
| file | The newly added file |
| void QRecentFileList::removeFile | ( | const QString & | file | ) | [protected] |
Removes a file from the list of recent files.
| file | The file to remove |
| bool QRecentFileList::contains | ( | const QString & | file | ) | [protected] |
Returns true if the list already contains the file.
| file | The file to check. |
1.5.2