2014-07-08 03:11:14 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "FractoriumPch.h"
|
2016-12-05 22:04:33 -05:00
|
|
|
#include "DoubleSpinBox.h"
|
2014-07-08 03:11:14 -04:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// SpinBox class.
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// A derivation to prevent the spin box from selecting its own text
|
|
|
|
/// when editing. Also to prevent multiple spin boxes from all having
|
|
|
|
/// selected text at once.
|
|
|
|
/// </summary>
|
|
|
|
class SpinBox : public QSpinBox
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2016-04-03 21:55:12 -04:00
|
|
|
explicit SpinBox(QWidget* p = nullptr, int height = 16, int step = 1);
|
2014-07-08 03:11:14 -04:00
|
|
|
virtual ~SpinBox() { }
|
|
|
|
void SetValueStealth(int d);
|
2016-02-13 20:24:51 -05:00
|
|
|
void SetValueStealth(size_t d);
|
2014-07-08 03:11:14 -04:00
|
|
|
void DoubleClick(bool b);
|
--User changes
-Add a palette editor.
-Add support for reading .ugr/.gradient/.gradients palette files.
-Allow toggling on spinners whose minimum value is not zero.
-Allow toggling display of image, affines and grid.
-Add new variations: cylinder2, circlesplit, tile_log, truchet_fill, waves2_radial.
--Bug fixes
-cpow2 was wrong.
-Palettes with rapid changes in color would produce slightly different outputs from Apo/Chaotica. This was due to a long standing bug from flam3.
-Use exec() on Apple and show() on all other OSes for dialog boxes.
-Trying to render a sequence with no frames would crash.
-Selecting multiple xforms and rotating them would produce the wrong rotation.
-Better handling when parsing flames using different encoding, such as unicode and UTF-8.
-Switching between SP/DP didn't reselect the selected flame in the Library tab.
--Code changes
-Make all types concerning palettes be floats, including PaletteTableWidgetItem.
-PaletteTableWidgetItem is no longer templated because all palettes are float.
-Include the source colors for user created gradients.
-Change parallel_for() calls to work with very old versions of TBB which are lingering on some systems.
-Split conditional out of accumulation loop on the CPU for better performance.
-Vectorize summing when doing density filter for better performance.
-Make all usage of palettes be of type float, double is pointless.
-Allow palettes to reside in multiple folders, while ensuring only one of each name is added.
-Refactor some palette path searching code.
-Make ReadFile() throw and catch an exception if the file operation fails.
-A little extra safety in foci and foci3D with a call to Zeps().
-Cast to (real_t) in the OpenCL string for the w variation, which was having trouble compiling on Mac.
-Fixing missing comma between paths in InitPaletteList().
-Move Xml and PaletteList classes into cpp to shorten build times when working on them.
-Remove default param values for IterOpenCLKernelCreator<T>::SharedDataIndexDefines in cpp file.
-Change more NULL to nullptr.
2017-02-26 03:02:21 -05:00
|
|
|
void DoubleClickLowVal(int val);
|
2018-07-08 11:31:26 -04:00
|
|
|
int DoubleClickLowVal();
|
2014-07-08 03:11:14 -04:00
|
|
|
void DoubleClickZero(int val);
|
2018-07-08 11:31:26 -04:00
|
|
|
int DoubleClickZero();
|
2014-07-08 03:11:14 -04:00
|
|
|
void DoubleClickNonZero(int val);
|
2018-07-08 11:31:26 -04:00
|
|
|
int DoubleClickNonZero();
|
2014-07-08 03:11:14 -04:00
|
|
|
void SmallStep(int step);
|
|
|
|
QLineEdit* lineEdit();
|
2018-07-08 11:31:26 -04:00
|
|
|
std::function<void(SpinBox*, int)> m_DoubleClickZeroEvent = [&](SpinBox*, int) {};
|
|
|
|
std::function<void(SpinBox*, int)> m_DoubleClickNonZeroEvent = [&](SpinBox*, int) {};
|
2014-07-08 03:11:14 -04:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
void onSpinBoxValueChanged(int i);
|
2015-05-15 21:45:15 -04:00
|
|
|
void OnTimeout();
|
2014-07-08 03:11:14 -04:00
|
|
|
|
|
|
|
protected:
|
2021-04-19 23:07:24 -04:00
|
|
|
bool eventFilter(QObject* o, QEvent* e) override;
|
|
|
|
void keyPressEvent(QKeyEvent* event) override;
|
|
|
|
void focusInEvent(QFocusEvent* e) override;
|
|
|
|
void focusOutEvent(QFocusEvent* e) override;
|
|
|
|
void enterEvent(QEvent* e) override;
|
|
|
|
void leaveEvent(QEvent* e) override;
|
2014-07-08 03:11:14 -04:00
|
|
|
|
|
|
|
private:
|
2015-05-15 21:45:15 -04:00
|
|
|
void StartTimer();
|
|
|
|
void StopTimer();
|
|
|
|
|
2014-07-08 03:11:14 -04:00
|
|
|
bool m_DoubleClick;
|
--User changes
-Add a palette editor.
-Add support for reading .ugr/.gradient/.gradients palette files.
-Allow toggling on spinners whose minimum value is not zero.
-Allow toggling display of image, affines and grid.
-Add new variations: cylinder2, circlesplit, tile_log, truchet_fill, waves2_radial.
--Bug fixes
-cpow2 was wrong.
-Palettes with rapid changes in color would produce slightly different outputs from Apo/Chaotica. This was due to a long standing bug from flam3.
-Use exec() on Apple and show() on all other OSes for dialog boxes.
-Trying to render a sequence with no frames would crash.
-Selecting multiple xforms and rotating them would produce the wrong rotation.
-Better handling when parsing flames using different encoding, such as unicode and UTF-8.
-Switching between SP/DP didn't reselect the selected flame in the Library tab.
--Code changes
-Make all types concerning palettes be floats, including PaletteTableWidgetItem.
-PaletteTableWidgetItem is no longer templated because all palettes are float.
-Include the source colors for user created gradients.
-Change parallel_for() calls to work with very old versions of TBB which are lingering on some systems.
-Split conditional out of accumulation loop on the CPU for better performance.
-Vectorize summing when doing density filter for better performance.
-Make all usage of palettes be of type float, double is pointless.
-Allow palettes to reside in multiple folders, while ensuring only one of each name is added.
-Refactor some palette path searching code.
-Make ReadFile() throw and catch an exception if the file operation fails.
-A little extra safety in foci and foci3D with a call to Zeps().
-Cast to (real_t) in the OpenCL string for the w variation, which was having trouble compiling on Mac.
-Fixing missing comma between paths in InitPaletteList().
-Move Xml and PaletteList classes into cpp to shorten build times when working on them.
-Remove default param values for IterOpenCLKernelCreator<T>::SharedDataIndexDefines in cpp file.
-Change more NULL to nullptr.
2017-02-26 03:02:21 -05:00
|
|
|
int m_DoubleClickLowVal;
|
2014-07-08 03:11:14 -04:00
|
|
|
int m_DoubleClickNonZero;
|
|
|
|
int m_DoubleClickZero;
|
|
|
|
int m_Step;
|
|
|
|
int m_SmallStep;
|
2015-05-15 21:45:15 -04:00
|
|
|
QPoint m_MouseDownPoint;
|
|
|
|
QPoint m_MouseMovePoint;
|
--User changes
-Add a palette editor.
-Add support for reading .ugr/.gradient/.gradients palette files.
-Allow toggling on spinners whose minimum value is not zero.
-Allow toggling display of image, affines and grid.
-Add new variations: cylinder2, circlesplit, tile_log, truchet_fill, waves2_radial.
--Bug fixes
-cpow2 was wrong.
-Palettes with rapid changes in color would produce slightly different outputs from Apo/Chaotica. This was due to a long standing bug from flam3.
-Use exec() on Apple and show() on all other OSes for dialog boxes.
-Trying to render a sequence with no frames would crash.
-Selecting multiple xforms and rotating them would produce the wrong rotation.
-Better handling when parsing flames using different encoding, such as unicode and UTF-8.
-Switching between SP/DP didn't reselect the selected flame in the Library tab.
--Code changes
-Make all types concerning palettes be floats, including PaletteTableWidgetItem.
-PaletteTableWidgetItem is no longer templated because all palettes are float.
-Include the source colors for user created gradients.
-Change parallel_for() calls to work with very old versions of TBB which are lingering on some systems.
-Split conditional out of accumulation loop on the CPU for better performance.
-Vectorize summing when doing density filter for better performance.
-Make all usage of palettes be of type float, double is pointless.
-Allow palettes to reside in multiple folders, while ensuring only one of each name is added.
-Refactor some palette path searching code.
-Make ReadFile() throw and catch an exception if the file operation fails.
-A little extra safety in foci and foci3D with a call to Zeps().
-Cast to (real_t) in the OpenCL string for the w variation, which was having trouble compiling on Mac.
-Fixing missing comma between paths in InitPaletteList().
-Move Xml and PaletteList classes into cpp to shorten build times when working on them.
-Remove default param values for IterOpenCLKernelCreator<T>::SharedDataIndexDefines in cpp file.
-Change more NULL to nullptr.
2017-02-26 03:02:21 -05:00
|
|
|
shared_ptr<FractoriumSettings> m_Settings;
|
2016-02-12 00:38:21 -05:00
|
|
|
static QTimer s_Timer;
|
2014-07-08 03:11:14 -04:00
|
|
|
};
|