Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
+60
@@ -0,0 +1,60 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Provides structs, typedefs and an enum
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Florian Schult, SLSE, 2016-03-18
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QString>
|
||||
#include <QMap>
|
||||
|
||||
struct Mode
|
||||
{
|
||||
QString name;
|
||||
int lines = 0;
|
||||
int letters = 0;
|
||||
int height = 0;
|
||||
};
|
||||
|
||||
struct Port
|
||||
{
|
||||
int port = 0;
|
||||
QString name;
|
||||
};
|
||||
|
||||
typedef QMap<QString, Mode> ModeMap;
|
||||
typedef QMap<int, Port> PortMap;
|
||||
|
||||
enum MsgLvl
|
||||
{
|
||||
MSGLVL_TRACE = 1,
|
||||
MSGLVL_DEBUG = 2,
|
||||
MSGLVL_INFO = 3,
|
||||
MSGLVL_WARNING = 4,
|
||||
MSGLVL_ERROR = 5,
|
||||
MSGLVL_FATAL = 6
|
||||
};
|
||||
|
||||
inline static QString levelName(MsgLvl lvl)
|
||||
{
|
||||
switch (lvl)
|
||||
{
|
||||
case MSGLVL_TRACE:
|
||||
return QStringLiteral("Trace");
|
||||
case MSGLVL_DEBUG:
|
||||
return QStringLiteral("Debug");
|
||||
case MSGLVL_INFO:
|
||||
return QStringLiteral("Info");
|
||||
case MSGLVL_WARNING:
|
||||
return QStringLiteral("Warning");
|
||||
case MSGLVL_ERROR:
|
||||
return QStringLiteral("Error");
|
||||
case MSGLVL_FATAL:
|
||||
return QStringLiteral("Fatal");
|
||||
}
|
||||
return QStringLiteral("Unknown (%1)").arg(lvl);
|
||||
}
|
||||
Reference in new issue
Block a user