From 21aa80032f685b3ded10fe293ca083d2f46ae18c Mon Sep 17 00:00:00 2001 From: Manuel Schneider Date: Thu, 21 Nov 2013 15:38:19 +0100 Subject: alpha --- src/config.h | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 src/config.h (limited to 'src/config.h') diff --git a/src/config.h b/src/config.h new file mode 100644 index 0000000..20f67d3 --- /dev/null +++ b/src/config.h @@ -0,0 +1,45 @@ +#ifndef CONIG_H +#define CONIG_H + +#include +#include +#include +#include +#include + +#define CONFIG_PATH "/home/manuel/beamer.conf" + +class Config +{ + Config(); + ~Config(); + + static Config * Instance; + + QString settingsPath; + QString display; + QString interface; + QStringList ipSpecificXConf; + QMap modeLines; + + QString getIPV4ofInterface(QString) const; + +public: + + void loadSettings(QString); + + // Getters + inline const QString& getSettingsPath() { return settingsPath; } + inline const QString& getDisplay() { return display; } + inline const QString& getInterface() { return interface; } + inline const QStringList& getIpSpecificXConf(){ return ipSpecificXConf; } + inline const QMap& getModeLines() { return modeLines; } + + // Singleton // + inline static Config * inst() { + if (Instance == NULL) Instance = new Config(); + return Instance; + } +}; + +#endif // CONIG_H -- cgit v1.2.3-55-g7522