more updates
This commit is contained in:
56
settings.cpp
56
settings.cpp
@@ -1,5 +1,59 @@
|
||||
#include "settings.hpp"
|
||||
|
||||
#include <QMutexLocker>
|
||||
|
||||
Settings::Settings(QObject *parent)
|
||||
: QObject{parent}
|
||||
{}
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
const Settings* Settings::get()
|
||||
{
|
||||
return getSettable();
|
||||
}
|
||||
|
||||
Settings* Settings::getSettable()
|
||||
{
|
||||
QMutexLocker locker(&lock);
|
||||
if (!instance)
|
||||
instance = new Settings();
|
||||
return instance;
|
||||
}
|
||||
|
||||
QSize Settings::cardSize() const
|
||||
{
|
||||
return _cardSize;
|
||||
}
|
||||
|
||||
void Settings::setCardSize(QSize newSize)
|
||||
{
|
||||
_cardSize = newSize;
|
||||
emit cardSizeChange(newSize);
|
||||
}
|
||||
|
||||
void Settings::setCardSize(int w, int h)
|
||||
{
|
||||
setCardSize(QSize(w, h));
|
||||
}
|
||||
|
||||
void Settings::setMainWindow(QWidget* wid)
|
||||
{
|
||||
_mainWindow = wid;
|
||||
}
|
||||
|
||||
QWidget* Settings::mainWindow() const
|
||||
{
|
||||
return _mainWindow;
|
||||
}
|
||||
|
||||
void Settings::setRowFade(float fade)
|
||||
{
|
||||
_rowFade = fade;
|
||||
emit rowFadeChange(fade);
|
||||
}
|
||||
|
||||
float Settings::rowFade() const
|
||||
{
|
||||
return _rowFade;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user