mirror of
https://github.com/copyrighttxt/watrbx-game-engine.git
synced 2026-09-07 05:57:47 +00:00
GEEKING
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* RobloxSavingStateDialog.h
|
||||
* Copyright (c) 2013 ROBLOX Corp. All Rights Reserved.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
// Qt Headers
|
||||
#include <QDialog>
|
||||
#include <QSettings>
|
||||
|
||||
template <typename T>
|
||||
class RobloxSavingStateDialog : public T
|
||||
{
|
||||
public:
|
||||
RobloxSavingStateDialog(QWidget* parent, const QString geometrySettingName)
|
||||
: T(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint)
|
||||
, m_geometrySettingName(geometrySettingName)
|
||||
{
|
||||
// restore settings
|
||||
QSettings settings;
|
||||
QDialog::restoreGeometry(settings.value(m_geometrySettingName).toByteArray());
|
||||
}
|
||||
|
||||
protected:
|
||||
QString m_geometrySettingName;
|
||||
virtual ~RobloxSavingStateDialog()
|
||||
{
|
||||
QSettings settings;
|
||||
settings.setValue(m_geometrySettingName, QDialog::saveGeometry());
|
||||
}
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user