GUI: Move application definition to own header file.
This commit is contained in:
parent
88176051fe
commit
3cb3992043
|
@ -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
|
|
@ -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)
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -76,7 +76,8 @@ HEADERS += mainwindow.h \
|
|||
logview.h \
|
||||
filelist.h \
|
||||
statsdialog.h \
|
||||
checkstatistics.h
|
||||
checkstatistics.h \
|
||||
application.h
|
||||
|
||||
SOURCES += main.cpp \
|
||||
mainwindow.cpp\
|
||||
|
|
Loading…
Reference in New Issue