mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-30 18:43:55 -07:00
remove all separate storing of widget sizes, rely on geometry (#6712)
This commit is contained in:
parent
dd8164611b
commit
69c046cca4
9 changed files with 8 additions and 166 deletions
|
|
@ -48,17 +48,6 @@ void LayoutsSettings::setDeckEditorGeometry(const QByteArray &value)
|
|||
setValue(value, GEOMETRY_PROP, GROUP_DECK_EDITOR);
|
||||
}
|
||||
|
||||
void LayoutsSettings::setDeckEditorWidgetSize(const QString &widgetName, const QSize &value)
|
||||
{
|
||||
setValue(value, widgetName, GROUP_DECK_EDITOR, SIZE_PROP);
|
||||
}
|
||||
|
||||
QSize LayoutsSettings::getDeckEditorWidgetSize(const QString &widgetName, const QSize &defaultValue)
|
||||
{
|
||||
QVariant previous = getValue(widgetName, GROUP_DECK_EDITOR, SIZE_PROP);
|
||||
return previous == QVariant() ? defaultValue : previous.toSize();
|
||||
}
|
||||
|
||||
QByteArray LayoutsSettings::getVisualDeckEditorLayoutState()
|
||||
{
|
||||
return getValue(STATE_PROP, GROUP_VISUAL_DECK_EDITOR).toByteArray();
|
||||
|
|
@ -79,17 +68,6 @@ void LayoutsSettings::setVisualDeckEditorGeometry(const QByteArray &value)
|
|||
setValue(value, GEOMETRY_PROP, GROUP_VISUAL_DECK_EDITOR);
|
||||
}
|
||||
|
||||
void LayoutsSettings::setVisualDeckEditorWidgetSize(const QString &widgetName, const QSize &value)
|
||||
{
|
||||
setValue(value, widgetName, GROUP_VISUAL_DECK_EDITOR, SIZE_PROP);
|
||||
}
|
||||
|
||||
QSize LayoutsSettings::getVisualDeckEditorWidgetSize(const QString &widgetName, const QSize &defaultValue)
|
||||
{
|
||||
QVariant previous = getValue(widgetName, GROUP_VISUAL_DECK_EDITOR, SIZE_PROP);
|
||||
return previous == QVariant() ? defaultValue : previous.toSize();
|
||||
}
|
||||
|
||||
QByteArray LayoutsSettings::getDeckEditorDbHeaderState()
|
||||
{
|
||||
return getValue(STATE_PROP, GROUP_DECK_EDITOR_DB, "header").toByteArray();
|
||||
|
|
@ -150,17 +128,6 @@ QByteArray LayoutsSettings::getGamePlayAreaGeometry()
|
|||
return getValue(GEOMETRY_PROP, GROUP_GAME_PLAY_AREA).toByteArray();
|
||||
}
|
||||
|
||||
void LayoutsSettings::setGamePlayAreaWidgetSize(const QString &widgetName, const QSize &value)
|
||||
{
|
||||
setValue(value, widgetName, GROUP_GAME_PLAY_AREA, SIZE_PROP);
|
||||
}
|
||||
|
||||
QSize LayoutsSettings::getGamePlayAreaWidgetSize(const QString &widgetName, const QSize &defaultValue)
|
||||
{
|
||||
QVariant previous = getValue(widgetName, GROUP_GAME_PLAY_AREA, SIZE_PROP);
|
||||
return previous == QVariant() ? defaultValue : previous.toSize();
|
||||
}
|
||||
|
||||
void LayoutsSettings::setReplayPlayAreaGeometry(const QByteArray &value)
|
||||
{
|
||||
setValue(value, GEOMETRY_PROP, GROUP_REPLAY_PLAY_AREA);
|
||||
|
|
@ -180,14 +147,3 @@ QByteArray LayoutsSettings::getReplayPlayAreaGeometry()
|
|||
{
|
||||
return getValue(GEOMETRY_PROP, GROUP_REPLAY_PLAY_AREA).toByteArray();
|
||||
}
|
||||
|
||||
void LayoutsSettings::setReplayPlayAreaWidgetSize(const QString &widgetName, const QSize &value)
|
||||
{
|
||||
setValue(value, widgetName, GROUP_REPLAY_PLAY_AREA, SIZE_PROP);
|
||||
}
|
||||
|
||||
QSize LayoutsSettings::getReplayPlayAreaWidgetSize(const QString &widgetName, const QSize &defaultValue)
|
||||
{
|
||||
QVariant previous = getValue(widgetName, GROUP_REPLAY_PLAY_AREA, SIZE_PROP);
|
||||
return previous == QVariant() ? defaultValue : previous.toSize();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue