mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-07-16 13:14:51 -04:00
--User changes
-Add toolbar buttons to switch some rendering options without having to open the options dialog. --Bug fixes -Only update summary on render completion, no need to constantly update it. -Properly handle cancel even on variations dialog. --Code changes -Add small function ShutdownAndRecreateFromOptions() to wrap shutting down the timer and recreating the renderer. -Use the overridden accept() and reject() functions more consistently across dialogs.
This commit is contained in:
@ -149,6 +149,35 @@ void FractoriumOptionsDialog::OnPlatformComboCurrentIndexChanged(int index)
|
||||
/// Not called if cancelled or closed with the X.
|
||||
/// </summary>
|
||||
void FractoriumOptionsDialog::accept()
|
||||
{
|
||||
GuiToData();
|
||||
QDialog::accept();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restore all GUI items to what was originally in the settings object.
|
||||
/// Called when the user clicks cancel or closes with the X.
|
||||
/// </summary>
|
||||
void FractoriumOptionsDialog::reject()
|
||||
{
|
||||
DataToGui();
|
||||
QDialog::reject();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Copy the state of the map to the checkboxes and show the dialog.
|
||||
/// </summary>
|
||||
/// <param name="e">Event, passed to base.</param>
|
||||
void FractoriumOptionsDialog::showEvent(QShowEvent* e)
|
||||
{
|
||||
DataToGui();
|
||||
QDialog::showEvent(e);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Copy the state of the Gui to the settings object.
|
||||
/// </summary>
|
||||
void FractoriumOptionsDialog::GuiToData()
|
||||
{
|
||||
//Interactive rendering.
|
||||
m_Settings->EarlyClip(EarlyClip());
|
||||
@ -176,15 +205,12 @@ void FractoriumOptionsDialog::accept()
|
||||
m_Settings->Id(m_IdEdit->text());
|
||||
m_Settings->Url(m_UrlEdit->text());
|
||||
m_Settings->Nick(m_NickEdit->text());
|
||||
|
||||
QDialog::accept();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restore all GUI items to what was originally in the settings object.
|
||||
/// Called when the user clicks cancel or closes with the X.
|
||||
/// Copy the state of the settings object to the Gui.
|
||||
/// </summary>
|
||||
void FractoriumOptionsDialog::reject()
|
||||
void FractoriumOptionsDialog::DataToGui()
|
||||
{
|
||||
//Interactive rendering.
|
||||
ui.EarlyClipCheckBox->setChecked(m_Settings->EarlyClip());
|
||||
@ -212,6 +238,4 @@ void FractoriumOptionsDialog::reject()
|
||||
m_IdEdit->setText(m_Settings->Id());
|
||||
m_UrlEdit->setText(m_Settings->Url());
|
||||
m_NickEdit->setText(m_Settings->Nick());
|
||||
|
||||
QDialog::reject();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user