summaryrefslogtreecommitdiffhomepage
path: root/qfunctionconfigurator
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-03-22 20:48:17 +0100
committerStanislaw Halik <sthalik@misaki.pl>2013-03-22 20:48:17 +0100
commit3089c4bbc10e98d18f43e8a70e7a3d0c0eaf0900 (patch)
treec6f985472c05372417ecd4a861f6c2f346b63fd3 /qfunctionconfigurator
parent3e1515e88c6f750c193ed9b9908d8a9c09e5b025 (diff)
Downcase. PLEASE TURN OFF IGNORING CASE IN GIT CONFIG!!!
.git/config: [core] ignorecase = false
Diffstat (limited to 'qfunctionconfigurator')
-rw-r--r--qfunctionconfigurator/Prerequisites for using widget in Qt Designer.pngbin0 -> 21422 bytes
-rw-r--r--qfunctionconfigurator/QFunctionConfigurator.sln20
-rw-r--r--qfunctionconfigurator/QFunctionConfigurator/FunctionConfig.cppbin0 -> 17350 bytes
-rw-r--r--qfunctionconfigurator/QFunctionConfigurator/FunctionConfig.hbin0 -> 3888 bytes
-rw-r--r--qfunctionconfigurator/QFunctionConfigurator/QFunctionConfigurator.vcproj355
-rw-r--r--qfunctionconfigurator/QFunctionConfigurator/QFunctionConfigurator_vc9.vcproj354
-rw-r--r--qfunctionconfigurator/QFunctionConfigurator/postbuild.bat30
-rw-r--r--qfunctionconfigurator/QFunctionConfigurator/qfunctionconfigurator.cpp721
-rw-r--r--qfunctionconfigurator/QFunctionConfigurator/qfunctionconfigurator.h206
-rw-r--r--qfunctionconfigurator/QFunctionConfigurator/qfunctionconfiguratorplugin.cpp146
-rw-r--r--qfunctionconfigurator/QFunctionConfigurator/qfunctionconfiguratorplugin.h30
-rw-r--r--qfunctionconfigurator/QFunctionConfigurator_vc9.sln20
12 files changed, 1882 insertions, 0 deletions
diff --git a/qfunctionconfigurator/Prerequisites for using widget in Qt Designer.png b/qfunctionconfigurator/Prerequisites for using widget in Qt Designer.png
new file mode 100644
index 00000000..6e4d8903
--- /dev/null
+++ b/qfunctionconfigurator/Prerequisites for using widget in Qt Designer.png
Binary files differ
diff --git a/qfunctionconfigurator/QFunctionConfigurator.sln b/qfunctionconfigurator/QFunctionConfigurator.sln
new file mode 100644
index 00000000..91b827df
--- /dev/null
+++ b/qfunctionconfigurator/QFunctionConfigurator.sln
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QFunctionConfigurator", "QFunctionConfigurator\QFunctionConfigurator.vcproj", "{2527B683-7EFC-4D51-B25A-843668649C54}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {2527B683-7EFC-4D51-B25A-843668649C54}.Debug|Win32.ActiveCfg = Debug|Win32
+ {2527B683-7EFC-4D51-B25A-843668649C54}.Debug|Win32.Build.0 = Debug|Win32
+ {2527B683-7EFC-4D51-B25A-843668649C54}.Release|Win32.ActiveCfg = Release|Win32
+ {2527B683-7EFC-4D51-B25A-843668649C54}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/qfunctionconfigurator/QFunctionConfigurator/FunctionConfig.cpp b/qfunctionconfigurator/QFunctionConfigurator/FunctionConfig.cpp
new file mode 100644
index 00000000..243564d1
--- /dev/null
+++ b/qfunctionconfigurator/QFunctionConfigurator/FunctionConfig.cpp
Binary files differ
diff --git a/qfunctionconfigurator/QFunctionConfigurator/FunctionConfig.h b/qfunctionconfigurator/QFunctionConfigurator/FunctionConfig.h
new file mode 100644
index 00000000..8dc9cf98
--- /dev/null
+++ b/qfunctionconfigurator/QFunctionConfigurator/FunctionConfig.h
Binary files differ
diff --git a/qfunctionconfigurator/QFunctionConfigurator/QFunctionConfigurator.vcproj b/qfunctionconfigurator/QFunctionConfigurator/QFunctionConfigurator.vcproj
new file mode 100644
index 00000000..29a06271
--- /dev/null
+++ b/qfunctionconfigurator/QFunctionConfigurator/QFunctionConfigurator.vcproj
@@ -0,0 +1,355 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="QFunctionConfigurator"
+ ProjectGUID="{2527B683-7EFC-4D51-B25A-843668649C54}"
+ RootNamespace="QFunctionConfigurator"
+ Keyword="Qt4VSv1.0"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)/bin"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=".\GeneratedFiles;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\qtmain;$(QTDIR)\include\QtDesigner;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;.\"
+ PreprocessorDefinitions="UNICODE,WIN32,QT_LARGEFILE_SUPPORT,QT_THREAD_SUPPORT,QT_PLUGIN,QT_NO_DEBUG,NDEBUG,QDESIGNER_EXPORT_WIDGETS,QT_CORE_LIB,QT_GUI_LIB;QT_DLL"
+ RuntimeLibrary="2"
+ TreatWChar_tAsBuiltInType="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="qtmain.lib QtDesigner4.lib QtCore4.lib QtGui4.lib"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
+ AdditionalLibraryDirectories="$(QTDIR)\lib"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="postbuild.bat &quot;$(OutDir)&quot; &quot;$(QTDIR)\plugins\designer&quot; $(ConfigurationName) &quot;D:\Project\FaceTrackNoIR\VS2005\FaceTrackNoIR\bin&quot;"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="&quot;C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include&quot;;.\GeneratedFiles;&quot;$(QTDIR)\include&quot;;&quot;.\GeneratedFiles\$(ConfigurationName)&quot;;&quot;$(QTDIR)\include\qtmain&quot;;&quot;$(QTDIR)\include\QtDesigner&quot;;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include\QtGui&quot;;.\"
+ PreprocessorDefinitions="UNICODE,WIN32,QT_LARGEFILE_SUPPORT,QT_THREAD_SUPPORT,QT_PLUGIN,QDESIGNER_EXPORT_WIDGETS,QT_CORE_LIB,QT_GUI_LIB;QT_DLL"
+ RuntimeLibrary="3"
+ TreatWChar_tAsBuiltInType="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="qtmaind.lib QtDesignerd4.lib QtCored4.lib QtGuid4.lib"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
+ AdditionalLibraryDirectories="$(QTDIR)\lib"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;cxx;c;def"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\FunctionConfig.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\qFunctionconfigurator.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\qFunctionconfiguratorplugin.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\FunctionConfig.h"
+ >
+ </File>
+ <File
+ RelativePath=".\qFunctionconfigurator.h"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Moc&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_PLUGIN -DQT_NO_DEBUG -DNDEBUG -DQDESIGNER_EXPORT_WIDGETS -DQT_CORE_LIB -DQT_GUI_LIB -DQT_DLL -D_WINDLL -I&quot;.\GeneratedFiles\.&quot; -I&quot;$(QTDIR)\include\.&quot; -I&quot;.\GeneratedFiles\$(ConfigurationName)\.&quot; -I&quot;$(QTDIR)\include\qtmain\.&quot; -I&quot;$(QTDIR)\include\QtDesigner\.&quot; -I&quot;$(QTDIR)\include\QtCore\.&quot; -I&quot;$(QTDIR)\include\QtGui\.&quot; -I&quot;.\.&quot; &quot;.\qFunctionconfigurator.h&quot; -o &quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="&quot;$(QTDIR)\bin\moc.exe&quot;;$(InputPath)"
+ Outputs="&quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Moc&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_PLUGIN -DQDESIGNER_EXPORT_WIDGETS -DQT_CORE_LIB -DQT_GUI_LIB -DQT_DLL -D_WINDLL -I&quot;C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include\.&quot; -I&quot;.\GeneratedFiles\.&quot; -I&quot;$(QTDIR)\include\.&quot; -I&quot;.\GeneratedFiles\$(ConfigurationName)\.&quot; -I&quot;$(QTDIR)\include\qtmain\.&quot; -I&quot;$(QTDIR)\include\QtDesigner\.&quot; -I&quot;$(QTDIR)\include\QtCore\.&quot; -I&quot;$(QTDIR)\include\QtGui\.&quot; -I&quot;.\.&quot; &quot;.\qFunctionconfigurator.h&quot; -o &quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="&quot;$(QTDIR)\bin\moc.exe&quot;;$(InputPath)"
+ Outputs="&quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\qFunctionconfiguratorplugin.h"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Moc&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_PLUGIN -DQT_NO_DEBUG -DNDEBUG -DQDESIGNER_EXPORT_WIDGETS -DQT_CORE_LIB -DQT_GUI_LIB -DQT_DLL -D_WINDLL -I&quot;.\GeneratedFiles\.&quot; -I&quot;$(QTDIR)\include\.&quot; -I&quot;.\GeneratedFiles\$(ConfigurationName)\.&quot; -I&quot;$(QTDIR)\include\qtmain\.&quot; -I&quot;$(QTDIR)\include\QtDesigner\.&quot; -I&quot;$(QTDIR)\include\QtCore\.&quot; -I&quot;$(QTDIR)\include\QtGui\.&quot; -I&quot;.\.&quot; &quot;.\qFunctionconfiguratorplugin.h&quot; -o &quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="&quot;$(QTDIR)\bin\moc.exe&quot;;$(InputPath)"
+ Outputs="&quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Moc&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_PLUGIN -DQDESIGNER_EXPORT_WIDGETS -DQT_CORE_LIB -DQT_GUI_LIB -DQT_DLL -D_WINDLL -I&quot;C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include\.&quot; -I&quot;.\GeneratedFiles\.&quot; -I&quot;$(QTDIR)\include\.&quot; -I&quot;.\GeneratedFiles\$(ConfigurationName)\.&quot; -I&quot;$(QTDIR)\include\qtmain\.&quot; -I&quot;$(QTDIR)\include\QtDesigner\.&quot; -I&quot;$(QTDIR)\include\QtCore\.&quot; -I&quot;$(QTDIR)\include\QtGui\.&quot; -I&quot;.\.&quot; &quot;.\qFunctionconfiguratorplugin.h&quot; -o &quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="&quot;$(QTDIR)\bin\moc.exe&quot;;$(InputPath)"
+ Outputs="&quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Generated Files"
+ Filter="moc;h;cpp"
+ UniqueIdentifier="{71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11}"
+ SourceControlFiles="false"
+ >
+ <Filter
+ Name="Release"
+ Filter="cpp;moc"
+ SourceControlFiles="false"
+ >
+ <File
+ RelativePath=".\GeneratedFiles\Release\moc_qFunctionconfigurator.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\GeneratedFiles\Release\moc_qFunctionconfiguratorplugin.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Debug"
+ Filter="cpp;moc"
+ SourceControlFiles="false"
+ >
+ <File
+ RelativePath=".\GeneratedFiles\Debug\moc_qFunctionconfigurator.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\GeneratedFiles\Debug\moc_qFunctionconfiguratorplugin.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="qrc;*"
+ UniqueIdentifier="{D9D6E242-F8AF-46E4-B9FD-80ECBC20BA3E}"
+ ParseFiles="false"
+ >
+ </Filter>
+ <File
+ RelativePath=".\postbuild.bat"
+ >
+ </File>
+ </Files>
+ <Globals>
+ <Global
+ Name="IsDesignerPlugin"
+ Value="True"
+ />
+ <Global
+ Name="lupdateOnBuild"
+ Value="0"
+ />
+ <Global
+ Name="MocDir"
+ Value=".\GeneratedFiles\$(ConfigurationName)"
+ />
+ <Global
+ Name="MocOptions"
+ Value=""
+ />
+ <Global
+ Name="QtVersion Win32"
+ Value="$(DefaultQtVersion)"
+ />
+ <Global
+ Name="RccDir"
+ Value=".\GeneratedFiles"
+ />
+ <Global
+ Name="UicDir"
+ Value=".\GeneratedFiles"
+ />
+ </Globals>
+</VisualStudioProject>
diff --git a/qfunctionconfigurator/QFunctionConfigurator/QFunctionConfigurator_vc9.vcproj b/qfunctionconfigurator/QFunctionConfigurator/QFunctionConfigurator_vc9.vcproj
new file mode 100644
index 00000000..940a6198
--- /dev/null
+++ b/qfunctionconfigurator/QFunctionConfigurator/QFunctionConfigurator_vc9.vcproj
@@ -0,0 +1,354 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="QFunctionConfigurator"
+ ProjectGUID="{2527B683-7EFC-4D51-B25A-843668649C54}"
+ RootNamespace="QFunctionConfigurator"
+ Keyword="Qt4VSv1.0"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=".\GeneratedFiles;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\qtmain;$(QTDIR)\include\QtDesigner;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;.\"
+ PreprocessorDefinitions="UNICODE,WIN32,QT_LARGEFILE_SUPPORT,QT_THREAD_SUPPORT,QT_PLUGIN,QT_NO_DEBUG,NDEBUG,QDESIGNER_EXPORT_WIDGETS,QT_CORE_LIB,QT_GUI_LIB;QT_DLL"
+ RuntimeLibrary="2"
+ TreatWChar_tAsBuiltInType="false"
+ DebugInformationFormat="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="qtmain.lib QtDesigner4.lib QtCore4.lib QtGui4.lib"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
+ AdditionalLibraryDirectories="$(QTDIR)\lib"
+ GenerateDebugInformation="false"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="postbuild.bat &quot;$(OutDir)&quot; &quot;$(QTDIR)\plugins\designer&quot; $(ConfigurationName) &quot;D:\Project\FaceTrackNoIR\VS2005\FaceTrackNoIR\bin&quot;"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".\GeneratedFiles;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\qtmain;$(QTDIR)\include\QtDesigner;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;.\"
+ PreprocessorDefinitions="UNICODE,WIN32,QT_LARGEFILE_SUPPORT,QT_THREAD_SUPPORT,QT_PLUGIN,QDESIGNER_EXPORT_WIDGETS,QT_CORE_LIB,QT_GUI_LIB;QT_DLL"
+ RuntimeLibrary="3"
+ TreatWChar_tAsBuiltInType="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="qtmaind.lib QtDesignerd4.lib QtCored4.lib QtGuid4.lib"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
+ AdditionalLibraryDirectories="$(QTDIR)\lib"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;cxx;c;def"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\FunctionConfig.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\qFunctionconfigurator.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\qFunctionconfiguratorplugin.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\FunctionConfig.h"
+ >
+ </File>
+ <File
+ RelativePath=".\qFunctionconfigurator.h"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Moc&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_PLUGIN -DQT_NO_DEBUG -DNDEBUG -DQDESIGNER_EXPORT_WIDGETS -DQT_CORE_LIB -DQT_GUI_LIB -DQT_DLL -D_WINDLL -I&quot;.\GeneratedFiles\.&quot; -I&quot;$(QTDIR)\include\.&quot; -I&quot;.\GeneratedFiles\$(ConfigurationName)\.&quot; -I&quot;$(QTDIR)\include\qtmain\.&quot; -I&quot;$(QTDIR)\include\QtDesigner\.&quot; -I&quot;$(QTDIR)\include\QtCore\.&quot; -I&quot;$(QTDIR)\include\QtGui\.&quot; -I&quot;.\.&quot; &quot;.\qFunctionconfigurator.h&quot; -o &quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="&quot;$(QTDIR)\bin\moc.exe&quot;;$(InputPath)"
+ Outputs="&quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Moc&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_PLUGIN -DQDESIGNER_EXPORT_WIDGETS -DQT_CORE_LIB -DQT_GUI_LIB -DQT_DLL -D_WINDLL -I&quot;.\GeneratedFiles\.&quot; -I&quot;$(QTDIR)\include\.&quot; -I&quot;.\GeneratedFiles\$(ConfigurationName)\.&quot; -I&quot;$(QTDIR)\include\qtmain\.&quot; -I&quot;$(QTDIR)\include\QtDesigner\.&quot; -I&quot;$(QTDIR)\include\QtCore\.&quot; -I&quot;$(QTDIR)\include\QtGui\.&quot; -I&quot;.\.&quot; &quot;.\qFunctionconfigurator.h&quot; -o &quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="&quot;$(QTDIR)\bin\moc.exe&quot;;$(InputPath)"
+ Outputs="&quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\qFunctionconfiguratorplugin.h"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Moc&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_PLUGIN -DQT_NO_DEBUG -DNDEBUG -DQDESIGNER_EXPORT_WIDGETS -DQT_CORE_LIB -DQT_GUI_LIB -DQT_DLL -D_WINDLL -I&quot;.\GeneratedFiles\.&quot; -I&quot;$(QTDIR)\include\.&quot; -I&quot;.\GeneratedFiles\$(ConfigurationName)\.&quot; -I&quot;$(QTDIR)\include\qtmain\.&quot; -I&quot;$(QTDIR)\include\QtDesigner\.&quot; -I&quot;$(QTDIR)\include\QtCore\.&quot; -I&quot;$(QTDIR)\include\QtGui\.&quot; -I&quot;.\.&quot; &quot;.\qFunctionconfiguratorplugin.h&quot; -o &quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="&quot;$(QTDIR)\bin\moc.exe&quot;;$(InputPath)"
+ Outputs="&quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Moc&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_PLUGIN -DQDESIGNER_EXPORT_WIDGETS -DQT_CORE_LIB -DQT_GUI_LIB -DQT_DLL -D_WINDLL -I&quot;.\GeneratedFiles\.&quot; -I&quot;$(QTDIR)\include\.&quot; -I&quot;.\GeneratedFiles\$(ConfigurationName)\.&quot; -I&quot;$(QTDIR)\include\qtmain\.&quot; -I&quot;$(QTDIR)\include\QtDesigner\.&quot; -I&quot;$(QTDIR)\include\QtCore\.&quot; -I&quot;$(QTDIR)\include\QtGui\.&quot; -I&quot;.\.&quot; &quot;.\qFunctionconfiguratorplugin.h&quot; -o &quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="&quot;$(QTDIR)\bin\moc.exe&quot;;$(InputPath)"
+ Outputs="&quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Generated Files"
+ Filter="moc;h;cpp"
+ UniqueIdentifier="{71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11}"
+ SourceControlFiles="false"
+ >
+ <Filter
+ Name="Release"
+ Filter="cpp;moc"
+ SourceControlFiles="false"
+ >
+ <File
+ RelativePath=".\GeneratedFiles\Release\moc_qFunctionconfigurator.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\GeneratedFiles\Release\moc_qFunctionconfiguratorplugin.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Debug"
+ Filter="cpp;moc"
+ SourceControlFiles="false"
+ >
+ <File
+ RelativePath=".\GeneratedFiles\Debug\moc_qFunctionconfigurator.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\GeneratedFiles\Debug\moc_qFunctionconfiguratorplugin.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="qrc;*"
+ UniqueIdentifier="{D9D6E242-F8AF-46E4-B9FD-80ECBC20BA3E}"
+ ParseFiles="false"
+ >
+ </Filter>
+ <File
+ RelativePath=".\postbuild.bat"
+ >
+ </File>
+ </Files>
+ <Globals>
+ <Global
+ Name="IsDesignerPlugin"
+ Value="True"
+ />
+ <Global
+ Name="lupdateOnBuild"
+ Value="0"
+ />
+ <Global
+ Name="MocDir"
+ Value=".\GeneratedFiles\$(ConfigurationName)"
+ />
+ <Global
+ Name="MocOptions"
+ Value=""
+ />
+ <Global
+ Name="QtVersion Win32"
+ Value="$(DefaultQtVersion)"
+ />
+ <Global
+ Name="RccDir"
+ Value=".\GeneratedFiles"
+ />
+ <Global
+ Name="UicDir"
+ Value=".\GeneratedFiles"
+ />
+ </Globals>
+</VisualStudioProject>
diff --git a/qfunctionconfigurator/QFunctionConfigurator/postbuild.bat b/qfunctionconfigurator/QFunctionConfigurator/postbuild.bat
new file mode 100644
index 00000000..3fe2e3ca
--- /dev/null
+++ b/qfunctionconfigurator/QFunctionConfigurator/postbuild.bat
@@ -0,0 +1,30 @@
+@echo off
+rem Copies required DLL files into output folder.
+
+setlocal
+set COPY=xcopy /D /S /C /I /H /R /Y
+set FILTER=find /v "File(s) copied"
+
+echo parameters %1 en %2 en %3 en %4
+
+set API_BIN=%1
+set OUTDIR=%2
+set CONFIG=%3
+set FTN_BIN=%4
+
+if %CONFIG%==Debug (goto Debug)
+if %CONFIG%==Release (goto Release)
+
+echo Unknown build configuration %CONFIG%
+exit /b -1
+
+:Debug
+%COPY% %API_BIN%\*.* %OUTDIR%\ | %FILTER%
+%COPY% %API_BIN%\*.dll %FTN_BIN%\ | %FILTER%
+exit /b 0
+
+:Release
+%COPY% %API_BIN%\*.* %OUTDIR%\ | %FILTER%
+%COPY% %API_BIN%\*.dll %FTN_BIN%\ | %FILTER%
+exit /b 0
+
diff --git a/qfunctionconfigurator/QFunctionConfigurator/qfunctionconfigurator.cpp b/qfunctionconfigurator/QFunctionConfigurator/qfunctionconfigurator.cpp
new file mode 100644
index 00000000..fe2ad49d
--- /dev/null
+++ b/qfunctionconfigurator/QFunctionConfigurator/qfunctionconfigurator.cpp
@@ -0,0 +1,721 @@
+/********************************************************************************
+* FaceTrackNoIR This program is a private project of some enthusiastic *
+* gamers from Holland, who don't like to pay much for *
+* head-tracking. *
+* *
+* Copyright (C) 2012 Wim Vriend (Developing) *
+* Ron Hendriks (Researching and Testing) *
+* *
+* Homepage http://facetracknoir.sourceforge.net/home/default.htm *
+* *
+* This program is free software; you can redistribute it and/or modify it *
+* under the terms of the GNU General Public License as published by the *
+* Free Software Foundation; either version 3 of the License, or (at your *
+* option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, but *
+* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
+* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for *
+* more details. *
+* *
+* You should have received a copy of the GNU General Public License along *
+* with this program; if not, see <http://www.gnu.org/licenses/>. *
+* *
+* The FunctionConfigurator was made by Stanislaw Halik, and adapted to *
+* FaceTrackNoIR. *
+* *
+* All credits for this nice piece of code should go to Stanislaw. *
+* *
+* Copyright (c) 2011-2012, Stanislaw Halik <sthalik@misaki.pl> *
+* Permission to use, copy, modify, and/or distribute this *
+* software for any purpose with or without fee is hereby granted, *
+* provided that the above copyright notice and this permission *
+* notice appear in all copies. *
+********************************************************************************/
+/*
+ Modifications (last one on top):
+ 20120830 - WVR: Changed functionality a bit. Now only draw the handles, when the function is drawn.
+ Only check mouseMoves, when they occur 'in range'. Redraw the curve, when a resize occurs.
+ Somehow, the curve was not drawn correctly, when this was not done (all points were too high).
+ After a 'Reset' this would disappear...
+ 20120828 - WVR: Removed bSkipText, which was used to not show a number below each vertical gridline.
+*/
+#include "qfunctionconfigurator.h"
+#include <QPainter>
+#include <QPaintEvent>
+#include <QPainterPathStroker>
+#include <QPainterPath>
+#include <QBrush>
+#include <QFileDialog>
+#include <QPen>
+#include <QMessageBox>
+#include <QImage>
+#include <QPixmap>
+#include <QTimer>
+
+#include <QtDebug>
+
+#include <math.h>
+
+QFunctionConfigurator::~QFunctionConfigurator()
+{
+ WaitForSingleObject(_mutex, INFINITE);
+ CloseHandle(_mutex);
+ delete btnReset;
+}
+
+static const int pointSize = 5;
+
+QFunctionConfigurator::QFunctionConfigurator(QWidget *parent)
+ : QWidget(parent)
+{
+
+ //
+ // Defaults, for when the widget has no values different from the domXML()
+ //
+ MaxInput = 50; // Maximum input limit
+ MaxOutput = 180; // Maximum output limit
+ pPerEGU_Output = 1; // Number of pixels, per EGU
+ pPerEGU_Input = 4; // Number of pixels, per EGU
+ gDistEGU_Input = 5; // Distance of gridlines
+ gDistEGU_Output = 10; // Distance of gridlines
+
+
+ // Change compared to BezierConfigurator: X = horizontal (input), Y = vertical (output)
+ // This will require the Curve-Dialog to be higher (which was the reason it was reversed in the first place..)
+ range = QRectF(40, 20, MaxInput * pPerEGU_Input, MaxOutput * pPerEGU_Output);
+
+ setMouseTracking(true);
+ moving = NULL; // Pointer to the curve-point, that's being moved
+ movingPoint = 1; // Index of that same point
+
+ //
+ // Add a Reset-button
+ //
+ btnReset = new QPushButton(QString("Reset"), this);
+ connect(btnReset, SIGNAL(clicked()), this, SLOT(resetCurve()));
+
+ //
+ // Variables for FunctionConfig
+ //
+ _config = 0;
+ _points = QList<QPointF>();
+ _draw_points = QList<QPointF>();
+ _mutex = CreateMutex(NULL, false, NULL);
+ _draw_background = true;
+ _draw_function = true;
+
+// qDebug() << "QFunctionConfigurator::QFunctionConfigurator object created.";
+
+}
+
+//
+// Attach an existing FunctionConfig to the Widget.
+//
+void QFunctionConfigurator::setConfig(FunctionConfig* config, QString settingsFile) {
+QPointF currentPoint;
+QPointF drawPoint;
+qreal x;
+
+ WaitForSingleObject(_mutex, INFINITE);
+ _config = config;
+ _points = config->getPoints();
+ strSettingsFile = settingsFile; // Remember for Reset()
+
+ qDebug() << "QFunctionConfigurator::setConfig" << config->getTitle();
+ setCaption(config->getTitle());
+
+ //
+ // Get the Function Points, one for each pixel in the horizontal range.
+ // If the curve does not change, there is no need to run this code every time (it slows down drawing).
+ //
+ _draw_points.clear();
+ for (int j = 0; j < MaxInput * pPerEGU_Input; j++) {
+ //
+ // Weird: not casting to float causes C++ to round the number...
+ //
+ x = (float) j / (float) pPerEGU_Input;
+ currentPoint.setX ( x );
+ currentPoint.setY (_config->getValue( x ));
+ drawPoint = graphicalizePoint(currentPoint, "setConfig");
+ if (withinRect(drawPoint, range)) {
+ _draw_points.append(drawPoint);
+// qDebug() << "QFunctionConfigurator::setConfig _draw_Point to add = " << drawPoint;
+ }
+ }
+
+ ReleaseMutex(_mutex);
+ _draw_function = true;
+ this->update();
+}
+
+//
+// Load the FunctionConfig (points) from the INI-file.
+//
+void QFunctionConfigurator::loadSettings(QString settingsFile) {
+
+ QSettings iniFile( settingsFile, QSettings::IniFormat ); // Application settings (in INI-file)
+ strSettingsFile = settingsFile; // Remember for Reset()
+ qDebug() << "QFunctionConfigurator::loadSettings = " << settingsFile;
+ WaitForSingleObject(_mutex, INFINITE);
+ if (_config) {
+ _config->loadSettings(iniFile);
+ setConfig(_config, settingsFile);
+ }
+ ReleaseMutex(_mutex);
+}
+
+//
+// Save the FunctionConfig (points) to the INI-file.
+//
+void QFunctionConfigurator::saveSettings(QString settingsFile) {
+ QSettings iniFile( settingsFile, QSettings::IniFormat ); // Application settings (in INI-file)
+ strSettingsFile = settingsFile; // Remember for Reset()
+ qDebug() << "QFunctionConfigurator::saveSettings = " << settingsFile;
+
+ WaitForSingleObject(_mutex, INFINITE);
+ if (_config) {
+ _config->saveSettings(iniFile);
+ }
+ ReleaseMutex(_mutex);
+}
+
+//
+// Draw the Background for the graph, the gridlines and the gridpoints.
+// The static objects are drawn on a Pixmap, so it does not have to be repeated every paintEvent. Hope this speeds things up...
+//
+void QFunctionConfigurator::drawBackground(const QRectF &fullRect)
+{
+int i;
+QRect scale;
+
+ qDebug() << "QFunctionConfigurator::drawBackground.";
+
+ _background = QPixmap(fullRect.width(), fullRect.height());
+ QPainter painter(&_background);
+
+ painter.save();
+ painter.setRenderHint(QPainter::Antialiasing);
+ painter.fillRect(fullRect, colBackground);
+ QColor bg_color(112, 154, 209);
+ painter.fillRect(range, bg_color);
+
+ QFont font("ComicSans", 4);
+ font.setPointSize(8);
+ painter.setFont(font);
+
+ QPen pen(QColor(55, 104, 170, 127), 1, Qt::SolidLine);
+
+ //
+ // Draw the Caption
+ //
+ if (_config) {
+ strCaption = _config->getTitle();
+ }
+
+ scale.setCoords(range.left(), 0, range.right(), 20);
+ painter.drawText(scale, Qt::AlignCenter, strCaption);
+
+ //
+ // Draw the horizontal grid
+ //
+ for (i = range.bottom() - gDistEGU_Output * pPerEGU_Output; i >= range.top(); i -= gDistEGU_Output * pPerEGU_Output) {
+ drawLine(&painter, QPointF(40, i), QPointF(range.right(), i), pen);
+ scale.setCoords(0, i - 5, range.left() - 5, i + 5);
+ painter.drawText(scale, Qt::AlignRight, tr("%1").arg(((range.bottom() - i))/pPerEGU_Output));
+ }
+
+ //
+ // Draw the vertical guidelines
+ //
+ for (i = range.left(); i <= range.right(); i += gDistEGU_Input * pPerEGU_Input) {
+ drawLine(&painter, QPointF(i, range.top()), QPointF(i, range.bottom()), pen);
+ scale.setCoords(i - 10, range.bottom() + 2, i + 10, range.bottom() + 15);
+ painter.drawText(scale, Qt::AlignCenter, tr("%1").arg(abs(((range.left() - i))/pPerEGU_Input)));
+ }
+
+ scale.setCoords(range.left(), range.bottom() + 20, range.right(), range.bottom() + 35);
+ painter.drawText(scale, Qt::AlignRight, strInputEGU);
+
+ //
+ // Draw the EGU of the vertical axis (vertically!)
+ //
+ font.setPointSize(10);
+ painter.translate(range.topLeft().x() - 35, range.topLeft().y());
+ painter.rotate(90);
+ painter.drawText(0,0,strOutputEGU );
+
+ //
+ // Draw the two axis
+ //
+ pen.setWidth(2);
+ pen.setColor( Qt::black );
+ drawLine(&painter, range.topLeft() - QPointF(2,0), range.bottomLeft() - QPointF(2,0), pen);
+ drawLine(&painter, range.bottomLeft(), range.bottomRight(), pen);
+
+ painter.restore();
+}
+
+
+//
+// Draw the Function for the graph, on a Pixmap.
+//
+void QFunctionConfigurator::drawFunction(const QRectF &fullRect)
+{
+ if (!_config)
+ return;
+int i;
+QPointF prevPoint;
+QPointF currentPoint;
+
+ //
+ // Use the background picture to draw on.
+ // ToDo: find out how to add Pixmaps, without getting it all green...
+ //
+ _function = QPixmap(_background);
+ QPainter painter(&_function);
+
+ painter.save();
+ painter.setRenderHint(QPainter::Antialiasing, false);
+
+ //
+ // Draw the handles for the Points
+ //
+ for (i = 0; i < _points.size(); i++) {
+ currentPoint = graphicalizePoint( _points[i], "drawFunction handles" ); // Get the next point and convert it to Widget measures
+ drawPoint(&painter, currentPoint, QColor(200, 200, 210, 120));
+ lastPoint = currentPoint; // Remember which point is the rightmost in the graph
+//qDebug() << "QFunctionConfigurator::paintEvent, drawing handle for " << currentPoint;
+ }
+
+
+ QPen pen(colBezier, 2, Qt::SolidLine);
+
+ prevPoint = graphicalizePoint( QPointF(0,0), "drawFunction lines" ); // Start at the Axis
+ double max = maxInputEGU();
+ QPointF prev = graphicalizePoint(QPointF(0, 0));
+ double step = 1 / (double) pixPerEGU_Input();
+ for (double i = 0; i < max; i += step) {
+ double val = _config->getValue(i);
+ QPointF cur = graphicalizePoint(QPointF(i, val));
+ drawLine(&painter, prev, cur, pen);
+ prev = cur;
+ }
+ painter.restore();
+}
+
+//
+// The Widget paints the surface every x msecs.
+//
+void QFunctionConfigurator::paintEvent(QPaintEvent *e)
+{
+QPointF prevPoint;
+QPointF currentPoint;
+QPointF actualPos;
+int i;
+
+// qDebug() << "QFunctionConfigurator::paintEvent.";
+
+ QPainter p(this);
+ p.setRenderHint(QPainter::Antialiasing);
+ p.setClipRect(e->rect());
+
+ if (_draw_background) {
+ drawBackground(e->rect()); // Draw the static parts on a Pixmap
+ p.drawPixmap(0, 0, _background); // Paint the background
+ _draw_background = false;
+
+ btnReset->move(e->rect().left(), e->rect().bottom() - btnReset->height() - 2);
+ }
+
+ if (_draw_function) {
+ drawFunction(e->rect()); // Draw the Function on a Pixmap
+ _draw_function = false;
+ }
+ p.drawPixmap(0, 0, _function); // Always draw the background and the function
+
+ QPen pen(Qt::white, 1, Qt::SolidLine);
+
+ //
+ // Draw the Points, that make up the Curve
+ //
+ WaitForSingleObject(_mutex, INFINITE);
+ if (_config) {
+
+ //
+ // When moving, also draw a sketched version of the Function.
+ //
+ if (moving) {
+ prevPoint = graphicalizePoint( QPointF(0,0), "paintEvent moving" ); // Start at the Axis
+ for (i = 0; i < _points.size(); i++) {
+ currentPoint = graphicalizePoint( _points[i], "paintEvent moving" ); // Get the next point and convert it to Widget measures
+ drawLine(&p, prevPoint, currentPoint, pen);
+ prevPoint = currentPoint;
+// qDebug() << "QFunctionConfigurator::paintEvent, drawing while moving " << currentPoint;
+ }
+
+ //
+ // When moving, also draw a few help-lines, so positioning the point gets easier.
+ //
+ pen.setWidth(1);
+ pen.setColor( Qt::white );
+ pen.setStyle( Qt::DashLine );
+ actualPos = graphicalizePoint(*moving, "paintEvent moving help line(s)");
+ drawLine(&p, QPoint(range.left(), actualPos.y()), QPoint(actualPos.x(), actualPos.y()), pen);
+ drawLine(&p, QPoint(actualPos.x(), actualPos.y()), QPoint(actualPos.x(), range.bottom()), pen);
+ }
+
+ //
+ // If the Tracker is active, the 'Last Point' it requested is recorded.
+ // Show that point on the graph, with some lines to assist.
+ // This new feature is very handy for tweaking the curves!
+ //
+ if (_config->getLastPoint( currentPoint )) {
+
+// qDebug() << "QFunctionConfigurator::paintEvent, drawing tracked Point " << currentPoint;
+
+ actualPos = graphicalizePoint( currentPoint, "paintEvent tracking" );
+ drawPoint(&p, actualPos, QColor(255, 0, 0, 120));
+
+ pen.setWidth(1);
+ pen.setColor( Qt::black );
+ pen.setStyle( Qt::SolidLine );
+ drawLine(&p, QPoint(range.left(), actualPos.y()), QPoint(actualPos.x(), actualPos.y()), pen);
+ drawLine(&p, QPoint(actualPos.x(), actualPos.y()), QPoint(actualPos.x(), range.bottom()), pen);
+ }
+
+ }
+ ReleaseMutex(_mutex);
+
+ //
+ // Draw the delimiters
+ //
+ pen.setWidth(1);
+ pen.setColor( Qt::white );
+ pen.setStyle( Qt::SolidLine );
+ drawLine(&p, QPoint(lastPoint.x(), range.top()), QPoint(lastPoint.x(), range.bottom()), pen);
+ drawLine(&p, QPoint(range.left(), lastPoint.y()), QPoint(range.right(), lastPoint.y()), pen);
+
+ QTimer::singleShot(250, this, SLOT(update()));
+}
+
+//
+// Draw the handle, to move the Bezier-curve.
+//
+void QFunctionConfigurator::drawPoint(QPainter *painter, const QPointF &pos, QColor colBG )
+{
+ painter->save();
+ painter->setPen(QColor(50, 100, 120, 200));
+ painter->setBrush( colBG );
+ painter->drawEllipse(QRectF(pos.x() - pointSize,
+ pos.y() - pointSize,
+ pointSize*2, pointSize*2));
+ painter->restore();
+}
+
+void QFunctionConfigurator::drawLine(QPainter *painter, const QPointF &start, const QPointF &end, QPen pen)
+{
+ painter->save();
+ painter->setPen(pen);
+ painter->setBrush(Qt::NoBrush);
+ painter->drawLine(start, end);
+ painter->restore();
+}
+
+//
+// If the mousebutton is pressed, check if it is inside one of the Points.
+// If so: start moving that Point, until mouse release.
+//
+void QFunctionConfigurator::mousePressEvent(QMouseEvent *e)
+{
+ //
+ // First: check the left mouse-button
+ //
+ if (e->button() == Qt::LeftButton) {
+
+ //
+ // Check to see if the cursor is touching one of the points.
+ //
+ bool bTouchingPoint = false;
+ movingPoint = -1;
+ WaitForSingleObject(_mutex, INFINITE);
+ if (_config) {
+
+ for (int i = 0; i < _points.size(); i++) {
+ if ( markContains( graphicalizePoint( _points[i], "mousePressEvent markContains" ), e->pos() ) ) {
+ bTouchingPoint = true;
+ moving = &_points[i];
+ movingPoint = i;
+ }
+ }
+
+ //
+ // If the Left Mouse-button was clicked without touching a Point, add a new Point
+ //
+ if (!bTouchingPoint) {
+ if (withinRect(e->pos(), range)) {
+ _config->addPoint(normalizePoint(e->pos()));
+ setConfig(_config, strSettingsFile);
+ moving = NULL;
+ emit CurveChanged( true );
+ }
+ }
+ }
+ ReleaseMutex(_mutex);
+ }
+
+ //
+ // Then: check the right mouse-button
+ //
+ if (e->button() == Qt::RightButton) {
+
+ //
+ // Check to see if the cursor is touching one of the points.
+ //
+ moving = NULL;
+ movingPoint = -1;
+ WaitForSingleObject(_mutex, INFINITE);
+ if (_config) {
+
+ for (int i = 0; i < _points.size(); i++) {
+ if ( markContains( graphicalizePoint( _points[i], "mousePressEvent RightButton" ), e->pos() ) ) {
+ movingPoint = i;
+ }
+ }
+
+ //
+ // If the Right Mouse-button was clicked while touching a Point, remove the Point
+ //
+ if (movingPoint >= 0) {
+ _config->removePoint(movingPoint);
+ setConfig(_config, strSettingsFile);
+ movingPoint = -1;
+ emit CurveChanged( true );
+ }
+ }
+ ReleaseMutex(_mutex);
+ }
+
+}
+
+//
+// If the mouse if moving, make sure the Bezier moves along.
+// Of course, only when a Point is selected...
+//
+void QFunctionConfigurator::mouseMoveEvent(QMouseEvent *e)
+{
+
+ if (moving) {
+
+ setCursor(Qt::ClosedHandCursor);
+
+ //
+ // Change the currently moving Point.
+ //
+ *moving = normalizePoint(e->pos());
+ update();
+ }
+ else {
+
+ //
+ // Check to see if the cursor is touching one of the points.
+ //
+ bool bTouchingPoint = false;
+ WaitForSingleObject(_mutex, INFINITE);
+ if (_config) {
+
+ for (int i = 0; i < _points.size(); i++) {
+ if ( markContains( graphicalizePoint( _points[i], "mouseMoveEvent" ), e->pos() ) ) {
+ bTouchingPoint = true;
+ }
+ }
+ }
+ ReleaseMutex(_mutex);
+
+ if ( bTouchingPoint ) {
+ setCursor(Qt::OpenHandCursor);
+ }
+ else {
+ setCursor(Qt::ArrowCursor);
+ }
+
+ }
+}
+
+void QFunctionConfigurator::mouseReleaseEvent(QMouseEvent *e)
+{
+ //qDebug()<<"releasing";
+ if (moving > 0) {
+ emit CurveChanged( true );
+
+ //
+ // Update the Point in the _config
+ //
+ WaitForSingleObject(_mutex, INFINITE);
+ if (_config) {
+ _config->movePoint(movingPoint, normalizePoint(e->pos()));
+ setConfig(_config, strSettingsFile);
+ }
+ ReleaseMutex(_mutex);
+
+ }
+ setCursor(Qt::ArrowCursor);
+ moving = NULL;
+ movingPoint = 0;
+}
+
+//
+// Determine if the mousebutton was pressed within the range of the Point.
+//
+bool QFunctionConfigurator::markContains(const QPointF &pos, const QPointF &coord) const
+{
+ QRectF rect(pos.x() - pointSize,
+ pos.y() - pointSize,
+ pointSize*2, pointSize*2);
+ QPainterPath path;
+ path.addEllipse(rect);
+ return path.contains(coord);
+}
+
+bool QFunctionConfigurator::withinRect( const QPointF &coord, const QRectF &rect ) const
+{
+ QPainterPath path;
+ path.addRect(rect);
+ return path.contains(coord);
+}
+
+//
+// Convert the Point in the graph, to the real-life Point.
+//
+QPointF QFunctionConfigurator::normalizePoint(QPointF point) const
+{
+ QPointF norm;
+
+ norm.setX( (point.x() - range.left()) / pPerEGU_Input );
+ norm.setY( (range.bottom() - point.y()) / pPerEGU_Output );
+
+ if (norm.x() > maxInputEGU())
+ norm.setX(maxInputEGU());
+ else if (norm.x() < 0)
+ norm.setX(0);
+ if (norm.y() > maxOutputEGU())
+ norm.setY(maxOutputEGU());
+ else if (norm.y() < 0)
+ norm.setY(0);
+
+ return norm;
+}
+
+//
+// Convert the real-life Point into the graphical Point.
+//
+QPointF QFunctionConfigurator::graphicalizePoint(QPointF point, QString source) const
+{
+QPointF graph;
+
+ graph.setX( range.left() + (fabs(point.x()) * pPerEGU_Input) );
+ graph.setY( range.bottom() - (fabs(point.y()) * pPerEGU_Output) );
+
+// qDebug() << "QFunctionConfigurator::graphicalizePoint source = " << source << ", point = " << point << ", graph = " << graph;
+
+ return graph;
+}
+
+void QFunctionConfigurator::setmaxInputEGU(int value)
+{
+ MaxInput = value;
+ setMinimumWidth(MaxInput * pPerEGU_Input + 55);
+// resetCurve();
+ resize( MaxInput * pPerEGU_Input + 55, MaxOutput * pPerEGU_Output + 60 );
+}
+void QFunctionConfigurator::setmaxOutputEGU(int value)
+{
+ MaxOutput = value;
+ setMinimumHeight(MaxOutput * pPerEGU_Output + 60);
+// resetCurve();
+ resize( MaxInput * pPerEGU_Input + 55, MaxOutput * pPerEGU_Output + 60 );
+}
+
+//
+// To make configuration more visibly attractive, the number of pixels 'per EGU' can be defined.
+//
+void QFunctionConfigurator::setpixPerEGU_Input(int value)
+{
+ pPerEGU_Input = value;
+ setMinimumWidth(MaxInput * pPerEGU_Input + 55);
+ resize( MaxInput * pPerEGU_Input + 55, MaxOutput * pPerEGU_Output + 60 );
+}
+
+//
+// To make configuration more visibly attractive, the number of pixels 'per EGU' can be defined.
+//
+void QFunctionConfigurator::setpixPerEGU_Output(int value)
+{
+ pPerEGU_Output = value;
+ setMinimumHeight(MaxOutput * pPerEGU_Output + 60);
+ resize( MaxInput * pPerEGU_Input + 55, MaxOutput * pPerEGU_Output + 60 );
+}
+
+//
+// Define the distance of the grid 'in EGU' points.
+//
+void QFunctionConfigurator::setgridDistEGU_Input(int value)
+{
+ gDistEGU_Input = value;
+ _draw_background = true;
+ _draw_function = true;
+ repaint();
+}
+
+//
+// Define the distance of the grid 'in EGU' points.
+//
+void QFunctionConfigurator::setgridDistEGU_Output(int value)
+{
+ gDistEGU_Output = value;
+ _draw_background = true;
+ _draw_function = true;
+ repaint();
+}
+
+void QFunctionConfigurator::setColorBezier(QColor color)
+{
+ colBezier = color;
+ update();
+}
+void QFunctionConfigurator::setColorBackground(QColor color)
+{
+ colBackground = color;
+ update();
+}
+
+void QFunctionConfigurator::setInputEGU(QString egu)
+{
+ strInputEGU = egu;
+ update();
+}
+void QFunctionConfigurator::setOutputEGU(QString egu)
+{
+ strOutputEGU = egu;
+ update();
+}
+void QFunctionConfigurator::setCaption(QString cap)
+{
+ strCaption = cap;
+ update();
+}
+
+void QFunctionConfigurator::resizeEvent(QResizeEvent *e)
+{
+ QSize s = e->size();
+ range = QRectF(40, 20, MaxInput * pPerEGU_Input, MaxOutput * pPerEGU_Output);
+
+ qDebug() << "QFunctionConfigurator::resizeEvent, name = " << strCaption << ",range = " << range;
+
+ if (_config) {
+ setConfig(_config, strSettingsFile);
+ }
+ _draw_background = true;
+ _draw_function = true;
+ repaint();
+}
diff --git a/qfunctionconfigurator/QFunctionConfigurator/qfunctionconfigurator.h b/qfunctionconfigurator/QFunctionConfigurator/qfunctionconfigurator.h
new file mode 100644
index 00000000..c467bc92
--- /dev/null
+++ b/qfunctionconfigurator/QFunctionConfigurator/qfunctionconfigurator.h
@@ -0,0 +1,206 @@
+/********************************************************************************
+* FaceTrackNoIR This program is a private project of some enthusiastic *
+* gamers from Holland, who don't like to pay much for *
+* head-tracking. *
+* *
+* Copyright (C) 2012 Wim Vriend (Developing) *
+* Ron Hendriks (Researching and Testing) *
+* *
+* Homepage http://facetracknoir.sourceforge.net/home/default.htm *
+* *
+* This program is free software; you can redistribute it and/or modify it *
+* under the terms of the GNU General Public License as published by the *
+* Free Software Foundation; either version 3 of the License, or (at your *
+* option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, but *
+* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
+* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for *
+* more details. *
+* *
+* You should have received a copy of the GNU General Public License along *
+* with this program; if not, see <http://www.gnu.org/licenses/>. *
+* *
+* The FunctionConfigurator was made by Stanislaw Halik, and adapted to *
+* FaceTrackNoIR. *
+* *
+* All credits for this nice piece of code should go to Stanislaw. *
+* *
+* Copyright (c) 2011-2012, Stanislaw Halik <sthalik@misaki.pl> *
+* Permission to use, copy, modify, and/or distribute this *
+* software for any purpose with or without fee is hereby granted, *
+* provided that the above copyright notice and this permission *
+* notice appear in all copies. *
+********************************************************************************/
+#ifndef QFUNCTIONCONFIGURATOR_H
+#define QFUNCTIONCONFIGURATOR_H
+
+#include <QtGui>
+#include <QtDesigner/QDesignerExportWidget>
+#include <QPointF>
+#include "FunctionConfig.h"
+
+//
+// The FunctionConfigurator Widget is used to display and configure a function (curve).
+// The Function is used by FaceTrackNoIR to 'translate' the actual head-pose to the virtual headpose. Every axis is configured by a separate Function.
+//
+// The Function is coded in a separate Class and can exists, without the Widget. When the widget is displayed (therefore 'created'), the Function can be attached to the
+// Widget and the Widget used to change the Function.
+//
+class QDESIGNER_WIDGET_EXPORT QFunctionConfigurator : public QWidget
+{
+ Q_OBJECT
+ Q_PROPERTY(int maxInputEGU READ maxInputEGU WRITE setmaxInputEGU);
+ Q_PROPERTY(int maxOutputEGU READ maxOutputEGU WRITE setmaxOutputEGU);
+ Q_PROPERTY(int pixPerEGU_Input READ pixPerEGU_Input WRITE setpixPerEGU_Input);
+ Q_PROPERTY(int pixPerEGU_Output READ pixPerEGU_Output WRITE setpixPerEGU_Output);
+ Q_PROPERTY(int gridDistEGU_Input READ gridDistEGU_Input WRITE setgridDistEGU_Input);
+ Q_PROPERTY(int gridDistEGU_Output READ gridDistEGU_Output WRITE setgridDistEGU_Output);
+
+ Q_PROPERTY(QColor colorBezier READ colorBezier WRITE setColorBezier);
+ Q_PROPERTY(QColor colorBackground READ colorBackground WRITE setColorBackground);
+ Q_PROPERTY(QString stringInputEGU READ stringInputEGU WRITE setInputEGU);
+ Q_PROPERTY(QString stringOutputEGU READ stringOutputEGU WRITE setOutputEGU);
+ Q_PROPERTY(QString stringCaption READ stringCaption WRITE setCaption);
+
+ // Return the current value to Designer
+ int maxInputEGU() const
+ {
+ return MaxInput;
+ }
+ int maxOutputEGU() const
+ {
+ return MaxOutput;
+ }
+ int pixPerEGU_Input() const
+ {
+ return pPerEGU_Input;
+ }
+ int pixPerEGU_Output() const
+ {
+ return pPerEGU_Output;
+ }
+ int gridDistEGU_Input() const
+ {
+ return gDistEGU_Input;
+ }
+ int gridDistEGU_Output() const
+ {
+ return gDistEGU_Output;
+ }
+
+ // Return the current color to Designer
+ QColor colorBezier() const
+ {
+ return colBezier;
+ }
+ // Return the current color to Designer
+ QColor colorBackground() const
+ {
+ return colBackground;
+ }
+ // Return the current string to Designer
+ QString stringInputEGU() const
+ {
+ return strInputEGU;
+ }
+ // Return the current string to Designer
+ QString stringOutputEGU() const
+ {
+ return strOutputEGU;
+ }
+ // Return the current string to Designer
+ QString stringCaption() const
+ {
+ return strCaption;
+ }
+
+public:
+ QFunctionConfigurator(QWidget *parent = 0);
+ ~QFunctionConfigurator();
+ FunctionConfig* config();
+
+ void setConfig(FunctionConfig* config, QString settingsFile); // Connect the FunctionConfig to the Widget.
+ void loadSettings(QString settingsFile); // Load the FunctionConfig (points) from the INI-file
+ void saveSettings(QString settingsFile); // Save the FunctionConfig (points) to the INI-file
+
+signals:
+ void CurveChanged(bool);
+
+public slots:
+ void setmaxInputEGU(int);
+ void setmaxOutputEGU(int);
+ void setpixPerEGU_Input(int);
+ void setpixPerEGU_Output(int);
+ void setgridDistEGU_Input(int);
+ void setgridDistEGU_Output(int);
+
+ void setColorBezier(QColor);
+ void setColorBackground(QColor);
+ void setInputEGU(QString);
+ void setOutputEGU(QString);
+ void setCaption(QString);
+
+ void resetCurve() {
+ qDebug() << "QFunctionConfigurator::resetCurve = " << strSettingsFile;
+ loadSettings( strSettingsFile );
+ }
+
+protected slots:
+ void paintEvent(QPaintEvent *e);
+ void mousePressEvent(QMouseEvent *e);
+ void mouseMoveEvent(QMouseEvent *e);
+ void mouseReleaseEvent(QMouseEvent *e);
+
+protected:
+ void drawBackground(const QRectF &rect);
+ void drawFunction(const QRectF &rect);
+ void drawPoint(QPainter *painter, const QPointF &pt, QColor colBG );
+ void drawLine(QPainter *painter, const QPointF &start, const QPointF &end, QPen pen);
+ bool markContains(const QPointF &pt, const QPointF &coord) const;
+// bool withinRange( const QPointF &coord ) const;
+ bool withinRect( const QPointF &coord, const QRectF &rect ) const;
+
+protected:
+ virtual void resizeEvent(QResizeEvent *);
+
+private:
+ QRectF range; // The actual rectangle for the Bezier-curve
+ QPointF lastPoint; // The right-most point of the Function
+ QPointF normalizePoint (QPointF point) const; // Convert the graphical Point to a real-life Point
+ QPointF graphicalizePoint (QPointF point, QString source = "") const; // Convert the Point to a graphical Point
+
+ QPointF *moving;
+ int movingPoint;
+
+ int MaxInput; // Maximum input limit
+ int MaxOutput; // Maximum output limit
+ int pPerEGU_Input; // Number of pixels, per EGU of Input
+ int pPerEGU_Output; // Number of pixels, per EGU of Output
+ int gDistEGU_Input; // Distance of the grid, in EGU of Input
+ int gDistEGU_Output; // Distance of the grid, in EGU of Output
+
+ QColor colBezier; // Color of Bezier curve
+ QColor colBackground; // Color of widget background
+ QString strInputEGU; // Engineering Units input (vertical axis)
+ QString strOutputEGU; // Engineering Units output (horizontal axis)
+ QString strCaption; // Caption of the graph
+ QString strSettingsFile; // Name of last read INI-file
+ QPushButton *btnReset; // Reset Curve
+
+ bool _draw_background; // Flag to determine if the background should be (re-)drawn on the QPixmap
+ QPixmap _background; // Image of the static parts (axis, lines, etc.)
+ bool _draw_function; // Flag to determine if the function should be (re-)drawn on the QPixmap
+ QPixmap _function; // Image of the function (static unless edited by the user)
+
+ //
+ // Properties of the CurveConfigurator Widget
+ //
+ QString _title; // Title do display in Widget and to load Settings
+ FunctionConfig* _config;
+ QList<QPointF> _points; // Function-points
+ QList<QPointF> _draw_points; // Curve-points needed for drawing
+ HANDLE _mutex;
+};
+
+#endif // QFUNCTIONCONFIGURATOR_H
diff --git a/qfunctionconfigurator/QFunctionConfigurator/qfunctionconfiguratorplugin.cpp b/qfunctionconfigurator/QFunctionConfigurator/qfunctionconfiguratorplugin.cpp
new file mode 100644
index 00000000..44e9f831
--- /dev/null
+++ b/qfunctionconfigurator/QFunctionConfigurator/qfunctionconfiguratorplugin.cpp
@@ -0,0 +1,146 @@
+/********************************************************************************
+* FaceTrackNoIR This program is a private project of some enthusiastic *
+* gamers from Holland, who don't like to pay much for *
+* head-tracking. *
+* *
+* Copyright (C) 2012 Wim Vriend (Developing) *
+* Ron Hendriks (Researching and Testing) *
+* *
+* Homepage http://facetracknoir.sourceforge.net/home/default.htm *
+* *
+* This program is free software; you can redistribute it and/or modify it *
+* under the terms of the GNU General Public License as published by the *
+* Free Software Foundation; either version 3 of the License, or (at your *
+* option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, but *
+* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
+* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for *
+* more details. *
+* *
+* You should have received a copy of the GNU General Public License along *
+* with this program; if not, see <http://www.gnu.org/licenses/>. *
+* *
+* The FunctionConfigurator was made by Stanislaw Halik, and adapted to *
+* FaceTrackNoIR. *
+* *
+* All credits for this nice piece of code should go to Stanislaw. *
+* *
+* Copyright (c) 2011-2012, Stanislaw Halik <sthalik@misaki.pl> *
+* Permission to use, copy, modify, and/or distribute this *
+* software for any purpose with or without fee is hereby granted, *
+* provided that the above copyright notice and this permission *
+* notice appear in all copies. *
+********************************************************************************/
+#include "qfunctionconfigurator.h"
+
+#include <QtCore/QtPlugin>
+#include "qfunctionconfiguratorplugin.h"
+
+
+QFunctionConfiguratorPlugin::QFunctionConfiguratorPlugin(QObject *parent)
+ : QObject(parent)
+{
+ initialized = false;
+}
+
+void QFunctionConfiguratorPlugin::initialize(QDesignerFormEditorInterface */*core*/)
+{
+ if (initialized)
+ return;
+
+ initialized = true;
+}
+
+bool QFunctionConfiguratorPlugin::isInitialized() const
+{
+ return initialized;
+}
+
+QWidget *QFunctionConfiguratorPlugin::createWidget(QWidget *parent)
+{
+ return new QFunctionConfigurator(parent);
+}
+
+QString QFunctionConfiguratorPlugin::name() const
+{
+ return "QFunctionConfigurator";
+}
+
+QString QFunctionConfiguratorPlugin::group() const
+{
+ return "My Plugins";
+}
+
+QIcon QFunctionConfiguratorPlugin::icon() const
+{
+ return QIcon();
+}
+
+QString QFunctionConfiguratorPlugin::toolTip() const
+{
+ return QString();
+}
+
+QString QFunctionConfiguratorPlugin::whatsThis() const
+{
+ return QString();
+}
+
+bool QFunctionConfiguratorPlugin::isContainer() const
+{
+ return false;
+}
+
+QString QFunctionConfiguratorPlugin::domXml() const
+{
+ return "<widget class=\"QFunctionConfigurator\" name=\"qFunctionA\">\n"
+ " <property name=\"geometry\">\n"
+ " <rect>\n"
+ " <x>0</x>\n"
+ " <y>0</y>\n"
+ " <width>161</width>\n"
+ " <height>220</height>\n"
+ " </rect>\n"
+ " </property>\n"
+ " <property name=\"colorBezier\">\n"
+ " <color>\n"
+ " <red>255</red>\n"
+ " <green>170</green>\n"
+ " <blue>0</blue>\n"
+ " </color>\n"
+ " </property>\n"
+ " <property name=\"colorBackground\">\n"
+ " <color>\n"
+ " <red>192</red>\n"
+ " <green>192</green>\n"
+ " <blue>192</blue>\n"
+ " </color>\n"
+ " </property>\n"
+ " <property name=\"stringInputEGU\" stdset=\"0\">\n"
+ " <string>Input Yaw (degr.)</string>\n"
+ " </property>\n"
+ " <property name=\"stringOutputEGU\" stdset=\"0\">\n"
+ " <string>Output Yaw (degr.)</string>\n"
+ " </property>\n"
+ " <property name=\"maxInputEGU\" stdset=\"0\">\n"
+ " <number>50</number>\n"
+ " </property>\n"
+ " <property name=\"maxOutputEGU\" stdset=\"0\">\n"
+ " <number>180</number>\n"
+ " </property>\n"
+ " <property name=\"pixPerEGU_Input\" stdset=\"0\">\n"
+ " <number>2</number>\n"
+ " </property>\n"
+ " <property name=\"pixPerEGU_Output\" stdset=\"0\">\n"
+ " <number>1</number>\n"
+ " </property>\n"
+ "</widget>\n";
+}
+
+QString QFunctionConfiguratorPlugin::includeFile() const
+{
+ return "qfunctionconfigurator.h";
+}
+
+Q_EXPORT_PLUGIN2(qfunctionconfigurator, QFunctionConfiguratorPlugin)
diff --git a/qfunctionconfigurator/QFunctionConfigurator/qfunctionconfiguratorplugin.h b/qfunctionconfigurator/QFunctionConfigurator/qfunctionconfiguratorplugin.h
new file mode 100644
index 00000000..31bf0b2e
--- /dev/null
+++ b/qfunctionconfigurator/QFunctionConfigurator/qfunctionconfiguratorplugin.h
@@ -0,0 +1,30 @@
+#ifndef QFUNCTIONCONFIGURATORPLUGIN_H
+#define QFUNCTIONCONFIGURATORPLUGIN_H
+
+#include <QDesignerCustomWidgetInterface>
+
+class QFunctionConfiguratorPlugin : public QObject, public QDesignerCustomWidgetInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(QDesignerCustomWidgetInterface)
+
+public:
+ QFunctionConfiguratorPlugin(QObject *parent = 0);
+
+ bool isContainer() const;
+ bool isInitialized() const;
+ QIcon icon() const;
+ QString domXml() const;
+ QString group() const;
+ QString includeFile() const;
+ QString name() const;
+ QString toolTip() const;
+ QString whatsThis() const;
+ QWidget *createWidget(QWidget *parent);
+ void initialize(QDesignerFormEditorInterface *core);
+
+private:
+ bool initialized;
+};
+
+#endif // QFUNCTIONCONFIGURATORPLUGIN_H
diff --git a/qfunctionconfigurator/QFunctionConfigurator_vc9.sln b/qfunctionconfigurator/QFunctionConfigurator_vc9.sln
new file mode 100644
index 00000000..3e82962f
--- /dev/null
+++ b/qfunctionconfigurator/QFunctionConfigurator_vc9.sln
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QFunctionConfigurator", "QFunctionConfigurator\QFunctionConfigurator_vc9.vcproj", "{2527B683-7EFC-4D51-B25A-843668649C54}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {2527B683-7EFC-4D51-B25A-843668649C54}.Debug|Win32.ActiveCfg = Debug|Win32
+ {2527B683-7EFC-4D51-B25A-843668649C54}.Debug|Win32.Build.0 = Debug|Win32
+ {2527B683-7EFC-4D51-B25A-843668649C54}.Release|Win32.ActiveCfg = Release|Win32
+ {2527B683-7EFC-4D51-B25A-843668649C54}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal