--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 "DoubleSpinBox.h"
QTimer DoubleSpinBox::m_Timer;
QTimer DoubleSpinBox::s_Timer;
/// <summary>
/// Constructor that passes parent to the base and sets up height and step.
@ -144,17 +144,16 @@ void DoubleSpinBox::OnTimeout()
//qDebug() << "Shift pressed";
scale = 0.0001;
}
/*else if (ctrl)
{
/* else if (ctrl)
{
qDebug() << "Control pressed";
scale = 0.01;
}*/
}*/
else
scale = 0.001;
val = d + (distance * amount * scale);
setValue(val);
//qDebug() << "Timer on, orig val: " << d << ", new val: " << val << ", distance " << distance;
}
@ -169,47 +168,47 @@ bool DoubleSpinBox::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();
//qDebug() << "Right mouse down";
// QPoint pt;
//
// if (QMouseEvent* me = (QMouseEvent*)e)
// pt = me->localPos().toPoint();
//
// int pos = lineEdit()->cursorPositionAt(pt);
//
// if (lineEdit()->selectedText() != "")
// {
// lineEdit()->deselect();
// lineEdit()->setCursorPosition(pos);
// return true;
// }
// else if (m_Select)
// {
// lineEdit()->setCursorPosition(pos);
// selectAll();
// m_Select = false;
// return true;
// }
// QPoint pt;
//
// if (QMouseEvent* me = (QMouseEvent*)e)
// pt = me->localPos().toPoint();
//
// int pos = lineEdit()->cursorPositionAt(pt);
//
// if (lineEdit()->selectedText() != "")
// {
// lineEdit()->deselect();
// lineEdit()->setCursorPosition(pos);
// return true;
// }
// else if (m_Select)
// {
// lineEdit()->setCursorPosition(pos);
// selectAll();
// m_Select = false;
// return true;
// }
}
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());
@ -262,8 +261,8 @@ void DoubleSpinBox::focusInEvent(QFocusEvent* e)
/// <param name="e">The event</param>
void DoubleSpinBox::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();
QDoubleSpinBox::focusOutEvent(e);
}
@ -299,9 +298,9 @@ void DoubleSpinBox::leaveEvent(QEvent* e)
/// </summary>
void DoubleSpinBox::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>
@ -309,6 +308,6 @@ void DoubleSpinBox::StartTimer()
/// </summary>
void DoubleSpinBox::StopTimer()
{
m_Timer.stop();
disconnect(&m_Timer, SIGNAL(timeout()), this, SLOT(OnTimeout()));
s_Timer.stop();
disconnect(&s_Timer, SIGNAL(timeout()), this, SLOT(OnTimeout()));
}