- Merged 292 changed files from dlbo snapshot - Fixed IDL enum collisions (PortType, PdmEventType) - Fixed Grantlee template for C++11 scoped enums - Fixed CMake VERSION_GREATER syntax - Added missing directories (THP, LtsRestClient, etc.) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
105 lines
2.1 KiB
C++
Executable File
105 lines
2.1 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* App Descriptor - Class to modify App Descriptor JSON Documents
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
*
|
|
* Created by Mike Wille, SLSE, 2016-10-24
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <QVector>
|
|
#include <QStringList>
|
|
|
|
#ifndef LTSAPPDESCRIPTOR_EXPORT
|
|
# ifdef BUILD_STATIC_LIBRARIES
|
|
# define LTSAPPDESCRIPTOR_EXPORT
|
|
# else
|
|
# if defined(MAKE_LTSAPPDESCRIPTOR_LIB)
|
|
# define LTSAPPDESCRIPTOR_EXPORT Q_DECL_EXPORT
|
|
# else
|
|
# define LTSAPPDESCRIPTOR_EXPORT Q_DECL_IMPORT
|
|
# endif
|
|
# endif
|
|
#endif
|
|
|
|
|
|
namespace LtsAppDescriptor
|
|
{
|
|
|
|
enum class App
|
|
{
|
|
Login = -1,
|
|
Situation = 0,
|
|
ResourceManager = 1,
|
|
PlanEditor = 2,
|
|
BuildingViewer = 3,
|
|
OC = 4,
|
|
OrgChart = 5,
|
|
Scripts = 6,
|
|
// merged into Scripts (aka. ScriptEditor) ScriptPlayer = 7,
|
|
Snapshot = 8,
|
|
SystemMonitor = 9,
|
|
Timeline = 10,
|
|
SymbolEditor = 11,
|
|
ScriptEditorEssentialsView = 12,
|
|
BaseDownloader = 13,
|
|
OnlineHelp = 14,
|
|
ThpSituationReplay = 15,
|
|
SituationTablet = 17,
|
|
SilhouetteEditor = 18, // for L400P2
|
|
Shootback = 19, // for L400P2
|
|
SAAs = 20, //Schnittstelle Adapter Adler
|
|
};
|
|
|
|
struct PluginInfo
|
|
{
|
|
enum class PluginType
|
|
{
|
|
UNKNOWN,
|
|
DATA,
|
|
GUI,
|
|
GUI_ELEMENT,
|
|
};
|
|
|
|
enum class Flag
|
|
{
|
|
UNKNOWN = 1 << 0,
|
|
ACTIONS = 1 << 1,
|
|
MAIN = 1 << 2,
|
|
PAYLOAD = 1 << 3,
|
|
OPTION = 1 << 4,
|
|
};
|
|
|
|
PluginType type = PluginType::UNKNOWN;
|
|
QString iid;
|
|
QFlags<Flag> flags;
|
|
QStringList options;
|
|
};
|
|
|
|
struct AppDescription
|
|
{
|
|
App id = App::Login;
|
|
bool active = false;
|
|
bool visible = true;
|
|
QString appName;
|
|
QVector<int> requiredAcls;
|
|
QVector<PluginInfo> pluginInfos;
|
|
|
|
bool isValid() const { return !appName.isEmpty(); }
|
|
};
|
|
|
|
typedef QVector<AppDescription> AppDescriptionVector;
|
|
|
|
|
|
namespace LtsAppDescriptor // TODO: make qobject class singleton - for tr
|
|
{
|
|
LTSAPPDESCRIPTOR_EXPORT App appFromInteger(int i);
|
|
LTSAPPDESCRIPTOR_EXPORT AppDescriptionVector getAppDescriptionVector(const QByteArray &jsonDocument, QStringList &lastErrors,
|
|
const QStringList &ignoredPlugins, QString &loginPluginIid);
|
|
}
|
|
|
|
} // namespace LtsAppDescriptor
|