mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-01-21 13:10:04 -05:00
--User changes
-Add a new dialog for editing QSS stylesheets. Allow for saving, reloading and setting styles as default. --Include a dark style with the installation called dark.qss. --Also add support for themes such as Fusion. --Resize some controls to better fit with the new style. -Add an option to specify the number of random embers generated on startup. 1 is the minimum and the default. --Bug fixes -Properly enable/disable thread priority label in final render dialog in response to enable/disable of the OpenCL checkbox. -Remove all inline stylesheets. -Show xaos spinners with 6 decimal places. --Code changes -Remove redundant comparisons to nullptr, use ! instead; -Give some controls valid names instead of the auto generated ones. -DoubleSpinBoxTableItemDelegate.h: Add virtual keyword to overridden functions.
This commit is contained in:
parent
9f524e1ad1
commit
04e72c27de
@ -6,7 +6,7 @@
|
||||
<ProductVersion>3.7</ProductVersion>
|
||||
<ProjectGuid>{c8096c47-e358-438c-a520-146d46b0637d}</ProjectGuid>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<OutputName>Fractorium_Beta_0.9.9.1</OutputName>
|
||||
<OutputName>Fractorium_Beta_0.9.9.2</OutputName>
|
||||
<OutputType>Package</OutputType>
|
||||
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
|
||||
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
||||
<?define ProductVersion="0.9.9.1" ?>
|
||||
<?define ProductVersion="0.9.9.2" ?>
|
||||
<?define ProductName="Fractorium Beta $(var.ProductVersion) ($(var.GpuType))" ?>
|
||||
<?define UpgradeCode="{4714cd15-bfba-44f6-8059-9e1466ebfa6e}"?>
|
||||
<?define Manufacturer="Fractorium"?>
|
||||
@ -13,7 +13,7 @@
|
||||
<!--
|
||||
Change this for every release.
|
||||
-->
|
||||
<?define ProductCode="{4BFD3388-4BB3-4389-BB83-924CC83385B3}"?>
|
||||
<?define ProductCode="{F59721C4-C46D-4FFF-BEA4-803FA3BD0BFE}"?>
|
||||
|
||||
<Product Id="$(var.ProductCode)" Name="$(var.ProductName)" Language="1033" Version="$(var.ProductVersion)" Manufacturer="$(var.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
|
||||
<Package
|
||||
@ -161,6 +161,9 @@
|
||||
<Component Id="flam3palettes.xml" Guid="d3adb0bb-14ef-4923-99d9-a5784b7ef04e">
|
||||
<File Id="flam3palettes.xml" Source="$(var.SolutionDir)..\..\..\Data\flam3-palettes.xml" KeyPath="yes" Checksum="yes" />
|
||||
</Component>
|
||||
<Component Id="dark.qss" Guid="c120ace3-5fab-416f-b7f1-a8d9e3e0f061">
|
||||
<File Id="dark.qss" Source="$(var.SolutionDir)..\..\..\Data\dark.qss" KeyPath="yes" Checksum="yes" ReadOnly="yes"/>
|
||||
</Component>
|
||||
<Component Id="VersionHistory.txt" Guid="8b031217-9e7d-4700-9ab8-2593a4e002b6">
|
||||
<File Id="VersionHistory.txt" Source="$(var.SolutionDir)..\..\..\Data\Version History.txt" KeyPath="yes" Checksum="yes" />
|
||||
</Component>
|
||||
|
Binary file not shown.
Binary file not shown.
@ -304,6 +304,7 @@ xcopy /F /Y /R /D "$(SolutionDir)..\..\..\Data\flam3-palettes.xml" "$(OutDir)"</
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Use</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ReleaseNvidia|x64'">Use</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Source\Fractorium\csshighlighter.cpp" />
|
||||
<ClCompile Include="..\..\..\Source\Fractorium\CurvesGraphicsView.cpp" />
|
||||
<ClCompile Include="..\..\..\Source\Fractorium\FinalRenderDialog.cpp" />
|
||||
<ClCompile Include="..\..\..\Source\Fractorium\FinalRenderEmberController.cpp" />
|
||||
@ -335,6 +336,11 @@ xcopy /F /Y /R /D "$(SolutionDir)..\..\..\Data\flam3-palettes.xml" "$(OutDir)"</
|
||||
<ClCompile Include="..\..\..\Source\Fractorium\main.cpp" />
|
||||
<ClCompile Include="..\..\..\Source\Fractorium\DoubleSpinBox.cpp" />
|
||||
<ClCompile Include="..\..\..\Source\Fractorium\OptionsDialog.cpp" />
|
||||
<ClCompile Include="..\..\..\Source\Fractorium\qcssparser.cpp" />
|
||||
<ClCompile Include="..\..\..\Source\Fractorium\qcssscanner.cpp" />
|
||||
<ClCompile Include="..\..\..\Source\Fractorium\qcssscanner.h" />
|
||||
<ClCompile Include="..\..\..\Source\Fractorium\QssDialog.cpp" />
|
||||
<ClCompile Include="..\..\..\Source\Fractorium\QssTextEdit.cpp" />
|
||||
<ClCompile Include="..\..\..\Source\Fractorium\SpinBox.cpp" />
|
||||
<ClCompile Include="..\..\..\Source\Fractorium\FractoriumPch.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||
@ -351,6 +357,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_csshighlighter.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_CurvesGraphicsView.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseNvidia|Win32'">true</ExcludedFromBuild>
|
||||
@ -399,6 +411,18 @@ 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_QssDialog.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_QssTextEdit.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_SpinBox.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseNvidia|Win32'">true</ExcludedFromBuild>
|
||||
@ -449,6 +473,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_csshighlighter.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_CurvesGraphicsView.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
@ -497,6 +527,18 @@ 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_QssDialog.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_QssTextEdit.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_SpinBox.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
@ -533,6 +575,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_csshighlighter.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_CurvesGraphicsView.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseNvidia|Win32'">true</ExcludedFromBuild>
|
||||
@ -581,6 +629,18 @@ 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_QssDialog.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_QssTextEdit.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_SpinBox.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseNvidia|Win32'">true</ExcludedFromBuild>
|
||||
@ -639,6 +699,87 @@ 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/VariationsDialog.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\QssDialog.h">
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing QssDialog.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/QssDialog.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 QssDialog.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/QssDialog.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 QssDialog.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/QssDialog.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 QssDialog.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/QssDialog.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 QssDialog.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/QssDialog.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 QssDialog.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/QssDialog.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\csshighlighter.h">
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing csshighlighter.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/csshighlighter.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);$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Moc%27ing csshighlighter.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/csshighlighter.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);$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing csshighlighter.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/csshighlighter.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);$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Moc%27ing csshighlighter.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/csshighlighter.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);$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='ReleaseNvidia|x64'">Moc%27ing csshighlighter.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/csshighlighter.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);$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='ReleaseNvidia|Win32'">Moc%27ing csshighlighter.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/csshighlighter.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\qcssparser.h" />
|
||||
<ClInclude Include="..\..\..\Source\Fractorium\qfunctions.h" />
|
||||
<CustomBuild Include="..\..\..\Source\Fractorium\QssTextEdit.h">
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing QssTextEdit.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/QssTextEdit.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 QssTextEdit.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/QssTextEdit.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 QssTextEdit.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/QssTextEdit.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 QssTextEdit.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/QssTextEdit.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 QssTextEdit.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/QssTextEdit.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 QssTextEdit.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/QssTextEdit.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="GeneratedFiles\ui_QssDialog.h" />
|
||||
<ClInclude Include="GeneratedFiles\ui_VariationsDialog.h" />
|
||||
<CustomBuild Include="..\..\..\Source\Fractorium\OptionsDialog.h">
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath);%(AdditionalInputs)</AdditionalInputs>
|
||||
@ -1280,6 +1421,32 @@ xcopy /F /Y /R /D "$(SolutionDir)..\..\..\Data\flam3-palettes.xml" "$(OutDir)"</
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='ReleaseNvidia|Win32'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='ReleaseNvidia|Win32'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="..\..\..\Source\Fractorium\QssDialog.ui">
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Uic%27ing %(Identity)...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Uic%27ing %(Identity)...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Uic%27ing %(Identity)...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Uic%27ing %(Identity)...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='ReleaseNvidia|x64'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='ReleaseNvidia|x64'">Uic%27ing %(Identity)...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='ReleaseNvidia|x64'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='ReleaseNvidia|x64'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='ReleaseNvidia|Win32'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='ReleaseNvidia|Win32'">Uic%27ing %(Identity)...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='ReleaseNvidia|Win32'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='ReleaseNvidia|Win32'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
|
@ -54,7 +54,7 @@
|
||||
<SourceControlFiles>False</SourceControlFiles>
|
||||
</Filter>
|
||||
<Filter Include="Dialogs\Qss">
|
||||
<UniqueIdentifier>{95078dd1-1c6e-476d-b565-cc844cef63d2}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{5ba9fccd-8922-4037-956f-d57177a43700}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@ -271,6 +271,51 @@
|
||||
<ClCompile Include="GeneratedFiles\ReleaseNvidia\moc_VariationsDialog.cpp">
|
||||
<Filter>Generated Files\ReleaseNvidia</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="GeneratedFiles\Debug\moc_QssDialog.cpp">
|
||||
<Filter>Generated Files\Debug</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="GeneratedFiles\Release\moc_QssDialog.cpp">
|
||||
<Filter>Generated Files\Release</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="GeneratedFiles\ReleaseNvidia\moc_QssDialog.cpp">
|
||||
<Filter>Generated Files\ReleaseNvidia</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Source\Fractorium\QssDialog.cpp">
|
||||
<Filter>Dialogs\Qss</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Source\Fractorium\csshighlighter.cpp">
|
||||
<Filter>Dialogs\Qss</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Source\Fractorium\qcssparser.cpp">
|
||||
<Filter>Dialogs\Qss</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Source\Fractorium\QssTextEdit.cpp">
|
||||
<Filter>Dialogs\Qss</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="GeneratedFiles\Debug\moc_QssTextEdit.cpp">
|
||||
<Filter>Generated Files\Debug</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="GeneratedFiles\Release\moc_QssTextEdit.cpp">
|
||||
<Filter>Generated Files\Release</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="GeneratedFiles\ReleaseNvidia\moc_QssTextEdit.cpp">
|
||||
<Filter>Generated Files\ReleaseNvidia</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Source\Fractorium\qcssscanner.h">
|
||||
<Filter>Dialogs\Qss</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Source\Fractorium\qcssscanner.cpp">
|
||||
<Filter>Dialogs\Qss</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="GeneratedFiles\Debug\moc_csshighlighter.cpp">
|
||||
<Filter>Generated Files\Debug</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="GeneratedFiles\Release\moc_csshighlighter.cpp">
|
||||
<Filter>Generated Files\Release</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="GeneratedFiles\ReleaseNvidia\moc_csshighlighter.cpp">
|
||||
<Filter>Generated Files\ReleaseNvidia</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="GeneratedFiles\ui_Fractorium.h">
|
||||
@ -318,6 +363,15 @@
|
||||
<ClInclude Include="GeneratedFiles\ui_VariationsDialog.h">
|
||||
<Filter>Generated Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="GeneratedFiles\ui_QssDialog.h">
|
||||
<Filter>Generated Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\Source\Fractorium\qcssparser.h">
|
||||
<Filter>Dialogs\Qss</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\Source\Fractorium\qfunctions.h">
|
||||
<Filter>Dialogs\Qss</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="..\..\..\Source\Fractorium\Fractorium.qrc">
|
||||
@ -386,6 +440,18 @@
|
||||
<CustomBuild Include="..\..\..\Source\Fractorium\VariationsDialog.h">
|
||||
<Filter>Dialogs</Filter>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="..\..\..\Source\Fractorium\QssDialog.ui">
|
||||
<Filter>Form Files</Filter>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="..\..\..\Source\Fractorium\QssDialog.h">
|
||||
<Filter>Dialogs\Qss</Filter>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="..\..\..\Source\Fractorium\QssTextEdit.h">
|
||||
<Filter>Dialogs\Qss</Filter>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="..\..\..\Source\Fractorium\csshighlighter.h">
|
||||
<Filter>Dialogs\Qss</Filter>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\..\..\Source\Fractorium\Fractorium.rc">
|
||||
|
@ -50,7 +50,12 @@ SOURCES += \
|
||||
../../../Source/Fractorium/Main.cpp \
|
||||
../../../Source/Fractorium/OptionsDialog.cpp \
|
||||
../../../Source/Fractorium/VariationsDialog.cpp \
|
||||
../../../Source/Fractorium/SpinBox.cpp
|
||||
../../../Source/Fractorium/SpinBox.cpp \
|
||||
../../../Source/Fractorium/csshighlighter.cpp \
|
||||
../../../Source/Fractorium/qcssparser.cpp \
|
||||
../../../Source/Fractorium/qcssscanner.cpp \
|
||||
../../../Source/Fractorium/QssDialog.cpp \
|
||||
../../../Source/Fractorium/QssTextEdit.cpp
|
||||
|
||||
HEADERS += \
|
||||
../../../Source/Fractorium/AboutDialog.h \
|
||||
@ -79,14 +84,21 @@ HEADERS += \
|
||||
../../../Source/Fractorium/FractoriumCommon.h \
|
||||
../../../Source/Fractorium/DoubleSpinBoxTableItemDelegate.h \
|
||||
../../../Source/Fractorium/PaletteTableWidgetItem.h \
|
||||
../../../Source/Fractorium/VariationsDialog.h
|
||||
../../../Source/Fractorium/VariationsDialog.h \
|
||||
../../../Source/Fractorium/csshighlighter.h \
|
||||
../../../Source/Fractorium/qcssparser.h \
|
||||
../../../Source/Fractorium/qcssscanner.h \
|
||||
../../../Source/Fractorium/qfunctions.h \
|
||||
../../../Source/Fractorium/QssDialog.h \
|
||||
../../../Source/Fractorium/QssTextEdit.h
|
||||
|
||||
FORMS += \
|
||||
../../../Source/Fractorium/AboutDialog.ui \
|
||||
../../../Source/Fractorium/FinalRenderDialog.ui \
|
||||
../../../Source/Fractorium/Fractorium.ui \
|
||||
../../../Source/Fractorium/VariationsDialog.ui \
|
||||
../../../Source/Fractorium/OptionsDialog.ui
|
||||
../../../Source/Fractorium/OptionsDialog.ui \
|
||||
../../../Source/Fractorium/QssDialog.ui
|
||||
|
||||
OTHER_FILES += \
|
||||
../../../Source/Fractorium/Fractorium.aps \
|
||||
|
611
Data/dark.qss
Normal file
611
Data/dark.qss
Normal file
@ -0,0 +1,611 @@
|
||||
/*---Base Style---
|
||||
This is needed to deal with the large tabs in the fusion theme which is the default on Linux, and optional on Windows.
|
||||
It's not needed for other themes.
|
||||
You should keep this at the top of whatever custom style you make to ensure the tabs aren't unusually large.*/
|
||||
QTabBar::tab { height: 5ex; }/*Do this for windows*/
|
||||
/*QTabBar::tab { height: 3ex; }*//*Do this for linux*/
|
||||
|
||||
/*This is needed to give the labels on the status bar some padding.*/
|
||||
QStatusBar QLabel { padding-left: 2px; padding-right: 2px; }
|
||||
|
||||
/*Specific styles below this line*/
|
||||
|
||||
QObject
|
||||
{
|
||||
background-color : rgb(53, 53, 53);
|
||||
color: darkgray;
|
||||
alternate-background-color: rgb(53, 53, 53);
|
||||
selection-color: black;
|
||||
selection-background-color: rgb(42, 130, 218);
|
||||
}
|
||||
|
||||
QObject:disabled
|
||||
{
|
||||
color: rgb(35, 35, 35);
|
||||
background-color: rgb(53, 53, 53);
|
||||
border-color: rgb(35, 35, 35);
|
||||
}
|
||||
|
||||
QDockWidget::float-button
|
||||
{
|
||||
background-color: gray;
|
||||
}
|
||||
|
||||
QDockWidget::title
|
||||
{
|
||||
margin: 1px;
|
||||
padding: 2px;
|
||||
background-color: gray;
|
||||
}
|
||||
|
||||
QTabWidget::pane
|
||||
{
|
||||
border: 1px solid gray;
|
||||
}
|
||||
|
||||
QPushButton
|
||||
{
|
||||
margin: 1px;
|
||||
padding: 4px;
|
||||
border: 1px solid gray;
|
||||
}
|
||||
|
||||
QPushButton:pressed
|
||||
{
|
||||
background-color: gray;
|
||||
}
|
||||
|
||||
QPushButton:focus
|
||||
{
|
||||
outline: none;
|
||||
}
|
||||
|
||||
QTableView QPushButton
|
||||
{
|
||||
border: 1px solid gray;
|
||||
margin: 1px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
QLineEdit, QTextEdit
|
||||
{
|
||||
border: 1px solid gray;
|
||||
color: darkgray;
|
||||
background-color: rgb(40, 40, 50);
|
||||
selection-background-color: darkgray;
|
||||
}
|
||||
|
||||
QToolTip
|
||||
{
|
||||
background-color: darkgray;
|
||||
border: 1px solid darkgray;
|
||||
}
|
||||
|
||||
QSpinBox,
|
||||
QDoubleSpinBox
|
||||
{
|
||||
padding-right: 0px;
|
||||
color: darkgray;
|
||||
selection-background-color: darkgray;
|
||||
font: 9pt "Segoe UI";/*For some reason the font changes if you set any style. Set this to whatever font is the default on your system*/
|
||||
}
|
||||
|
||||
QCheckBox
|
||||
{
|
||||
spacing: 5px;
|
||||
}
|
||||
|
||||
QCheckBox::indicator,
|
||||
QTableView::indicator
|
||||
{
|
||||
border: none;
|
||||
border-radius: 2px;
|
||||
background-color: lightgray;
|
||||
}
|
||||
|
||||
QCheckBox::indicator:enabled:unchecked,
|
||||
QTableView::indicator:enabled:unchecked
|
||||
{
|
||||
background-color: lightgray;
|
||||
image: url(:/Fractorium/Icons/checkbox_unchecked.png);
|
||||
}
|
||||
|
||||
QCheckBox::indicator:enabled:checked,
|
||||
QTableView::indicator:enabled:checked
|
||||
{
|
||||
background-color: lightgray;
|
||||
image: url(:/Fractorium/Icons/checkbox_checked.png);
|
||||
}
|
||||
|
||||
QCheckBox::indicator:disabled:unchecked,
|
||||
QTableView::indicator:disabled:unchecked
|
||||
{
|
||||
background-color: gray;
|
||||
image: none;
|
||||
}
|
||||
|
||||
QCheckBox::indicator:disabled:checked,
|
||||
QTableView::indicator:disabled:checked
|
||||
{
|
||||
background-color: gray;
|
||||
image: none;
|
||||
}
|
||||
|
||||
QRadioButton::indicator:checked
|
||||
{
|
||||
background-color: black;
|
||||
border: 2px solid gray;
|
||||
border-radius: 7px;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
margin: 3px;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
QRadioButton::indicator:checked:disabled
|
||||
{
|
||||
background-color: rgb(35, 35, 35);
|
||||
}
|
||||
|
||||
QRadioButton::indicator:unchecked
|
||||
{
|
||||
border: 2px solid gray;
|
||||
border-radius: 7px;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
margin: 3px;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
QComboBox
|
||||
{
|
||||
margin: 0px;
|
||||
padding-left: 4px;
|
||||
border: 1px solid gray;
|
||||
}
|
||||
|
||||
QComboBox::down-arrow:enabled
|
||||
{
|
||||
border: 1px solid gray;
|
||||
margin-right: 2px;
|
||||
margin-top: 0px;
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
|
||||
|
||||
QComboBox::down-arrow:disabled
|
||||
{
|
||||
border: 1px solid rgb(35, 35, 35);
|
||||
margin-right: 2px;
|
||||
margin-top: 0px;
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
|
||||
QComboBox::drop-down
|
||||
{
|
||||
border: none;
|
||||
}
|
||||
|
||||
/*For some reason this is needed with Fusion, but not with Windows*/
|
||||
QComboBox::item:selected
|
||||
{
|
||||
selection-background-color: darkgray;
|
||||
}
|
||||
|
||||
QComboBox QAbstractItemView
|
||||
{
|
||||
border: 1px solid gray;
|
||||
outline: none;
|
||||
selection-background-color: darkgray;
|
||||
}
|
||||
|
||||
QTableView QComboBox
|
||||
{
|
||||
margin: 1px;
|
||||
padding: 0px;
|
||||
padding-left: 3px;
|
||||
}
|
||||
|
||||
QGroupBox QComboBox
|
||||
{
|
||||
margin: 1px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
QTableView QComboBox::down-arrow
|
||||
{
|
||||
margin-top: 0px;
|
||||
margin-right: 1px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
QProgressBar
|
||||
{
|
||||
color: black;
|
||||
background-color: gray;
|
||||
border: 0px none gray;
|
||||
border-radius: 3px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
QProgressBar::chunk
|
||||
{
|
||||
border-radius: 3px;
|
||||
background-color: lightgray;
|
||||
}
|
||||
|
||||
QStatusBar QProgressBar
|
||||
{
|
||||
min-width: 300px;
|
||||
max-width: 300px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
QMenuBar
|
||||
{
|
||||
border-bottom: 1px solid gray;
|
||||
}
|
||||
|
||||
QMenuBar::item
|
||||
{
|
||||
background-color: rgb(53, 53, 53);
|
||||
}
|
||||
|
||||
QMenu::item:disabled
|
||||
{
|
||||
color: rgb(35, 35, 35);
|
||||
|
||||
}
|
||||
|
||||
QMenu::item:enabled:selected
|
||||
{
|
||||
background-color: gray;
|
||||
}
|
||||
|
||||
QMenu::item:disabled:selected
|
||||
{
|
||||
background-color: rgb(53, 53, 53);
|
||||
}
|
||||
|
||||
QToolBar
|
||||
{
|
||||
border: 0px none gray;
|
||||
}
|
||||
|
||||
QGroupBox
|
||||
{
|
||||
padding-top: 3px;
|
||||
border: 2px solid gray;
|
||||
border-radius: 4px;
|
||||
margin-top: 3ex;
|
||||
}
|
||||
|
||||
QGroupBox::title
|
||||
{
|
||||
subcontrol-origin: border;
|
||||
subcontrol-position: top left;
|
||||
margin-top: -1ex;
|
||||
margin-left: 0px;
|
||||
padding-right: 1px;
|
||||
padding-left: 2px;
|
||||
top: -2ex;
|
||||
left: 8px;
|
||||
}
|
||||
|
||||
QListView
|
||||
{
|
||||
selection-color: black;
|
||||
selection-background-color: darkgray;
|
||||
}
|
||||
|
||||
QListView::item:selected
|
||||
{
|
||||
background-color: darkgray;
|
||||
}
|
||||
|
||||
QTreeView
|
||||
{
|
||||
border: 1px solid gray;
|
||||
background-color: rgb(53, 53, 53);
|
||||
}
|
||||
|
||||
/*Setting this gives a more consistent look, but removes the ability to gray variations that are included in the xform*/
|
||||
QTreeView::item
|
||||
{
|
||||
background-color: rgb(53, 53, 53);
|
||||
color: darkgray;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
QTreeView::item:selected
|
||||
{
|
||||
border: 0px none black;
|
||||
background-color: gray;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
QTreeView::branch:!has-children
|
||||
{
|
||||
background: rgb(53, 53, 53);
|
||||
}
|
||||
|
||||
QTreeView::branch:has-children:closed
|
||||
{
|
||||
border: 1px solid darkgray;
|
||||
background: gray;
|
||||
margin: 2px;
|
||||
}
|
||||
|
||||
QTreeView::branch:has-children:!closed
|
||||
{
|
||||
border: 1px solid lightgray;
|
||||
background: gray;
|
||||
margin-left: 1px;
|
||||
margin-right: 0px;
|
||||
margin-top: 3px;
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
QTableView
|
||||
{
|
||||
border-left: 0px none gray;
|
||||
border-top: 0px none gray;
|
||||
border-right: 0px none gray;
|
||||
border-bottom: 0px none gray;
|
||||
gridline-color: gray;
|
||||
color: darkgray;
|
||||
selection-color: darkgray;
|
||||
selection-background-color: rgb(53, 53, 53);
|
||||
}
|
||||
|
||||
QTableView QTableCornerButton::section:enabled
|
||||
{
|
||||
background-color: darkgray;
|
||||
}
|
||||
|
||||
QTableView QTableCornerButton::section:disabled
|
||||
{
|
||||
background-color: rgb(53, 53, 53);
|
||||
}
|
||||
|
||||
QTableView::indicator:disabled
|
||||
{
|
||||
background-color: rgb(35, 35, 35);
|
||||
}
|
||||
|
||||
QTableView:disabled
|
||||
{
|
||||
color: rgb(35, 35, 35);
|
||||
border: none;
|
||||
gridline-color: rgb(35, 35, 35);
|
||||
}
|
||||
|
||||
QHeaderView::section::vertical:enabled
|
||||
{
|
||||
color: black;
|
||||
background-color: gray;
|
||||
border: none;
|
||||
border-bottom: 1px solid gray;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
QHeaderView::section::horizontal:enabled
|
||||
{
|
||||
color: black;
|
||||
background-color: darkgray;
|
||||
border: 0px solid darkgray;
|
||||
border-right: 1px solid gray;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
QHeaderView::section::vertical:disabled
|
||||
{
|
||||
color: rgb(35, 35, 35);
|
||||
background-color: rgb(53, 53, 53);
|
||||
border: 0px none darkgray;
|
||||
border-bottom: 1px solid rgb(53, 53, 53);
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
QHeaderView::section::horizontal:disabled
|
||||
{
|
||||
color:rgb(35, 35, 35);
|
||||
background-color: rgb(53, 53, 53);
|
||||
border: 0px none darkgray;
|
||||
border-right: 1px solid rgb(53, 53, 53);
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
QScrollBar::vertical
|
||||
{
|
||||
background-color: darkgray;
|
||||
border: 0px solid darkgray;
|
||||
width: 15px;
|
||||
margin: 22px 0 22px 0;
|
||||
}
|
||||
|
||||
QScrollBar::handle::vertical
|
||||
{
|
||||
background-color: gray;
|
||||
border-top: 1px solid darkgray;
|
||||
border-bottom: 1px solid darkgray;
|
||||
min-height: 20px;
|
||||
}
|
||||
|
||||
QScrollBar::add-line::vertical
|
||||
{
|
||||
border: 0px solid darkgray;
|
||||
background-color: gray;
|
||||
height: 22px;
|
||||
subcontrol-position: bottom;
|
||||
subcontrol-origin: margin;
|
||||
}
|
||||
|
||||
QScrollBar::sub-line::vertical
|
||||
{
|
||||
border: 0px solid darkgray;
|
||||
background-color: gray;
|
||||
height: 22px;
|
||||
subcontrol-position: top;
|
||||
subcontrol-origin: margin;
|
||||
}
|
||||
|
||||
QScrollBar::up-arrow::vertical, QScrollBar::down-arrow::vertical
|
||||
{
|
||||
border: 2px solid darkgray;
|
||||
width: 5px;
|
||||
height: 12px;
|
||||
background-color: gray;
|
||||
}
|
||||
|
||||
QScrollBar::add-page::vertical, QScrollBar::sub-page::vertical, QScrollBar::add-page::horizontal, QScrollBar::sub-page::horizontal
|
||||
{
|
||||
background-color: darkgray;
|
||||
}
|
||||
|
||||
QScrollBar::horizontal
|
||||
{
|
||||
background-color: darkgray;
|
||||
border: 0px solid darkgray;
|
||||
height: 15px;
|
||||
margin: 0px 20px 0 20px;
|
||||
}
|
||||
|
||||
QScrollBar::handle::horizontal
|
||||
{
|
||||
background-color: gray;
|
||||
border-left: 1px solid darkgray;
|
||||
border-right: 1px solid darkgray;
|
||||
min-width: 20px;
|
||||
}
|
||||
|
||||
QScrollBar::add-line::horizontal
|
||||
{
|
||||
border: 0px solid darkgray;
|
||||
background-color: gray;
|
||||
width: 20px;
|
||||
subcontrol-position: right;
|
||||
subcontrol-origin: margin;
|
||||
}
|
||||
|
||||
QScrollBar::sub-line::horizontal
|
||||
{
|
||||
border: 0px solid darkgray;
|
||||
background-color: gray;
|
||||
width: 20px;
|
||||
subcontrol-position: left;
|
||||
subcontrol-origin: margin;
|
||||
}
|
||||
|
||||
QScrollBar::left-arrow::horizontal, QScrollBar::right-arrow::horizontal
|
||||
{
|
||||
border: 2px solid darkgray;
|
||||
width: 12px;
|
||||
height: 5px;
|
||||
background-color: gray;
|
||||
}
|
||||
|
||||
QMenu::separator
|
||||
{
|
||||
height: 1px;
|
||||
background-color: gray;
|
||||
}
|
||||
|
||||
QToolBar::separator
|
||||
{
|
||||
width: 1px;
|
||||
margin-top: 3px;
|
||||
margin-bottom: 2px;
|
||||
background-color: gray;
|
||||
}
|
||||
|
||||
QStatusBar::item
|
||||
{
|
||||
border: none;
|
||||
}
|
||||
|
||||
/*Specific controls*/
|
||||
QTableWidget#ColorTableHeader QHeaderView::section::horizontal,
|
||||
QTableWidget#GeometryTableHeader QHeaderView::section::horizontal,
|
||||
QTableWidget#FilterTableHeader QHeaderView::section::horizontal,
|
||||
QTableWidget#IterationTableHeader QHeaderView::section::horizontal,
|
||||
QTreeWidget#LibraryTree QHeaderView::section::horizontal
|
||||
{
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
QTableWidget#ColorTable,
|
||||
QTableWidget#GeometryTable,
|
||||
QTableWidget#FilterTable,
|
||||
QTableWidget#IterationTable,
|
||||
QTableWidget#XformWeightNameTable
|
||||
{
|
||||
border-left: 1px solid gray;
|
||||
}
|
||||
|
||||
QTableWidget#SummaryTable,
|
||||
QTableWidget#PaletteListTable
|
||||
{
|
||||
border-left: 1px solid gray;
|
||||
}
|
||||
|
||||
QTableWidget#SummaryTable QHeaderView::section::vertical
|
||||
{
|
||||
background-color: darkgray;
|
||||
}
|
||||
|
||||
QTableWidget#PaletteAdjustTable,
|
||||
QTableWidget#PalettePreviewTable,
|
||||
QTableWidget#XformColorIndexTable,
|
||||
QTableWidget#XformColorValuesTable,
|
||||
QTableWidget#InfoBoundsTable,
|
||||
QTableWidget#OptionsXmlSavingTable,
|
||||
QTableWidget#OptionsIdentityTable,
|
||||
QTableWidget#FinalRenderSizeTable,
|
||||
QTableWidget#FinalRenderParamsTable
|
||||
{
|
||||
border-left: 1px solid gray;
|
||||
border-top: 1px solid gray;
|
||||
}
|
||||
|
||||
QLineEdit#PaletteFilterLineEdit,
|
||||
QLineEdit#VariationsFilterLineEdit
|
||||
{
|
||||
height: 20px;
|
||||
min-height: 20px;
|
||||
max-height: 20px;
|
||||
}
|
||||
|
||||
QSpinBox#ThreadCountSpin,
|
||||
QSpinBox#RandomCountSpin,
|
||||
QSpinBox#CpuSubBatchSpin,
|
||||
QSpinBox#OpenCLSubBatchSpin,
|
||||
QSpinBox#FinalRenderCurrentSpin,
|
||||
QSpinBox#FinalRenderThreadCountSpin
|
||||
{
|
||||
padding: 2px;
|
||||
border: 1px solid gray;
|
||||
}
|
||||
|
||||
QSpinBox#ThreadCountSpin:disabled,
|
||||
QSpinBox#CpuSubBatchSpin:disabled,
|
||||
QSpinBox#OpenCLSubBatchSpin:disabled,
|
||||
QSpinBox#FinalRenderCurrentSpin:disabled,
|
||||
QSpinBox#FinalRenderThreadCountSpin:disabled
|
||||
{
|
||||
padding: 2px;
|
||||
border: 1px solid rgb(35, 35, 35);
|
||||
}
|
||||
|
||||
QTableView#FinalRenderParamsTable QComboBox
|
||||
{
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
QTableView#FinalRenderParamsTable QPushButton
|
||||
{
|
||||
margin-top: 1px;
|
||||
margin-bottom: 2px;
|
||||
padding: 0px;
|
||||
}
|
@ -180,7 +180,7 @@ public:
|
||||
SetProjFunc();
|
||||
ClearEdit();
|
||||
|
||||
if (ember.m_Edits != nullptr)
|
||||
if (ember.m_Edits)
|
||||
m_Edits = xmlCopyDoc(ember.m_Edits, 1);
|
||||
|
||||
CopyVec(m_EmberMotionElements, ember.m_EmberMotionElements);
|
||||
@ -858,7 +858,7 @@ public:
|
||||
|
||||
var->m_Weight = 0;
|
||||
|
||||
if (parVar != nullptr)
|
||||
if (parVar)
|
||||
parVar->Clear();
|
||||
|
||||
for (size_t k = 0; k < size; k++)//For each ember in the list.
|
||||
@ -869,17 +869,17 @@ public:
|
||||
{
|
||||
Variation<T>* tempVar = tempXform->GetVariationById(var->VariationId());//See if the variation at this xform index exists in that ember at this xform index.
|
||||
|
||||
if (tempVar != nullptr)
|
||||
if (tempVar)
|
||||
{
|
||||
//Interp weight.
|
||||
var->m_Weight += tempVar->m_Weight * coefs[k];
|
||||
|
||||
//If it was a parametric variation, interp params.
|
||||
if (parVar != nullptr)
|
||||
if (parVar)
|
||||
{
|
||||
ParametricVariation<T>* tempParVar = dynamic_cast<ParametricVariation<T>*>(tempVar);
|
||||
|
||||
if (tempParVar != nullptr && (parVar->ParamCount() == tempParVar->ParamCount()))//This check will should always be true, but just check to be absolutely sure to avoid clobbering memory.
|
||||
if (tempParVar && (parVar->ParamCount() == tempParVar->ParamCount()))//This check will should always be true, but just check to be absolutely sure to avoid clobbering memory.
|
||||
{
|
||||
auto params = parVar->Params();
|
||||
auto tempParams = tempParVar->Params();
|
||||
@ -1461,7 +1461,7 @@ public:
|
||||
/// </summary>
|
||||
void ClearEdit()
|
||||
{
|
||||
if (m_Edits != nullptr)
|
||||
if (m_Edits)
|
||||
xmlFreeDoc(m_Edits);
|
||||
|
||||
m_Edits = nullptr;
|
||||
|
@ -42,7 +42,7 @@
|
||||
|
||||
namespace EmberNs
|
||||
{
|
||||
#define EMBER_VERSION "0.9.9.1"
|
||||
#define EMBER_VERSION "0.9.9.2"
|
||||
#define EPS6 T(1e-6)
|
||||
#define EPS std::numeric_limits<T>::epsilon()//Apoplugin.h uses -20, but it's more mathematically correct to do it this way.
|
||||
#define ISAAC_SIZE 4
|
||||
|
@ -296,7 +296,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
if (doEdits && ember.m_Edits != nullptr)
|
||||
if (doEdits && ember.m_Edits)
|
||||
os << ToString(xmlDocGetRootElement(ember.m_Edits), 1, true, printEditDepth);
|
||||
|
||||
os << "</flame>\n";
|
||||
@ -448,7 +448,7 @@ public:
|
||||
os.str("");
|
||||
|
||||
//Check for errors.
|
||||
if (commentDoc != nullptr)
|
||||
if (commentDoc)
|
||||
{
|
||||
|
||||
//Loop through the children of the new document and copy them into the rootNode.
|
||||
|
@ -544,7 +544,7 @@ public:
|
||||
static void InterpParametricVar(vector<ParametricVariation<T>*>& first, ParametricVariation<T>* second, vector<T>& c)
|
||||
{
|
||||
//First, make sure the variation vector is the same size as the coefficient vector.
|
||||
if (second != nullptr && first.size() == c.size())
|
||||
if (second && first.size() == c.size())
|
||||
{
|
||||
second->Clear();
|
||||
auto secondParams = second->Params();
|
||||
|
@ -49,7 +49,7 @@ public:
|
||||
{
|
||||
xmlDocPtr doc = xmlReadMemory(static_cast<const char*>(buf.data()), int(buf.size()), filename.c_str(), nullptr, XML_PARSE_NONET);
|
||||
|
||||
if (doc != nullptr)
|
||||
if (doc)
|
||||
{
|
||||
auto rootNode = xmlDocGetRootElement(doc);
|
||||
auto pfilename = shared_ptr<string>(new string(filename));
|
||||
|
@ -1410,8 +1410,8 @@ template <typename T, typename bucketT> size_t Renderer<T, bucketT>::FuseCount()
|
||||
/// Non-virtual iterator wrappers.
|
||||
/// </summary>
|
||||
|
||||
template <typename T, typename bucketT> const byte* Renderer<T, bucketT>::XformDistributions() const { return m_Iterator != nullptr ? m_Iterator->XformDistributions() : nullptr; }
|
||||
template <typename T, typename bucketT> size_t Renderer<T, bucketT>::XformDistributionsSize() const { return m_Iterator != nullptr ? m_Iterator->XformDistributionsSize() : 0; }
|
||||
template <typename T, typename bucketT> const byte* Renderer<T, bucketT>::XformDistributions() const { return m_Iterator ? m_Iterator->XformDistributions() : nullptr; }
|
||||
template <typename T, typename bucketT> size_t Renderer<T, bucketT>::XformDistributionsSize() const { return m_Iterator ? m_Iterator->XformDistributionsSize() : 0; }
|
||||
template <typename T, typename bucketT> Point<T>* Renderer<T, bucketT>::Samples(size_t threadIndex) const { return threadIndex < m_Samples.size() ? const_cast<Point<T>*>(m_Samples[threadIndex].data()) : nullptr; }
|
||||
|
||||
/// <summary>
|
||||
|
@ -50,7 +50,7 @@ public:
|
||||
m_EndTime = Clock::now();
|
||||
double ms = ElapsedTime();
|
||||
|
||||
if (str != nullptr)
|
||||
if (str)
|
||||
{
|
||||
cout << string(str) << (fullString ? "" : " processing time: ") << Format(ms) << endl;
|
||||
}
|
||||
|
@ -182,7 +182,7 @@ static bool ReadFile(const char* filename, string& buf, bool nullTerminate = tru
|
||||
{
|
||||
fopen_s(&f, filename, "rb");//Open in binary mode.
|
||||
|
||||
if (f != nullptr)
|
||||
if (f)
|
||||
{
|
||||
struct _stat statBuf;
|
||||
|
||||
@ -225,7 +225,7 @@ static bool ReadFile(const char* filename, string& buf, bool nullTerminate = tru
|
||||
b = false;
|
||||
}
|
||||
|
||||
if (f != nullptr)
|
||||
if (f)
|
||||
fclose(f);
|
||||
|
||||
return b;
|
||||
@ -279,7 +279,7 @@ static void ClearVec(vector<T*>& vec, bool arrayDelete = false)
|
||||
{
|
||||
for (size_t i = 0; i < vec.size(); i++)
|
||||
{
|
||||
if (vec[i] != nullptr)
|
||||
if (vec[i])
|
||||
{
|
||||
if (arrayDelete)
|
||||
delete [] vec[i];
|
||||
|
@ -1874,7 +1874,7 @@ protected:
|
||||
#define VARCOPYDOUBLE(name) \
|
||||
virtual void Copy(Variation<double>*& var) const override \
|
||||
{ \
|
||||
if (var != nullptr) \
|
||||
if (var) \
|
||||
delete var; \
|
||||
\
|
||||
var = new name<double>(*this); \
|
||||
@ -1905,7 +1905,7 @@ protected:
|
||||
\
|
||||
virtual void Copy(Variation<float>*& var) const override \
|
||||
{ \
|
||||
if (var != nullptr) \
|
||||
if (var) \
|
||||
delete var; \
|
||||
\
|
||||
var = new name<float>(*this); \
|
||||
@ -1932,7 +1932,7 @@ protected:
|
||||
\
|
||||
virtual void Copy(Variation<float>*& var) const override \
|
||||
{ \
|
||||
if (var != nullptr) \
|
||||
if (var) \
|
||||
delete var; \
|
||||
\
|
||||
var = new name<float>(*this); \
|
||||
@ -2018,7 +2018,7 @@ protected:
|
||||
\
|
||||
virtual void Copy(Variation<float>*& var) const override \
|
||||
{ \
|
||||
if (var != nullptr) \
|
||||
if (var) \
|
||||
delete var; \
|
||||
\
|
||||
var = new name<float>(*this); \
|
||||
@ -2049,7 +2049,7 @@ protected:
|
||||
\
|
||||
virtual void Copy(Variation<float>*& var) const override \
|
||||
{ \
|
||||
if (var != nullptr) \
|
||||
if (var) \
|
||||
delete var; \
|
||||
\
|
||||
var = new name<float>(*this); \
|
||||
|
@ -412,7 +412,7 @@ public:
|
||||
/// <returns>A pointer to the variation if found, else nullptr.</returns>
|
||||
const Variation<T>* GetVariation(eVariationId id) const
|
||||
{
|
||||
for (size_t i = 0; i < m_Variations.size() && m_Variations[i] != nullptr; i++)
|
||||
for (size_t i = 0; i < m_Variations.size() && m_Variations[i]; i++)
|
||||
if (id == m_Variations[i]->VariationId())
|
||||
return m_Variations[i];
|
||||
|
||||
@ -435,7 +435,7 @@ public:
|
||||
/// <returns>A pointer to the variation if found, else nullptr.</returns>
|
||||
const Variation<T>* GetVariation(const string& name) const
|
||||
{
|
||||
for (size_t i = 0; i < m_Variations.size() && m_Variations[i] != nullptr; i++)
|
||||
for (size_t i = 0; i < m_Variations.size() && m_Variations[i]; i++)
|
||||
if (!_stricmp(name.c_str(), m_Variations[i]->Name().c_str()))
|
||||
return m_Variations[i];
|
||||
|
||||
@ -466,7 +466,7 @@ public:
|
||||
/// <returns>The parametric variation with a matching name, else nullptr.</returns>
|
||||
const ParametricVariation<T>* GetParametricVariation(const string& name) const
|
||||
{
|
||||
for (size_t i = 0; i < m_ParametricVariations.size() && m_ParametricVariations[i] != nullptr; i++)
|
||||
for (size_t i = 0; i < m_ParametricVariations.size() && m_ParametricVariations[i]; i++)
|
||||
if (!_stricmp(name.c_str(), m_ParametricVariations[i]->Name().c_str()))
|
||||
return m_ParametricVariations[i];
|
||||
|
||||
@ -480,7 +480,7 @@ public:
|
||||
/// <returns>The index of the variation with the matching name, else -1</returns>
|
||||
int GetVariationIndex(const string& name)
|
||||
{
|
||||
for (size_t i = 0; i < m_Variations.size() && m_Variations[i] != nullptr; i++)
|
||||
for (size_t i = 0; i < m_Variations.size() && m_Variations[i]; i++)
|
||||
if (!_stricmp(name.c_str(), m_Variations[i]->Name().c_str()))
|
||||
return int(i);
|
||||
|
||||
|
@ -370,7 +370,7 @@ public:
|
||||
{
|
||||
for (auto v : variations)
|
||||
{
|
||||
if (v != nullptr && v->VariationId() == id)
|
||||
if (v && v->VariationId() == id)
|
||||
{
|
||||
var = v;
|
||||
keepGoing = false;
|
||||
@ -395,7 +395,7 @@ public:
|
||||
{
|
||||
for (auto v : variations)
|
||||
{
|
||||
if (v != nullptr && v->Name() == name)
|
||||
if (v && v->Name() == name)
|
||||
{
|
||||
var = v;
|
||||
keepGoing = false;
|
||||
@ -447,7 +447,7 @@ public:
|
||||
{
|
||||
for (size_t i = 0; i < variations.size(); i++)
|
||||
{
|
||||
if (variations[i] != nullptr && variations[i]->VariationId() == id)
|
||||
if (variations[i] && variations[i]->VariationId() == id)
|
||||
{
|
||||
delete variations[i];
|
||||
variations.erase(variations.begin() + i);
|
||||
@ -768,7 +768,7 @@ public:
|
||||
|
||||
//At this point, we've added if needed, or just applied the motion func to the weight.
|
||||
//Now apply the motion func to the params if needed.
|
||||
if (motParVar != nullptr)
|
||||
if (motParVar)
|
||||
{
|
||||
auto parVar = dynamic_cast<ParametricVariation<T>*>(var);
|
||||
auto params = parVar->Params();
|
||||
|
@ -49,8 +49,8 @@ END
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 0,9,9,1
|
||||
PRODUCTVERSION 0,9,9,1
|
||||
FILEVERSION 0,9,9,2
|
||||
PRODUCTVERSION 0,9,9,2
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
@ -67,12 +67,12 @@ BEGIN
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Open Source"
|
||||
VALUE "FileDescription", "Renders fractal flames as animations with motion blur"
|
||||
VALUE "FileVersion", "0.9.9.1"
|
||||
VALUE "FileVersion", "0.9.9.2"
|
||||
VALUE "InternalName", "EmberAnimate.exe"
|
||||
VALUE "LegalCopyright", "Copyright (C) Matt Feemster 2015, GPL v3"
|
||||
VALUE "OriginalFilename", "EmberAnimate.exe"
|
||||
VALUE "ProductName", "Ember Animate"
|
||||
VALUE "ProductVersion", "0.9.9.1"
|
||||
VALUE "ProductVersion", "0.9.9.2"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
@ -759,7 +759,7 @@ eRenderStatus RendererCL<T, bucketT>::AccumulatorToFinalImage(byte* pixels, size
|
||||
{
|
||||
eRenderStatus status = RunFinalAccum();
|
||||
|
||||
if (status == RENDER_OK && pixels != nullptr && !m_Devices.empty() && !m_Devices[0]->m_Wrapper.Shared())
|
||||
if (status == RENDER_OK && pixels && !m_Devices.empty() && !m_Devices[0]->m_Wrapper.Shared())
|
||||
{
|
||||
pixels += finalOffset;
|
||||
|
||||
|
@ -49,8 +49,8 @@ END
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 0,9,9,1
|
||||
PRODUCTVERSION 0,9,9,1
|
||||
FILEVERSION 0,9,9,2
|
||||
PRODUCTVERSION 0,9,9,2
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
@ -67,12 +67,12 @@ BEGIN
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Open Source"
|
||||
VALUE "FileDescription", "Manipulates fractal flames parameter files"
|
||||
VALUE "FileVersion", "0.9.9.1"
|
||||
VALUE "FileVersion", "0.9.9.2"
|
||||
VALUE "InternalName", "EmberGenome.exe"
|
||||
VALUE "LegalCopyright", "Copyright (C) Matt Feemster 2015, GPL v3"
|
||||
VALUE "OriginalFilename", "EmberGenome.exe"
|
||||
VALUE "ProductName", "Ember Genome"
|
||||
VALUE "ProductVersion", "0.9.9.1"
|
||||
VALUE "ProductVersion", "0.9.9.2"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
@ -49,8 +49,8 @@ END
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 0,9,9,1
|
||||
PRODUCTVERSION 0,9,9,1
|
||||
FILEVERSION 0,9,9,2
|
||||
PRODUCTVERSION 0,9,9,2
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
@ -67,12 +67,12 @@ BEGIN
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Open Source"
|
||||
VALUE "FileDescription", "Renders fractal flames as single images"
|
||||
VALUE "FileVersion", "0.9.9.1"
|
||||
VALUE "FileVersion", "0.9.9.2"
|
||||
VALUE "InternalName", "EmberRender.exe"
|
||||
VALUE "LegalCopyright", "Copyright (C) Matt Feemster 2015, GPL v3"
|
||||
VALUE "OriginalFilename", "EmberRender.exe"
|
||||
VALUE "ProductName", "Ember Render"
|
||||
VALUE "ProductVersion", "0.9.9.1"
|
||||
VALUE "ProductVersion", "0.9.9.2"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
@ -58,7 +58,7 @@
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><html><head/><body><p align="center"><br/>Fractorium 0.9.9.1 Beta</p><p align="center"><span style=" font-size:10pt;">A Qt-based fractal flame editor which uses a C++ re-write of the flam3 algorithm named Ember and a GPU capable version named EmberCL which implements a portion of the cuburn algorithm in OpenCL.</span></p><p align="center"><span style=" font-size:10pt;">Lead: Matt Feemster<br/>Contributors: Simon Detheridge</span></p></body></html></string>
|
||||
<string><html><head/><body><p align="center"><br/>Fractorium 0.9.9.2 Beta</p><p align="center"><span style=" font-size:10pt;">A Qt-based fractal flame editor which uses a C++ re-write of the flam3 algorithm named Ember and a GPU capable version named EmberCL which implements a portion of the cuburn algorithm in OpenCL.</span></p><p align="center"><span style=" font-size:10pt;">Lead: Matt Feemster<br/>Contributors: Simon Detheridge</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
@ -85,7 +85,7 @@
|
||||
<height>483</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<layout class="QVBoxLayout" name="AboutVerticalLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="CodeCopiedGroupBox">
|
||||
<property name="sizePolicy">
|
||||
@ -246,12 +246,12 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout" rowminimumheight="0">
|
||||
<layout class="QGridLayout" name="AboutOkGridLayout" rowminimumheight="0">
|
||||
<property name="verticalSpacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QPushButton" name="okButton">
|
||||
<widget class="QPushButton" name="OkButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
@ -277,7 +277,7 @@
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>okButton</sender>
|
||||
<sender>OkButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>AboutDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
|
@ -34,7 +34,7 @@ public:
|
||||
/// <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
|
||||
virtual QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const override
|
||||
{
|
||||
m_SpinBox->setParent(parent);
|
||||
|
||||
@ -46,7 +46,7 @@ public:
|
||||
/// </summary>
|
||||
/// <param name="editor">Unused</param>
|
||||
/// <param name="index">Unused</param>
|
||||
void destroyEditor(QWidget* editor, const QModelIndex& index) const override
|
||||
virtual void destroyEditor(QWidget* editor, const QModelIndex& index) const override
|
||||
{
|
||||
}
|
||||
|
||||
@ -55,7 +55,7 @@ public:
|
||||
/// </summary>
|
||||
/// <param name="editor">Unused</param>
|
||||
/// <param name="index">Unused</param>
|
||||
void setEditorData(QWidget* editor, const QModelIndex& index) const override
|
||||
virtual void setEditorData(QWidget* editor, const QModelIndex& index) const override
|
||||
{
|
||||
QPoint p(index.row(), index.column());
|
||||
auto value = index.model()->data(index, Qt::EditRole).toDouble();
|
||||
@ -70,7 +70,7 @@ public:
|
||||
/// <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
|
||||
virtual void setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const override
|
||||
{
|
||||
model->setData(index, m_SpinBox->value(), Qt::EditRole);
|
||||
}
|
||||
@ -81,7 +81,7 @@ public:
|
||||
/// <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
|
||||
virtual void updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const override
|
||||
{
|
||||
editor->setGeometry(option.rect);
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ FractoriumFinalRenderDialog::FractoriumFinalRenderDialog(FractoriumSettings* set
|
||||
connect(ui.FinalRenderScaleNoneRadioButton, SIGNAL(toggled(bool)), this, SLOT(OnScaleRadioButtonChanged(bool)), Qt::QueuedConnection);
|
||||
connect(ui.FinalRenderScaleWidthRadioButton, SIGNAL(toggled(bool)), this, SLOT(OnScaleRadioButtonChanged(bool)), Qt::QueuedConnection);
|
||||
connect(ui.FinalRenderScaleHeightRadioButton, SIGNAL(toggled(bool)), this, SLOT(OnScaleRadioButtonChanged(bool)), Qt::QueuedConnection);
|
||||
connect(ui.DeviceTable, SIGNAL(cellChanged(int, int)), this, SLOT(OnDeviceTableCellChanged(int, int)), Qt::QueuedConnection);
|
||||
connect(ui.FinalRenderDeviceTable, SIGNAL(cellChanged(int, int)), this, SLOT(OnDeviceTableCellChanged(int, int)), Qt::QueuedConnection);
|
||||
|
||||
SetupSpinner<DoubleSpinBox, double>(ui.FinalRenderSizeTable, this, row, 1, m_WidthScaleSpin, spinHeight, 0.001, 99.99, 0.1, SIGNAL(valueChanged(double)), SLOT(OnWidthScaleChanged(double)), true, 1.0, 1.0, 1.0);
|
||||
SetupSpinner<DoubleSpinBox, double>(ui.FinalRenderSizeTable, this, row, 1, m_HeightScaleSpin, spinHeight, 0.001, 99.99, 0.1, SIGNAL(valueChanged(double)), SLOT(OnHeightScaleChanged(double)), true, 1.0, 1.0, 1.0);
|
||||
@ -79,11 +79,11 @@ FractoriumFinalRenderDialog::FractoriumFinalRenderDialog(FractoriumSettings* set
|
||||
connect(m_PrefixEdit, SIGNAL(textChanged(const QString&)), this, SLOT(OnPrefixChanged(const QString&)), Qt::QueuedConnection);
|
||||
connect(m_SuffixEdit, SIGNAL(textChanged(const QString&)), this, SLOT(OnSuffixChanged(const QString&)), Qt::QueuedConnection);
|
||||
|
||||
ui.StartRenderButton->disconnect(SIGNAL(clicked(bool)));
|
||||
connect(ui.StartRenderButton, SIGNAL(clicked(bool)), this, SLOT(OnRenderClicked(bool)), Qt::QueuedConnection);
|
||||
connect(ui.StopRenderButton, SIGNAL(clicked(bool)), this, SLOT(OnCancelRenderClicked(bool)), Qt::QueuedConnection);
|
||||
ui.FinalRenderStartButton->disconnect(SIGNAL(clicked(bool)));
|
||||
connect(ui.FinalRenderStartButton, SIGNAL(clicked(bool)), this, SLOT(OnRenderClicked(bool)), Qt::QueuedConnection);
|
||||
connect(ui.FinalRenderStopButton, SIGNAL(clicked(bool)), this, SLOT(OnCancelRenderClicked(bool)), Qt::QueuedConnection);
|
||||
|
||||
table = ui.DeviceTable;
|
||||
table = ui.FinalRenderDeviceTable;
|
||||
table->clearContents();
|
||||
table->setRowCount(0);
|
||||
|
||||
@ -162,7 +162,7 @@ FractoriumFinalRenderDialog::FractoriumFinalRenderDialog(FractoriumSettings* set
|
||||
w = SetTabOrder(this, w, ui.FinalRenderDoAllCheckBox);
|
||||
w = SetTabOrder(this, w, ui.FinalRenderDoSequenceCheckBox);
|
||||
w = SetTabOrder(this, w, ui.FinalRenderCurrentSpin);
|
||||
w = SetTabOrder(this, w, ui.DeviceTable);
|
||||
w = SetTabOrder(this, w, ui.FinalRenderDeviceTable);
|
||||
w = SetTabOrder(this, w, ui.FinalRenderThreadCountSpin);
|
||||
w = SetTabOrder(this, w, ui.FinalRenderThreadPriorityComboBox);
|
||||
w = SetTabOrder(this, w, ui.FinalRenderApplyToAllCheckBox);
|
||||
@ -183,9 +183,9 @@ FractoriumFinalRenderDialog::FractoriumFinalRenderDialog(FractoriumSettings* set
|
||||
w = SetTabOrder(this, w, m_PrefixEdit);
|
||||
w = SetTabOrder(this, w, m_SuffixEdit);
|
||||
w = SetTabOrder(this, w, ui.FinalRenderTextOutput);
|
||||
w = SetTabOrder(this, w, ui.StartRenderButton);
|
||||
w = SetTabOrder(this, w, ui.StopRenderButton);
|
||||
w = SetTabOrder(this, w, ui.CloseButton);
|
||||
w = SetTabOrder(this, w, ui.FinalRenderStartButton);
|
||||
w = SetTabOrder(this, w, ui.FinalRenderStopButton);
|
||||
w = SetTabOrder(this, w, ui.FinalRenderCloseButton);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -228,7 +228,7 @@ double FractoriumFinalRenderDialog::Quality() { return m_QualitySpin->value(); }
|
||||
uint FractoriumFinalRenderDialog::TemporalSamples() { return m_TemporalSamplesSpin->value(); }
|
||||
uint FractoriumFinalRenderDialog::Supersample() { return m_SupersampleSpin->value(); }
|
||||
uint FractoriumFinalRenderDialog::Strips() { return m_StripsSpin->value(); }
|
||||
QList<QVariant> FractoriumFinalRenderDialog::Devices() { return DeviceTableToSettings(ui.DeviceTable); }
|
||||
QList<QVariant> FractoriumFinalRenderDialog::Devices() { return DeviceTableToSettings(ui.FinalRenderDeviceTable); }
|
||||
|
||||
/// <summary>
|
||||
/// Capture the current state of the Gui.
|
||||
@ -347,8 +347,9 @@ void FractoriumFinalRenderDialog::OnOpenCLCheckBoxStateChanged(int state)
|
||||
{
|
||||
bool checked = state == Qt::Checked;
|
||||
|
||||
ui.DeviceTable->setEnabled(checked);
|
||||
ui.FinalRenderDeviceTable->setEnabled(checked);
|
||||
ui.FinalRenderThreadCountSpin->setEnabled(!checked);
|
||||
ui.FinalRenderThreadPriorityLabel->setEnabled(!checked);
|
||||
ui.FinalRenderThreadPriorityComboBox->setEnabled(!checked);
|
||||
SetMemory();
|
||||
}
|
||||
@ -480,9 +481,9 @@ void FractoriumFinalRenderDialog::OnScaleRadioButtonChanged(bool checked)
|
||||
/// <param name="col">The column of the cell</param>
|
||||
void FractoriumFinalRenderDialog::OnDeviceTableCellChanged(int row, int col)
|
||||
{
|
||||
if (auto item = ui.DeviceTable->item(row, col))
|
||||
if (auto item = ui.FinalRenderDeviceTable->item(row, col))
|
||||
{
|
||||
HandleDeviceTableCheckChanged(ui.DeviceTable, row, col);
|
||||
HandleDeviceTableCheckChanged(ui.FinalRenderDeviceTable, row, col);
|
||||
SetMemory();
|
||||
}
|
||||
}
|
||||
@ -497,7 +498,7 @@ void FractoriumFinalRenderDialog::OnDeviceTableRadioToggled(bool checked)
|
||||
{
|
||||
int row;
|
||||
auto s = sender();
|
||||
auto table = ui.DeviceTable;
|
||||
auto table = ui.FinalRenderDeviceTable;
|
||||
QRadioButton* radio = nullptr;
|
||||
|
||||
if (s)
|
||||
@ -506,7 +507,7 @@ void FractoriumFinalRenderDialog::OnDeviceTableRadioToggled(bool checked)
|
||||
if (radio = qobject_cast<QRadioButton*>(table->cellWidget(row, 1)))
|
||||
if (s == radio)
|
||||
{
|
||||
HandleDeviceTableCheckChanged(ui.DeviceTable, row, 1);
|
||||
HandleDeviceTableCheckChanged(ui.FinalRenderDeviceTable, row, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -45,7 +45,7 @@
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QScrollArea" name="scrollArea">
|
||||
<widget class="QScrollArea" name="FinalRenderScrollArea">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
@ -58,7 +58,7 @@
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="scrollAreaWidgetContents">
|
||||
<widget class="QWidget" name="FinalRenderScrollAreaWidgetContents">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
@ -84,7 +84,7 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout" columnstretch="0,0">
|
||||
<layout class="QGridLayout" name="FinalRenderGridLayout" columnstretch="0,0">
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="FinalRenderEarlyClipCheckBox">
|
||||
<property name="toolTip">
|
||||
@ -168,7 +168,7 @@
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<layout class="QGridLayout" name="FinalRenderGridLayout2">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetNoConstraint</enum>
|
||||
</property>
|
||||
@ -240,7 +240,7 @@
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTableWidget" name="DeviceTable">
|
||||
<widget class="QTableWidget" name="FinalRenderDeviceTable">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
@ -461,13 +461,13 @@
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>46</height>
|
||||
<height>45</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>46</height>
|
||||
<height>45</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
@ -670,13 +670,13 @@
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>200</height>
|
||||
<height>199</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>200</height>
|
||||
<height>199</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
@ -939,7 +939,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_2" rowstretch="0,0,0,0" columnstretch="1,4">
|
||||
<layout class="QGridLayout" name="FinalRenderGridLayout3" rowstretch="0,0,0,0" columnstretch="1,4">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetDefaultConstraint</enum>
|
||||
</property>
|
||||
@ -1105,7 +1105,7 @@
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="StartRenderButton">
|
||||
<widget class="QPushButton" name="FinalRenderStartButton">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::TabFocus</enum>
|
||||
</property>
|
||||
@ -1118,7 +1118,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="StopRenderButton">
|
||||
<widget class="QPushButton" name="FinalRenderStopButton">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::TabFocus</enum>
|
||||
</property>
|
||||
@ -1128,7 +1128,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="CloseButton">
|
||||
<widget class="QPushButton" name="FinalRenderCloseButton">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::TabFocus</enum>
|
||||
</property>
|
||||
@ -1165,14 +1165,14 @@
|
||||
<tabstop>FinalRenderOpenCLCheckBox</tabstop>
|
||||
<tabstop>FinalRenderParamsTable</tabstop>
|
||||
<tabstop>FinalRenderTextOutput</tabstop>
|
||||
<tabstop>StartRenderButton</tabstop>
|
||||
<tabstop>StopRenderButton</tabstop>
|
||||
<tabstop>CloseButton</tabstop>
|
||||
<tabstop>FinalRenderStartButton</tabstop>
|
||||
<tabstop>FinalRenderStopButton</tabstop>
|
||||
<tabstop>FinalRenderCloseButton</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>StartRenderButton</sender>
|
||||
<sender>FinalRenderStartButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>FinalRenderDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
@ -1188,7 +1188,7 @@
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>CloseButton</sender>
|
||||
<sender>FinalRenderCloseButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>FinalRenderDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
|
@ -881,7 +881,7 @@ void FinalRenderEmberController<T>::RenderComplete(Ember<T>& ember, const EmberS
|
||||
ember.m_Edits = m_XmlWriter.CreateNewEditdoc(&ember, nullptr, "edit", m_Settings->Nick().toStdString(), m_Settings->Url().toStdString(), m_Settings->Id().toStdString(), "", 0, 0);
|
||||
m_XmlWriter.Save(newPath.toStdString().c_str(), ember, 0, true, false, true);//Note that the ember passed is used, rather than m_Ember because it's what was actually rendered.
|
||||
|
||||
if (tempEdit != nullptr)
|
||||
if (tempEdit)
|
||||
xmlFreeDoc(tempEdit);
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "FractoriumPch.h"
|
||||
#include "Fractorium.h"
|
||||
#include "QssDialog.h"
|
||||
|
||||
// X11 headers on Linux define this, causing build errors.
|
||||
#ifdef KeyRelease
|
||||
@ -13,14 +14,16 @@
|
||||
/// is present here, it's safe to assume it can't be done in the designer.
|
||||
/// </summary>
|
||||
/// <param name="p">The parent widget of this item</param>
|
||||
Fractorium::Fractorium(QWidget* p)
|
||||
Fractorium::Fractorium(QWidget* p)
|
||||
: QMainWindow(p),
|
||||
m_Info(OpenCLInfo::Instance())
|
||||
{
|
||||
int spinHeight = 20, iconSize_ = 9;
|
||||
size_t i = 0;
|
||||
string s;
|
||||
Timing t;
|
||||
ui.setupUi(this);
|
||||
|
||||
qRegisterMetaType<QVector<int>>("QVector<int>");//For previews.
|
||||
qRegisterMetaType<vector<byte>>("vector<byte>");
|
||||
qRegisterMetaType<EmberTreeWidgetItemBase*>("EmberTreeWidgetItemBase*");
|
||||
@ -33,7 +36,7 @@ Fractorium::Fractorium(QWidget* p)
|
||||
tabifyDockWidget(ui.XformsDockWidget, ui.XaosDockWidget);
|
||||
tabifyDockWidget(ui.XaosDockWidget, ui.PaletteDockWidget);
|
||||
tabifyDockWidget(ui.PaletteDockWidget, ui.InfoDockWidget);
|
||||
|
||||
|
||||
m_Docks.reserve(8);
|
||||
m_Docks.push_back(ui.LibraryDockWidget);
|
||||
m_Docks.push_back(ui.FlameDockWidget);
|
||||
@ -47,6 +50,7 @@ Fractorium::Fractorium(QWidget* p)
|
||||
m_PaletteSortMode = 0;//Sort by palette ascending by default.
|
||||
m_ColorDialog = new QColorDialog(this);
|
||||
m_Settings = new FractoriumSettings(this);
|
||||
m_QssDialog = new QssDialog(this);
|
||||
|
||||
m_FileDialog = nullptr;//Use lazy instantiation upon first use.
|
||||
m_FolderDialog = nullptr;
|
||||
@ -121,19 +125,19 @@ Fractorium::Fractorium(QWidget* p)
|
||||
m_QualitySpin->setValue(30 * m_Settings->Devices().size());
|
||||
|
||||
int statusBarHeight = 20 * devicePixelRatio();
|
||||
ui.statusBar->setMinimumHeight(statusBarHeight);
|
||||
ui.statusBar->setMaximumHeight(statusBarHeight);
|
||||
ui.StatusBar->setMinimumHeight(statusBarHeight);
|
||||
ui.StatusBar->setMaximumHeight(statusBarHeight);
|
||||
|
||||
m_RenderStatusLabel = new QLabel(this);
|
||||
m_RenderStatusLabel->setMinimumWidth(200);
|
||||
m_RenderStatusLabel->setAlignment(Qt::AlignRight);
|
||||
ui.statusBar->addPermanentWidget(m_RenderStatusLabel);
|
||||
ui.StatusBar->addPermanentWidget(m_RenderStatusLabel);
|
||||
|
||||
m_CoordinateStatusLabel = new QLabel(this);
|
||||
m_CoordinateStatusLabel->setMinimumWidth(300);
|
||||
m_CoordinateStatusLabel->setMaximumWidth(300);
|
||||
m_CoordinateStatusLabel->setAlignment(Qt::AlignLeft);
|
||||
ui.statusBar->addWidget(m_CoordinateStatusLabel);
|
||||
ui.StatusBar->addWidget(m_CoordinateStatusLabel);
|
||||
|
||||
int progressBarHeight = 15;
|
||||
int progressBarWidth = 300;
|
||||
@ -144,7 +148,7 @@ Fractorium::Fractorium(QWidget* p)
|
||||
m_ProgressBar->setMaximumHeight(progressBarHeight);
|
||||
m_ProgressBar->setMinimumWidth(progressBarWidth);
|
||||
m_ProgressBar->setMaximumWidth(progressBarWidth);
|
||||
ui.statusBar->addPermanentWidget(m_ProgressBar);
|
||||
ui.StatusBar->addPermanentWidget(m_ProgressBar);
|
||||
|
||||
//Setup pointer in the GL window to point back to here.
|
||||
ui.GLDisplay->SetMainWindow(this);
|
||||
@ -162,29 +166,43 @@ Fractorium::Fractorium(QWidget* p)
|
||||
ui.XformsTabWidget->setCurrentIndex(2);//Make variations tab the currently selected one under the Xforms tab.
|
||||
}
|
||||
|
||||
//Setting certain values will completely throw off the GUI, doing everything
|
||||
//from setting strange margins, to arbitrarily changing the fonts used.
|
||||
//For these cases, the only way to fix the problem is to use style sheets.
|
||||
ui.ColorTable->setStyleSheet("QTableWidget::item { padding: 1px; }");
|
||||
ui.GeometryTable->setStyleSheet("QTableWidget::item { padding: 1px; }");
|
||||
ui.FilterTable->setStyleSheet("QTableWidget::item { padding: 1px; }");
|
||||
ui.IterationTable->setStyleSheet("QTableWidget::item { padding: 1px; }");
|
||||
ui.XformAffineTab->setStyleSheet("QTableWidget::item { padding: 1px; }");
|
||||
ui.XformWeightNameTable->setStyleSheet("QTableWidget::item { padding: 0px; }");
|
||||
ui.XformColorIndexTable->setStyleSheet("QTableWidget::item { padding: 1px; }");
|
||||
ui.XformColorValuesTable->setStyleSheet("QTableWidget::item { padding: 1px; }");
|
||||
ui.XformPaletteRefTable->setStyleSheet("QTableWidget::item { padding: 0px; border: none; margin: 0px; }");
|
||||
ui.PaletteAdjustTable->setStyleSheet("QTableWidget::item { padding: 1px; }");//Need this to avoid covering the top border pixel with the spinners.
|
||||
ui.statusBar->setStyleSheet("QStatusBar QLabel { padding-left: 2px; padding-right: 2px; }");
|
||||
ui.XaosTableView->setStyleSheet("QTableView { margin: 1px}");
|
||||
|
||||
//setStyleSheet("QGroupBox { border: 2px solid gray; border-radius: 3px; } ");
|
||||
|
||||
m_PreviousPaletteRow = -1;//Force click handler the first time through.
|
||||
SetCoordinateStatus(0, 0, 0, 0);
|
||||
|
||||
SetTabOrders();
|
||||
|
||||
m_SettingsPath = QFileInfo(m_Settings->fileName()).absoluteDir().absolutePath();
|
||||
ifstream ifs((m_SettingsPath + "/default.qss").toStdString().c_str(), ifstream::in);
|
||||
|
||||
if (ifs.is_open())
|
||||
{
|
||||
string total, qs;
|
||||
|
||||
while (std::getline(ifs, qs))
|
||||
total += qs + "\n";
|
||||
|
||||
m_Style = QString::fromStdString(total);
|
||||
}
|
||||
else
|
||||
m_Style = BaseStyle();
|
||||
|
||||
setStyleSheet(m_Style);
|
||||
|
||||
if (!m_Settings->Theme().isEmpty())
|
||||
{
|
||||
if (auto theme = QStyleFactory::create(m_Settings->Theme()))
|
||||
{
|
||||
m_Theme = theme;
|
||||
setStyle(m_Theme);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!QStyleFactory::keys().empty())
|
||||
{
|
||||
m_Theme = QStyleFactory::create(qApp->style()->objectName());
|
||||
setStyle(m_Theme);
|
||||
}
|
||||
}
|
||||
|
||||
//At this point, everything has been setup except the renderer. Shortly after
|
||||
//this constructor exits, GLWidget::InitGL() will create the initial flock and start the rendering timer
|
||||
//which executes whenever the program is idle. Upon starting the timer, the renderer
|
||||
@ -764,7 +782,7 @@ void Fractorium::SetTabOrders()
|
||||
w = SetTabOrder(this, w, ui.PaletteListTable);
|
||||
|
||||
|
||||
w = SetTabOrder(this, ui.SummaryTableWidget, ui.SummaryTreeWidget);//Info summary.
|
||||
w = SetTabOrder(this, ui.SummaryTable, ui.SummaryTree);//Info summary.
|
||||
|
||||
w = SetTabOrder(this, ui.InfoBoundsGroupBox, ui.InfoBoundsFrame);//Info bounds.
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
/// </summary>
|
||||
|
||||
class GLWidget;
|
||||
class QssDialog;
|
||||
class FractoriumOptionsDialog;
|
||||
class FractoriumVariationsDialog;
|
||||
class FractoriumFinalRenderDialog;
|
||||
@ -42,9 +43,9 @@ template <typename T> class FinalRenderEmberController;
|
||||
/// certain parameters don't require a full render, the minimum necessary processing will be ran.
|
||||
/// When the user changes something on the GUI, the required processing action is added to a vector.
|
||||
/// Upon the next execution of the idle timer function, the most significant action will be extracted
|
||||
/// and applied to the renderer. The vector is then cleared.
|
||||
/// and applied to the renderer. The state change vector is then cleared.
|
||||
/// On the left side of the window is a dock widget which contains all controls needed for
|
||||
/// manipulating embers.
|
||||
/// manipulating embers. It's tabs can be floated, dragged, docked and nested elsewhere.
|
||||
/// Qt takes very long to create file dialog windows, so they are kept as members and initialized
|
||||
/// upon first use with lazy instantiation and then kept around for the remainder of the program.
|
||||
/// Additional dialogs are for the about box, options, and final rendering out to a file.
|
||||
@ -53,9 +54,6 @@ template <typename T> class FinalRenderEmberController;
|
||||
/// Fractorium.cpp and the other functional areas are each broken out into their own files.
|
||||
/// The order of the functions in each .cpp file should roughly match the order they appear in the .h file.
|
||||
/// Future todo list:
|
||||
/// Add all of the plugins/variations that work with Apophysis and are open source.
|
||||
/// Allow specifying variations to include/exclude from random generation.
|
||||
/// Allow the option to specify a different palette file rather than the default flam3-palettes.xml.
|
||||
/// Implement more rendering types.
|
||||
/// Add support for animation previewing.
|
||||
/// Add support for full animation editing and rendering.
|
||||
@ -66,6 +64,7 @@ class Fractorium : public QMainWindow
|
||||
Q_OBJECT
|
||||
|
||||
friend GLWidget;
|
||||
friend QssDialog;
|
||||
friend FractoriumOptionsDialog;
|
||||
friend FractoriumFinalRenderDialog;
|
||||
friend FractoriumAboutDialog;
|
||||
@ -149,6 +148,7 @@ public slots:
|
||||
void OnActionCL(bool checked);
|
||||
void OnActionSP(bool checked);
|
||||
void OnActionDP(bool checked);
|
||||
void OnActionStyle(bool checked);
|
||||
|
||||
//Library.
|
||||
void OnEmberTreeItemChanged(QTreeWidgetItem* item, int col);
|
||||
@ -472,8 +472,12 @@ private:
|
||||
//Files.
|
||||
QFileDialog* m_FileDialog;
|
||||
QFileDialog* m_FolderDialog;
|
||||
QssDialog* m_QssDialog;
|
||||
QString m_LastSaveAll;
|
||||
QString m_LastSaveCurrent;
|
||||
QString m_Style;
|
||||
QStyle* m_Theme;
|
||||
QString m_SettingsPath;
|
||||
//QMenu* m_FileTreeMenu;
|
||||
|
||||
QProgressBar* m_ProgressBar;
|
||||
|
@ -44,5 +44,7 @@
|
||||
<file>Icons/square.png</file>
|
||||
<file>Icons/cube.png</file>
|
||||
<file>Icons/table_gear.png</file>
|
||||
<file>Icons/checkbox_checked.png</file>
|
||||
<file>Icons/checkbox_unchecked.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -357,3 +357,44 @@ static void HandleDeviceTableCheckChanged(QTableWidget* table, int row, int col)
|
||||
if (primaryItem->checkState() == Qt::Unchecked)
|
||||
primaryItem->setCheckState(Qt::Checked);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The basic style that is needed for things to look right, this varies by OS.
|
||||
/// </summary>
|
||||
/// <returns>The base style</returns>
|
||||
static QString BaseStyle()
|
||||
{
|
||||
return "/*---Base Style---\n"
|
||||
"This is needed to deal with the large tabs in the fusion theme which is the default on Linux, and optional on Windows.\n"
|
||||
"It's not needed for other themes."
|
||||
"You should keep this at the top of whatever custom style you make to ensure the tabs aren't unusually large.*/\n"
|
||||
#ifndef WIN32
|
||||
"QTabBar::tab { height: 3ex; }\n\n"
|
||||
#else
|
||||
"QTabBar::tab { height: 5ex; }\n\n"
|
||||
#endif
|
||||
"/*This is needed to give the labels on the status bar some padding.*/\n"
|
||||
"QStatusBar QLabel { padding-left: 2px; padding-right: 2px; }\n\n"
|
||||
;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get all parent objects of the passed in widget.
|
||||
/// </summary>
|
||||
/// <param name="widget">The widget whose parents will be retrieved</param>
|
||||
/// <returns>The entire parent object chain in a QList</returns>
|
||||
template <typename T>
|
||||
static QList<T> GetAllParents(QWidget* widget)
|
||||
{
|
||||
QList<T> parents;
|
||||
|
||||
while (auto parent = qobject_cast<QWidget*>(widget->parent()))
|
||||
{
|
||||
if (auto parentT = qobject_cast<T>(parent))
|
||||
parents.push_back(parentT);
|
||||
|
||||
widget = parent;
|
||||
}
|
||||
|
||||
return parents;
|
||||
}
|
@ -6,22 +6,22 @@
|
||||
/// </summary>
|
||||
void Fractorium::InitInfoUI()
|
||||
{
|
||||
auto treeHeader = ui.SummaryTreeWidget->header();
|
||||
auto tableHeader = ui.SummaryTableWidget->horizontalHeader();
|
||||
auto treeHeader = ui.SummaryTree->header();
|
||||
auto tableHeader = ui.SummaryTable->horizontalHeader();
|
||||
|
||||
treeHeader->setVisible(true);
|
||||
treeHeader->setSectionsClickable(true);
|
||||
treeHeader->setSectionResizeMode(QHeaderView::ResizeToContents);
|
||||
connect(treeHeader, SIGNAL(sectionClicked(int)), this, SLOT(OnSummaryTreeHeaderSectionClicked(int)), Qt::QueuedConnection);
|
||||
connect(tableHeader, SIGNAL(sectionResized(int, int, int)), this, SLOT(OnSummaryTableHeaderResized(int, int, int)), Qt::QueuedConnection);
|
||||
SetFixedTableHeader(ui.SummaryTableWidget->verticalHeader());
|
||||
SetFixedTableHeader(ui.SummaryTable->verticalHeader());
|
||||
|
||||
ui.SummaryTableWidget->setItem(0, 0, m_InfoNameItem = new QTableWidgetItem(""));
|
||||
ui.SummaryTableWidget->setItem(1, 0, m_InfoPaletteItem = new QTableWidgetItem(""));
|
||||
ui.SummaryTableWidget->setItem(2, 0, m_Info3dItem = new QTableWidgetItem(""));
|
||||
ui.SummaryTableWidget->setItem(3, 0, m_InfoXaosItem = new QTableWidgetItem(""));
|
||||
ui.SummaryTableWidget->setItem(4, 0, m_InfoXformCountItem = new QTableWidgetItem(""));
|
||||
ui.SummaryTableWidget->setItem(5, 0, m_InfoFinalXformItem = new QTableWidgetItem(""));
|
||||
ui.SummaryTable->setItem(0, 0, m_InfoNameItem = new QTableWidgetItem(""));
|
||||
ui.SummaryTable->setItem(1, 0, m_InfoPaletteItem = new QTableWidgetItem(""));
|
||||
ui.SummaryTable->setItem(2, 0, m_Info3dItem = new QTableWidgetItem(""));
|
||||
ui.SummaryTable->setItem(3, 0, m_InfoXaosItem = new QTableWidgetItem(""));
|
||||
ui.SummaryTable->setItem(4, 0, m_InfoXformCountItem = new QTableWidgetItem(""));
|
||||
ui.SummaryTable->setItem(5, 0, m_InfoFinalXformItem = new QTableWidgetItem(""));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -34,7 +34,7 @@ void Fractorium::InitInfoUI()
|
||||
void Fractorium::OnSummaryTableHeaderResized(int logicalIndex, int oldSize, int newSize)
|
||||
{
|
||||
QPixmap pixmap = QPixmap::fromImage(m_Controller->FinalPaletteImage());//Create a QPixmap out of the QImage, will be empty on startup.
|
||||
SetPaletteTableItem(&pixmap, ui.SummaryTableWidget, m_InfoPaletteItem, 1, 0);
|
||||
SetPaletteTableItem(&pixmap, ui.SummaryTable, m_InfoPaletteItem, 1, 0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -44,7 +44,7 @@ void Fractorium::OnSummaryTableHeaderResized(int logicalIndex, int oldSize, int
|
||||
/// <param name="logicalIndex">The column which was clicked</param>
|
||||
void Fractorium::OnSummaryTreeHeaderSectionClicked(int logicalIndex)
|
||||
{
|
||||
auto tree = ui.SummaryTreeWidget;
|
||||
auto tree = ui.SummaryTree;
|
||||
|
||||
if (logicalIndex)
|
||||
tree->expandAll();
|
||||
@ -73,8 +73,8 @@ void FractoriumEmberController<T>::FillSummary()
|
||||
size_t x = 0, total = m_Ember.TotalXformCount();
|
||||
Xform<T>* xform = nullptr;
|
||||
QColor color;
|
||||
auto table = m_Fractorium->ui.SummaryTableWidget;
|
||||
auto tree = m_Fractorium->ui.SummaryTreeWidget;
|
||||
auto table = m_Fractorium->ui.SummaryTable;
|
||||
auto tree = m_Fractorium->ui.SummaryTree;
|
||||
QVariantList states;
|
||||
QTreeWidgetItemIterator it(tree);
|
||||
|
||||
|
@ -82,7 +82,7 @@ void FractoriumEmberController<T>::NewFlock(size_t count)
|
||||
/// <param name="checked">Ignored</param>
|
||||
void Fractorium::OnActionNewFlock(bool checked)
|
||||
{
|
||||
m_Controller->NewFlock(10);
|
||||
m_Controller->NewFlock(m_Settings->RandomCount());
|
||||
m_Controller->SetEmber(0);
|
||||
}
|
||||
|
||||
@ -285,7 +285,7 @@ void FractoriumEmberController<T>::SaveCurrentAsXml()
|
||||
ApplyXmlSavingTemplate(ember);
|
||||
ember.m_Edits = writer.CreateNewEditdoc(&ember, nullptr, "edit", s->Nick().toStdString(), s->Url().toStdString(), s->Id().toStdString(), "", 0, 0);
|
||||
|
||||
if (tempEdit != nullptr)
|
||||
if (tempEdit)
|
||||
xmlFreeDoc(tempEdit);
|
||||
|
||||
if (writer.Save(filename.toStdString().c_str(), ember, 0, true, false, true))
|
||||
|
@ -23,26 +23,52 @@
|
||||
#endif
|
||||
|
||||
#include <deque>
|
||||
#include <QLineEdit>
|
||||
#include <QSpinBox>
|
||||
#include "qfunctions.h"
|
||||
#include <QApplication>
|
||||
#include <QBrush>
|
||||
#include <QColor>
|
||||
#include <QColorDialog>
|
||||
#include <QComboBox>
|
||||
#include <QDebug>
|
||||
#include <QDoubleSpinBox>
|
||||
#include <QFileInfo>
|
||||
#include <QFont>
|
||||
#include <QFontDialog>
|
||||
#include <QFontMetrics>
|
||||
#include <QFuture>
|
||||
#include <QGraphicsView>
|
||||
#include <QIcon>
|
||||
#include <QImageReader>
|
||||
#include <QItemDelegate>
|
||||
#include <QLineEdit>
|
||||
#include <QMenu>
|
||||
#include <QModelIndex>
|
||||
#include <qopenglfunctions_2_0.h>
|
||||
#include <QOpenGLWidget>
|
||||
#include <QPainterPath>
|
||||
#include <QPushButton>
|
||||
#include <QComboBox>
|
||||
#include <QColorDialog>
|
||||
#include <QGraphicsView>
|
||||
#include <QSettings>
|
||||
#include <QSignalMapper>
|
||||
#include <QSpinBox>
|
||||
#include <QStandardPaths>
|
||||
#include <QTextEdit>
|
||||
#include <QTimer>
|
||||
#include <QToolBar>
|
||||
#include <QTreeWidget>
|
||||
#include <QWheelEvent>
|
||||
#include <QItemDelegate>
|
||||
#include <QApplication>
|
||||
#include <QSettings>
|
||||
#include <QStandardPaths>
|
||||
#include <QOpenGLWidget>
|
||||
#include <qopenglfunctions_2_0.h>
|
||||
#include <QtWidgets/QMainWindow>
|
||||
#include <QFuture>
|
||||
#include <QtConcurrentRun>
|
||||
#include <QModelIndex>
|
||||
#include <QtCore/QMultiHash>
|
||||
#include <QtCore/QPair>
|
||||
#include <QtCore/QSharedData>
|
||||
#include <QtCore/QSize>
|
||||
#include <QtCore/QStringList>
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtCore/QVector>
|
||||
#include <QtCore/qglobal.h>
|
||||
#include <QtGui/QFont>
|
||||
#include <QtGui/QPalette>
|
||||
#include <QtGui/QSyntaxHighlighter>
|
||||
#include <QtWidgets/QMainWindow>
|
||||
|
||||
#include "glm/glm.hpp"
|
||||
#include "glm/gtc/matrix_transform.hpp"
|
||||
|
@ -712,7 +712,7 @@ bool Fractorium::CreateControllerFromOptions()
|
||||
}
|
||||
}
|
||||
|
||||
return m_Controller.get() != nullptr;
|
||||
return m_Controller.get();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -46,11 +46,9 @@ void FractoriumSettings::EnsureDefaults()
|
||||
|
||||
FinalThreadPriority(Clamp<int>(FinalThreadPriority(), (int)eThreadPriority::LOWEST, (int)eThreadPriority::HIGHEST));
|
||||
|
||||
if (CpuSubBatch() < 1)
|
||||
CpuSubBatch(1);
|
||||
|
||||
if (OpenCLSubBatch() < 1)
|
||||
OpenCLSubBatch(1);
|
||||
CpuSubBatch(std::max(1u, CpuSubBatch()));
|
||||
OpenCLSubBatch(std::max(1u, OpenCLSubBatch()));
|
||||
RandomCount(std::max(1u, RandomCount()));
|
||||
|
||||
if (FinalScale() > SCALE_HEIGHT)
|
||||
FinalScale(0);
|
||||
@ -124,6 +122,9 @@ void FractoriumSettings::CpuSubBatch(uint i) { setValue(CPUSUBBATCH, i);
|
||||
|
||||
uint FractoriumSettings::OpenCLSubBatch() { return value(OPENCLSUBBATCH).toUInt(); }
|
||||
void FractoriumSettings::OpenCLSubBatch(uint i) { setValue(OPENCLSUBBATCH, i); }
|
||||
|
||||
uint FractoriumSettings::RandomCount() { return value(RANDOMCOUNT).toUInt(); }
|
||||
void FractoriumSettings::RandomCount(uint i) { setValue(RANDOMCOUNT, i); }
|
||||
|
||||
/// <summary>
|
||||
/// Final render settings.
|
||||
@ -232,3 +233,7 @@ void FractoriumSettings::SaveAutoUnique(bool b) { setValue(AUTOUNIQUE, b)
|
||||
|
||||
QMap<QString, QVariant> FractoriumSettings::Variations() { return value(UIVARIATIONS).toMap(); }
|
||||
void FractoriumSettings::Variations(const QMap<QString, QVariant>& m) { setValue(UIVARIATIONS, m); }
|
||||
|
||||
QString FractoriumSettings::Theme() { return value(STYLETHEME).toString(); }
|
||||
void FractoriumSettings::Theme(const QString& s) { setValue(STYLETHEME, s); }
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
#define OPENCLDEFILTER "render/opencldefilter"
|
||||
#define CPUSUBBATCH "render/cpusubbatch"
|
||||
#define OPENCLSUBBATCH "render/openclsubbatch"
|
||||
#define RANDOMCOUNT "render/randomcount"
|
||||
|
||||
#define FINALEARLYCLIP "finalrender/earlyclip"
|
||||
#define FINALYAXISUP "finalrender/finalyaxisup"
|
||||
@ -60,6 +61,8 @@
|
||||
|
||||
#define UIVARIATIONS "ui/variations"
|
||||
|
||||
#define STYLETHEME "style/theme"
|
||||
|
||||
/// <summary>
|
||||
/// Class for preserving various program options between
|
||||
/// runs of Fractorium. Each of these generally corresponds
|
||||
@ -111,6 +114,9 @@ public:
|
||||
uint OpenCLSubBatch();
|
||||
void OpenCLSubBatch(uint i);
|
||||
|
||||
uint RandomCount();
|
||||
void RandomCount(uint i);
|
||||
|
||||
bool FinalEarlyClip();
|
||||
void FinalEarlyClip(bool b);
|
||||
|
||||
@ -206,4 +212,7 @@ public:
|
||||
|
||||
QMap<QString, QVariant> Variations();
|
||||
void Variations(const QMap<QString, QVariant>& m);
|
||||
|
||||
QString Theme();
|
||||
void Theme(const QString& s);
|
||||
};
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "FractoriumPch.h"
|
||||
#include "Fractorium.h"
|
||||
#include "QssDialog.h"
|
||||
|
||||
/// <summary>
|
||||
/// Initialize the toolbar UI.
|
||||
@ -15,10 +16,11 @@ void Fractorium::InitToolbarUI()
|
||||
spGroup->addAction(ui.ActionDP);
|
||||
|
||||
SyncOptionsToToolbar();
|
||||
connect(ui.ActionCpu, SIGNAL(triggered(bool)), this, SLOT(OnActionCpu(bool)), Qt::QueuedConnection);
|
||||
connect(ui.ActionCL, SIGNAL(triggered(bool)), this, SLOT(OnActionCL(bool)), Qt::QueuedConnection);
|
||||
connect(ui.ActionSP, SIGNAL(triggered(bool)), this, SLOT(OnActionSP(bool)), Qt::QueuedConnection);
|
||||
connect(ui.ActionDP, SIGNAL(triggered(bool)), this, SLOT(OnActionDP(bool)), Qt::QueuedConnection);
|
||||
connect(ui.ActionCpu, SIGNAL(triggered(bool)), this, SLOT(OnActionCpu(bool)), Qt::QueuedConnection);
|
||||
connect(ui.ActionCL, SIGNAL(triggered(bool)), this, SLOT(OnActionCL(bool)), Qt::QueuedConnection);
|
||||
connect(ui.ActionSP, SIGNAL(triggered(bool)), this, SLOT(OnActionSP(bool)), Qt::QueuedConnection);
|
||||
connect(ui.ActionDP, SIGNAL(triggered(bool)), this, SLOT(OnActionDP(bool)), Qt::QueuedConnection);
|
||||
connect(ui.ActionStyle, SIGNAL(triggered(bool)), this, SLOT(OnActionStyle(bool)), Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -73,6 +75,15 @@ void Fractorium::OnActionDP(bool checked)
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called when the show style button is clicked.
|
||||
/// </summary>
|
||||
/// <param name="checked">Ignored</param>
|
||||
void Fractorium::OnActionStyle(bool checked)
|
||||
{
|
||||
m_QssDialog->show();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sync options data to the check state of the toolbar buttons.
|
||||
/// This does not trigger a clicked() event.
|
||||
|
@ -12,10 +12,11 @@ void Fractorium::InitXaosUI()
|
||||
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_XaosSpinBox->setDecimals(6);
|
||||
m_XaosSpinBox->setObjectName("XaosSpinBox");
|
||||
|
||||
m_XaosTableModel = nullptr;
|
||||
m_XaosTableItemDelegate = new DoubleSpinBoxTableItemDelegate(m_XaosSpinBox, this);
|
||||
@ -146,6 +147,12 @@ void Fractorium::FillXaosTable()
|
||||
|
||||
if (oldModel)
|
||||
delete oldModel;
|
||||
|
||||
//Needed to get the dark stylesheet to correctly color the top left corner button.
|
||||
auto widgetList = ui.XaosTableView->findChildren<QAbstractButton*>();
|
||||
|
||||
for (auto& it : widgetList)
|
||||
it->setEnabled(true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -31,32 +31,6 @@ void Fractorium::InitXformsUI()
|
||||
connect(ui.XformWeightNameTable, SIGNAL(cellChanged(int, int)), this, SLOT(OnXformNameChanged(int, int)), Qt::QueuedConnection);
|
||||
|
||||
ui.CurrentXformCombo->setProperty("soloxform", -1);
|
||||
/*
|
||||
ui.XformsTabWidget->setStyleSheet(
|
||||
|
||||
"QTabWidget::pane \n"
|
||||
"{\n"
|
||||
" border: 5px solid #898C95;\n"
|
||||
" font: 9pt "Segoe UI";\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"QTabWidget::tab-bar \n"
|
||||
"{\n"
|
||||
" bottom: -8px;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"DoubleSpinBox \n"
|
||||
"{\n"
|
||||
" font: 9pt "Segoe UI";\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"SpinBox \n"
|
||||
"{\n"
|
||||
" font: 9pt "Segoe UI";\n"
|
||||
"}"
|
||||
);
|
||||
*/
|
||||
|
||||
#ifndef WIN32
|
||||
//For some reason linux makes these 24x24, even though the designer explicitly says 16x16.
|
||||
ui.AddXformButton->setIconSize(QSize(16, 16));
|
||||
|
@ -16,8 +16,7 @@ void Fractorium::InitXformsAffineUI()
|
||||
table->horizontalHeader()->setSectionsClickable(true);
|
||||
table->verticalHeader()->setSectionResizeMode(QHeaderView::Stretch);
|
||||
table->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
|
||||
|
||||
connect(table->verticalHeader(), SIGNAL(sectionDoubleClicked(int)), this, SLOT(OnPreAffineRowDoubleClicked(int)), Qt::QueuedConnection);
|
||||
connect(table->verticalHeader(), SIGNAL(sectionDoubleClicked(int)), this, SLOT(OnPreAffineRowDoubleClicked(int)), Qt::QueuedConnection);
|
||||
connect(table->horizontalHeader(), SIGNAL(sectionDoubleClicked(int)), this, SLOT(OnPreAffineColDoubleClicked(int)), Qt::QueuedConnection);
|
||||
|
||||
//Pre affine spinners.
|
||||
@ -169,8 +168,10 @@ void Fractorium::InitXformsAffineUI()
|
||||
m_PostSpins[4] = m_PostY2Spin;
|
||||
m_PostSpins[5] = m_PostO2Spin;
|
||||
|
||||
ui.PostAffineGroupBox->setChecked(true);//Flip it once to force the disabling of the group box.
|
||||
ui.PostAffineGroupBox->setChecked(false);
|
||||
ui.PreAffineGroupBox->setChecked(false);//Flip both once to force enabling/disabling the disabling of the group boxes and the corner buttons.
|
||||
ui.PreAffineGroupBox->setChecked(true);//Pre affine enabled.
|
||||
ui.PostAffineGroupBox->setChecked(true);
|
||||
ui.PostAffineGroupBox->setChecked(false);//Post affine disabled.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -604,11 +605,20 @@ void FractoriumEmberController<T>::FillAffineWithXform(Xform<T>* xform, bool pre
|
||||
/// <summary>
|
||||
/// Trigger a redraw which will show or hide the circle affine transforms
|
||||
/// based on whether each group box is checked or not.
|
||||
/// Note that all sub buttons must manually be disabled/enabled in order to
|
||||
/// get the top left corner button in the proper state. This is needed so
|
||||
/// any style sheets can properly draw it based on its state.
|
||||
/// Without explicitly setting it, that button is never actually disabled.
|
||||
/// Called when the group box check box for pre or post affine is checked.
|
||||
/// </summary>
|
||||
/// <param name="on">Ignored</param>
|
||||
void Fractorium::OnAffineGroupBoxToggled(bool on)
|
||||
{
|
||||
auto widgetList = sender()->findChildren<QAbstractButton*>();
|
||||
|
||||
for (auto& it : widgetList)
|
||||
it->setEnabled(on);
|
||||
|
||||
ui.GLDisplay->update();
|
||||
}
|
||||
|
||||
|
@ -239,7 +239,6 @@ void FractoriumEmberController<T>::VariationSpinBoxValueChanged(double d)//Would
|
||||
if (xformVar)
|
||||
xform->DeleteVariationById(var->VariationId());
|
||||
|
||||
//widgetItem->setBackgroundColor(0, Qt::darkGray);//Ensure background is always white if weight goes to zero.
|
||||
widgetItem->setBackgroundColor(0, QColor(255, 255, 255));//Ensure background is always white if weight goes to zero.
|
||||
}
|
||||
else
|
||||
@ -256,7 +255,6 @@ void FractoriumEmberController<T>::VariationSpinBoxValueChanged(double d)//Would
|
||||
|
||||
newVar->m_Weight = d;
|
||||
xform->AddVariation(newVar);
|
||||
//widgetItem->setBackgroundColor(0, Qt::darkGray);//Set background to gray when a variation has non-zero weight in this xform.
|
||||
widgetItem->setBackgroundColor(0, QColor(200, 200, 200));//Set background to gray when a variation has non-zero weight in this xform.
|
||||
|
||||
//If they've added a new parametric variation, then grab the values currently in the spinners
|
||||
|
@ -1084,7 +1084,7 @@ int GLEmberController<T>::UpdateHover(v3T& glCoords)
|
||||
m_HoverType = HoverNone;
|
||||
|
||||
//If there's a selected/current xform, check it first so it gets precedence over the others.
|
||||
if (m_SelectedXform != nullptr)
|
||||
if (m_SelectedXform)
|
||||
{
|
||||
//These checks prevent highlighting the pre/post selected xform circle, when one is set to show all, and the other
|
||||
//is set to show current, and the user hovers over another xform, but doesn't select it, then moves the mouse
|
||||
|
BIN
Source/Fractorium/Icons/checkbox_checked.png
Normal file
BIN
Source/Fractorium/Icons/checkbox_checked.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 263 B |
BIN
Source/Fractorium/Icons/checkbox_unchecked.png
Normal file
BIN
Source/Fractorium/Icons/checkbox_unchecked.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 159 B |
@ -30,63 +30,10 @@ int main(int argc, char *argv[])
|
||||
putenv(const_cast<char*>("GPU_MAX_ALLOC_PERCENT=100"));
|
||||
#endif
|
||||
|
||||
#ifndef WIN32
|
||||
a.setStyleSheet("QGroupBox { border: 1px solid gray; border-radius: 3px; margin-top: 1.1em; background-color: transparent; } \n"
|
||||
"QTabBar::tab { height: 2.8ex; } \n"
|
||||
"QGroupBox::title "
|
||||
"{"
|
||||
" background-color: transparent;"
|
||||
" subcontrol-origin: margin; "
|
||||
//" left: 3px; "
|
||||
" subcontrol-position: top left;"
|
||||
" padding: 0 3px 0 3px;"
|
||||
//" padding: 2px;"
|
||||
"} \n"
|
||||
"QComboBox { margin-top: 0px; padding-bottom: 0px; }"
|
||||
);
|
||||
#endif
|
||||
|
||||
int rv = -1;
|
||||
|
||||
try
|
||||
{
|
||||
//a.setStyle(QStyleFactory::create("Fusion"));
|
||||
//QPalette darkPalette;
|
||||
/*darkPalette.setColor(QPalette::Window, QColor(53, 53, 53));
|
||||
darkPalette.setColor(QPalette::WindowText, Qt::white);
|
||||
darkPalette.setColor(QPalette::Base, QColor(25, 25, 25));
|
||||
darkPalette.setColor(QPalette::AlternateBase, QColor(53, 53, 53));
|
||||
darkPalette.setColor(QPalette::ToolTipBase, Qt::white);
|
||||
darkPalette.setColor(QPalette::ToolTipText, Qt::white);
|
||||
darkPalette.setColor(QPalette::Text, Qt::white);
|
||||
darkPalette.setColor(QPalette::Button, QColor(53, 53, 53));
|
||||
darkPalette.setColor(QPalette::ButtonText, Qt::white);
|
||||
darkPalette.setColor(QPalette::BrightText, Qt::red);
|
||||
darkPalette.setColor(QPalette::Link, QColor(42, 130, 218));
|
||||
|
||||
darkPalette.setColor(QPalette::Highlight, QColor(42, 130, 218));
|
||||
darkPalette.setColor(QPalette::HighlightedText, Qt::black);;*/
|
||||
|
||||
//darkPalette.setColor(QPalette::, Qt::lightGray);
|
||||
//darkPalette.setColor(QPalette::Window, Qt::darkGray);
|
||||
//darkPalette.setColor(QPalette::Disabled, QPalette::WindowText, Qt::red);
|
||||
//darkPalette.setColor(QPalette::Disabled, QPalette::ButtonText, Qt::blue);//Works for disabled buttons, but not for disabled menus.
|
||||
|
||||
//a.setPalette(darkPalette);
|
||||
//a.setStyleSheet("QToolTip { color: #ffffff; background-color: darkgray; border: 1px solid white; }");
|
||||
//a.setStyleSheet("QTableWidget { border-color: darkgray; }")
|
||||
//QString s;
|
||||
|
||||
//s = "QTableView, QSpinBox, QDoubleSpinBox, QGroupBox, QTreeWidget { background-color: darkGray; } ";
|
||||
//s += "QComboBox, QTextEdit, QLineEdit { background - color: lightGray; } ";
|
||||
//s += "QTabWidget { window-color: darkGray; } ";
|
||||
//a.setStyleSheet("{ color: rgb(85, 170, 0); }");
|
||||
//a.setStyleSheet("GLWidget { background-color: darkgray; }");
|
||||
//a.setStyleSheet("QTableView, QDoubleSpinBox { background-color: darkgray; }");//Works!
|
||||
//a.setStyleSheet(s);//Works!
|
||||
//a.setStyleSheet("QTableView, QSpinBox, QDoubleSpinBox, QTreeWidget, QTreeWidgetItem { background-color: darkgray; }");//QTreeWidgetItem not needed.
|
||||
//a.setStyleSheet("QTableView, DoubleSpinBox { background-color: darkgray; }");//Works!
|
||||
|
||||
Fractorium w;
|
||||
w.show();
|
||||
a.installEventFilter(&w);
|
||||
|
@ -74,6 +74,7 @@ bool FractoriumOptionsDialog::Double() { return ui.DoublePrecisionCheckBox->isCh
|
||||
bool FractoriumOptionsDialog::ShowAllXforms() { return ui.ShowAllXformsCheckBox->isChecked(); }
|
||||
bool FractoriumOptionsDialog::AutoUnique() { return ui.AutoUniqueCheckBox->isChecked(); }
|
||||
uint FractoriumOptionsDialog::ThreadCount() { return ui.ThreadCountSpin->value(); }
|
||||
uint FractoriumOptionsDialog::RandomCount() { return ui.RandomCountSpin->value(); }
|
||||
|
||||
/// <summary>
|
||||
/// The check state of one of the OpenCL devices was changed.
|
||||
@ -130,6 +131,7 @@ void FractoriumOptionsDialog::OnOpenCLCheckBoxStateChanged(int state)
|
||||
ui.CpuFilteringLogRadioButton->setEnabled(!checked);
|
||||
ui.OpenCLFilteringDERadioButton->setEnabled(checked);
|
||||
ui.OpenCLFilteringLogRadioButton->setEnabled(checked);
|
||||
ui.InteraciveCpuFilteringGroupBox->setEnabled(!checked);
|
||||
ui.InteraciveGpuFilteringGroupBox->setEnabled(checked);
|
||||
}
|
||||
|
||||
@ -178,6 +180,7 @@ void FractoriumOptionsDialog::GuiToData()
|
||||
m_Settings->Double(Double());
|
||||
m_Settings->ShowAllXforms(ShowAllXforms());
|
||||
m_Settings->ThreadCount(ThreadCount());
|
||||
m_Settings->RandomCount(RandomCount());
|
||||
m_Settings->CpuSubBatch(ui.CpuSubBatchSpin->value());
|
||||
m_Settings->OpenCLSubBatch(ui.OpenCLSubBatchSpin->value());
|
||||
m_Settings->CpuDEFilter(ui.CpuFilteringDERadioButton->isChecked());
|
||||
@ -212,6 +215,7 @@ void FractoriumOptionsDialog::DataToGui()
|
||||
ui.DoublePrecisionCheckBox->setChecked(m_Settings->Double());
|
||||
ui.ShowAllXformsCheckBox->setChecked(m_Settings->ShowAllXforms());
|
||||
ui.ThreadCountSpin->setValue(m_Settings->ThreadCount());
|
||||
ui.RandomCountSpin->setValue(m_Settings->RandomCount());
|
||||
ui.CpuSubBatchSpin->setValue(m_Settings->CpuSubBatch());
|
||||
ui.OpenCLSubBatchSpin->setValue(m_Settings->OpenCLSubBatch());
|
||||
SettingsToDeviceTable(ui.DeviceTable, devices);
|
||||
|
@ -47,6 +47,7 @@ private:
|
||||
bool ShowAllXforms();
|
||||
bool AutoUnique();
|
||||
uint ThreadCount();
|
||||
uint RandomCount();
|
||||
void DataToGui();
|
||||
void GuiToData();
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
||||
<string>Options</string>
|
||||
</property>
|
||||
<property name="sizeGripEnabled">
|
||||
<bool>true</bool>
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="leftMargin">
|
||||
@ -112,7 +112,7 @@
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="OpenCLCheckBox">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Use OpenCL to render if your video card supports it.</p><p>This is highly recommended as it will give fluid, real-time interactive editing.</p></body></html></string>
|
||||
<string><html><head/><body><p>Use OpenCL to render if your video card supports it.</p><p>This is highly recommended as it will provide fluid, real-time interactive editing.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Use OpenCL</string>
|
||||
@ -257,7 +257,7 @@
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<item row="8" column="0">
|
||||
<widget class="QSpinBox" name="ThreadCountSpin">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>The number of threads to use with CPU rendering.</p><p>Decrease for more responsive editing, increase for better performance.</p></body></html></string>
|
||||
@ -273,7 +273,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<item row="9" column="0">
|
||||
<widget class="QSpinBox" name="CpuSubBatchSpin">
|
||||
<property name="toolTip">
|
||||
<string>The number of 10,000 iteration chunks ran per thread on the CPU
|
||||
@ -290,7 +290,7 @@ in interactive mode for each mouse movement</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<item row="10" column="0">
|
||||
<widget class="QSpinBox" name="OpenCLSubBatchSpin">
|
||||
<property name="toolTip">
|
||||
<string>The number of ~8M iteration chunks ran using OpenCL
|
||||
@ -307,7 +307,7 @@ in interactive mode for each mouse movement</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<item row="11" column="0">
|
||||
<widget class="QGroupBox" name="InteraciveCpuFilteringGroupBox">
|
||||
<property name="title">
|
||||
<string>CPU Filtering</string>
|
||||
@ -354,7 +354,7 @@ in interactive mode for each mouse movement</string>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="0">
|
||||
<item row="12" column="0">
|
||||
<widget class="QGroupBox" name="InteraciveGpuFilteringGroupBox">
|
||||
<property name="title">
|
||||
<string>OpenCL Filtering</string>
|
||||
@ -398,6 +398,22 @@ in interactive mode for each mouse movement</string>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QSpinBox" name="RandomCountSpin">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>The number of random flames to generate on startup.</p><p>These are usually of low quality, so leave the count as 1 unless you are searching for good randoms.</p></body></html></string>
|
||||
</property>
|
||||
<property name="prefix">
|
||||
<string>Randoms </string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>99999</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="OptionsXmlSavingTab">
|
||||
@ -431,13 +447,13 @@ in interactive mode for each mouse movement</string>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>68</height>
|
||||
<height>67</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>68</height>
|
||||
<height>67</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
@ -624,13 +640,13 @@ in interactive mode for each mouse movement</string>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>68</height>
|
||||
<height>67</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>68</height>
|
||||
<height>67</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
@ -820,6 +836,7 @@ in interactive mode for each mouse movement</string>
|
||||
<tabstop>TransparencyCheckBox</tabstop>
|
||||
<tabstop>ShowAllXformsCheckBox</tabstop>
|
||||
<tabstop>ContinuousUpdateCheckBox</tabstop>
|
||||
<tabstop>RandomCountSpin</tabstop>
|
||||
<tabstop>ThreadCountSpin</tabstop>
|
||||
<tabstop>CpuSubBatchSpin</tabstop>
|
||||
<tabstop>OpenCLSubBatchSpin</tabstop>
|
||||
|
694
Source/Fractorium/QssDialog.cpp
Normal file
694
Source/Fractorium/QssDialog.cpp
Normal file
@ -0,0 +1,694 @@
|
||||
#include "FractoriumPch.h"
|
||||
#include "QssDialog.h"
|
||||
#include "ui_QssDialog.h"
|
||||
#include "qcssscanner.h"
|
||||
|
||||
/// <summary>
|
||||
/// The code in this file did not originate in Fractorium.
|
||||
/// It was taken either in whole or in part from the source code
|
||||
/// of Qt Creator. Their license applies.
|
||||
/// </summary>
|
||||
|
||||
/// <summary>
|
||||
/// Comparison for sorting object names.
|
||||
/// Strings not starting with the letter 'Q' take precedence.
|
||||
/// This has the effect of putting custom derived classes first before
|
||||
/// all Q* classes.
|
||||
/// </summary>
|
||||
/// <param name="s1">The first string to compare</param>
|
||||
/// <param name="s2">The second string to compare</param>
|
||||
/// <returns>True if s1 < s2 with special rules for 'Q' taken into account.</returns>
|
||||
bool CaseInsensitiveLessThanQ(const QString& s1, const QString& s2)
|
||||
{
|
||||
if (s1.length() && s2.length())
|
||||
{
|
||||
if (s1[0] == 'Q' && s2[0] == 'Q')
|
||||
return s1.toLower() < s2.toLower();
|
||||
else if (s1[0] == 'Q')
|
||||
return false;
|
||||
else if (s2[0] == 'Q')
|
||||
return true;
|
||||
else
|
||||
return s1.toLower() < s2.toLower();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Construct a QssDialog.
|
||||
/// This manually constructs much of the menu GUI via code rather
|
||||
/// than in the designer.
|
||||
/// </summary>
|
||||
/// <param name="parent">The main Fractorium window.</param>
|
||||
QssDialog::QssDialog(Fractorium* parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::QssDialog),
|
||||
m_FileDialog(nullptr),
|
||||
m_AddColorAction(new QAction(tr("Add Color"), this)),
|
||||
m_AddGeomAction(new QAction(tr("Add Geometry"), this)),
|
||||
m_AddBorderAction(new QAction(tr("Add Border"), this)),
|
||||
m_AddFontAction(new QAction(tr("Add Font..."), this)),
|
||||
m_AddStyleAction(new QAction(tr("Set Theme"), this))
|
||||
{
|
||||
ui->setupUi(this);
|
||||
m_Parent = parent;
|
||||
m_LastStyle = m_Parent->styleSheet();
|
||||
setWindowTitle("QSS Editor - default.qss");
|
||||
connect(ui->QssEdit, SIGNAL(textChanged()), this, SLOT(SlotTextChanged()));
|
||||
|
||||
QToolBar* toolBar = new QToolBar(this);
|
||||
QMenu* colorActionMenu = new QMenu(this);
|
||||
QMenu* geomActionMenu = new QMenu(this);
|
||||
QMenu* borderActionMenu = new QMenu(this);
|
||||
QMenu* styleActionMenu = new QMenu(this);
|
||||
|
||||
(m_ColorActionMapper = new QSignalMapper(this))->setMapping(m_AddColorAction, QString());
|
||||
(m_GeomActionMapper = new QSignalMapper(this))->setMapping(m_AddGeomAction, QString());
|
||||
(m_BorderActionMapper = new QSignalMapper(this))->setMapping(m_AddBorderAction, QString());
|
||||
(m_StyleActionMapper = new QSignalMapper(this))->setMapping(m_AddStyleAction, QString());
|
||||
|
||||
connect(ui->QssLoadButton, SIGNAL(clicked()), this, SLOT(LoadButton_clicked()), Qt::QueuedConnection);
|
||||
connect(ui->QssSaveButton, SIGNAL(clicked()), this, SLOT(SaveButton_clicked()), Qt::QueuedConnection);
|
||||
connect(ui->QssSaveDefaultButton, SIGNAL(clicked()), this, SLOT(SaveDefaultButton_clicked()), Qt::QueuedConnection);
|
||||
connect(ui->QssBasicButton, SIGNAL(clicked()), this, SLOT(BasicButton_clicked()), Qt::QueuedConnection);
|
||||
connect(ui->QssMediumButton, SIGNAL(clicked()), this, SLOT(MediumButton_clicked()), Qt::QueuedConnection);
|
||||
connect(ui->QssAdvancedButton, SIGNAL(clicked()), this, SLOT(AdvancedButton_clicked()), Qt::QueuedConnection);
|
||||
connect(m_AddFontAction, SIGNAL(triggered()), this, SLOT(SlotAddFont()));
|
||||
|
||||
QVector<QPair<QString, QString>> colorVec;
|
||||
|
||||
colorVec.reserve(12);
|
||||
colorVec.push_back(QPair<QString, QString>("color", ""));
|
||||
colorVec.push_back(QPair<QString, QString>("background-color", ""));
|
||||
colorVec.push_back(QPair<QString, QString>("alternate-background-color", ""));
|
||||
colorVec.push_back(QPair<QString, QString>("border-color", ""));
|
||||
colorVec.push_back(QPair<QString, QString>("border-top-color", ""));
|
||||
colorVec.push_back(QPair<QString, QString>("border-right-color", ""));
|
||||
colorVec.push_back(QPair<QString, QString>("border-bottom-color", ""));
|
||||
colorVec.push_back(QPair<QString, QString>("border-left-color", ""));
|
||||
colorVec.push_back(QPair<QString, QString>("gridline-color", ""));
|
||||
colorVec.push_back(QPair<QString, QString>("selection-color", ""));
|
||||
colorVec.push_back(QPair<QString, QString>("selection-background-color", ""));
|
||||
|
||||
for (auto& c : colorVec)
|
||||
{
|
||||
auto colorAction = colorActionMenu->addAction(c.first);
|
||||
|
||||
m_ColorMap[c.first] = c.second;
|
||||
connect(colorAction, SIGNAL(triggered()), m_ColorActionMapper, SLOT(map()));
|
||||
m_ColorActionMapper->setMapping(colorAction, c.first);
|
||||
}
|
||||
|
||||
QVector<QPair<QString, QString>> geomVec;
|
||||
|
||||
geomVec.reserve(12);
|
||||
geomVec.push_back(QPair<QString, QString>("width", "100px"));
|
||||
geomVec.push_back(QPair<QString, QString>("height", "50px"));
|
||||
geomVec.push_back(QPair<QString, QString>("spacing", "10"));
|
||||
geomVec.push_back(QPair<QString, QString>("padding", "3px"));
|
||||
geomVec.push_back(QPair<QString, QString>("padding-top", "3px"));
|
||||
geomVec.push_back(QPair<QString, QString>("padding-right", "3px"));
|
||||
geomVec.push_back(QPair<QString, QString>("padding-bottom", "3px"));
|
||||
geomVec.push_back(QPair<QString, QString>("padding-left", "3px"));
|
||||
geomVec.push_back(QPair<QString, QString>("margin", "3px"));
|
||||
geomVec.push_back(QPair<QString, QString>("margin-top", "3px"));
|
||||
geomVec.push_back(QPair<QString, QString>("margin-right", "3px"));
|
||||
geomVec.push_back(QPair<QString, QString>("margin-bottom", "3px"));
|
||||
geomVec.push_back(QPair<QString, QString>("margin-left", "3px"));
|
||||
|
||||
for (auto& g : geomVec)
|
||||
{
|
||||
auto geomAction = geomActionMenu->addAction(g.first);
|
||||
|
||||
m_GeomMap[g.first] = g.second;
|
||||
connect(geomAction, SIGNAL(triggered()), m_GeomActionMapper, SLOT(map()));
|
||||
m_GeomActionMapper->setMapping(geomAction, g.first);
|
||||
}
|
||||
|
||||
QVector<QPair<QString, QString>> borderVec;
|
||||
|
||||
borderVec.reserve(8);
|
||||
borderVec.push_back(QPair<QString, QString>("border", "1px solid black"));
|
||||
borderVec.push_back(QPair<QString, QString>("border-top", "1px inset black"));
|
||||
borderVec.push_back(QPair<QString, QString>("border-right", "1px outset black"));
|
||||
borderVec.push_back(QPair<QString, QString>("border-bottom", "1px ridge black"));
|
||||
borderVec.push_back(QPair<QString, QString>("border-left", "1px groove black"));
|
||||
borderVec.push_back(QPair<QString, QString>("border-style", "double"));
|
||||
borderVec.push_back(QPair<QString, QString>("border-width", "1px"));
|
||||
borderVec.push_back(QPair<QString, QString>("border-radius", "10px"));
|
||||
|
||||
for (auto& b : borderVec)
|
||||
{
|
||||
auto borderAction = borderActionMenu->addAction(b.first);
|
||||
|
||||
m_BorderMap[b.first] = b.second;
|
||||
connect(borderAction, SIGNAL(triggered()), m_BorderActionMapper, SLOT(map()));
|
||||
m_BorderActionMapper->setMapping(borderAction, b.first);
|
||||
}
|
||||
|
||||
auto styles = QStyleFactory::keys();
|
||||
|
||||
for (auto& s : styles)
|
||||
{
|
||||
auto styleAction = styleActionMenu->addAction(s);
|
||||
|
||||
m_StyleMap[s] = s;
|
||||
connect(styleAction, SIGNAL(triggered()), m_StyleActionMapper, SLOT(map()));
|
||||
m_StyleActionMapper->setMapping(styleAction, s);
|
||||
}
|
||||
|
||||
connect(m_ColorActionMapper, SIGNAL(mapped(QString)), this, SLOT(SlotAddColor(QString)));
|
||||
connect(m_GeomActionMapper, SIGNAL(mapped(QString)), this, SLOT(SlotAddGeom(QString)));
|
||||
connect(m_BorderActionMapper, SIGNAL(mapped(QString)), this, SLOT(SlotAddBorder(QString)));
|
||||
connect(m_StyleActionMapper, SIGNAL(mapped(QString)), this, SLOT(SlotSetTheme(QString)));
|
||||
|
||||
m_AddColorAction->setMenu(colorActionMenu);
|
||||
m_AddGeomAction->setMenu(geomActionMenu);
|
||||
m_AddBorderAction->setMenu(borderActionMenu);
|
||||
m_AddStyleAction->setMenu(styleActionMenu);
|
||||
|
||||
toolBar->addAction(m_AddColorAction);
|
||||
toolBar->addAction(m_AddGeomAction);
|
||||
toolBar->addAction(m_AddBorderAction);
|
||||
toolBar->addAction(m_AddFontAction);
|
||||
toolBar->addAction(m_AddStyleAction);
|
||||
ui->verticalLayout->insertWidget(0, toolBar);
|
||||
ui->QssEdit->setFocus();
|
||||
m_ApplyTimer = new QTimer(this);
|
||||
m_ApplyTimer->setSingleShot(true);
|
||||
m_ApplyTimer->setInterval(1000);
|
||||
connect(m_ApplyTimer, SIGNAL(timeout()), this, SLOT(SlotApplyCss()));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Destructor that stops the apply timer and deletes the ui.
|
||||
/// </summary>
|
||||
QssDialog::~QssDialog()
|
||||
{
|
||||
m_ApplyTimer->stop();
|
||||
delete ui;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Thin wrapper around getting the text from the main text box as plain text.
|
||||
/// </summary>
|
||||
/// <returns>The plain text of the main text box</returns>
|
||||
QString QssDialog::Text() const
|
||||
{
|
||||
return ui->QssEdit->toPlainText();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Thin wrapper around setting the text of the main text box.
|
||||
/// </summary>
|
||||
/// <param name="t">The text to set</param>
|
||||
void QssDialog::SetText(const QString& t)
|
||||
{
|
||||
ui->QssEdit->setText(t);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the class names of all objects in the application.
|
||||
/// This only makes one entry for each class type.
|
||||
/// It will also optionally return the object names as well for advanced QSS editing.
|
||||
/// </summary>
|
||||
/// <param name="includeObjectNames">Whether to get the individual object names as well</param>
|
||||
/// <returns>A list of all class names with optional entries for each individual object</returns>
|
||||
QList<QString> QssDialog::GetClassNames(bool includeObjectNames)
|
||||
{
|
||||
QSet<QString> classNames;
|
||||
QList<QList<QString>> dialogClassNames;
|
||||
auto widgetList = m_Parent->findChildren<QWidget*>();
|
||||
|
||||
for (int i = 0; i < widgetList.size(); i++)
|
||||
{
|
||||
auto classAndName = QString(widgetList[i]->metaObject()->className());
|
||||
|
||||
if (!includeObjectNames)
|
||||
{
|
||||
classNames.insert(classAndName);
|
||||
}
|
||||
else
|
||||
{
|
||||
auto dlg = qobject_cast<QDialog*>(widgetList[i]);
|
||||
|
||||
if (dlg)//Dialogs only nest one level deep, so no need for generalized recursion.
|
||||
{
|
||||
QSet<QString> dlgSet;
|
||||
auto dlgWidgetList = dlg->findChildren<QWidget*>();//Find all children of the dialog.
|
||||
|
||||
dlgSet.insert(classAndName);//Add the basic dialog class name, opening curly brace will be added later.
|
||||
classAndName += " ";
|
||||
|
||||
for (int i = 0; i < dlgWidgetList.size(); i++)
|
||||
{
|
||||
auto dlgClassAndName = classAndName + QString(dlgWidgetList[i]->metaObject()->className());
|
||||
dlgSet.insert(dlgClassAndName);
|
||||
|
||||
if (!dlgWidgetList[i]->objectName().isEmpty())//Add the class with object name for individual control customization.
|
||||
{
|
||||
dlgClassAndName += "#" + dlgWidgetList[i]->objectName();
|
||||
dlgSet.insert(dlgClassAndName);
|
||||
}
|
||||
}
|
||||
|
||||
auto dlgList = dlgSet.toList();//Convert set to list and sort.
|
||||
qSort(dlgList.begin(), dlgList.end(), CaseInsensitiveLessThanQ);
|
||||
dialogClassNames.push_back(dlgList);//Add this to the full list after sorting at the end.
|
||||
}
|
||||
else if (GetAllParents<QDialog*>(widgetList[i]).empty())//Skip widgets on dialogs, they are added above.
|
||||
{
|
||||
classNames.insert(classAndName);//Add the basic class name.
|
||||
|
||||
if (!widgetList[i]->objectName().isEmpty())//Add the class with object name for individual control customization.
|
||||
{
|
||||
classAndName += "#" + widgetList[i]->objectName();
|
||||
classNames.insert(classAndName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
auto l = classNames.toList();
|
||||
qSort(l.begin(), l.end(), CaseInsensitiveLessThanQ);
|
||||
|
||||
for (auto& d : dialogClassNames)
|
||||
l.append(d);
|
||||
|
||||
return l;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether the passed in stylesheet text is valid.
|
||||
/// If the initial parse fails, a second attempt is made by wrapping the entire
|
||||
/// text in curly braces.
|
||||
/// </summary>
|
||||
/// <param name="styleSheet">The stylesheet text to analyze.</param>
|
||||
/// <returns>True if valid, else false.</returns>
|
||||
bool QssDialog::IsStyleSheetValid(const QString& styleSheet)
|
||||
{
|
||||
QCss::Parser parser(styleSheet);
|
||||
QCss::StyleSheet sheet;
|
||||
if (parser.parse(&sheet))
|
||||
return true;
|
||||
QString fullSheet = QStringLiteral("* { ");
|
||||
fullSheet += styleSheet;
|
||||
fullSheet += QLatin1Char('}');
|
||||
QCss::Parser parser2(fullSheet);
|
||||
return parser2.parse(&sheet);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Save the current stylesheet text to default.qss.
|
||||
/// Also save the selected theme to the settings.
|
||||
/// Called when the user clicks ok.
|
||||
/// Not called if cancelled or closed with the X.
|
||||
/// </summary>
|
||||
void QssDialog::accept()
|
||||
{
|
||||
if (m_Theme)
|
||||
m_Parent->m_Settings->Theme(m_Theme->objectName());
|
||||
|
||||
SaveDefaultButton_clicked();
|
||||
QDialog::accept();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restore the stylesheet and theme to what it was when the dialog was opened.
|
||||
/// Called when the user clicks cancel or closes with the X.
|
||||
/// </summary>
|
||||
void QssDialog::reject()
|
||||
{
|
||||
if (!m_LastStyle.isEmpty())
|
||||
m_Parent->setStyleSheet(m_LastStyle);
|
||||
|
||||
if (m_LastTheme)
|
||||
{
|
||||
m_Parent->setStyle(m_LastTheme);
|
||||
m_Parent->m_Settings->Theme(m_LastTheme->objectName());
|
||||
}
|
||||
|
||||
QDialog::reject();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Shows the event.
|
||||
/// </summary>
|
||||
/// <param name="e">The e.</param>
|
||||
void QssDialog::showEvent(QShowEvent* e)
|
||||
{
|
||||
if (m_Parent)
|
||||
{
|
||||
m_LastStyle = m_Parent->styleSheet();
|
||||
m_LastTheme = m_Parent->m_Theme;//The style() member cannot be relied upon, it is *not* the same object passed to setStyle();
|
||||
SetText(m_LastStyle);
|
||||
}
|
||||
|
||||
QDialog::showEvent(e);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Start the timer which will analyze and apply the current stylesheet text.
|
||||
/// Each successive keystroke will reset the timer if it has not timed out yet.
|
||||
/// This is only called when the dialog is visible because it seems to be spurriously
|
||||
/// called on startup.
|
||||
/// Called when the user changes the text in main text box.
|
||||
/// </summary>
|
||||
void QssDialog::SlotTextChanged()
|
||||
{
|
||||
if (isVisible())//Sometimes this fires even though the window is not shown yet.
|
||||
m_ApplyTimer->start();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add a color string to the stylesheet text.
|
||||
/// Called when the user clicks the add color menu.
|
||||
/// </summary>
|
||||
/// <param name="s">The color string selector to add</param>
|
||||
void QssDialog::SlotAddColor(const QString& s)
|
||||
{
|
||||
const QColor color = QColorDialog::getColor(0xffffffff, this, QString(), QColorDialog::ShowAlphaChannel);
|
||||
|
||||
if (!color.isValid())
|
||||
return;
|
||||
|
||||
QString colorStr;
|
||||
|
||||
if (color.alpha() == 255)
|
||||
{
|
||||
colorStr = QString(QStringLiteral("rgb(%1, %2, %3)")).arg(
|
||||
color.red()).arg(color.green()).arg(color.blue());
|
||||
}
|
||||
else
|
||||
{
|
||||
colorStr = QString(QStringLiteral("rgba(%1, %2, %3, %4)")).arg(
|
||||
color.red()).arg(color.green()).arg(color.blue()).arg(color.alpha());
|
||||
}
|
||||
|
||||
InsertCssProperty(s, colorStr);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a geometry string to the stylesheet text.
|
||||
/// </summary>
|
||||
/// <param name="s">The geometry string to add</param>
|
||||
void QssDialog::SlotAddGeom(const QString& s)
|
||||
{
|
||||
auto val = m_GeomMap[s];
|
||||
|
||||
InsertCssProperty(s, val);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a border string to the stylesheet text.
|
||||
/// </summary>
|
||||
/// <param name="s">The border string to add</param>
|
||||
void QssDialog::SlotAddBorder(const QString& s)
|
||||
{
|
||||
auto val = m_BorderMap[s];
|
||||
|
||||
InsertCssProperty(s, val);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set the theme to the user selection.
|
||||
/// Called when the user selects an item on the theme combo box.
|
||||
/// </summary>
|
||||
/// <param name="s">The s.</param>
|
||||
void QssDialog::SlotSetTheme(const QString& s)
|
||||
{
|
||||
if (auto theme = QStyleFactory::create(s))
|
||||
{
|
||||
m_Theme = theme;
|
||||
m_Parent->setStyle(m_Theme);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add a font string.
|
||||
/// Called when the user clicks the add font menu button.
|
||||
/// </summary>
|
||||
void QssDialog::SlotAddFont()
|
||||
{
|
||||
bool ok;
|
||||
auto font = QFontDialog::getFont(&ok, this);
|
||||
|
||||
if (ok)
|
||||
{
|
||||
QString fontStr;
|
||||
|
||||
if (font.weight() != QFont::Normal)
|
||||
{
|
||||
fontStr += QString::number(font.weight());
|
||||
fontStr += QLatin1Char(' ');
|
||||
}
|
||||
|
||||
switch (font.style())
|
||||
{
|
||||
case QFont::StyleItalic:
|
||||
fontStr += QStringLiteral("italic ");
|
||||
break;
|
||||
case QFont::StyleOblique:
|
||||
fontStr += QStringLiteral("oblique ");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
fontStr += QString::number(font.pointSize());
|
||||
fontStr += QStringLiteral("pt \"");
|
||||
fontStr += font.family();
|
||||
fontStr += QLatin1Char('"');
|
||||
InsertCssProperty(QStringLiteral("font"), fontStr);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if the current stylesheet is valid and apply it if so.
|
||||
/// Also indicate via label whether it was valid.
|
||||
/// </summary>
|
||||
void QssDialog::SlotApplyCss()
|
||||
{
|
||||
auto label = ui->QssValidityLabel;
|
||||
auto style = Text();
|
||||
const bool valid = IsStyleSheetValid(style);
|
||||
ui->QssButtonBox->button(QDialogButtonBox::Ok)->setEnabled(valid);
|
||||
|
||||
if (valid)
|
||||
{
|
||||
label->setText(tr("Valid Style Sheet"));
|
||||
label->setStyleSheet(QStringLiteral("color: green"));
|
||||
m_Parent->setStyleSheet(style);
|
||||
}
|
||||
else
|
||||
{
|
||||
label->setText(tr("Invalid Style Sheet"));
|
||||
label->setStyleSheet(QStringLiteral("color: red"));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load a stylesheet from disk.
|
||||
/// Called when the user clicks the load button.
|
||||
/// </summary>
|
||||
void QssDialog::LoadButton_clicked()
|
||||
{
|
||||
string s;
|
||||
auto f = OpenFile();
|
||||
|
||||
if (!f.isEmpty() && ReadFile(f.toStdString().c_str(), s) && !s.empty())
|
||||
SetText(QString::fromStdString(s));
|
||||
|
||||
setWindowTitle("QSS Editor - " + f);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Save the stylesheet to disk.
|
||||
/// Called when the user clicks the save button.
|
||||
/// </summary>
|
||||
void QssDialog::SaveButton_clicked()
|
||||
{
|
||||
auto path = SaveFile();
|
||||
|
||||
if (!path.isEmpty())
|
||||
{
|
||||
ofstream of(path.toStdString());
|
||||
string s = Text().toStdString();
|
||||
|
||||
if (of.is_open())
|
||||
{
|
||||
of << s;
|
||||
of.close();
|
||||
}
|
||||
else
|
||||
QMessageBox::critical(this, "File open error", "Failed to open " + path + ", style will not be set as default");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Save the stylesheet to the default.qss on disk.
|
||||
/// This will be loaded the next time Fractorium runs.
|
||||
/// Called when the user clicks the save as default button.
|
||||
/// </summary>
|
||||
void QssDialog::SaveDefaultButton_clicked()
|
||||
{
|
||||
auto path = m_Parent->m_SettingsPath + "/default.qss";
|
||||
ofstream of(path.toStdString());
|
||||
auto s = Text().toStdString();
|
||||
|
||||
if (of.is_open())
|
||||
{
|
||||
of << s;
|
||||
of.close();
|
||||
}
|
||||
else
|
||||
QMessageBox::critical(this, "File open error", "Failed to open " + path + ", style will not be set as default");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fill the main text box with the most basic style.
|
||||
/// Called when the Basic button is clicked.
|
||||
/// </summary>
|
||||
void QssDialog::BasicButton_clicked()
|
||||
{
|
||||
SetText(BaseStyle());
|
||||
setWindowTitle("QSS Editor");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fill the main text box with a medium specificity style.
|
||||
/// This will expose all control types in the application.
|
||||
/// Called when the Medium button is clicked.
|
||||
/// </summary>
|
||||
void QssDialog::MediumButton_clicked()
|
||||
{
|
||||
QString str = BaseStyle();
|
||||
auto names = GetClassNames(false);
|
||||
|
||||
for (auto& it : names)
|
||||
str += it + QString("\n{\n\t\n}\n\n");
|
||||
|
||||
SetText(str);
|
||||
setWindowTitle("QSS Editor");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fill the main text box with the most advanced style.
|
||||
/// This will expose all control types in the application as well as their named instances.
|
||||
/// Called when the Advanced button is clicked.
|
||||
/// </summary>
|
||||
void QssDialog::AdvancedButton_clicked()
|
||||
{
|
||||
QString str = BaseStyle();
|
||||
auto names = GetClassNames(true);
|
||||
|
||||
for (auto& it : names)
|
||||
str += it + QString("\n{\n\t\n}\n\n");
|
||||
|
||||
SetText(str);
|
||||
setWindowTitle("QSS Editor");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Insert a CSS property.
|
||||
/// This is called whenever the user inserts a value via the menus.
|
||||
/// </summary>
|
||||
/// <param name="name">The name of the property to insert</param>
|
||||
/// <param name="value">The value of the property to insert</param>
|
||||
void QssDialog::InsertCssProperty(const QString& name, const QString& value)
|
||||
{
|
||||
auto editor = ui->QssEdit;
|
||||
auto cursor = editor->textCursor();
|
||||
|
||||
if (!name.isEmpty())
|
||||
{
|
||||
cursor.beginEditBlock();
|
||||
cursor.removeSelectedText();
|
||||
cursor.movePosition(QTextCursor::EndOfLine);
|
||||
|
||||
//Simple check to see if we're in a selector scope.
|
||||
const QTextDocument* doc = editor->document();
|
||||
const QTextCursor closing = doc->find(QStringLiteral("}"), cursor, QTextDocument::FindBackward);
|
||||
const QTextCursor opening = doc->find(QStringLiteral("{"), cursor, QTextDocument::FindBackward);
|
||||
const bool inSelector = !opening.isNull() && (closing.isNull() ||
|
||||
closing.position() < opening.position());
|
||||
QString insertion;
|
||||
|
||||
//Reasonable attempt at positioning things correctly. This can and often is wrong, but is sufficient for our purposes.
|
||||
if (editor->textCursor().block().length() != 1 && !editor->textCursor().block().text().isEmpty())
|
||||
insertion += QLatin1Char('\n');
|
||||
|
||||
if (inSelector && editor->textCursor().block().text() != "\t")
|
||||
insertion += QLatin1Char('\t');
|
||||
|
||||
insertion += name;
|
||||
insertion += QStringLiteral(": ");
|
||||
insertion += value;
|
||||
insertion += QLatin1Char(';');
|
||||
cursor.insertText(insertion);
|
||||
cursor.endEditBlock();
|
||||
}
|
||||
else
|
||||
{
|
||||
cursor.insertText(value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initial file dialog creation.
|
||||
/// This will perform lazy instantiation since it takes a long time.
|
||||
/// </summary>
|
||||
void QssDialog::SetupFileDialog()
|
||||
{
|
||||
if (!m_FileDialog)
|
||||
{
|
||||
auto path = m_Parent->m_SettingsPath;
|
||||
m_FileDialog = new QFileDialog(this);
|
||||
m_FileDialog->setDirectory(path);
|
||||
m_FileDialog->setViewMode(QFileDialog::List);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Present a file open dialog and retun the file selected.
|
||||
/// </summary>
|
||||
/// <returns>The file selected if any, else empty string.</returns>
|
||||
QString QssDialog::OpenFile()
|
||||
{
|
||||
QStringList filenames;
|
||||
|
||||
SetupFileDialog();
|
||||
|
||||
m_FileDialog->setFileMode(QFileDialog::ExistingFile);
|
||||
m_FileDialog->setAcceptMode(QFileDialog::AcceptOpen);
|
||||
m_FileDialog->setNameFilter("Qss (*.qss)");
|
||||
m_FileDialog->setWindowTitle("Open Stylesheet");
|
||||
m_FileDialog->selectNameFilter("*.qss");
|
||||
|
||||
if (m_FileDialog->exec() == QDialog::Accepted)
|
||||
filenames = m_FileDialog->selectedFiles();
|
||||
|
||||
return !filenames.empty() ? filenames[0] : "";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Present a file save dialog and retun the file selected.
|
||||
/// </summary>
|
||||
/// <returns>The file selected for saving if any, else empty string.</returns>
|
||||
QString QssDialog::SaveFile()
|
||||
{
|
||||
QStringList filenames;
|
||||
|
||||
SetupFileDialog();
|
||||
m_FileDialog->setFileMode(QFileDialog::AnyFile);
|
||||
m_FileDialog->setAcceptMode(QFileDialog::AcceptSave);
|
||||
m_FileDialog->setNameFilter("Qss (*.qss)");
|
||||
m_FileDialog->setWindowTitle("Save Stylesheet");
|
||||
m_FileDialog->selectNameFilter("*.qss");
|
||||
|
||||
if (m_FileDialog->exec() == QDialog::Accepted)
|
||||
filenames = m_FileDialog->selectedFiles();
|
||||
|
||||
return !filenames.empty() ? filenames[0] : "";
|
||||
}
|
141
Source/Fractorium/QssDialog.h
Normal file
141
Source/Fractorium/QssDialog.h
Normal file
@ -0,0 +1,141 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and Digia. For licensing terms and
|
||||
** conditions see http://qt.digia.com/licensing. For further information
|
||||
** use the contact form at http://qt.digia.com/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 2.1 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Digia gives you certain additional
|
||||
** rights. These rights are described in the Digia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3.0 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU General Public License version 3.0 requirements will be
|
||||
** met: http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include "Fractorium.h"
|
||||
#include "FractoriumCommon.h"
|
||||
#include "QssTextEdit.h"
|
||||
#include "qcssparser.h"
|
||||
|
||||
/// <summary>
|
||||
/// The code in this file did not originate in Fractorium.
|
||||
/// It was taken either in whole or in part from the source code
|
||||
/// of Qt Creator. Their license applies.
|
||||
/// </summary>
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class QssDialog;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A dialog for editing the stylesheet used in the application.
|
||||
/// This is meant to be used in the following way:
|
||||
/// On first run, no stylesheet is present/selected, so a basic style
|
||||
/// is used on startup. This style differs slightly between Windows and Linux. See BaseStyle() for details.
|
||||
/// If the user clicks Save as default or ok to exit the dialog, the text of this stylesheet will
|
||||
/// be saved to the application settings folder in the file default.qss.
|
||||
/// On all subsequent runs, the main window will detect the presence of default.qss and load it.
|
||||
/// The user can load a different stylesheet from disk, such as dark.qss which comes with the installation.
|
||||
/// They can save this back to disk (under a different name because dark.qss is made read only by the installer),
|
||||
/// however it will not become the default until they explicitly click the Save as default button or click ok.
|
||||
/// The other buttons Basic, Medium and Advanced produce an empty style sheet that gives access to various controls.
|
||||
/// Basic: Just the base style.
|
||||
/// Medium: Basic + every type of control in the application.
|
||||
/// Advanced: Medium + the name of every individual control in the application. It is not intended that the user fill
|
||||
/// out a custom style for every single control. Rather, it's to make them aware of the names of the controls in the
|
||||
/// event they want to set some custom styling for a specific control.
|
||||
/// For all practical purposes, the user will probably start with dark.qss, edit what they need and save to a new stylesheet,
|
||||
// then set that one as the default.
|
||||
/// </summary>
|
||||
class QssDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit QssDialog(Fractorium* parent);
|
||||
~QssDialog();
|
||||
|
||||
QString Text() const;
|
||||
void SetText(const QString& t);
|
||||
QList<QString> GetClassNames(bool includeObjectNames);
|
||||
static bool IsStyleSheetValid(const QString& styleSheet);
|
||||
|
||||
public slots:
|
||||
virtual void accept() override;
|
||||
virtual void reject() override;
|
||||
|
||||
protected:
|
||||
virtual void showEvent(QShowEvent* e) override;
|
||||
|
||||
private slots:
|
||||
void SlotTextChanged();
|
||||
void SlotAddColor(const QString& p);
|
||||
void SlotAddGeom(const QString& p);
|
||||
void SlotAddBorder(const QString& p);
|
||||
void SlotSetTheme(const QString& s);
|
||||
void SlotAddFont();
|
||||
void SlotApplyCss();
|
||||
|
||||
void LoadButton_clicked();
|
||||
void SaveButton_clicked();
|
||||
void SaveDefaultButton_clicked();
|
||||
void BasicButton_clicked();
|
||||
void MediumButton_clicked();
|
||||
void AdvancedButton_clicked();
|
||||
|
||||
private:
|
||||
void InsertCssProperty(const QString &name, const QString &value);
|
||||
void SetupFileDialog();
|
||||
QString OpenFile();
|
||||
QString SaveFile();
|
||||
|
||||
QStyle* m_Theme;
|
||||
QStyle* m_LastTheme;
|
||||
QString m_LastStyle;
|
||||
QAction* m_AddColorAction;
|
||||
QAction* m_AddGeomAction;
|
||||
QAction* m_AddBorderAction;
|
||||
QAction* m_AddFontAction;
|
||||
QAction* m_AddStyleAction;
|
||||
QSignalMapper* m_ColorActionMapper;
|
||||
QSignalMapper* m_GeomActionMapper;
|
||||
QSignalMapper* m_BorderActionMapper;
|
||||
QSignalMapper* m_StyleActionMapper;
|
||||
QHash<QString, QString> m_ColorMap;
|
||||
QHash<QString, QString> m_GeomMap;
|
||||
QHash<QString, QString> m_BorderMap;
|
||||
QHash<QString, QString> m_StyleMap;
|
||||
QTimer* m_ApplyTimer;
|
||||
Fractorium* m_Parent;
|
||||
QFileDialog* m_FileDialog;
|
||||
Ui::QssDialog *ui;
|
||||
};
|
160
Source/Fractorium/QssDialog.ui
Normal file
160
Source/Fractorium/QssDialog.ui
Normal file
@ -0,0 +1,160 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>QssDialog</class>
|
||||
<widget class="QDialog" name="QssDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1041</width>
|
||||
<height>644</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>QSS Editor</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="leftMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="QssHorizontalLayout">
|
||||
<item>
|
||||
<widget class="QssTextEdit" name="QssEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="QssVerticalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="QssLoadButton">
|
||||
<property name="text">
|
||||
<string>Load...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="QssSaveButton">
|
||||
<property name="text">
|
||||
<string>Save...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="QssSaveDefaultButton">
|
||||
<property name="text">
|
||||
<string>Save as default</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="QssBasicButton">
|
||||
<property name="text">
|
||||
<string>Basic</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="QssMediumButton">
|
||||
<property name="text">
|
||||
<string>Medium</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="QssAdvancedButton">
|
||||
<property name="text">
|
||||
<string>Advanced</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="QssVerticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="QssButtonBoxHorizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="QssValidityLabel">
|
||||
<property name="text">
|
||||
<string>Valid Qss</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="QssButtonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>QssTextEdit</class>
|
||||
<extends>QTextEdit</extends>
|
||||
<header>QssTextEdit.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>QssButtonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>QssDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>QssButtonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>QssDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
10
Source/Fractorium/QssTextEdit.cpp
Normal file
10
Source/Fractorium/QssTextEdit.cpp
Normal file
@ -0,0 +1,10 @@
|
||||
#include "FractoriumPch.h"
|
||||
#include "QssTextEdit.h"
|
||||
|
||||
QssTextEdit::QssTextEdit(QWidget* parent) :
|
||||
QTextEdit(parent)
|
||||
{
|
||||
setTabStopWidth(fontMetrics().width(QLatin1Char(' '))*4);
|
||||
setAcceptRichText(false);
|
||||
new CssHighlighter(document());
|
||||
}
|
56
Source/Fractorium/QssTextEdit.h
Normal file
56
Source/Fractorium/QssTextEdit.h
Normal file
@ -0,0 +1,56 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and Digia. For licensing terms and
|
||||
** conditions see http://qt.digia.com/licensing. For further information
|
||||
** use the contact form at http://qt.digia.com/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 2.1 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Digia gives you certain additional
|
||||
** rights. These rights are described in the Digia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3.0 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU General Public License version 3.0 requirements will be
|
||||
** met: http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include "FractoriumPch.h"
|
||||
#include "csshighlighter.h"
|
||||
|
||||
class QssTextEdit : public QTextEdit
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
QssTextEdit(QWidget* parent = nullptr);
|
||||
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
|
||||
};
|
@ -98,7 +98,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<layout class="QHBoxLayout" name="VariationsHorizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="SelectAllButton">
|
||||
<property name="text">
|
||||
|
178
Source/Fractorium/csshighlighter.cpp
Normal file
178
Source/Fractorium/csshighlighter.cpp
Normal file
@ -0,0 +1,178 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the Qt Designer of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL21$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and Digia. For licensing terms and
|
||||
** conditions see http://qt.digia.com/licensing. For further information
|
||||
** use the contact form at http://qt.digia.com/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 2.1 or version 3 as published by the Free
|
||||
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
|
||||
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
|
||||
** following information to ensure the GNU Lesser General Public License
|
||||
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Digia gives you certain additional
|
||||
** rights. These rights are described in the Digia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
#include "FractoriumPch.h"
|
||||
#include "csshighlighter.h"
|
||||
|
||||
/// <summary>
|
||||
/// The code in this file did not originate in Fractorium.
|
||||
/// It was taken either in whole or in part from the source code
|
||||
/// of Qt Creator. Their license applies.
|
||||
/// </summary>
|
||||
|
||||
CssHighlighter::CssHighlighter(QTextDocument *document)
|
||||
: QSyntaxHighlighter(document)
|
||||
{
|
||||
}
|
||||
|
||||
void CssHighlighter::highlightBlock(const QString& text)
|
||||
{
|
||||
enum Token { ALNUM, LBRACE, RBRACE, COLON, SEMICOLON, COMMA, QUOTE, SLASH, STAR };
|
||||
static const int transitions[10][9] = {
|
||||
{ Selector, Property, Selector, Pseudo, Property, Selector, Quote, MaybeComment, Selector }, // Selector
|
||||
{ Property, Property, Selector, Value, Property, Property, Quote, MaybeComment, Property }, // Property
|
||||
{ Value, Property, Selector, Value, Property, Value, Quote, MaybeComment, Value }, // Value
|
||||
{ Pseudo1, Property, Selector, Pseudo2, Selector, Selector, Quote, MaybeComment, Pseudo }, // Pseudo
|
||||
{ Pseudo1, Property, Selector, Pseudo, Selector, Selector, Quote, MaybeComment, Pseudo1 }, // Pseudo1
|
||||
{ Pseudo2, Property, Selector, Pseudo, Selector, Selector, Quote, MaybeComment, Pseudo2 }, // Pseudo2
|
||||
{ Quote, Quote, Quote, Quote, Quote, Quote, -1, Quote, Quote }, // Quote
|
||||
{ -1, -1, -1, -1, -1, -1, -1, -1, Comment }, // MaybeComment
|
||||
{ Comment, Comment, Comment, Comment, Comment, Comment, Comment, Comment, MaybeCommentEnd }, // Comment
|
||||
{ Comment, Comment, Comment, Comment, Comment, Comment, Comment, -1, MaybeCommentEnd } // MaybeCommentEnd
|
||||
};
|
||||
|
||||
int lastIndex = 0;
|
||||
bool lastWasSlash = false;
|
||||
int state = previousBlockState(), save_state;
|
||||
if (state == -1) {
|
||||
// As long as the text is empty, leave the state undetermined
|
||||
if (text.isEmpty()) {
|
||||
setCurrentBlockState(-1);
|
||||
return;
|
||||
}
|
||||
// The initial state is based on the precense of a : and the absense of a {.
|
||||
// This is because Qt style sheets support both a full stylesheet as well as
|
||||
// an inline form with just properties.
|
||||
state = save_state = (text.indexOf(QLatin1Char(':')) > -1 &&
|
||||
text.indexOf(QLatin1Char('{')) == -1) ? Property : Selector;
|
||||
} else {
|
||||
save_state = state>>16;
|
||||
state &= 0x00ff;
|
||||
}
|
||||
|
||||
if (state == MaybeCommentEnd) {
|
||||
state = Comment;
|
||||
} else if (state == MaybeComment) {
|
||||
state = save_state;
|
||||
}
|
||||
|
||||
for (int i = 0; i < text.length(); i++) {
|
||||
int token = ALNUM;
|
||||
const QChar c = text.at(i);
|
||||
const char a = c.toLatin1();
|
||||
|
||||
if (state == Quote) {
|
||||
if (a == '\\') {
|
||||
lastWasSlash = true;
|
||||
} else {
|
||||
if (a == '\"' && !lastWasSlash) {
|
||||
token = QUOTE;
|
||||
}
|
||||
lastWasSlash = false;
|
||||
}
|
||||
} else {
|
||||
switch (a) {
|
||||
case '{': token = LBRACE; break;
|
||||
case '}': token = RBRACE; break;
|
||||
case ':': token = COLON; break;
|
||||
case ';': token = SEMICOLON; break;
|
||||
case ',': token = COMMA; break;
|
||||
case '\"': token = QUOTE; break;
|
||||
case '/': token = SLASH; break;
|
||||
case '*': token = STAR; break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
int new_state = transitions[state][token];
|
||||
|
||||
if (new_state != state) {
|
||||
bool include_token = new_state == MaybeCommentEnd || (state == MaybeCommentEnd && new_state!= Comment)
|
||||
|| state == Quote;
|
||||
highlight(text, lastIndex, i-lastIndex+include_token, state);
|
||||
|
||||
if (new_state == Comment) {
|
||||
lastIndex = i-1; // include the slash and star
|
||||
} else {
|
||||
lastIndex = i + ((token == ALNUM || new_state == Quote) ? 0 : 1);
|
||||
}
|
||||
}
|
||||
|
||||
if (new_state == -1) {
|
||||
state = save_state;
|
||||
} else if (state <= Pseudo2) {
|
||||
save_state = state;
|
||||
state = new_state;
|
||||
} else {
|
||||
state = new_state;
|
||||
}
|
||||
}
|
||||
|
||||
highlight(text, lastIndex, text.length() - lastIndex, state);
|
||||
setCurrentBlockState(state + (save_state<<16));
|
||||
}
|
||||
|
||||
void CssHighlighter::highlight(const QString &text, int start, int length, int state)
|
||||
{
|
||||
if (start >= text.length() || length <= 0)
|
||||
return;
|
||||
|
||||
QTextCharFormat format;
|
||||
|
||||
switch (state) {
|
||||
case Selector:
|
||||
setFormat(start, length, QColor::fromRgb(43, 145, 175));//Teal, like the Visual Studio default for classes in C++ and C#.
|
||||
break;
|
||||
case Property:
|
||||
setFormat(start, length, Qt::darkBlue);
|
||||
break;
|
||||
case Value:
|
||||
setFormat(start, length, Qt::black);
|
||||
break;
|
||||
case Pseudo1:
|
||||
setFormat(start, length, Qt::darkRed);
|
||||
break;
|
||||
case Pseudo2:
|
||||
setFormat(start, length, Qt::black);
|
||||
break;
|
||||
case Quote:
|
||||
setFormat(start, length, Qt::darkMagenta);
|
||||
break;
|
||||
case Comment:
|
||||
case MaybeCommentEnd:
|
||||
format.setForeground(Qt::darkGreen);
|
||||
setFormat(start, length, format);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
67
Source/Fractorium/csshighlighter.h
Normal file
67
Source/Fractorium/csshighlighter.h
Normal file
@ -0,0 +1,67 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the Qt Designer of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL21$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and Digia. For licensing terms and
|
||||
** conditions see http://qt.digia.com/licensing. For further information
|
||||
** use the contact form at http://qt.digia.com/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 2.1 or version 3 as published by the Free
|
||||
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
|
||||
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
|
||||
** following information to ensure the GNU Lesser General Public License
|
||||
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Digia gives you certain additional
|
||||
** rights. These rights are described in the Digia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists for the convenience
|
||||
// of Qt Designer. This header
|
||||
// file may change from version to version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
#pragma once
|
||||
|
||||
#include "FractoriumPch.h"
|
||||
|
||||
/// <summary>
|
||||
/// The code in this file did not originate in Fractorium.
|
||||
/// It was taken either in whole or in part from the source code
|
||||
/// of Qt Creator. Their license applies.
|
||||
/// </summary>
|
||||
|
||||
class CssHighlighter : public QSyntaxHighlighter
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit CssHighlighter(QTextDocument *document);
|
||||
|
||||
protected:
|
||||
void highlightBlock(const QString&);
|
||||
void highlight(const QString&, int, int, int/*State*/);
|
||||
|
||||
private:
|
||||
enum State { Selector, Property, Value, Pseudo, Pseudo1, Pseudo2, Quote,
|
||||
MaybeComment, Comment, MaybeCommentEnd };
|
||||
};
|
2697
Source/Fractorium/qcssparser.cpp
Normal file
2697
Source/Fractorium/qcssparser.cpp
Normal file
File diff suppressed because it is too large
Load Diff
832
Source/Fractorium/qcssparser.h
Normal file
832
Source/Fractorium/qcssparser.h
Normal file
@ -0,0 +1,832 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and Digia. For licensing terms and
|
||||
** conditions see http://qt.digia.com/licensing. For further information
|
||||
** use the contact form at http://qt.digia.com/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 2.1 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Digia gives you certain additional
|
||||
** rights. These rights are described in the Digia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3.0 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU General Public License version 3.0 requirements will be
|
||||
** met: http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include "FractoriumPch.h"
|
||||
|
||||
/// <summary>
|
||||
/// The code in this file did not originate in Fractorium.
|
||||
/// It was taken either in whole or in part from the source code
|
||||
/// of Qt Creator. Their license applies.
|
||||
/// </summary>
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists for the convenience
|
||||
// of the QLibrary class. This header file may change from
|
||||
// version to version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
class QIcon;
|
||||
|
||||
namespace QCss
|
||||
{
|
||||
|
||||
enum Property {
|
||||
UnknownProperty,
|
||||
BackgroundColor,
|
||||
Color,
|
||||
Float,
|
||||
Font,
|
||||
FontFamily,
|
||||
FontSize,
|
||||
FontStyle,
|
||||
FontWeight,
|
||||
Margin,
|
||||
MarginBottom,
|
||||
MarginLeft,
|
||||
MarginRight,
|
||||
MarginTop,
|
||||
QtBlockIndent,
|
||||
QtListIndent,
|
||||
QtParagraphType,
|
||||
QtTableType,
|
||||
QtUserState,
|
||||
TextDecoration,
|
||||
TextIndent,
|
||||
TextUnderlineStyle,
|
||||
VerticalAlignment,
|
||||
Whitespace,
|
||||
QtSelectionForeground,
|
||||
QtSelectionBackground,
|
||||
Border,
|
||||
BorderLeft,
|
||||
BorderRight,
|
||||
BorderTop,
|
||||
BorderBottom,
|
||||
Padding,
|
||||
PaddingLeft,
|
||||
PaddingRight,
|
||||
PaddingTop,
|
||||
PaddingBottom,
|
||||
PageBreakBefore,
|
||||
PageBreakAfter,
|
||||
QtAlternateBackground,
|
||||
BorderLeftStyle,
|
||||
BorderRightStyle,
|
||||
BorderTopStyle,
|
||||
BorderBottomStyle,
|
||||
BorderStyles,
|
||||
BorderLeftColor,
|
||||
BorderRightColor,
|
||||
BorderTopColor,
|
||||
BorderBottomColor,
|
||||
BorderColor,
|
||||
BorderLeftWidth,
|
||||
BorderRightWidth,
|
||||
BorderTopWidth,
|
||||
BorderBottomWidth,
|
||||
BorderWidth,
|
||||
BorderTopLeftRadius,
|
||||
BorderTopRightRadius,
|
||||
BorderBottomLeftRadius,
|
||||
BorderBottomRightRadius,
|
||||
BorderRadius,
|
||||
Background,
|
||||
BackgroundOrigin,
|
||||
BackgroundClip,
|
||||
BackgroundRepeat,
|
||||
BackgroundPosition,
|
||||
BackgroundAttachment,
|
||||
BackgroundImage,
|
||||
BorderImage,
|
||||
QtSpacing,
|
||||
Width,
|
||||
Height,
|
||||
MinimumWidth,
|
||||
MinimumHeight,
|
||||
MaximumWidth,
|
||||
MaximumHeight,
|
||||
QtImage,
|
||||
Left,
|
||||
Right,
|
||||
Top,
|
||||
Bottom,
|
||||
QtOrigin,
|
||||
QtPosition,
|
||||
Position,
|
||||
QtStyleFeatures,
|
||||
QtBackgroundRole,
|
||||
ListStyleType,
|
||||
ListStyle,
|
||||
QtImageAlignment,
|
||||
TextAlignment,
|
||||
Outline,
|
||||
OutlineOffset,
|
||||
OutlineWidth,
|
||||
OutlineColor,
|
||||
OutlineStyle,
|
||||
OutlineRadius,
|
||||
OutlineTopLeftRadius,
|
||||
OutlineTopRightRadius,
|
||||
OutlineBottomLeftRadius,
|
||||
OutlineBottomRightRadius,
|
||||
FontVariant,
|
||||
TextTransform,
|
||||
QtListNumberPrefix,
|
||||
QtListNumberSuffix,
|
||||
LineHeight,
|
||||
NumProperties
|
||||
};
|
||||
|
||||
enum KnownValue {
|
||||
UnknownValue,
|
||||
Value_Normal,
|
||||
Value_Pre,
|
||||
Value_NoWrap,
|
||||
Value_PreWrap,
|
||||
Value_Small,
|
||||
Value_Medium,
|
||||
Value_Large,
|
||||
Value_XLarge,
|
||||
Value_XXLarge,
|
||||
Value_Italic,
|
||||
Value_Oblique,
|
||||
Value_Bold,
|
||||
Value_Underline,
|
||||
Value_Overline,
|
||||
Value_LineThrough,
|
||||
Value_Sub,
|
||||
Value_Super,
|
||||
Value_Left,
|
||||
Value_Right,
|
||||
Value_Top,
|
||||
Value_Bottom,
|
||||
Value_Center,
|
||||
Value_Native,
|
||||
Value_Solid,
|
||||
Value_Dotted,
|
||||
Value_Dashed,
|
||||
Value_DotDash,
|
||||
Value_DotDotDash,
|
||||
Value_Double,
|
||||
Value_Groove,
|
||||
Value_Ridge,
|
||||
Value_Inset,
|
||||
Value_Outset,
|
||||
Value_Wave,
|
||||
Value_Middle,
|
||||
Value_Auto,
|
||||
Value_Always,
|
||||
Value_None,
|
||||
Value_Transparent,
|
||||
Value_Disc,
|
||||
Value_Circle,
|
||||
Value_Square,
|
||||
Value_Decimal,
|
||||
Value_LowerAlpha,
|
||||
Value_UpperAlpha,
|
||||
Value_LowerRoman,
|
||||
Value_UpperRoman,
|
||||
Value_SmallCaps,
|
||||
Value_Uppercase,
|
||||
Value_Lowercase,
|
||||
|
||||
/* keep these in same order as QPalette::ColorRole */
|
||||
Value_FirstColorRole,
|
||||
Value_WindowText = Value_FirstColorRole,
|
||||
Value_Button,
|
||||
Value_Light,
|
||||
Value_Midlight,
|
||||
Value_Dark,
|
||||
Value_Mid,
|
||||
Value_Text,
|
||||
Value_BrightText,
|
||||
Value_ButtonText,
|
||||
Value_Base,
|
||||
Value_Window,
|
||||
Value_Shadow,
|
||||
Value_Highlight,
|
||||
Value_HighlightedText,
|
||||
Value_Link,
|
||||
Value_LinkVisited,
|
||||
Value_AlternateBase,
|
||||
Value_LastColorRole = Value_AlternateBase,
|
||||
|
||||
Value_Disabled,
|
||||
Value_Active,
|
||||
Value_Selected,
|
||||
Value_On,
|
||||
Value_Off,
|
||||
|
||||
NumKnownValues
|
||||
};
|
||||
|
||||
enum BorderStyle {
|
||||
BorderStyle_Unknown,
|
||||
BorderStyle_None,
|
||||
BorderStyle_Dotted,
|
||||
BorderStyle_Dashed,
|
||||
BorderStyle_Solid,
|
||||
BorderStyle_Double,
|
||||
BorderStyle_DotDash,
|
||||
BorderStyle_DotDotDash,
|
||||
BorderStyle_Groove,
|
||||
BorderStyle_Ridge,
|
||||
BorderStyle_Inset,
|
||||
BorderStyle_Outset,
|
||||
BorderStyle_Native,
|
||||
NumKnownBorderStyles
|
||||
};
|
||||
|
||||
enum Edge {
|
||||
TopEdge,
|
||||
RightEdge,
|
||||
BottomEdge,
|
||||
LeftEdge,
|
||||
NumEdges
|
||||
};
|
||||
|
||||
enum Corner {
|
||||
TopLeftCorner,
|
||||
TopRightCorner,
|
||||
BottomLeftCorner,
|
||||
BottomRightCorner
|
||||
};
|
||||
|
||||
enum TileMode {
|
||||
TileMode_Unknown,
|
||||
TileMode_Round,
|
||||
TileMode_Stretch,
|
||||
TileMode_Repeat,
|
||||
NumKnownTileModes
|
||||
};
|
||||
|
||||
enum Repeat {
|
||||
Repeat_Unknown,
|
||||
Repeat_None,
|
||||
Repeat_X,
|
||||
Repeat_Y,
|
||||
Repeat_XY,
|
||||
NumKnownRepeats
|
||||
};
|
||||
|
||||
enum Origin {
|
||||
Origin_Unknown,
|
||||
Origin_Padding,
|
||||
Origin_Border,
|
||||
Origin_Content,
|
||||
Origin_Margin,
|
||||
NumKnownOrigins
|
||||
};
|
||||
|
||||
enum PositionMode {
|
||||
PositionMode_Unknown,
|
||||
PositionMode_Static,
|
||||
PositionMode_Relative,
|
||||
PositionMode_Absolute,
|
||||
PositionMode_Fixed,
|
||||
NumKnownPositionModes
|
||||
};
|
||||
|
||||
enum Attachment {
|
||||
Attachment_Unknown,
|
||||
Attachment_Fixed,
|
||||
Attachment_Scroll,
|
||||
NumKnownAttachments
|
||||
};
|
||||
|
||||
enum StyleFeature {
|
||||
StyleFeature_None = 0,
|
||||
StyleFeature_BackgroundColor = 1,
|
||||
StyleFeature_BackgroundGradient = 2,
|
||||
NumKnownStyleFeatures = 4
|
||||
};
|
||||
|
||||
static inline bool isHexDigit(const char c)
|
||||
{
|
||||
return (c >= '0' && c <= '9')
|
||||
|| (c >= 'a' && c <= 'f')
|
||||
|| (c >= 'A' && c <= 'F')
|
||||
;
|
||||
}
|
||||
|
||||
struct Value
|
||||
{
|
||||
enum Type {
|
||||
Unknown,
|
||||
Number,
|
||||
Percentage,
|
||||
Length,
|
||||
String,
|
||||
Identifier,
|
||||
KnownIdentifier,
|
||||
Uri,
|
||||
Color,
|
||||
Function,
|
||||
TermOperatorSlash,
|
||||
TermOperatorComma
|
||||
};
|
||||
inline Value() : type(Unknown) { }
|
||||
Type type;
|
||||
QVariant variant;
|
||||
QString toString() const;
|
||||
};
|
||||
|
||||
struct ColorData {
|
||||
ColorData() : role(QPalette::NoRole), type(Invalid) {}
|
||||
ColorData(const QColor &col) : color(col), role(QPalette::NoRole), type(Color) {}
|
||||
ColorData(QPalette::ColorRole r) : role(r), type(Role) {}
|
||||
QColor color;
|
||||
QPalette::ColorRole role;
|
||||
enum { Invalid, Color, Role} type;
|
||||
};
|
||||
|
||||
struct BrushData {
|
||||
BrushData() : role(QPalette::NoRole), type(Invalid) {}
|
||||
BrushData(const QBrush &br) : brush(br), role(QPalette::NoRole), type(Brush) {}
|
||||
BrushData(QPalette::ColorRole r) : role(r), type(Role) {}
|
||||
QBrush brush;
|
||||
QPalette::ColorRole role;
|
||||
enum { Invalid, Brush, Role, DependsOnThePalette } type;
|
||||
};
|
||||
|
||||
struct BackgroundData {
|
||||
BrushData brush;
|
||||
QString image;
|
||||
Repeat repeat;
|
||||
Qt::Alignment alignment;
|
||||
};
|
||||
|
||||
struct LengthData {
|
||||
qreal number;
|
||||
enum { NONE, Px, Ex, Em } unit;
|
||||
};
|
||||
|
||||
struct BorderData {
|
||||
LengthData width;
|
||||
BorderStyle style;
|
||||
BrushData color;
|
||||
};
|
||||
|
||||
|
||||
// 1. StyleRule - x:hover, y:clicked > z:checked { prop1: value1; prop2: value2; }
|
||||
// 2. QVector<Selector> - x:hover, y:clicked z:checked
|
||||
// 3. QVector<BasicSelector> - y:clicked z:checked
|
||||
// 4. QVector<Declaration> - { prop1: value1; prop2: value2; }
|
||||
// 5. Declaration - prop1: value1;
|
||||
|
||||
struct Declaration
|
||||
{
|
||||
struct DeclarationData : public QSharedData
|
||||
{
|
||||
inline DeclarationData() : propertyId(UnknownProperty), important(false) {}
|
||||
QString property;
|
||||
Property propertyId;
|
||||
QVector<Value> values;
|
||||
QVariant parsed;
|
||||
bool important;
|
||||
};
|
||||
QExplicitlySharedDataPointer<DeclarationData> d;
|
||||
inline Declaration() : d(new DeclarationData()) {}
|
||||
inline bool isEmpty() const { return d->property.isEmpty() && d->propertyId == UnknownProperty; }
|
||||
|
||||
// helper functions
|
||||
QColor colorValue(const QPalette & = QPalette()) const;
|
||||
void colorValues(QColor *c, const QPalette & = QPalette()) const;
|
||||
QBrush brushValue(const QPalette & = QPalette()) const;
|
||||
void brushValues(QBrush *c, const QPalette & = QPalette()) const;
|
||||
|
||||
BorderStyle styleValue() const;
|
||||
void styleValues(BorderStyle *s) const;
|
||||
|
||||
Origin originValue() const;
|
||||
Repeat repeatValue() const;
|
||||
Qt::Alignment alignmentValue() const;
|
||||
PositionMode positionValue() const;
|
||||
Attachment attachmentValue() const;
|
||||
int styleFeaturesValue() const;
|
||||
|
||||
bool intValue(int *i, const char *unit = 0) const;
|
||||
bool realValue(qreal *r, const char *unit = 0) const;
|
||||
|
||||
QSize sizeValue() const;
|
||||
QRect rectValue() const;
|
||||
QString uriValue() const;
|
||||
QIcon iconValue() const;
|
||||
|
||||
void borderImageValue(QString *image, int *cuts, TileMode *h, TileMode *v) const;
|
||||
};
|
||||
|
||||
const quint64 PseudoClass_Unknown = Q_UINT64_C(0x0000000000000000);
|
||||
const quint64 PseudoClass_Enabled = Q_UINT64_C(0x0000000000000001);
|
||||
const quint64 PseudoClass_Disabled = Q_UINT64_C(0x0000000000000002);
|
||||
const quint64 PseudoClass_Pressed = Q_UINT64_C(0x0000000000000004);
|
||||
const quint64 PseudoClass_Focus = Q_UINT64_C(0x0000000000000008);
|
||||
const quint64 PseudoClass_Hover = Q_UINT64_C(0x0000000000000010);
|
||||
const quint64 PseudoClass_Checked = Q_UINT64_C(0x0000000000000020);
|
||||
const quint64 PseudoClass_Unchecked = Q_UINT64_C(0x0000000000000040);
|
||||
const quint64 PseudoClass_Indeterminate = Q_UINT64_C(0x0000000000000080);
|
||||
const quint64 PseudoClass_Unspecified = Q_UINT64_C(0x0000000000000100);
|
||||
const quint64 PseudoClass_Selected = Q_UINT64_C(0x0000000000000200);
|
||||
const quint64 PseudoClass_Horizontal = Q_UINT64_C(0x0000000000000400);
|
||||
const quint64 PseudoClass_Vertical = Q_UINT64_C(0x0000000000000800);
|
||||
const quint64 PseudoClass_Window = Q_UINT64_C(0x0000000000001000);
|
||||
const quint64 PseudoClass_Children = Q_UINT64_C(0x0000000000002000);
|
||||
const quint64 PseudoClass_Sibling = Q_UINT64_C(0x0000000000004000);
|
||||
const quint64 PseudoClass_Default = Q_UINT64_C(0x0000000000008000);
|
||||
const quint64 PseudoClass_First = Q_UINT64_C(0x0000000000010000);
|
||||
const quint64 PseudoClass_Last = Q_UINT64_C(0x0000000000020000);
|
||||
const quint64 PseudoClass_Middle = Q_UINT64_C(0x0000000000040000);
|
||||
const quint64 PseudoClass_OnlyOne = Q_UINT64_C(0x0000000000080000);
|
||||
const quint64 PseudoClass_PreviousSelected = Q_UINT64_C(0x0000000000100000);
|
||||
const quint64 PseudoClass_NextSelected = Q_UINT64_C(0x0000000000200000);
|
||||
const quint64 PseudoClass_Flat = Q_UINT64_C(0x0000000000400000);
|
||||
const quint64 PseudoClass_Left = Q_UINT64_C(0x0000000000800000);
|
||||
const quint64 PseudoClass_Right = Q_UINT64_C(0x0000000001000000);
|
||||
const quint64 PseudoClass_Top = Q_UINT64_C(0x0000000002000000);
|
||||
const quint64 PseudoClass_Bottom = Q_UINT64_C(0x0000000004000000);
|
||||
const quint64 PseudoClass_Exclusive = Q_UINT64_C(0x0000000008000000);
|
||||
const quint64 PseudoClass_NonExclusive = Q_UINT64_C(0x0000000010000000);
|
||||
const quint64 PseudoClass_Frameless = Q_UINT64_C(0x0000000020000000);
|
||||
const quint64 PseudoClass_ReadOnly = Q_UINT64_C(0x0000000040000000);
|
||||
const quint64 PseudoClass_Active = Q_UINT64_C(0x0000000080000000);
|
||||
const quint64 PseudoClass_Closable = Q_UINT64_C(0x0000000100000000);
|
||||
const quint64 PseudoClass_Movable = Q_UINT64_C(0x0000000200000000);
|
||||
const quint64 PseudoClass_Floatable = Q_UINT64_C(0x0000000400000000);
|
||||
const quint64 PseudoClass_Minimized = Q_UINT64_C(0x0000000800000000);
|
||||
const quint64 PseudoClass_Maximized = Q_UINT64_C(0x0000001000000000);
|
||||
const quint64 PseudoClass_On = Q_UINT64_C(0x0000002000000000);
|
||||
const quint64 PseudoClass_Off = Q_UINT64_C(0x0000004000000000);
|
||||
const quint64 PseudoClass_Editable = Q_UINT64_C(0x0000008000000000);
|
||||
const quint64 PseudoClass_Item = Q_UINT64_C(0x0000010000000000);
|
||||
const quint64 PseudoClass_Closed = Q_UINT64_C(0x0000020000000000);
|
||||
const quint64 PseudoClass_Open = Q_UINT64_C(0x0000040000000000);
|
||||
const quint64 PseudoClass_EditFocus = Q_UINT64_C(0x0000080000000000);
|
||||
const quint64 PseudoClass_Alternate = Q_UINT64_C(0x0000100000000000);
|
||||
// The Any specifier is never generated, but can be used as a wildcard in searches.
|
||||
const quint64 PseudoClass_Any = Q_UINT64_C(0x0000ffffffffffff);
|
||||
const int NumPseudos = 45;
|
||||
|
||||
struct Pseudo
|
||||
{
|
||||
Pseudo() : type(0), negated(false) { }
|
||||
quint64 type;
|
||||
QString name;
|
||||
QString function;
|
||||
bool negated;
|
||||
};
|
||||
|
||||
struct AttributeSelector
|
||||
{
|
||||
enum ValueMatchType {
|
||||
NoMatch,
|
||||
MatchEqual,
|
||||
MatchContains,
|
||||
MatchBeginsWith
|
||||
};
|
||||
inline AttributeSelector() : valueMatchCriterium(NoMatch) {}
|
||||
|
||||
QString name;
|
||||
QString value;
|
||||
ValueMatchType valueMatchCriterium;
|
||||
};
|
||||
|
||||
struct BasicSelector
|
||||
{
|
||||
inline BasicSelector() : relationToNext(NoRelation) {}
|
||||
|
||||
enum Relation {
|
||||
NoRelation,
|
||||
MatchNextSelectorIfAncestor,
|
||||
MatchNextSelectorIfParent,
|
||||
MatchNextSelectorIfPreceeds
|
||||
};
|
||||
|
||||
QString elementName;
|
||||
|
||||
QStringList ids;
|
||||
QVector<Pseudo> pseudos;
|
||||
QVector<AttributeSelector> attributeSelectors;
|
||||
|
||||
Relation relationToNext;
|
||||
};
|
||||
|
||||
struct Selector
|
||||
{
|
||||
QVector<BasicSelector> basicSelectors;
|
||||
int specificity() const;
|
||||
quint64 pseudoClass(quint64 *negated = 0) const;
|
||||
QString pseudoElement() const;
|
||||
};
|
||||
|
||||
struct StyleRule;
|
||||
struct MediaRule;
|
||||
struct PageRule;
|
||||
struct ImportRule;
|
||||
|
||||
struct ValueExtractor
|
||||
{
|
||||
ValueExtractor(const QVector<Declaration> &declarations, const QPalette & = QPalette());
|
||||
|
||||
bool extractFont(QFont *font, int *fontSizeAdjustment);
|
||||
bool extractBackground(QBrush *, QString *, Repeat *, Qt::Alignment *, QCss::Origin *, QCss::Attachment *,
|
||||
QCss::Origin *);
|
||||
bool extractGeometry(int *w, int *h, int *minw, int *minh, int *maxw, int *maxh);
|
||||
bool extractPosition(int *l, int *t, int *r, int *b, QCss::Origin *, Qt::Alignment *,
|
||||
QCss::PositionMode *, Qt::Alignment *);
|
||||
bool extractBox(int *margins, int *paddings, int *spacing = 0);
|
||||
bool extractBorder(int *borders, QBrush *colors, BorderStyle *Styles, QSize *radii);
|
||||
bool extractOutline(int *borders, QBrush *colors, BorderStyle *Styles, QSize *radii, int *offsets);
|
||||
bool extractPalette(QBrush *fg, QBrush *sfg, QBrush *sbg, QBrush *abg);
|
||||
int extractStyleFeatures();
|
||||
bool extractImage(QIcon *icon, Qt::Alignment *a, QSize *size);
|
||||
|
||||
int lengthValue(const Declaration &decl);
|
||||
|
||||
private:
|
||||
void extractFont();
|
||||
void borderValue(const Declaration &decl, int *width, QCss::BorderStyle *style, QBrush *color);
|
||||
LengthData lengthValue(const Value& v);
|
||||
void lengthValues(const Declaration &decl, int *m);
|
||||
QSize sizeValue(const Declaration &decl);
|
||||
void sizeValues(const Declaration &decl, QSize *radii);
|
||||
|
||||
QVector<Declaration> declarations;
|
||||
QFont f;
|
||||
int adjustment;
|
||||
int fontExtracted;
|
||||
QPalette pal;
|
||||
};
|
||||
|
||||
struct StyleRule
|
||||
{
|
||||
StyleRule() : order(0) { }
|
||||
QVector<Selector> selectors;
|
||||
QVector<Declaration> declarations;
|
||||
int order;
|
||||
};
|
||||
|
||||
struct MediaRule
|
||||
{
|
||||
QStringList media;
|
||||
QVector<StyleRule> styleRules;
|
||||
};
|
||||
|
||||
struct PageRule
|
||||
{
|
||||
QString selector;
|
||||
QVector<Declaration> declarations;
|
||||
};
|
||||
|
||||
struct ImportRule
|
||||
{
|
||||
QString href;
|
||||
QStringList media;
|
||||
};
|
||||
|
||||
enum StyleSheetOrigin {
|
||||
StyleSheetOrigin_Unspecified,
|
||||
StyleSheetOrigin_UserAgent,
|
||||
StyleSheetOrigin_User,
|
||||
StyleSheetOrigin_Author,
|
||||
StyleSheetOrigin_Inline
|
||||
};
|
||||
|
||||
struct StyleSheet
|
||||
{
|
||||
StyleSheet() : origin(StyleSheetOrigin_Unspecified), depth(0) { }
|
||||
QVector<StyleRule> styleRules; //only contains rules that are not indexed
|
||||
QVector<MediaRule> mediaRules;
|
||||
QVector<PageRule> pageRules;
|
||||
QVector<ImportRule> importRules;
|
||||
StyleSheetOrigin origin;
|
||||
int depth; // applicable only for inline style sheets
|
||||
QMultiHash<QString, StyleRule> nameIndex;
|
||||
QMultiHash<QString, StyleRule> idIndex;
|
||||
void buildIndexes(Qt::CaseSensitivity nameCaseSensitivity = Qt::CaseSensitive);
|
||||
};
|
||||
|
||||
class StyleSelector
|
||||
{
|
||||
public:
|
||||
StyleSelector() : nameCaseSensitivity(Qt::CaseSensitive) {}
|
||||
virtual ~StyleSelector();
|
||||
|
||||
union NodePtr {
|
||||
void *ptr;
|
||||
int id;
|
||||
};
|
||||
|
||||
QVector<StyleRule> styleRulesForNode(NodePtr node);
|
||||
QVector<Declaration> declarationsForNode(NodePtr node, const char *extraPseudo = 0);
|
||||
|
||||
virtual bool nodeNameEquals(NodePtr node, const QString& nodeName) const;
|
||||
virtual QString attribute(NodePtr node, const QString &name) const = 0;
|
||||
virtual bool hasAttributes(NodePtr node) const = 0;
|
||||
virtual QStringList nodeIds(NodePtr node) const;
|
||||
virtual QStringList nodeNames(NodePtr node) const = 0;
|
||||
virtual bool isNullNode(NodePtr node) const = 0;
|
||||
virtual NodePtr parentNode(NodePtr node) const = 0;
|
||||
virtual NodePtr previousSiblingNode(NodePtr node) const = 0;
|
||||
virtual NodePtr duplicateNode(NodePtr node) const = 0;
|
||||
virtual void freeNode(NodePtr node) const = 0;
|
||||
|
||||
QVector<StyleSheet> styleSheets;
|
||||
QString medium;
|
||||
Qt::CaseSensitivity nameCaseSensitivity;
|
||||
private:
|
||||
void matchRule(NodePtr node, const StyleRule &rules, StyleSheetOrigin origin,
|
||||
int depth, QMap<uint, StyleRule> *weightedRules);
|
||||
bool selectorMatches(const Selector &rule, NodePtr node);
|
||||
bool basicSelectorMatches(const BasicSelector &rule, NodePtr node);
|
||||
};
|
||||
|
||||
enum TokenType {
|
||||
NONE,
|
||||
|
||||
S,
|
||||
|
||||
CDO,
|
||||
CDC,
|
||||
INCLUDES,
|
||||
DASHMATCH,
|
||||
|
||||
LBRACE,
|
||||
PLUS,
|
||||
GREATER,
|
||||
COMMA,
|
||||
|
||||
STRING,
|
||||
INVALID,
|
||||
|
||||
IDENT,
|
||||
|
||||
HASH,
|
||||
|
||||
ATKEYWORD_SYM,
|
||||
|
||||
EXCLAMATION_SYM,
|
||||
|
||||
LENGTH,
|
||||
|
||||
PERCENTAGE,
|
||||
NUMBER,
|
||||
|
||||
FUNCTION,
|
||||
|
||||
COLON,
|
||||
SEMICOLON,
|
||||
RBRACE,
|
||||
SLASH,
|
||||
MINUS,
|
||||
DOT,
|
||||
STAR,
|
||||
LBRACKET,
|
||||
RBRACKET,
|
||||
EQUAL,
|
||||
LPAREN,
|
||||
RPAREN,
|
||||
OR
|
||||
};
|
||||
|
||||
struct Symbol
|
||||
{
|
||||
inline Symbol() : token(NONE), start(0), len(-1) {}
|
||||
TokenType token;
|
||||
QString text;
|
||||
int start, len;
|
||||
QString lexem() const;
|
||||
};
|
||||
|
||||
class Scanner
|
||||
{
|
||||
public:
|
||||
static QString preprocess(const QString &input, bool *hasEscapeSequences = 0);
|
||||
static void scan(const QString &preprocessedInput, QVector<Symbol> *symbols);
|
||||
};
|
||||
|
||||
class Parser
|
||||
{
|
||||
public:
|
||||
Parser();
|
||||
explicit Parser(const QString &css, bool file = false);
|
||||
|
||||
void init(const QString &css, bool file = false);
|
||||
bool parse(StyleSheet *styleSheet, Qt::CaseSensitivity nameCaseSensitivity = Qt::CaseSensitive);
|
||||
Symbol errorSymbol();
|
||||
|
||||
bool parseImport(ImportRule *importRule);
|
||||
bool parseMedia(MediaRule *mediaRule);
|
||||
bool parseMedium(QStringList *media);
|
||||
bool parsePage(PageRule *pageRule);
|
||||
bool parsePseudoPage(QString *selector);
|
||||
bool parseNextOperator(Value *value);
|
||||
bool parseCombinator(BasicSelector::Relation *relation);
|
||||
bool parseProperty(Declaration *decl);
|
||||
bool parseRuleset(StyleRule *styleRule);
|
||||
bool parseSelector(Selector *sel);
|
||||
bool parseSimpleSelector(BasicSelector *basicSel);
|
||||
bool parseClass(QString *name);
|
||||
bool parseElementName(QString *name);
|
||||
bool parseAttrib(AttributeSelector *attr);
|
||||
bool parsePseudo(Pseudo *pseudo);
|
||||
bool parseNextDeclaration(Declaration *declaration);
|
||||
bool parsePrio(Declaration *declaration);
|
||||
bool parseExpr(QVector<Value> *values);
|
||||
bool parseTerm(Value *value);
|
||||
bool parseFunction(QString *name, QString *args);
|
||||
bool parseHexColor(QColor *col);
|
||||
bool testAndParseUri(QString *uri);
|
||||
|
||||
inline bool testRuleset() { return testSelector(); }
|
||||
inline bool testSelector() { return testSimpleSelector(); }
|
||||
inline bool parseNextSelector(Selector *sel) { if (!testSelector()) return recordError(); return parseSelector(sel); }
|
||||
bool testSimpleSelector();
|
||||
inline bool parseNextSimpleSelector(BasicSelector *basicSel) { if (!testSimpleSelector()) return recordError(); return parseSimpleSelector(basicSel); }
|
||||
inline bool testElementName() { return test(IDENT) || test(STAR); }
|
||||
inline bool testClass() { return test(DOT); }
|
||||
inline bool testAttrib() { return test(LBRACKET); }
|
||||
inline bool testPseudo() { return test(COLON); }
|
||||
inline bool testMedium() { return test(IDENT); }
|
||||
inline bool parseNextMedium(QStringList *media) { if (!testMedium()) return recordError(); return parseMedium(media); }
|
||||
inline bool testPseudoPage() { return test(COLON); }
|
||||
inline bool testImport() { return testTokenAndEndsWith(ATKEYWORD_SYM, QLatin1String("import")); }
|
||||
inline bool testMedia() { return testTokenAndEndsWith(ATKEYWORD_SYM, QLatin1String("media")); }
|
||||
inline bool testPage() { return testTokenAndEndsWith(ATKEYWORD_SYM, QLatin1String("page")); }
|
||||
inline bool testCombinator() { return test(PLUS) || test(GREATER) || test(S); }
|
||||
inline bool testProperty() { return test(IDENT); }
|
||||
bool testTerm();
|
||||
inline bool testExpr() { return testTerm(); }
|
||||
inline bool parseNextExpr(QVector<Value> *values) { if (!testExpr()) return recordError(); return parseExpr(values); }
|
||||
bool testPrio();
|
||||
inline bool testHexColor() { return test(HASH); }
|
||||
inline bool testFunction() { return test(FUNCTION); }
|
||||
inline bool parseNextFunction(QString *name, QString *args) { if (!testFunction()) return recordError(); return parseFunction(name, args); }
|
||||
|
||||
inline bool lookupElementName() const { return lookup() == IDENT || lookup() == STAR; }
|
||||
|
||||
inline void skipSpace() { while (test(S)) {}; }
|
||||
|
||||
inline bool hasNext() const { return index < symbols.count(); }
|
||||
inline TokenType next() { return symbols.at(index++).token; }
|
||||
bool next(TokenType t);
|
||||
bool test(TokenType t);
|
||||
inline void prev() { index--; }
|
||||
inline const Symbol &symbol() const { return symbols.at(index - 1); }
|
||||
inline QString lexem() const { return symbol().lexem(); }
|
||||
QString unquotedLexem() const;
|
||||
QString lexemUntil(TokenType t);
|
||||
bool until(TokenType target, TokenType target2 = NONE);
|
||||
inline TokenType lookup() const {
|
||||
return (index - 1) < symbols.count() ? symbols.at(index - 1).token : NONE;
|
||||
}
|
||||
|
||||
bool testTokenAndEndsWith(TokenType t, QLatin1String str);
|
||||
|
||||
inline bool recordError() { errorIndex = index; return false; }
|
||||
|
||||
QVector<Symbol> symbols;
|
||||
int index;
|
||||
int errorIndex;
|
||||
bool hasEscapeSequences;
|
||||
QString sourcePath;
|
||||
};
|
||||
|
||||
} // namespace QCss
|
||||
|
||||
Q_DECLARE_METATYPE( QCss::BackgroundData )
|
||||
Q_DECLARE_METATYPE( QCss::LengthData )
|
||||
Q_DECLARE_METATYPE( QCss::BorderData )
|
1171
Source/Fractorium/qcssscanner.cpp
Normal file
1171
Source/Fractorium/qcssscanner.cpp
Normal file
File diff suppressed because it is too large
Load Diff
62
Source/Fractorium/qcssscanner.h
Normal file
62
Source/Fractorium/qcssscanner.h
Normal file
@ -0,0 +1,62 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL21$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and Digia. For licensing terms and
|
||||
** conditions see http://qt.digia.com/licensing. For further information
|
||||
** use the contact form at http://qt.digia.com/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 2.1 or version 3 as published by the Free
|
||||
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
|
||||
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
|
||||
** following information to ensure the GNU Lesser General Public License
|
||||
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Digia gives you certain additional
|
||||
** rights. These rights are described in the Digia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
#include "FractoriumPch.h"
|
||||
#include "qcssparser.h"
|
||||
|
||||
/// <summary>
|
||||
/// The code in this file did not originate in Fractorium.
|
||||
/// It was taken either in whole or in part from the source code
|
||||
/// of Qt Creator. Their license applies.
|
||||
/// </summary>
|
||||
|
||||
namespace QCss
|
||||
{
|
||||
// auto generated. DO NOT EDIT.
|
||||
class QCssScanner
|
||||
{
|
||||
public:
|
||||
QCssScanner(const QString &inp);
|
||||
|
||||
inline QChar next() {
|
||||
return (pos < input.length()) ? input.at(pos++) : QChar();
|
||||
}
|
||||
int handleCommentStart();
|
||||
int lex();
|
||||
|
||||
QString input;
|
||||
int pos;
|
||||
int lexemStart;
|
||||
int lexemLength;
|
||||
};
|
||||
}
|
77
Source/Fractorium/qfunctions.h
Normal file
77
Source/Fractorium/qfunctions.h
Normal file
@ -0,0 +1,77 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and Digia. For licensing terms and
|
||||
** conditions see http://qt.digia.com/licensing. For further information
|
||||
** use the contact form at http://qt.digia.com/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 2.1 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Digia gives you certain additional
|
||||
** rights. These rights are described in the Digia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3.0 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU General Public License version 3.0 requirements will be
|
||||
** met: http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists for the convenience
|
||||
// of qfunctions_*. This header file may change from version to version
|
||||
// without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
#pragma once
|
||||
|
||||
/// <summary>
|
||||
/// The code in this file did not originate in Fractorium.
|
||||
/// It was taken either in whole or in part from the source code
|
||||
/// of Qt Creator. Their license applies.
|
||||
/// </summary>
|
||||
|
||||
#if defined(Q_OS_WINCE)
|
||||
# include "QtCore/qfunctions_wince.h"
|
||||
#elif defined(Q_OS_VXWORKS)
|
||||
# include "QtCore/qfunctions_vxworks.h"
|
||||
#elif defined(Q_OS_NACL)
|
||||
# include "QtCore/qfunctions_nacl.h"
|
||||
#elif defined(Q_OS_WINRT)
|
||||
# include "QtCore/qfunctions_winrt.h"
|
||||
#endif
|
||||
|
||||
#ifdef Q_CC_RVCT
|
||||
// rvct doesn't see static operators when using our qalgorithms
|
||||
# define Q_STATIC_GLOBAL_OPERATOR inline
|
||||
# define Q_STATIC_GLOBAL_INLINE_OPERATOR inline
|
||||
#else
|
||||
# define Q_STATIC_GLOBAL_OPERATOR static
|
||||
# define Q_STATIC_GLOBAL_INLINE_OPERATOR static inline
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user