GUI: Move application definition to own header file.

This commit is contained in:
Kimmo Varis 2011-04-02 13:35:52 +03:00
parent 88176051fe
commit 3cb3992043
4 changed files with 152 additions and 145 deletions

30
gui/application.h Normal file
View File

@ -0,0 +1,30 @@
#ifndef APPLICATION_H
#define APPLICATION_H
/**
* @brief A class containing information of the application to execute.
*
*/
class Application
{
public:
/**
* @brief Application's name
*
*/
QString Name;
/**
* @brief Application's path
*
*/
QString Path;
/**
* @brief Application's parameters
*
*/
QString Parameters;
};
#endif // APPLICATION_H

View File

@ -175,11 +175,11 @@ void ApplicationList::AddApplication(const QString &name,
return;
}
ApplicationType type;
type.Name = name;
type.Path = path;
type.Parameters = parameters;
mApplications << type;
Application app;
app.Name = name;
app.Path = path;
app.Parameters = parameters;
mApplications << app;
}
void ApplicationList::RemoveApplication(const int index)

View File

@ -21,6 +21,7 @@
#include <QObject>
#include <QSettings>
#include "application.h"
/// @addtogroup GUI
/// @{
@ -49,31 +50,6 @@ class ApplicationList : public QObject
Q_OBJECT
public:
/**
* @brief Struct containing information of the application
*
*/
typedef struct
{
/**
* @brief Application's name
*
*/
QString Name;
/**
* @brief Application's path
*
*/
QString Path;
/**
* @brief Application's parameters
*
*/
QString Parameters;
} ApplicationType;
ApplicationList(QObject *parent = 0);
virtual ~ApplicationList();
@ -193,7 +169,7 @@ private:
* @brief List of applications
*
*/
QList<ApplicationType> mApplications;
QList<Application> mApplications;
/**
* @brief Index of the default application.

View File

@ -76,7 +76,8 @@ HEADERS += mainwindow.h \
logview.h \
filelist.h \
statsdialog.h \
checkstatistics.h
checkstatistics.h \
application.h
SOURCES += main.cpp \
mainwindow.cpp\