mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-01 11:03:54 -07:00
[LayoutSettings] Move over layout settings in global.ini (#6587)
* [LayoutSettings] Move over some settings from general * remove unused setting
This commit is contained in:
parent
a80a0531a6
commit
804a60f1ea
7 changed files with 49 additions and 61 deletions
|
|
@ -4,9 +4,11 @@ const static QString STATE_PROP = "state";
|
|||
const static QString GEOMETRY_PROP = "geometry";
|
||||
const static QString SIZE_PROP = "widgetSize";
|
||||
|
||||
const static QString GROUP_MAIN_WINDOW = "mainWindow";
|
||||
const static QString GROUP_DECK_EDITOR = "deckEditor";
|
||||
const static QString GROUP_DECK_EDITOR_DB = "deckEditorDb";
|
||||
const static QString GROUP_SETS_DIALOG = "setsDialog";
|
||||
const static QString GROUP_TOKEN_DIALOG = "tokenDialog";
|
||||
const static QString GROUP_GAME_PLAY_AREA = "gamePlayArea";
|
||||
const static QString GROUP_REPLAY_PLAY_AREA = "replayPlayArea";
|
||||
|
||||
|
|
@ -15,6 +17,16 @@ LayoutsSettings::LayoutsSettings(const QString &settingPath, QObject *parent)
|
|||
{
|
||||
}
|
||||
|
||||
void LayoutsSettings::setMainWindowGeometry(const QByteArray &value)
|
||||
{
|
||||
setValue(value, GEOMETRY_PROP, GROUP_MAIN_WINDOW);
|
||||
}
|
||||
|
||||
QByteArray LayoutsSettings::getMainWindowGeometry()
|
||||
{
|
||||
return getValue(GEOMETRY_PROP, GROUP_MAIN_WINDOW).toByteArray();
|
||||
}
|
||||
|
||||
const QByteArray LayoutsSettings::getDeckEditorLayoutState()
|
||||
{
|
||||
return getValue(STATE_PROP, GROUP_DECK_EDITOR).toByteArray();
|
||||
|
|
@ -110,6 +122,26 @@ void LayoutsSettings::setSetsDialogHeaderState(const QByteArray &value)
|
|||
setValue(value, STATE_PROP, GROUP_SETS_DIALOG, "header");
|
||||
}
|
||||
|
||||
void LayoutsSettings::setSetsDialogGeometry(const QByteArray &value)
|
||||
{
|
||||
setValue(value, GEOMETRY_PROP, GROUP_SETS_DIALOG);
|
||||
}
|
||||
|
||||
QByteArray LayoutsSettings::getSetsDialogGeometry()
|
||||
{
|
||||
return getValue(GEOMETRY_PROP, GROUP_SETS_DIALOG).toByteArray();
|
||||
}
|
||||
|
||||
void LayoutsSettings::setTokenDialogGeometry(const QByteArray &value)
|
||||
{
|
||||
setValue(value, GEOMETRY_PROP, GROUP_TOKEN_DIALOG);
|
||||
}
|
||||
|
||||
QByteArray LayoutsSettings::getTokenDialogGeometry()
|
||||
{
|
||||
return getValue(GEOMETRY_PROP, GROUP_TOKEN_DIALOG).toByteArray();
|
||||
}
|
||||
|
||||
void LayoutsSettings::setGamePlayAreaGeometry(const QByteArray &value)
|
||||
{
|
||||
setValue(value, GEOMETRY_PROP, GROUP_GAME_PLAY_AREA);
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ class LayoutsSettings : public SettingsManager
|
|||
friend class SettingsCache;
|
||||
|
||||
public:
|
||||
void setMainWindowGeometry(const QByteArray &value);
|
||||
|
||||
void setDeckEditorLayoutState(const QByteArray &value);
|
||||
void setDeckEditorGeometry(const QByteArray &value);
|
||||
void setDeckEditorCardDatabaseSize(const QSize &value);
|
||||
|
|
@ -26,6 +28,8 @@ public:
|
|||
void setDeckEditorFilterSize(const QSize &value);
|
||||
void setDeckEditorDbHeaderState(const QByteArray &value);
|
||||
void setSetsDialogHeaderState(const QByteArray &value);
|
||||
void setSetsDialogGeometry(const QByteArray &value);
|
||||
void setTokenDialogGeometry(const QByteArray &value);
|
||||
|
||||
void setGamePlayAreaGeometry(const QByteArray &value);
|
||||
void setGamePlayAreaState(const QByteArray &value);
|
||||
|
|
@ -40,6 +44,8 @@ public:
|
|||
void setReplayPlayerListSize(const QSize &value);
|
||||
void setReplayReplaySize(const QSize &value);
|
||||
|
||||
QByteArray getMainWindowGeometry();
|
||||
|
||||
const QByteArray getDeckEditorLayoutState();
|
||||
const QByteArray getDeckEditorGeometry();
|
||||
QSize getDeckEditorCardDatabaseSize();
|
||||
|
|
@ -49,6 +55,8 @@ public:
|
|||
QSize getDeckEditorFilterSize();
|
||||
const QByteArray getDeckEditorDbHeaderState();
|
||||
const QByteArray getSetsDialogHeaderState();
|
||||
QByteArray getSetsDialogGeometry();
|
||||
QByteArray getTokenDialogGeometry();
|
||||
|
||||
const QByteArray getGamePlayAreaLayoutState();
|
||||
const QByteArray getGamePlayAreaGeometry();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue