Game: save and restore dock sizes

This commit is contained in:
Fabio Bas 2016-02-07 21:58:51 +01:00
parent cddb45085c
commit 058b913455
4 changed files with 151 additions and 7 deletions

View file

@ -78,6 +78,39 @@ const QByteArray LayoutsSettings::getGamePlayAreaGeometry()
return getValue("layouts/gameplayarea_geometry").toByteArray();
}
const QSize LayoutsSettings::getGameCardInfoSize()
{
QVariant previous = getValue("layouts/gameplayarea_CardInfoSize");
return previous == QVariant() ? QSize(250,360) : previous.toSize();
}
void LayoutsSettings::setGameCardInfoSize(const QSize &value)
{
setValue(value,"layouts/gameplayarea_CardInfoSize");
}
const QSize LayoutsSettings::getGameMessageLayoutSize()
{
QVariant previous = getValue("layouts/gameplayarea_MessageLayoutSize");
return previous == QVariant() ? QSize(250,250) : previous.toSize();
}
void LayoutsSettings::setGameMessageLayoutSize(const QSize &value)
{
setValue(value,"layouts/gameplayarea_MessageLayoutSize");
}
const QSize LayoutsSettings::getGamePlayerListSize()
{
QVariant previous = getValue("layouts/gameplayarea_PlayerListSize");
return previous == QVariant() ? QSize(250,50) : previous.toSize();
}
void LayoutsSettings::setGamePlayerListSize(const QSize &value)
{
setValue(value,"layouts/gameplayarea_PlayerListSize");
}
void LayoutsSettings::setReplayPlayAreaGeometry(const QByteArray &value)
{
setValue(value,"layouts/replayplayarea_geometry");
@ -97,3 +130,47 @@ const QByteArray LayoutsSettings::getReplayPlayAreaGeometry()
{
return getValue("layouts/replayplayarea_geometry").toByteArray();
}
const QSize LayoutsSettings::getReplayCardInfoSize()
{
QVariant previous = getValue("layouts/replayplayarea_CardInfoSize");
return previous == QVariant() ? QSize(250,360) : previous.toSize();
}
void LayoutsSettings::setReplayCardInfoSize(const QSize &value)
{
setValue(value,"layouts/replayplayarea_CardInfoSize");
}
const QSize LayoutsSettings::getReplayMessageLayoutSize()
{
QVariant previous = getValue("layouts/replayplayarea_MessageLayoutSize");
return previous == QVariant() ? QSize(250,200) : previous.toSize();
}
void LayoutsSettings::setReplayMessageLayoutSize(const QSize &value)
{
setValue(value,"layouts/replayplayarea_MessageLayoutSize");
}
const QSize LayoutsSettings::getReplayPlayerListSize()
{
QVariant previous = getValue("layouts/replayplayarea_PlayerListSize");
return previous == QVariant() ? QSize(250,50) : previous.toSize();
}
void LayoutsSettings::setReplayPlayerListSize(const QSize &value)
{
setValue(value,"layouts/replayplayarea_PlayerListSize");
}
const QSize LayoutsSettings::getReplayReplaySize()
{
QVariant previous = getValue("layouts/replayplayarea_ReplaySize");
return previous == QVariant() ? QSize(900,100) : previous.toSize();
}
void LayoutsSettings::setReplayReplaySize(const QSize &value)
{
setValue(value,"layouts/replayplayarea_ReplaySize");
}

View file

@ -15,20 +15,38 @@ public:
void setDeckEditorCardSize(const QSize &value);
void setDeckEditorDeckSize(const QSize &value);
void setDeckEditorFilterSize(const QSize &value);
void setGamePlayAreaGeometry(const QByteArray &value);
void setGamePlayAreaState(const QByteArray &value);
void setGameCardInfoSize(const QSize &value);
void setGameMessageLayoutSize(const QSize &value);
void setGamePlayerListSize(const QSize &value);
void setReplayPlayAreaGeometry(const QByteArray &value);
void setReplayPlayAreaState(const QByteArray &value);
void setReplayCardInfoSize(const QSize &value);
void setReplayMessageLayoutSize(const QSize &value);
void setReplayPlayerListSize(const QSize &value);
void setReplayReplaySize(const QSize &value);
const QByteArray getDeckEditorLayoutState();
const QByteArray getDeckEditorGeometry();
const QSize getDeckEditorCardSize();
const QSize getDeckEditorDeckSize();
const QSize getDeckEditorFilterSize();
const QByteArray getGamePlayAreaLayoutState();
const QByteArray getGamePlayAreaGeometry();
const QSize getGameCardInfoSize();
const QSize getGameMessageLayoutSize();
const QSize getGamePlayerListSize();
const QByteArray getReplayPlayAreaLayoutState();
const QByteArray getReplayPlayAreaGeometry();
const QSize getReplayCardInfoSize();
const QSize getReplayMessageLayoutSize();
const QSize getReplayPlayerListSize();
const QSize getReplayReplaySize();
signals:
public slots: