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;
|
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)
|
||||||
|
|
|
@ -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.
|
||||||
|
|
|
@ -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\
|
||||||
|
|
Loading…
Reference in New Issue