QRecentFileList Class Reference

#include <Shared/QRecentFileList.h>

List of all members.


Detailed Description

Holds a list of recently used files.

Uses the Singleton design pattern to ensure there is only one list per application instance.

Author:
Michael A. Jackson for BlueQuartz Software
Date:
Oct 2008
Version:
Revision
1.2


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 QRecentFileListinstance ()
 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.


Member Function Documentation

QRecentFileList * QRecentFileList::instance (  )  [static]

Returns the singleton instance of this class.

Returns:
Instance of this class

QString QRecentFileList::strippedName ( const QString &  fullfilepath  )  [static]

Stripps the path from a file argument given as a full path.

Parameters:
fullfilepath The filename to extract
Returns:
File name

QString QRecentFileList::parentAndFileName ( const QString &  file  )  [static]

Returns the Filename plus it's parent folder name.

Parameters:
file The path to the file including its filename
Returns:

QStringList QRecentFileList::fileList (  ) 

Returns the current list of 'Recent Files' for this application.

Returns:

void QRecentFileList::addFile ( const QString &  file  ) 

Adds a file to the recent files.

Parameters:
file The file to add to the list

void QRecentFileList::writeList ( QSettings &  prefs  ) 

Writes the list of files to a preference file.

Parameters:
prefs The QSettings object to use.

void QRecentFileList::readList ( QSettings &  prefs  ) 

Reads the list of Recent Files from the preferences file.

Parameters:
prefs The QSettins object to use

void QRecentFileList::fileListChanged ( const QString &  file  )  [signal]

Qt Signal emitted when the list of files has changed.

Parameters:
file The newly added file

void QRecentFileList::removeFile ( const QString &  file  )  [protected]

Removes a file from the list of recent files.

Parameters:
file The file to remove

bool QRecentFileList::contains ( const QString &  file  )  [protected]

Returns true if the list already contains the file.

Parameters:
file The file to check.


The documentation for this class was generated from the following files:
Generated on Fri Aug 28 14:04:33 2009 for R3DImageTools by  doxygen 1.5.2