-// qg_recentfiles.cpp
+// recentfiles.cpp
//
// Part of the Architektonas Project
// Originally part of QCad Community Edition by Andrew Mustun
// JLH 05/11/2010 Added this text. :-)
//
-#include "qg_recentfiles.h"
+#include "recentfiles.h"
-#include "qc_applicationwindow.h"
+#include "applicationwindow.h"
#include "rs_debug.h"
/**
* Constructor
* @param number Number of files that can be stored in the list at maximum
*/
-QG_RecentFiles::QG_RecentFiles(QWidget * parent, QMenu * menu, int num/*= 9*/):
+RecentFiles::RecentFiles(QWidget * parent, QMenu * menu, int num/*= 9*/):
QObject(), number(num)
{
// We make a separator that we can control the visibility of...
/**
* Destructor
*/
-QG_RecentFiles::~QG_RecentFiles()
+RecentFiles::~RecentFiles()
{
while (!actionList.isEmpty())
delete actionList.takeFirst();
* Adds a file to the list of recently loaded files if
* it's not already in the list.
*/
-void QG_RecentFiles::add(const QString & filename)
+void RecentFiles::add(const QString & filename)
{
- RS_DEBUG->print("QG_RecentFiles::add");
+ RS_DEBUG->print("RecentFiles::add");
// Is the file already in the list? Bail out if so...
if (files.indexOf(filename) != -1)
if ((int)files.count() > number)
files.pop_front();
- RS_DEBUG->print("QG_RecentFiles::add: OK");
+ RS_DEBUG->print("RecentFiles::add: OK");
}
/**
* @return complete path and name of the file stored in the
* list at index i
*/
-QString QG_RecentFiles::get(int i)
+QString RecentFiles::get(int i)
{
if (i < (int)files.count())
return files[i];
}
/** @return number of files currently stored in the list */
-int QG_RecentFiles::count(void)
+int RecentFiles::count(void)
{
return files.count();
}
/** @return number of files that can be stored in the list at maximum */
-int QG_RecentFiles::Maximum(void)
+int RecentFiles::Maximum(void)
{
return number;
}
-void QG_RecentFiles::UpdateGUI(void)
+void RecentFiles::UpdateGUI(void)
{
int numRecentFiles = count();