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; return;
} }
ApplicationType type; Application app;
type.Name = name; app.Name = name;
type.Path = path; app.Path = path;
type.Parameters = parameters; app.Parameters = parameters;
mApplications << type; mApplications << app;
} }
void ApplicationList::RemoveApplication(const int index) void ApplicationList::RemoveApplication(const int index)

View File

@ -21,6 +21,7 @@
#include <QObject> #include <QObject>
#include <QSettings> #include <QSettings>
#include "application.h"
/// @addtogroup GUI /// @addtogroup GUI
/// @{ /// @{
@ -49,31 +50,6 @@ class ApplicationList : public QObject
Q_OBJECT Q_OBJECT
public: 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); ApplicationList(QObject *parent = 0);
virtual ~ApplicationList(); virtual ~ApplicationList();
@ -193,7 +169,7 @@ private:
* @brief List of applications * @brief List of applications
* *
*/ */
QList<ApplicationType> mApplications; QList<Application> mApplications;
/** /**
* @brief Index of the default application. * @brief Index of the default application.

View File

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