mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-07-17 05:34:50 -04:00
--User changes
-Give tabs a height of 4px in the qss files. Looks a little large on 4k screens, but just right on HD screens which are much more common. -Allow for styling of zero and non-zero variation tree nodes via qss. -Allow for toggling whether to interpolate between colors in the palette editor, or to do hard cuts between colors. -Allow for adjusting spinner values with the + = or up arrow keys to increase, and - _ or down arrow keys to decrease. -Allow for responding to global presses of + = and - _ to cycle up or down to specify which xform is set as the current one. -Allow for adding "layers" via xaos which will add a user-specified number of xforms, and set certain xaos values to 0 or 1. -Add a new menu item under the Edit menu to copy the OpenCL iteration kernel source to the clipboard. -Show text on the status bar which indicates that an OpenCL kernel compilation is taking place. -Show xform name on xform combo box when expanded. Adjust size to fit all names. -Draw post affine circles using dashed lines. -Prevent QSS dialog from styling its editor, which makes it easier to see text when creating styles which have custom colors for text boxes. --Bug fixes -Fix up some table layouts which seemed to have regressed/decayed over time for reasons unknown. -Using undo/redo would create a new flame in the library every time. -Solo was not being preserved when using undo/redo. --Code changes -Make the solo flag be a part of the flame data now. -Fix some tabification in the OpenCL code for EllipticVariation. -Fix tabification in the varState code for OpenCL. -Add an event called m_CompileBegun to RendererCL that is called right before an OpenCL compile is begun. --This required making RendererCLBase not a pure virtual base class. Member functions just return defaults. -Filter key presses on main window to only process the third one. This is due to Qt triggering three events for every key press. -The palette preview table was installing an event filter for seemingly no reason. Remove it. -Mark certain virtual functions as override in SpinBox and DoubleSpinBox.
This commit is contained in:
@ -25,6 +25,7 @@ void Fractorium::InitMenusUI()
|
||||
connect(ui.ActionPasteXmlOver, SIGNAL(triggered(bool)), this, SLOT(OnActionPasteXmlOver(bool)), Qt::QueuedConnection);
|
||||
connect(ui.ActionCopySelectedXforms, SIGNAL(triggered(bool)), this, SLOT(OnActionCopySelectedXforms(bool)), Qt::QueuedConnection);
|
||||
connect(ui.ActionPasteSelectedXforms, SIGNAL(triggered(bool)), this, SLOT(OnActionPasteSelectedXforms(bool)), Qt::QueuedConnection);
|
||||
connect(ui.ActionCopyKernel, SIGNAL(triggered(bool)), this, SLOT(OnActionCopyKernel(bool)), Qt::QueuedConnection);
|
||||
ui.ActionPasteSelectedXforms->setEnabled(false);
|
||||
//View menu.
|
||||
connect(ui.ActionResetWorkspace, SIGNAL(triggered(bool)), this, SLOT(OnActionResetWorkspace(bool)), Qt::QueuedConnection);
|
||||
@ -471,10 +472,10 @@ void FractoriumEmberController<T>::Undo()
|
||||
int index = m_Ember.GetTotalXformIndex(current, forceFinal);
|
||||
m_LastEditWasUndoRedo = true;
|
||||
m_UndoIndex = std::max<size_t>(0u, m_UndoIndex - 1u);
|
||||
SetEmber(m_UndoList[m_UndoIndex], true, false);//Don't update pointer because it's coming from the undo list...
|
||||
SetEmber(m_UndoList[m_UndoIndex], true, false);//Don't update pointer because it's coming from the undo list.
|
||||
m_EditState = eEditUndoState::UNDO_REDO;
|
||||
|
||||
if (index >= 0)
|
||||
if (index >= 0 && index < m_Fractorium->ui.CurrentXformCombo->count())
|
||||
m_Fractorium->CurrentXform(index);
|
||||
|
||||
m_Fractorium->ui.ActionUndo->setEnabled(m_UndoList.size() > 1 && (m_UndoIndex > 0));
|
||||
@ -497,10 +498,10 @@ void FractoriumEmberController<T>::Redo()
|
||||
int index = m_Ember.GetTotalXformIndex(current, forceFinal);
|
||||
m_LastEditWasUndoRedo = true;
|
||||
m_UndoIndex = std::min<size_t>(m_UndoIndex + 1, m_UndoList.size() - 1);
|
||||
SetEmber(m_UndoList[m_UndoIndex], true, false);
|
||||
SetEmber(m_UndoList[m_UndoIndex], true, false);//Don't update pointer because it's coming from the undo list.
|
||||
m_EditState = eEditUndoState::UNDO_REDO;
|
||||
|
||||
if (index >= 0)
|
||||
if (index >= 0 && index < m_Fractorium->ui.CurrentXformCombo->count())
|
||||
m_Fractorium->CurrentXform(index);
|
||||
|
||||
m_Fractorium->ui.ActionUndo->setEnabled(m_UndoList.size() > 1 && (m_UndoIndex > 0));
|
||||
@ -713,6 +714,19 @@ void Fractorium::OnActionPasteSelectedXforms(bool checked)
|
||||
m_Controller->PasteSelectedXforms();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Copy the text of the OpenCL iteration kernel to the clipboard.
|
||||
/// This performs no action if the renderer is not of type RendererCL.
|
||||
/// </summary>
|
||||
template <typename T>
|
||||
void FractoriumEmberController<T>::CopyKernel()
|
||||
{
|
||||
if (auto rendererCL = dynamic_cast<RendererCL<T, float>*>(m_Renderer.get()))
|
||||
QApplication::clipboard()->setText(QString::fromStdString(rendererCL->IterKernel()));
|
||||
}
|
||||
|
||||
void Fractorium::OnActionCopyKernel(bool checked) { m_Controller->CopyKernel(); }
|
||||
|
||||
/// <summary>
|
||||
/// Reset dock widgets and tabs to their default position.
|
||||
/// Note that there is a bug in Qt, where it will only move them all to the left side if at least
|
||||
@ -837,7 +851,7 @@ void FractoriumEmberController<T>::Flatten()
|
||||
{
|
||||
ember.Flatten(XmlToEmber<T>::m_FlattenNames);
|
||||
}, true, eProcessAction::FULL_RENDER, m_Fractorium->ApplyAll());
|
||||
FillVariationTreeWithXform(CurrentXform());
|
||||
FillVariationTreeWithCurrentXform();
|
||||
}
|
||||
void Fractorium::OnActionFlatten(bool checked) { m_Controller->Flatten(); }
|
||||
|
||||
@ -852,7 +866,7 @@ void FractoriumEmberController<T>::Unflatten()
|
||||
{
|
||||
ember.Unflatten();
|
||||
}, true, eProcessAction::FULL_RENDER, m_Fractorium->ApplyAll());
|
||||
FillVariationTreeWithXform(CurrentXform());
|
||||
FillVariationTreeWithCurrentXform();
|
||||
}
|
||||
void Fractorium::OnActionUnflatten(bool checked) { m_Controller->Unflatten(); }
|
||||
|
||||
|
Reference in New Issue
Block a user