mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-28 01:23: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();
|
||||
}
|
||||
|
|
@ -21,11 +21,9 @@ public:
|
|||
|
||||
void setDeckEditorLayoutState(const QByteArray &value);
|
||||
void setDeckEditorGeometry(const QByteArray &value);
|
||||
void setDeckEditorWidgetSize(const QString &widgetName, const QSize &value);
|
||||
|
||||
void setVisualDeckEditorLayoutState(const QByteArray &value);
|
||||
void setVisualDeckEditorGeometry(const QByteArray &value);
|
||||
void setVisualDeckEditorWidgetSize(const QString &widgetName, const QSize &value);
|
||||
|
||||
void setDeckEditorDbHeaderState(const QByteArray &value);
|
||||
void setSetsDialogHeaderState(const QByteArray &value);
|
||||
|
|
@ -34,21 +32,17 @@ public:
|
|||
|
||||
void setGamePlayAreaGeometry(const QByteArray &value);
|
||||
void setGamePlayAreaState(const QByteArray &value);
|
||||
void setGamePlayAreaWidgetSize(const QString &widgetName, const QSize &value);
|
||||
|
||||
void setReplayPlayAreaGeometry(const QByteArray &value);
|
||||
void setReplayPlayAreaState(const QByteArray &value);
|
||||
void setReplayPlayAreaWidgetSize(const QString &widgetName, const QSize &value);
|
||||
|
||||
QByteArray getMainWindowGeometry();
|
||||
|
||||
QByteArray getDeckEditorLayoutState();
|
||||
QByteArray getDeckEditorGeometry();
|
||||
QSize getDeckEditorWidgetSize(const QString &widgetName, const QSize &defaultValue = {});
|
||||
|
||||
QByteArray getVisualDeckEditorLayoutState();
|
||||
QByteArray getVisualDeckEditorGeometry();
|
||||
QSize getVisualDeckEditorWidgetSize(const QString &widgetName, const QSize &defaultValue = {});
|
||||
|
||||
QByteArray getDeckEditorDbHeaderState();
|
||||
QByteArray getSetsDialogHeaderState();
|
||||
|
|
@ -57,11 +51,9 @@ public:
|
|||
|
||||
QByteArray getGamePlayAreaLayoutState();
|
||||
QByteArray getGamePlayAreaGeometry();
|
||||
QSize getGamePlayAreaWidgetSize(const QString &widgetName, const QSize &defaultValue = {});
|
||||
|
||||
QByteArray getReplayPlayAreaLayoutState();
|
||||
QByteArray getReplayPlayAreaGeometry();
|
||||
QSize getReplayPlayAreaWidgetSize(const QString &widgetName, const QSize &defaultValue = {});
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue