-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConfiguration.h
30 lines (30 loc) · 1.09 KB
/
Configuration.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
* configuration for railroad [- CONFIGURATION.H -]
*******************************************************************************
* Configuration parameters which can be passed to other classes *
* - debug, info mode (logging) *
* - mode for connected hardware or not *
*******************************************************************************
*/
#ifndef CONFIGURATION_H
#define CONFIGURATION_H
#include <QObject>
#include <QtLogging>
#include <QLoggingCategory>
#include <QString>
class Configuration {
Q_DECLARE_LOGGING_CATEGORY(StellwerkQt)
public:
Configuration();
//
void setLogLevel( QString loglevel);
QString getLogLevel(){ return logLevel; }
void setWithHardware( bool withHardware){ this->withHardware = withHardware;}
bool getWithHardware(){ return withHardware; }
QtMessageHandler msgHandler;
~Configuration();
private:
QString logLevel = "warning";
bool withHardware = true; // mode where real hardware is connected I2C, MCP, shift register...
};
#endif