--User changes

-Add variations changes to the list of functionality that can be applied to all xforms using the Select tab.
 -Allow for graphical affine adjustments to apply to multiple selected xforms.
 -Slight optimization of the pie variation.
 -Undo state is only saved when the render completes and the mouse buttons are released. This helps avoid intermediate steps for quickly completing renders while dragging.
 -Add some keyboard shortcuts for toolbar and menu items.
 -Make info tab tree always expanded.

--Bug fixes
 -Make precalcs for all hypertile variations safer by using Zeps() for denominators.
 -Changing the current xform with more than one selected would set all xform's color index value that of the current one.
 -Use hard found palette path information for randoms as well.
 -OpenCL build and assignment errors for Z value in epispiral variation.
 -Unitialized local variables in hexaplay3D, crob, pRose3D.

--Code changes
 -Change static member variables from m_ to s_.
 -Get rid of excessive endl and replace with "\n".
 -Remove old IMAGEGL2D define from before Nvidia supported OpenCL 1.2.
 -Remove old CriticalSection code and use std::recursive_mutex.
 -Make Affine2D Rotate() and RotateTrans() take radians instead of angles.
 -More C++11 work.
 -General cleanup.
This commit is contained in:
mfeemster
2016-02-11 21:38:21 -08:00
parent a345e2d5e1
commit a800b08b67
69 changed files with 981 additions and 1094 deletions

View File

@ -1,7 +1,7 @@
#include "FractoriumPch.h"
#include "SpinBox.h"
QTimer SpinBox::m_Timer;
QTimer SpinBox::s_Timer;
/// <summary>
/// Constructor that passes parent to the base and sets up height and step.
@ -118,17 +118,16 @@ void SpinBox::OnTimeout()
//qDebug() << "Shift pressed";
scale = 0.001;
}
/*else if (ctrl)
{
qDebug() << "Control pressed";
scale = 0.01;
}*/
/* else if (ctrl)
{
qDebug() << "Control pressed";
scale = 0.01;
}*/
else
scale = 0.01;
val = d + (distance * amount * scale);
setValue(int(val));
//qDebug() << "Timer on, orig val: " << d << ", new val: " << val << ", distance " << distance;
}
@ -143,9 +142,9 @@ bool SpinBox::eventFilter(QObject* o, QEvent* e)
QMouseEvent* me = dynamic_cast<QMouseEvent*>(e);
if (isEnabled() &&
me &&
me->type() == QMouseEvent::MouseButtonPress &&
me->button() == Qt::RightButton)
me &&
me->type() == QMouseEvent::MouseButtonPress &&
me->button() == Qt::RightButton)
{
m_MouseDownPoint = m_MouseMovePoint = me->pos();
StartTimer();
@ -172,18 +171,18 @@ bool SpinBox::eventFilter(QObject* o, QEvent* e)
// }
}
else if (isEnabled() &&
me &&
me->type() == QMouseEvent::MouseButtonRelease &&
me->button() == Qt::RightButton)
me &&
me->type() == QMouseEvent::MouseButtonRelease &&
me->button() == Qt::RightButton)
{
StopTimer();
m_MouseDownPoint = m_MouseMovePoint = me->pos();
//qDebug() << "Right mouse up";
}
else if (isEnabled() &&
me &&
me->type() == QMouseEvent::MouseMove &&
QGuiApplication::mouseButtons() & Qt::RightButton)
me &&
me->type() == QMouseEvent::MouseMove &&
QGuiApplication::mouseButtons() & Qt::RightButton)
{
m_MouseMovePoint = me->pos();
qDebug() << "Mouse move while right down. Pt = " << me->pos() << ", global: " << mapToGlobal(me->pos());
@ -236,8 +235,8 @@ void SpinBox::focusInEvent(QFocusEvent* e)
/// <param name="e">The event</param>
void SpinBox::focusOutEvent(QFocusEvent* e)
{
//lineEdit()->deselect();//Clear selection when leaving.
//lineEdit()->setReadOnly(true);//Clever hack to clear the cursor when leaving.
//lineEdit()->deselect();//Clear selection when leaving.
//lineEdit()->setReadOnly(true);//Clever hack to clear the cursor when leaving.
StopTimer();
QSpinBox::focusOutEvent(e);
}
@ -273,9 +272,9 @@ void SpinBox::leaveEvent(QEvent* e)
/// </summary>
void SpinBox::StartTimer()
{
m_Timer.stop();
connect(&m_Timer, SIGNAL(timeout()), this, SLOT(OnTimeout()));
m_Timer.start(300);
s_Timer.stop();
connect(&s_Timer, SIGNAL(timeout()), this, SLOT(OnTimeout()));
s_Timer.start(300);
}
/// <summary>
@ -283,6 +282,6 @@ void SpinBox::StartTimer()
/// </summary>
void SpinBox::StopTimer()
{
m_Timer.stop();
disconnect(&m_Timer, SIGNAL(timeout()), this, SLOT(OnTimeout()));
s_Timer.stop();
disconnect(&s_Timer, SIGNAL(timeout()), this, SLOT(OnTimeout()));
}