0.4.0.9 Beta 07/27/2014

0.4.0.9 Beta 07/27/2014
--User Changes
Properly set tab order on all controls.
Calculate and report iters/second in the final render dialog.
Immediately draw yellow dot on xform mouse down on previously unselected
xform.

--Bug Fixes
Fix GlynnSim1, GlynnSim2, GlynnSim3 and juliaNab by ensuring the first
argument to pow() is >= 0.
Ensure OpenCL platform and device combo boxes in the final render dialog
expand as needed.

--Code Changes
Make VariationTreeSpinbox take its parent VariationTreeWidgetItem as a
constructor argument. This makes SetupVariationTree() and
VariationSpinBoxValueChanged() more efficient.
Make Interference2 and ho use fabs().
This commit is contained in:
mfeemster
2014-07-27 22:25:38 -07:00
parent a5d69c75a2
commit 88a325a5cd
28 changed files with 561 additions and 111 deletions

View File

@ -45,6 +45,12 @@ private:
double m_SmallStep;
};
/// <summary>
/// VariationTreeWidgetItem and VariationTreeDoubleSpinBox need each other, but each can't include the other.
/// So VariationTreeWidgetItem includes this file, and use a forward declaration here.
/// </summary>
template <typename T> class VariationTreeWidgetItem;
/// <summary>
/// Derivation for the double spin boxes that are in the
/// variations tree.
@ -57,13 +63,15 @@ public:
/// Constructor that passes agruments to the base and assigns the m_Param and m_Variation members.
/// </summary>
/// <param name="parent">The parent widget</param>
/// <param name="widgetItem">The widget item this spinner is contained in</param>
/// <param name="var">The variation this spinner is for</param>
/// <param name="param">The name of the parameter this is for</param>
/// <param name="height">The height of the spin box. Default: 16.</param>
/// <param name="step">The step used to increment/decrement the spin box when using the mouse wheel. Default: 0.05.</param>
explicit VariationTreeDoubleSpinBox(QWidget* parent, Variation<T>* var, string param, int height = 16, double step = 0.05)
explicit VariationTreeDoubleSpinBox(QWidget* parent, VariationTreeWidgetItem<T>* widgetItem, Variation<T>* var, string param, int height = 16, double step = 0.05)
: DoubleSpinBox(parent, height, step)
{
m_WidgetItem = widgetItem;
m_Param = param;
m_Variation = var;
setDecimals(3);
@ -73,8 +81,10 @@ public:
bool IsParam() { return !m_Param.empty(); }
string ParamName() { return m_Param; }
Variation<T>* GetVariation() { return m_Variation; }
VariationTreeWidgetItem<T>* WidgetItem() { return m_WidgetItem; }
private:
string m_Param;
Variation<T>* m_Variation;
VariationTreeWidgetItem<T>* m_WidgetItem;
};