This repository has been archived on 2022-08-16. You can view files and clone it, but cannot push or open issues or pull requests.
modern-linbo-gui/headers/backend/linboconfig.h
2020-11-19 14:39:32 +01:00

83 lines
4.3 KiB
C++

/****************************************************************************
** Modern Linbo GUI
** Copyright (C) 2020 Dorian Zedler <dorian@itsblue.de>
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU Affero General Public License as published
** by the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU Affero General Public License for more details.
**
** You should have received a copy of the GNU Affero General Public License
** along with this program. If not, see <http://www.gnu.org/licenses/>.
****************************************************************************/
#ifndef LINBOCONFIG_H
#define LINBOCONFIG_H
#include <QObject>
class LinboConfig : public QObject
{
Q_OBJECT
public:
friend class LinboBackend;
const QString& getServer() const {return this->server;}
const QString& getIpAddress() const {return this->ipAddress;}
const QString& getMacAddress() const {return this->macAddress;}
const QString& getVersion() const {return this->version;}
const QString& getHostname() const {return this->hostname;}
const QString& getCpu() const {return this->cpu;}
const QString& getRamSize() const {return this->ramSize;}
const QString& getCacheSize() const {return this->cacheSize;}
const QString& getHddSize() const {return this->hddSize;}
const QString& getCache() const {return this->cache;}
const QString& getHostgroup() const {return this->hostgroup;}
const unsigned int& getRootTimeout() const {return this->rootTimeout;}
const bool& getAutopartition() {return this->autoPartition;}
const bool& getAutoInitCache() {return this->autoInitCache;}
const QString& getBackgroundFontcolor() {return this->backgroundFontcolor;}
const QString& getConsoleFontcolorStdout() {return this->consoleFontcolorStdout;}
const QString& getConsoleFontcolorStderr() {return this->consoleFontcolorStderr;}
const QString& getDownloadType() {return this->downloadType;}
const bool& getAutoFormat() {return this->autoFormat;}
protected:
explicit LinboConfig(QObject *parent = nullptr);
void setServer( const QString& server ) {this->server = server;}
void setIpAddress( const QString& ipAddress ) {this->ipAddress = ipAddress;}
void setMacAddress( const QString& macAddress ) {this->macAddress = macAddress;}
void setVersion( const QString& version ) {this->version = version;}
void setHostname( const QString& hostname ) {this->hostname = hostname;}
void setCpu( const QString& cpu ) {this->cpu = cpu;}
void setRamSize( const QString& ramSize ) {this->ramSize = ramSize;}
void setCacheSize( const QString& cacheSize ) {this->cacheSize = cacheSize;}
void setHddSize( const QString& hddSize ) {this->hddSize = hddSize;}
void setCache( const QString& cache ) {this->cache = cache;}
void setHostgroup( const QString& hostgroup ) {this->hostgroup = hostgroup;}
void setRootTimeout( const unsigned int& rootTimeout ) {this->rootTimeout = rootTimeout;}
void setAutopartition( const bool& autoPartition ){this->autoPartition = autoPartition;}
void setAutoInitCache( const bool& autoInitCache ){this->autoInitCache = autoInitCache;}
void setBackgroundFontcolor( const QString& backgroundFontcolor ){this->backgroundFontcolor = backgroundFontcolor;}
void setConsoleFontcolorStdout( const QString& consoleFontcolorStdout ){this->consoleFontcolorStdout = consoleFontcolorStdout;}
void setConsoleFontcolorStderr( const QString& consoleFontcolorStderr ){this->consoleFontcolorStderr = consoleFontcolorStderr;}
void setDownloadType( const QString& downloadType ){this->downloadType = downloadType;}
void setAutoFormat( const bool& autoFormat ){this->autoFormat = autoFormat;}
private:
QString server, ipAddress, macAddress, version, hostname, cpu, ramSize, cacheSize, hddSize, cache, hostgroup, downloadType, backgroundFontcolor, consoleFontcolorStdout, consoleFontcolorStderr;
unsigned int rootTimeout;
bool autoPartition, autoInitCache, autoFormat;
signals:
};
#endif // LINBOCONFIG_H