Merge branch 'master' into travis

This commit is contained in:
Simon Detheridge 2015-05-30 10:17:09 +01:00
commit 1e88aa740c
11 changed files with 327 additions and 213 deletions

View File

@ -361,6 +361,12 @@ xcopy /F /Y /R /D "$(SolutionDir)..\..\..\Data\flam3-palettes.xml" "$(OutDir)"</
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseNvidia|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="GeneratedFiles\Debug\moc_DoubleSpinBoxTableItemDelegate.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseNvidia|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseNvidia|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="GeneratedFiles\Debug\moc_FinalRenderDialog.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseNvidia|Win32'">true</ExcludedFromBuild>
@ -447,6 +453,12 @@ xcopy /F /Y /R /D "$(SolutionDir)..\..\..\Data\flam3-palettes.xml" "$(OutDir)"</
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="GeneratedFiles\ReleaseNvidia\moc_DoubleSpinBoxTableItemDelegate.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="GeneratedFiles\ReleaseNvidia\moc_FinalRenderDialog.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
@ -519,6 +531,12 @@ xcopy /F /Y /R /D "$(SolutionDir)..\..\..\Data\flam3-palettes.xml" "$(OutDir)"</
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseNvidia|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_DoubleSpinBoxTableItemDelegate.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseNvidia|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseNvidia|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_FinalRenderDialog.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseNvidia|Win32'">true</ExcludedFromBuild>
@ -776,6 +794,32 @@ xcopy /F /Y /R /D "$(SolutionDir)..\..\..\Data\flam3-palettes.xml" "$(OutDir)"</
<Outputs Condition="'$(Configuration)|$(Platform)'=='ReleaseNvidia|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='ReleaseNvidia|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" "-fFractoriumPch.h" "-f../../../../../Source/Fractorium/CurvesGraphicsView.h" -DUNICODE -DWIN32 -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_MULTIMEDIA_LIB -DQT_HELP_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB -D_MBCS "-I." "-I$(QTDIR)\include" "-I$(ProjectDir)..\..\..\Fractorium\GeneratedFiles" "-I$(ProjectDir)..\..\..\Fractorium\GeneratedFiles\ConfigurationName" "-I$(QTDIR)\..\qtmultimedia\include\QtMultimedia" "-I$(QTDIR)\..\qtmultimedia\include" "-I$(QTDIR)\..\qttools\include" "-I$(QTDIR)\..\qttools\include\QtHelp" "-I$(QTDIR)\include\QtConcurrent" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtXml" "-I.\GeneratedFiles" "-I$(ProjectDir)..\..\..\Source\Ember" "-I$(ProjectDir)..\..\..\Source\EmberCL" "-I$(ProjectDir)..\..\..\Source\EmberCommon" "-I$(ProjectDir)..\..\..\..\glm" "-I$(ProjectDir)..\..\..\..\tbb\include" "-I$(ProjectDir)..\..\..\..\libjpeg" "-I$(ProjectDir)..\..\..\..\libpng" "-I$(ProjectDir)..\..\..\..\libxml2\include" "-I$(ProjectDir)..\..\..\..\glew\include" "-I$(AMDAPPSDKROOT)\include" "-I$(CUDA_PATH)include" "-I.\GeneratedFiles\$(ConfigurationName)\."</Command>
</CustomBuild>
<CustomBuild Include="..\..\..\Source\Fractorium\DoubleSpinBoxTableItemDelegate.h">
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing DoubleSpinBoxTableItemDelegate.h...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" "-fFractoriumPch.h" "-f../../../../../Source/Fractorium/DoubleSpinBoxTableItemDelegate.h" -DUNICODE -DWIN32 -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_MULTIMEDIA_LIB -DQT_HELP_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB -D_MBCS "-I." "-I$(QTDIR)\include" "-I$(ProjectDir)..\..\..\Fractorium\GeneratedFiles" "-I$(ProjectDir)..\..\..\Fractorium\GeneratedFiles\ConfigurationName" "-I$(QTDIR)\..\qtmultimedia\include\QtMultimedia" "-I$(QTDIR)\..\qtmultimedia\include" "-I$(QTDIR)\..\qttools\include" "-I$(QTDIR)\..\qttools\include\QtHelp" "-I$(QTDIR)\include\QtConcurrent" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtXml" "-I.\GeneratedFiles" "-I$(ProjectDir)..\..\..\Source\Ember" "-I$(ProjectDir)..\..\..\Source\EmberCL" "-I$(ProjectDir)..\..\..\Source\EmberCommon" "-I$(ProjectDir)..\..\..\..\glm" "-I$(ProjectDir)..\..\..\..\tbb\include" "-I$(ProjectDir)..\..\..\..\libjpeg" "-I$(ProjectDir)..\..\..\..\libpng" "-I$(ProjectDir)..\..\..\..\libxml2\include" "-I$(ProjectDir)..\..\..\..\glew\include" "-I$(AMDAPPSDKROOT)\include" "-I$(CUDA_PATH)include" "-I.\GeneratedFiles\$(ConfigurationName)\."</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Moc%27ing DoubleSpinBoxTableItemDelegate.h...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" "-fFractoriumPch.h" "-f../../../../../Source/Fractorium/DoubleSpinBoxTableItemDelegate.h" -DUNICODE -DWIN32 -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_MULTIMEDIA_LIB -DQT_HELP_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB -D_MBCS "-I." "-I$(QTDIR)\include" "-I$(ProjectDir)..\..\..\Fractorium\GeneratedFiles" "-I$(ProjectDir)..\..\..\Fractorium\GeneratedFiles\ConfigurationName" "-I$(QTDIR)\..\qtmultimedia\include\QtMultimedia" "-I$(QTDIR)\..\qtmultimedia\include" "-I$(QTDIR)\..\qttools\include" "-I$(QTDIR)\..\qttools\include\QtHelp" "-I$(QTDIR)\include\QtConcurrent" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtXml" "-I.\GeneratedFiles" "-I$(ProjectDir)..\..\..\Source\Ember" "-I$(ProjectDir)..\..\..\Source\EmberCL" "-I$(ProjectDir)..\..\..\Source\EmberCommon" "-I$(ProjectDir)..\..\..\..\glm" "-I$(ProjectDir)..\..\..\..\tbb\include" "-I$(ProjectDir)..\..\..\..\libjpeg" "-I$(ProjectDir)..\..\..\..\libpng" "-I$(ProjectDir)..\..\..\..\libxml2\include" "-I$(ProjectDir)..\..\..\..\glew\include" "-I$(AMDAPPSDKROOT)\include" "-I.\GeneratedFiles\$(ConfigurationName)\."</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing DoubleSpinBoxTableItemDelegate.h...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" "-fFractoriumPch.h" "-f../../../../../Source/Fractorium/DoubleSpinBoxTableItemDelegate.h" -DUNICODE -DWIN32 -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_MULTIMEDIA_LIB -DQT_HELP_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB -D_MBCS "-I." "-I$(QTDIR)\include" "-I$(ProjectDir)..\..\..\Fractorium\GeneratedFiles" "-I$(ProjectDir)..\..\..\Fractorium\GeneratedFiles\ConfigurationName" "-I$(QTDIR)\..\qtmultimedia\include\QtMultimedia" "-I$(QTDIR)\..\qtmultimedia\include" "-I$(QTDIR)\..\qttools\include" "-I$(QTDIR)\..\qttools\include\QtHelp" "-I$(QTDIR)\include\QtConcurrent" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtXml" "-I.\GeneratedFiles" "-I$(ProjectDir)..\..\..\Source\Ember" "-I$(ProjectDir)..\..\..\Source\EmberCL" "-I$(ProjectDir)..\..\..\Source\EmberCommon" "-I$(ProjectDir)..\..\..\..\glm" "-I$(ProjectDir)..\..\..\..\tbb\include" "-I$(ProjectDir)..\..\..\..\libjpeg" "-I$(ProjectDir)..\..\..\..\libpng" "-I$(ProjectDir)..\..\..\..\libxml2\include" "-I$(ProjectDir)..\..\..\..\glew\include" "-I$(AMDAPPSDKROOT)\include" "-I$(CUDA_PATH)include" "-I.\GeneratedFiles\$(ConfigurationName)\."</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Moc%27ing DoubleSpinBoxTableItemDelegate.h...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" "-fFractoriumPch.h" "-f../../../../../Source/Fractorium/DoubleSpinBoxTableItemDelegate.h" -DUNICODE -DWIN32 -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_MULTIMEDIA_LIB -DQT_HELP_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB -D_MBCS "-I." "-I$(QTDIR)\include" "-I$(ProjectDir)..\..\..\Fractorium\GeneratedFiles" "-I$(ProjectDir)..\..\..\Fractorium\GeneratedFiles\ConfigurationName" "-I$(QTDIR)\..\qtmultimedia\include\QtMultimedia" "-I$(QTDIR)\..\qtmultimedia\include" "-I$(QTDIR)\..\qttools\include" "-I$(QTDIR)\..\qttools\include\QtHelp" "-I$(QTDIR)\include\QtConcurrent" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtXml" "-I.\GeneratedFiles" "-I$(ProjectDir)..\..\..\Source\Ember" "-I$(ProjectDir)..\..\..\Source\EmberCL" "-I$(ProjectDir)..\..\..\Source\EmberCommon" "-I$(ProjectDir)..\..\..\..\glm" "-I$(ProjectDir)..\..\..\..\tbb\include" "-I$(ProjectDir)..\..\..\..\libjpeg" "-I$(ProjectDir)..\..\..\..\libpng" "-I$(ProjectDir)..\..\..\..\libxml2\include" "-I$(ProjectDir)..\..\..\..\glew\include" "-I$(AMDAPPSDKROOT)\include" "-I.\GeneratedFiles\$(ConfigurationName)\."</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='ReleaseNvidia|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='ReleaseNvidia|x64'">Moc%27ing DoubleSpinBoxTableItemDelegate.h...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='ReleaseNvidia|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='ReleaseNvidia|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" "-fFractoriumPch.h" "-f../../../../../Source/Fractorium/DoubleSpinBoxTableItemDelegate.h" -DUNICODE -DWIN32 -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_MULTIMEDIA_LIB -DQT_HELP_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB -D_MBCS "-I." "-I$(QTDIR)\include" "-I$(ProjectDir)..\..\..\Fractorium\GeneratedFiles" "-I$(ProjectDir)..\..\..\Fractorium\GeneratedFiles\ConfigurationName" "-I$(QTDIR)\..\qtmultimedia\include\QtMultimedia" "-I$(QTDIR)\..\qtmultimedia\include" "-I$(QTDIR)\..\qttools\include" "-I$(QTDIR)\..\qttools\include\QtHelp" "-I$(QTDIR)\include\QtConcurrent" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtXml" "-I.\GeneratedFiles" "-I$(ProjectDir)..\..\..\Source\Ember" "-I$(ProjectDir)..\..\..\Source\EmberCL" "-I$(ProjectDir)..\..\..\Source\EmberCommon" "-I$(ProjectDir)..\..\..\..\glm" "-I$(ProjectDir)..\..\..\..\tbb\include" "-I$(ProjectDir)..\..\..\..\libjpeg" "-I$(ProjectDir)..\..\..\..\libpng" "-I$(ProjectDir)..\..\..\..\libxml2\include" "-I$(ProjectDir)..\..\..\..\glew\include" "-I$(CUDA_PATH)include" "-I.\GeneratedFiles\$(ConfigurationName)\."</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='ReleaseNvidia|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='ReleaseNvidia|Win32'">Moc%27ing DoubleSpinBoxTableItemDelegate.h...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='ReleaseNvidia|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='ReleaseNvidia|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" "-fFractoriumPch.h" "-f../../../../../Source/Fractorium/DoubleSpinBoxTableItemDelegate.h" -DUNICODE -DWIN32 -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_MULTIMEDIA_LIB -DQT_HELP_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB -D_MBCS "-I." "-I$(QTDIR)\include" "-I$(ProjectDir)..\..\..\Fractorium\GeneratedFiles" "-I$(ProjectDir)..\..\..\Fractorium\GeneratedFiles\ConfigurationName" "-I$(QTDIR)\..\qtmultimedia\include\QtMultimedia" "-I$(QTDIR)\..\qtmultimedia\include" "-I$(QTDIR)\..\qttools\include" "-I$(QTDIR)\..\qttools\include\QtHelp" "-I$(QTDIR)\include\QtConcurrent" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtXml" "-I.\GeneratedFiles" "-I$(ProjectDir)..\..\..\Source\Ember" "-I$(ProjectDir)..\..\..\Source\EmberCL" "-I$(ProjectDir)..\..\..\Source\EmberCommon" "-I$(ProjectDir)..\..\..\..\glm" "-I$(ProjectDir)..\..\..\..\tbb\include" "-I$(ProjectDir)..\..\..\..\libjpeg" "-I$(ProjectDir)..\..\..\..\libpng" "-I$(ProjectDir)..\..\..\..\libxml2\include" "-I$(ProjectDir)..\..\..\..\glew\include" "-I$(AMDAPPSDKROOT)\include" "-I$(CUDA_PATH)include" "-I.\GeneratedFiles\$(ConfigurationName)\."</Command>
</CustomBuild>
<ClInclude Include="..\..\..\Source\Fractorium\FinalRenderEmberController.h" />
<ClInclude Include="..\..\..\Source\Fractorium\FractoriumCommon.h" />
<ClInclude Include="..\..\..\Source\Fractorium\FractoriumEmberController.h" />

View File

@ -247,6 +247,15 @@
<ClCompile Include="..\..\..\Source\Fractorium\FractoriumXformsSelect.cpp">
<Filter>MainWindows</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Debug\moc_DoubleSpinBoxTableItemDelegate.cpp">
<Filter>Generated Files\Debug</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_DoubleSpinBoxTableItemDelegate.cpp">
<Filter>Generated Files\Release</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\ReleaseNvidia\moc_DoubleSpinBoxTableItemDelegate.cpp">
<Filter>Generated Files\ReleaseNvidia</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="GeneratedFiles\ui_Fractorium.h">
@ -347,6 +356,9 @@
<CustomBuild Include="..\..\..\Source\Fractorium\CurvesGraphicsView.h">
<Filter>Widgets</Filter>
</CustomBuild>
<CustomBuild Include="..\..\..\Source\Fractorium\DoubleSpinBoxTableItemDelegate.h">
<Filter>Widgets</Filter>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\..\Source\Fractorium\Fractorium.rc">

View File

@ -73,7 +73,8 @@ HEADERS += \
../../../Source/EmberCommon/EmberCommon.h \
../../../Source/EmberCommon/JpegUtils.h \
../../../Source/EmberCommon/EmberCommonPch.h \
../../../Source/Fractorium/FractoriumCommon.h
../../../Source/Fractorium/FractoriumCommon.h \
../../../Source/Fractorium/DoubleSpinBoxTableItemDelegate.h
FORMS += \
../../../Source/Fractorium/AboutDialog.ui \

View File

@ -23,7 +23,6 @@ DoubleSpinBox::DoubleSpinBox(QWidget* p, int h, double step)
m_SmallStep = step / 10.0;
setSingleStep(step);
setFrame(false);
//setAttribute(Qt::WA_PaintOnScreen);
setButtonSymbols(QAbstractSpinBox::NoButtons);
setFocusPolicy(Qt::StrongFocus);
setMinimumHeight(h);//setGeometry() has no effect, so must set both of these instead.

View File

@ -0,0 +1,91 @@
#pragma once
#include "FractoriumPch.h"
#include "DoubleSpinBox.h"
/// <summary>
/// DoubleSpinBoxTableItemDelegate class.
/// </summary>
/// <summary>
/// Used for showing a DoubleSpinBox on the cell of a QTableView when the user enters the cell to edit it.
/// </summary>
class DoubleSpinBoxTableItemDelegate
: public QItemDelegate
{
Q_OBJECT
public:
/// <summary>
/// Constructor that assigns a DoubleSpinBox.
/// </summary>
/// <param name="title">The DoubleSpinBox to use throughought the life of the object</param>
/// <param name="parent">The parent widget. Default: nullptr.</param>
explicit DoubleSpinBoxTableItemDelegate(DoubleSpinBox* spinBox, QObject* parent = nullptr)
: QItemDelegate(parent),
m_SpinBox(spinBox)
{
}
/// <summary>
/// Re-parent and return the DoubleSpinBox to display when the user clicks on a cell and it enters edit mode.
/// The re-parenting is done so that the DoubleSpinBox appears directly on top of the cell.
/// </summary>
/// <param name="parent">The parent cell</param>
/// <param name="option">Unused</param>
/// <param name="index">unused</param>
/// <returns>The DoubleSpinBox member</returns>
QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const override
{
m_SpinBox->setParent(parent);
return m_SpinBox;
}
/// <summary>
/// Prevent DoubleSpinBox control from being destroyed when the cell loses focus.
/// </summary>
/// <param name="editor">Unused</param>
/// <param name="index">Unused</param>
void destroyEditor(QWidget* editor, const QModelIndex& index) const override
{
}
/// <summary>
/// Set the value of the DoubleSpinBox as well as its tableindex property.
/// </summary>
/// <param name="editor">Unused</param>
/// <param name="index">Unused</param>
void setEditorData(QWidget* editor, const QModelIndex& index) const override
{
QPoint p(index.row(), index.column());
auto value = index.model()->data(index, Qt::EditRole).toDouble();
m_SpinBox->setProperty("tableindex", p);
m_SpinBox->setValue(value);
}
/// <summary>
/// Set the cell in the model to the value of the DoubleSpinBox.
/// </summary>
/// <param name="editor">Unused</param>
/// <param name="model">The model whose value will be set</param>
/// <param name="index">The cell index of the model</param>
void setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const override
{
model->setData(index, m_SpinBox->value(), Qt::EditRole);
}
/// <summary>
/// Set the geometry of the DoubleSpinBox to match the cell being edited.
/// </summary>
/// <param name="editor">The DoubleSpinBox member</param>
/// <param name="option">Contains the rectangle to be used for the geometry of the DoubleSpinBox</param>
/// <param name="index">Unused</param>
void updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const override
{
editor->setGeometry(option.rect);
}
private:
DoubleSpinBox* m_SpinBox;
};

View File

@ -1,6 +1,11 @@
#include "FractoriumPch.h"
#include "Fractorium.h"
// X11 headers on Linux define this, causing build errors.
#ifdef KeyRelease
#undef KeyRelease
#endif
/// <summary>
/// Constructor that initializes the entire program.
/// The setup process is very lengthy because it requires many custom modifications
@ -584,16 +589,15 @@ QString Fractorium::SetupSaveFolderDialog()
/// <summary>
/// Thin wrapper around QMessageBox::critical() to allow it to be invoked from another thread.
/// </summary>
/// <param name="title">The title of the message box</param>
/// <param name="text">The text displayed on the message box</param>
/// <param name="invokeRequired">True if running on another thread, else false. Default: false.</param>
void Fractorium::ShowCritical(const QString& title, const QString& text, bool invokeRequired)
{
if (!invokeRequired)
{
QMessageBox::critical(this, title, text);
}
else
{
QMetaObject::invokeMethod(this, "ShowCritical", Qt::QueuedConnection, Q_ARG(const QString&, title), Q_ARG(const QString&, text), Q_ARG(bool, false));
}
}
/// <summary>
@ -730,33 +734,58 @@ void Fractorium::SetTabOrders()
/// If shift is held down, reverse the logic.
/// Resets the rendering process.
/// </summary>
/// <param name="table">The QTableWidget or QTableView whose row will be toggled</param>
/// <param name="logicalIndex">The index of the row that was double clicked</param>
void Fractorium::ToggleTableRow(TableWidget* table, int logicalIndex)
void Fractorium::ToggleTableRow(QTableView* table, int logicalIndex)
{
bool allZero = true;
int cols = table->columnCount();
auto model = table->model();
int cols = model->columnCount();
bool shift = QGuiApplication::keyboardModifiers().testFlag(Qt::ShiftModifier);
auto tableWidget = dynamic_cast<QTableWidget*>(table);
for (int i = 0; i < cols; i++)
if (tableWidget)
{
if (auto* spinBox = dynamic_cast<DoubleSpinBox*>(table->cellWidget(logicalIndex, i)))
for (int i = 0; i < cols; i++)
{
if (!IsNearZero(spinBox->value()))
if (auto* spinBox = dynamic_cast<DoubleSpinBox*>(tableWidget->cellWidget(logicalIndex, i)))
{
if (!IsNearZero(spinBox->value()))
{
allZero = false;
break;
}
}
}
if (shift)
allZero = !allZero;
double val = allZero ? 1.0 : 0.0;
for (int i = 0; i < cols; i++)
if (auto* spinBox = dynamic_cast<DoubleSpinBox*>(tableWidget->cellWidget(logicalIndex, i)))
spinBox->setValue(val);
}
else
{
for (int i = 0; i < cols; i++)
{
if (!IsNearZero(model->data(model->index(logicalIndex, i, QModelIndex())).toDouble()))
{
allZero = false;
break;
}
}
if (shift)
allZero = !allZero;
double val = allZero ? 1.0 : 0.0;
for (int i = 0; i < cols; i++)
model->setData(model->index(logicalIndex, i), val, Qt::EditRole);
}
if (shift)
allZero = !allZero;
double val = allZero ? 1.0 : 0.0;
for (int i = 0; i < cols; i++)
if (auto* spinBox = dynamic_cast<DoubleSpinBox*>(table->cellWidget(logicalIndex, i)))
spinBox->setValue(val);
}
/// <summary>
@ -766,82 +795,61 @@ void Fractorium::ToggleTableRow(TableWidget* table, int logicalIndex)
/// If shift is held down, reverse the logic.
/// Resets the rendering process.
/// </summary>
/// <param name="table">The QTableWidget or QTableView whose column will be toggled</param>
/// <param name="logicalIndex">The index of the column that was double clicked</param>
void Fractorium::ToggleTableCol(TableWidget* table, int logicalIndex)
void Fractorium::ToggleTableCol(QTableView* table, int logicalIndex)
{
bool allZero = true;
int rows = table->rowCount();
auto model = table->model();
int rows = model->rowCount();
bool shift = QGuiApplication::keyboardModifiers().testFlag(Qt::ShiftModifier);
auto tableWidget = dynamic_cast<QTableWidget*>(table);
for (int i = 0; i < rows; i++)
if (tableWidget)
{
if (auto* spinBox = dynamic_cast<DoubleSpinBox*>(table->cellWidget(i, logicalIndex)))
for (int i = 0; i < rows; i++)
{
if (!IsNearZero(spinBox->value()))
if (auto* spinBox = dynamic_cast<DoubleSpinBox*>(tableWidget->cellWidget(i, logicalIndex)))
{
if (!IsNearZero(spinBox->value()))
{
allZero = false;
break;
}
}
}
if (shift)
allZero = !allZero;
double val = allZero ? 1.0 : 0.0;
for (int i = 0; i < rows; i++)
if (auto* spinBox = dynamic_cast<DoubleSpinBox*>(tableWidget->cellWidget(i, logicalIndex)))
spinBox->setValue(val);
}
else
{
for (int i = 0; i < rows; i++)
{
if (!IsNearZero(model->data(model->index(i, logicalIndex, QModelIndex())).toDouble()))
{
allZero = false;
break;
}
}
if (shift)
allZero = !allZero;
double val = allZero ? 1.0 : 0.0;
for (int i = 0; i < rows; i++)
model->setData(model->index(i, logicalIndex), val, Qt::EditRole);
}
if (shift)
allZero = !allZero;
double val = allZero ? 1.0 : 0.0;
for (int i = 0; i < rows; i++)
if (auto* spinBox = dynamic_cast<DoubleSpinBox*>(table->cellWidget(i, logicalIndex)))
spinBox->setValue(val);
}
/// <summary>
/// This is no longer needed and was used to compensate for a different bug
/// however the code is interesting, so keep it around for possible future use.
/// This was used to correct a rotation bug where matrix rotation comes out in the wrong direction
/// if x1, y1 (a & d) are on the left side of the line from 0,0 to
/// x2, y2 (b, e). In that case, the angle must be flipped. In order
/// to determine which side of the line it's on, create a mat2
/// and find its determinant. Values > 0 are on the left side of the line.
/// </summary>
/// <param name="affine">The affine.</param>
/// <returns></returns>
int Fractorium::FlipDet(Affine2D<float>& affine)
{
float x1 = affine.A();
float y1 = affine.D();
float x2 = affine.B();
float y2 = affine.E();
//Just make the other end of the line be the center of the circle.
glm::mat2 mat( 0 - x1, 0 - y1,//Col 0.
x2 - x1, y2 - y1);//Col 1.
return (glm::determinant(mat) > 0) ? -1 : 1;
}
//template<typename spinType, typename valType>//See note at the end of Fractorium.h
//void Fractorium::SetupSpinner(QTableWidget* table, const QObject* receiver, int& row, int col, spinType*& spinBox, int height, valType min, valType max, valType step, const char* signal, const char* slot, bool incRow, valType val, valType doubleClickZero, valType doubleClickNonZero)
//{
// spinBox = new spinType(table, height, step);
// spinBox->setRange(min, max);
// spinBox->setValue(val);
// table->setCellWidget(row, col, spinBox);
//
// if (string(signal) != "" && string(slot) != "")
// connect(spinBox, signal, receiver, slot, connectionType);
//
// if (doubleClickNonZero != -999 && doubleClickZero != -999)
// {
// spinBox->DoubleClick(true);
// spinBox->DoubleClickZero((valType)doubleClickZero);
// spinBox->DoubleClickNonZero((valType)doubleClickNonZero);
// }
//
// if (incRow)
// row++;
//}
template class FractoriumEmberController<float>;
#ifdef DO_DOUBLE

View File

@ -11,6 +11,7 @@
#include "OptionsDialog.h"
#include "AboutDialog.h"
#include "CurvesGraphicsView.h"
#include "DoubleSpinBoxTableItemDelegate.h"
/// <summary>
/// Fractorium class.
@ -258,6 +259,7 @@ public slots:
void OnRandomXaosButtonClicked(bool checked);
void OnXaosRowDoubleClicked(int logicalIndex);
void OnXaosColDoubleClicked(int logicalIndex);
void OnXaosTableModelDataChanged(const QModelIndex& indexA, const QModelIndex& indexB);
//Palette.
void OnPaletteFilenameComboChanged(const QString& text);
@ -282,7 +284,6 @@ public:
static void SetupAffineSpinner(QTableWidget* table, const QObject* receiver, int row, int col, DoubleSpinBox*& spinBox, int height, double min, double max, double step, double prec, const char* signal, const char* slot);
static void SetupCombo(QTableWidget* table, const QObject* receiver, int& row, int col, StealthComboBox*& comboBox, const vector<string>& vals, const char* signal, const char* slot, Qt::ConnectionType connectionType = Qt::QueuedConnection);
static void SetFixedTableHeader(QHeaderView* header, QHeaderView::ResizeMode mode = QHeaderView::Fixed);
static int FlipDet(Affine2D<float>& affine);
protected:
virtual bool eventFilter(QObject* o, QEvent* e) override;
@ -306,8 +307,8 @@ private:
void InitLibraryUI();
void SetTabOrders();
void ToggleTableRow(TableWidget* table, int logicalIndex);
void ToggleTableCol(TableWidget* table, int logicalIndex);
void ToggleTableRow(QTableView* table, int logicalIndex);
void ToggleTableCol(QTableView* table, int logicalIndex);
//Embers.
bool HaveFinal();
@ -421,6 +422,11 @@ private:
DoubleSpinBox* m_PreSpins[6];
DoubleSpinBox* m_PostSpins[6];
//Xaos.
DoubleSpinBox* m_XaosSpinBox;
QStandardItemModel* m_XaosTableModel;
DoubleSpinBoxTableItemDelegate* m_XaosTableItemDelegate;
//Palette.
SpinBox* m_PaletteHueSpin;
SpinBox* m_PaletteSaturationSpin;
@ -457,6 +463,3 @@ private:
unique_ptr<FractoriumEmberControllerBase> m_Controller;
Ui::FractoriumClass ui;
};
//template void Fractorium::SetupSpinner<SpinBox, int> (QTableWidget* table, const QObject* receiver, int& row, int col, SpinBox*& spinBox, int height, int min, int max, int step, const char* signal, const char* slot, bool incRow, int val, int doubleClickZero, int doubleClickNonZero);
//template void Fractorium::SetupSpinner<DoubleSpinBox, double>(QTableWidget* table, const QObject* receiver, int& row, int col, DoubleSpinBox*& spinBox, int height, double min, double max, double step, const char* signal, const char* slot, bool incRow, double val, double doubleClickZero, double doubleClickNonZero);

View File

@ -2644,8 +2644,8 @@ SpinBox
<rect>
<x>0</x>
<y>0</y>
<width>245</width>
<height>747</height>
<width>118</width>
<height>618</height>
</rect>
</property>
<property name="autoFillBackground">
@ -4301,8 +4301,8 @@ SpinBox
<rect>
<x>0</x>
<y>0</y>
<width>245</width>
<height>682</height>
<width>133</width>
<height>52</height>
</rect>
</property>
<property name="sizePolicy">
@ -4717,7 +4717,7 @@ SpinBox
<number>4</number>
</property>
<item>
<widget class="TableWidget" name="XaosTable">
<widget class="QTableView" name="XaosTableView">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
@ -4766,13 +4766,13 @@ SpinBox
<enum>QAbstractScrollArea::AdjustToContents</enum>
</property>
<property name="autoScroll">
<bool>false</bool>
<bool>true</bool>
</property>
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
<set>QAbstractItemView::CurrentChanged|QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked</set>
</property>
<property name="tabKeyNavigation">
<bool>false</bool>
<bool>true</bool>
</property>
<property name="showDropIndicator" stdset="0">
<bool>false</bool>
@ -4784,7 +4784,7 @@ SpinBox
<bool>false</bool>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::NoSelection</enum>
<enum>QAbstractItemView::SingleSelection</enum>
</property>
<property name="verticalScrollMode">
<enum>QAbstractItemView::ScrollPerPixel</enum>
@ -4804,14 +4804,8 @@ SpinBox
<property name="cornerButtonEnabled">
<bool>false</bool>
</property>
<property name="columnCount">
<number>3</number>
</property>
<attribute name="horizontalHeaderVisible">
<bool>false</bool>
</attribute>
<attribute name="horizontalHeaderCascadingSectionResizes">
<bool>true</bool>
<bool>false</bool>
</attribute>
<attribute name="horizontalHeaderDefaultSectionSize">
<number>35</number>
@ -4822,14 +4816,8 @@ SpinBox
<attribute name="horizontalHeaderMinimumSectionSize">
<number>35</number>
</attribute>
<attribute name="horizontalHeaderStretchLastSection">
<bool>false</bool>
</attribute>
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
<attribute name="verticalHeaderCascadingSectionResizes">
<bool>true</bool>
<bool>false</bool>
</attribute>
<attribute name="verticalHeaderDefaultSectionSize">
<number>22</number>
@ -4840,44 +4828,6 @@ SpinBox
<attribute name="verticalHeaderMinimumSectionSize">
<number>22</number>
</attribute>
<attribute name="verticalHeaderStretchLastSection">
<bool>false</bool>
</attribute>
<row>
<property name="text">
<string/>
</property>
</row>
<column>
<property name="text">
<string>F1</string>
</property>
</column>
<column>
<property name="text">
<string>F2</string>
</property>
</column>
<column>
<property name="text">
<string>F3</string>
</property>
</column>
<item row="0" column="0">
<property name="text">
<string/>
</property>
</item>
<item row="0" column="1">
<property name="text">
<string/>
</property>
</item>
<item row="0" column="2">
<property name="text">
<string/>
</property>
</item>
</widget>
</item>
<item>
@ -6181,7 +6131,7 @@ SpinBox
<customwidget>
<class>CurvesGraphicsView</class>
<extends>QGraphicsView</extends>
<header>curvesgraphicsview.h</header>
<header>CurvesGraphicsView.h</header>
</customwidget>
</customwidgets>
<tabstops>

View File

@ -189,7 +189,7 @@ public:
//Xaos.
virtual void FillXaos() { }
virtual QString MakeXaosNameString(uint i) { return ""; }
virtual void XaosChanged(DoubleSpinBox* sender) { }
virtual void XaosChanged(int x, int y, double val) { }
virtual void ClearXaos() { }
virtual void RandomXaos() { }
@ -422,7 +422,7 @@ public:
//Xforms Xaos.
virtual void FillXaos() override;
virtual QString MakeXaosNameString(uint i) override;
virtual void XaosChanged(DoubleSpinBox* sender) override;
virtual void XaosChanged(int x, int y, double val) override;
virtual void ClearXaos() override;
virtual void RandomXaos() override;

View File

@ -42,6 +42,7 @@
#include <QtWidgets/QMainWindow>
#include <QFuture>
#include <QtConcurrentRun>
#include <QModelIndex>
#include "glm/glm.hpp"
#include "glm/gtc/matrix_transform.hpp"

View File

@ -6,15 +6,25 @@
/// </summary>
void Fractorium::InitXaosUI()
{
ui.XaosTable->verticalHeader()->setVisible(true);
ui.XaosTable->horizontalHeader()->setVisible(true);
ui.XaosTable->verticalHeader()->setSectionsClickable(true);
ui.XaosTable->horizontalHeader()->setSectionsClickable(true);
int spinHeight = 20;
ui.XaosTableView->verticalHeader()->setSectionsClickable(true);
ui.XaosTableView->horizontalHeader()->setSectionsClickable(true);
m_XaosSpinBox = new DoubleSpinBox(nullptr, spinHeight, 0.1);
m_XaosSpinBox->setFixedWidth(35);
m_XaosSpinBox->DoubleClick(true);
m_XaosSpinBox->DoubleClickZero(1);
m_XaosSpinBox->DoubleClickNonZero(0);
m_XaosTableModel = nullptr;
m_XaosTableItemDelegate = new DoubleSpinBoxTableItemDelegate(m_XaosSpinBox, this);
connect(m_XaosSpinBox, SIGNAL(valueChanged(double)), this, SLOT(OnXaosChanged(double)), Qt::QueuedConnection);
connect(ui.ClearXaosButton, SIGNAL(clicked(bool)), this, SLOT(OnClearXaosButtonClicked(bool)), Qt::QueuedConnection);
connect(ui.RandomXaosButton, SIGNAL(clicked(bool)), this, SLOT(OnRandomXaosButtonClicked(bool)), Qt::QueuedConnection);
connect(ui.XaosTable->verticalHeader(), SIGNAL(sectionDoubleClicked(int)), this, SLOT(OnXaosRowDoubleClicked(int)), Qt::QueuedConnection);
connect(ui.XaosTable->horizontalHeader(), SIGNAL(sectionDoubleClicked(int)), this, SLOT(OnXaosColDoubleClicked(int)), Qt::QueuedConnection);
connect(ui.XaosTableView->verticalHeader(), SIGNAL(sectionDoubleClicked(int)), this, SLOT(OnXaosRowDoubleClicked(int)), Qt::QueuedConnection);
connect(ui.XaosTableView->horizontalHeader(), SIGNAL(sectionDoubleClicked(int)), this, SLOT(OnXaosColDoubleClicked(int)), Qt::QueuedConnection);
}
/// <summary>
@ -25,11 +35,14 @@ void FractoriumEmberController<T>::FillXaos()
{
for (int i = 0, count = int(XformCount()); i < count; i++)
{
auto* xform = m_Ember.GetXform(i);
for (int j = 0; j < count; j++)
if (auto* spinBox = dynamic_cast<DoubleSpinBox*>(m_Fractorium->ui.XaosTable->cellWidget(i, j)))
spinBox->SetValueStealth(xform->Xaos(j));
if (auto xform = m_Ember.GetXform(i))
{
for (int j = 0; j < count; j++)
{
QModelIndex index = m_Fractorium->m_XaosTableModel->index(i, j, QModelIndex());
m_Fractorium->m_XaosTableModel->setData(index, xform->Xaos(j));
}
}
}
}
@ -67,22 +80,34 @@ QString FractoriumEmberController<T>::MakeXaosNameString(uint i)
/// <summary>
/// Set the xaos value.
/// Called when any xaos spinner is changed.
/// It actually gets called multiple times as the user clicks around the
/// xaos table due to how QTableView passes events to and from its model.
/// To filter out spurrious events, the value is checked against the existing
/// xaos value.
/// Resets the rendering process.
/// </summary>
/// <param name="sender">The DoubleSpinBox that triggered this event</param>
template <typename T>
void FractoriumEmberController<T>::XaosChanged(DoubleSpinBox* sender)
void FractoriumEmberController<T>::XaosChanged(int x, int y, double val)
{
auto p = sender->property("tableindex").toPoint();
if (auto* xform = m_Ember.GetXform(p.x()))
Update([&] { xform->SetXaos(p.y(), sender->value()); });
if (Xform<T>* xform = m_Ember.GetXform(x))
if (!IsClose<T>(val, xform->Xaos(y), 1e-10))//Ensure it actually changed.
Update([&] { xform->SetXaos(y, val); });
}
void Fractorium::OnXaosChanged(double d)
{
if (auto* senderSpinBox = dynamic_cast<DoubleSpinBox*>(this->sender()))
m_Controller->XaosChanged(senderSpinBox);
{
auto p = senderSpinBox->property("tableindex").toPoint();
m_Controller->XaosChanged(p.x(), p.y(), d);
}
}
void Fractorium::OnXaosTableModelDataChanged(const QModelIndex& indexA, const QModelIndex& indexB)
{
m_Controller->XaosChanged(indexA.row(), indexA.column(), indexA.data().toDouble());
}
/// <summary>
@ -90,57 +115,37 @@ void Fractorium::OnXaosChanged(double d)
/// </summary>
void Fractorium::FillXaosTable()
{
int spinHeight = 20;
int count = int(m_Controller->XformCount());
QWidget* w = nullptr;
QString lbl("lbl");
QStringList hl, vl;
auto oldModel = m_XaosTableModel;
ui.XaosTable->blockSignals(true);
ui.XaosTable->setRowCount(count);//This will grow or shrink the number of rows and call the destructor for previous DoubleSpinBoxes.
ui.XaosTable->setColumnCount(count);
hl.reserve(count);
vl.reserve(count);
m_XaosTableModel = new QStandardItemModel(count, count, this);
connect(m_XaosTableModel, SIGNAL(dataChanged(QModelIndex, QModelIndex)), SLOT(OnXaosTableModelDataChanged(QModelIndex, QModelIndex)));
ui.XaosTableView->blockSignals(true);
for (int i = 0; i < count; i++)
{
for (int j = 0; j < count; j++)
{
QPoint p(i, j);
DoubleSpinBox* spinBox = new DoubleSpinBox(ui.XaosTable, spinHeight, 0.1);
auto s = QString::number(i + 1);
spinBox->setFixedWidth(35);
spinBox->DoubleClick(true);
spinBox->DoubleClickZero(1);
spinBox->DoubleClickNonZero(0);
spinBox->setProperty("tableindex", p);
ui.XaosTable->setCellWidget(i, j, spinBox);
auto wp = ui.XaosTable->item(i, j);
if (wp)
wp->setTextAlignment(Qt::AlignCenter);
connect(spinBox, SIGNAL(valueChanged(double)), this, SLOT(OnXaosChanged(double)), Qt::QueuedConnection);
if (i == 0 && j == 0)
w = spinBox;
else
w = SetTabOrder(this, w, spinBox);
}
hl.push_back("F" + s);
vl.push_back("T" + s);
}
m_XaosTableModel->setHorizontalHeaderLabels(hl);
m_XaosTableModel->setVerticalHeaderLabels(vl);
ui.XaosTableView->setModel(m_XaosTableModel);
ui.XaosTableView->setItemDelegate(m_XaosTableItemDelegate);
ui.XaosTableView->resizeRowsToContents();
ui.XaosTableView->resizeColumnsToContents();
SetTabOrder(this, ui.ClearXaosButton, ui.RandomXaosButton);
ui.XaosTableView->blockSignals(false);
for (int i = 0; i < count; i++)
{
ui.XaosTable->setHorizontalHeaderItem(i, new QTableWidgetItem("F" + QString::number(i + 1)));
ui.XaosTable->setVerticalHeaderItem(i, new QTableWidgetItem("T" + QString::number(i + 1)));
ui.XaosTable->horizontalHeader()->setSectionResizeMode(i, QHeaderView::ResizeToContents);
ui.XaosTable->verticalHeader()->setSectionResizeMode(i, QHeaderView::ResizeToContents);
}
ui.XaosTable->resizeRowsToContents();
ui.XaosTable->resizeColumnsToContents();
w = SetTabOrder(this, w, ui.ClearXaosButton);
w = SetTabOrder(this, w, ui.RandomXaosButton);
ui.XaosTable->blockSignals(false);
if (oldModel)
delete oldModel;
}
/// <summary>
@ -193,7 +198,7 @@ void Fractorium::OnRandomXaosButtonClicked(bool checked) { m_Controller->RandomX
/// <param name="logicalIndex">The index of the row that was double clicked</param>
void Fractorium::OnXaosRowDoubleClicked(int logicalIndex)
{
ToggleTableRow(ui.XaosTable, logicalIndex);
ToggleTableRow(ui.XaosTableView, logicalIndex);
}
/// <summary>
@ -203,7 +208,7 @@ void Fractorium::OnXaosRowDoubleClicked(int logicalIndex)
/// <param name="logicalIndex">The index of the column that was double clicked</param>
void Fractorium::OnXaosColDoubleClicked(int logicalIndex)
{
ToggleTableCol(ui.XaosTable, logicalIndex);
ToggleTableCol(ui.XaosTableView, logicalIndex);
}
template class FractoriumEmberController<float>;