Gem Illuminator
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
Config Class Reference

The Config class provides easy access to values read out of our config.json provided by ConfigView.qml. The config class is implemented as singleton, because these values are used in many various situations. This class works together ConfigView.qml. More...

#include <config.h>

Inheritance diagram for Config:
FileIO

Signals

void axisRangeChanged ()
 
void envMapChanged ()
 
void maxGemSizeChanged ()
 
void minGemSizeChanged ()
 
- Signals inherited from FileIO
void error (const QString &msg)
 This signal will be emitted if an error occurs. More...
 
void sourceChanged (const QString &source)
 This signal is emitted if the source() is changed. More...
 

Public Member Functions

virtual ~Config ()
 
int axisRange ()
 The axisRange describes how far the scene expands along all axis. More...
 
QString envMap () const
 envMap is the name of our current environment. The name is the prefix of our environment texture names. More...
 
float maxGemSize () const
 maxGemSize is the maximum size a gem could be. This is the same as maximum scale factor for a gem, because all gems are in range between [-1;1] by default. More...
 
float minGemSize () const
 minGemSize is the minimum size a gem could be. This is the same as minimum scale factor for a gem, because all gems are in range between [-1;1] by default. More...
 
void setAxisRange (int &axisRange)
 Sets value of axisRange();. More...
 
void setEnvMap (const QString &envMap)
 Sets value of envMap();. More...
 
void setMaxGemSize (float maxGemSize)
 Sets value of maxGemSize();. More...
 
void setMinGemSize (float minGemSize)
 Sets value of minGemSize();. More...
 
- Public Member Functions inherited from FileIO
 FileIO (QObject *parent=0)
 Creates a new FileIO. More...
 
 ~FileIO ()
 
Q_INVOKABLE QString read ()
 Reads previous specified file. More...
 
void setSource (const QString &source)
 Sets the source file by name. The source is read calling read() More...
 
QString source ()
 The name of file that is read by read(). More...
 
Q_INVOKABLE bool write (const QString &data)
 Writes specified data into source() More...
 

Static Public Member Functions

static void drop ()
 Drops current instance of our Config. More...
 
static Configinstance ()
 The instance of our Config. More...
 

Protected Member Functions

 Config ()
 

Protected Attributes

int m_axisRange
 
QString m_envMap
 
float m_maxGemSize
 
float m_minGemSize
 
- Protected Attributes inherited from FileIO
QString m_source
 

Static Protected Attributes

static Configm_instance = 0
 

Detailed Description

The Config class provides easy access to values read out of our config.json provided by ConfigView.qml. The config class is implemented as singleton, because these values are used in many various situations. This class works together ConfigView.qml.

Constructor & Destructor Documentation

Config::~Config ( )
virtual
Config::Config ( )
protected

Member Function Documentation

int Config::axisRange ( )

The axisRange describes how far the scene expands along all axis.

Returns
The value of axisRange
See also
setAxisRange()
void Config::axisRangeChanged ( )
signal
void Config::drop ( )
static

Drops current instance of our Config.

QString Config::envMap ( ) const

envMap is the name of our current environment. The name is the prefix of our environment texture names.

Returns
void Config::envMapChanged ( )
signal
Config * Config::instance ( )
static

The instance of our Config.

Returns
float Config::maxGemSize ( ) const

maxGemSize is the maximum size a gem could be. This is the same as maximum scale factor for a gem, because all gems are in range between [-1;1] by default.

Returns
See also
setMaxGemSize()
void Config::maxGemSizeChanged ( )
signal
float Config::minGemSize ( ) const

minGemSize is the minimum size a gem could be. This is the same as minimum scale factor for a gem, because all gems are in range between [-1;1] by default.

Returns
void Config::minGemSizeChanged ( )
signal
void Config::setAxisRange ( int &  axisRange)

Sets value of axisRange();.

Parameters
Thenew value
void Config::setEnvMap ( const QString &  envMap)

Sets value of envMap();.

Parameters
Thenew value
void Config::setMaxGemSize ( float  maxGemSize)

Sets value of maxGemSize();.

Parameters
Thenew value
void Config::setMinGemSize ( float  minGemSize)

Sets value of minGemSize();.

Parameters
Thenew value

Member Data Documentation

int Config::m_axisRange
protected
QString Config::m_envMap
protected
Config * Config::m_instance = 0
staticprotected
float Config::m_maxGemSize
protected
float Config::m_minGemSize
protected

The documentation for this class was generated from the following files: