[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [calligra/krita-perspective_drawing-shivaraman] /: PerspectiveGridNg tool: Krita Crashes when adding
From:       Shivaraman Aiyer <sra392 () gmail ! com>
Date:       2014-03-31 20:57:05
Message-ID: E1WUjGT-0002ch-5p () scm ! kde ! org
[Download RAW message or body]

Git commit 93f40475e0003e2586b8c1255c2b26695a898d9a by Shivaraman Aiyer.
Committed on 31/03/2014 at 20:44.
Pushed by aiyer into branch 'krita-perspective_drawing-shivaraman'.

PerspectiveGridNg tool: Krita Crashes when adding a new PerspectiveGridNg, need to \
ask for the reason as unable to find it.

M  +579  -3    CMakeLists.txt.user
M  +1    -1    krita/plugins/tools/tool_perspectivegridng/CMakeLists.txt
M  +20   -15   krita/plugins/tools/tool_perspectivegridng/kis_tool_perspectivegridng.cc
 M  +2    -1    krita/plugins/tools/tool_perspectivegridng/kis_tool_perspectivegridng.h
 D  +0    -45   krita/plugins/tools/tool_perspectivegridng/kritatoolperspectivegrid.desktop
 A  +7    -0    krita/plugins/tools/tool_perspectivegridng/kritatoolperspectivegridng.desktop
 M  +1    -1    krita/plugins/tools/tool_perspectivegridng/tool_perspectivegridng.cc
M  +2    -1    krita/ui/kis_perspective_grid_managerng.cpp
M  +307  -33   krita/ui/kis_perspective_gridng.cpp
M  +26   -10   krita/ui/kis_perspective_gridng.h
M  +7    -0    krita/ui/kis_view2.cpp

http://commits.kde.org/calligra/93f40475e0003e2586b8c1255c2b26695a898d9a

diff --git a/CMakeLists.txt.user b/CMakeLists.txt.user
index 6883295..6c8107b 100644
--- a/CMakeLists.txt.user
+++ b/CMakeLists.txt.user
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE QtCreatorProject>
-<!-- Written by QtCreator 2.8.1, 2014-02-18T20:58:11. -->
+<!-- Written by QtCreator 2.8.1, 2014-03-31T23:23:14. -->
 <qtcreator>
  <data>
   <variable>ProjectExplorer.Project.ActiveTarget</variable>
@@ -35478,7 +35478,7 @@
     <value type="QString" \
                key="CMakeProjectManager.CMakeRunConfiguration.Arguments"></value>
     <value type="bool" \
                key="CMakeProjectManager.CMakeRunConfiguration.UseTerminal">false</value>
                
     <value type="QString" \
                key="CMakeProjectManager.CMakeRunConfiguration.UserWorkingDirectory"></value>
                
-    <value type="int" key="PE.EnvironmentAspect.Base">-1</value>
+    <value type="int" key="PE.EnvironmentAspect.Base">2</value>
     <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
     <value type="QString" \
key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">TestKoTableColumnAndRowStyleManager</value>
                
     <value type="QString" \
key="ProjectExplorer.ProjectConfiguration.DisplayName">TestKoTableColumnAndRowStyleManager61</value>
 @@ -35490,6 +35490,390 @@
     <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
     <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
    </valuemap>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.762">
+    <value type="bool" key="Analyzer.Project.UseGlobal">true</value>
+    <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
+    <value type="bool" \
key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> +    <value \
type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> +    \
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> +  \
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> +   \
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> \
+    <value type="double" \
key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> +    <value \
type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
 +    <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
+    <value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
+    <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
+    <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
+    <value type="QString" \
key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> +    <valuelist \
type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> +     <value \
type="int">0</value> +     <value type="int">1</value>
+     <value type="int">2</value>
+     <value type="int">3</value>
+     <value type="int">4</value>
+     <value type="int">5</value>
+     <value type="int">6</value>
+     <value type="int">7</value>
+     <value type="int">8</value>
+     <value type="int">9</value>
+     <value type="int">10</value>
+     <value type="int">11</value>
+     <value type="int">12</value>
+     <value type="int">13</value>
+     <value type="int">14</value>
+    </valuelist>
+    <value type="QString" \
key="CMakeProjectManager.CMakeRunConfiguation.Title">TestKoTableColumnAndRowStyleManager</value>
 +    <value type="QString" \
key="CMakeProjectManager.CMakeRunConfiguration.Arguments"></value> +    <value \
type="bool" key="CMakeProjectManager.CMakeRunConfiguration.UseTerminal">false</value> \
+    <value type="QString" \
key="CMakeProjectManager.CMakeRunConfiguration.UserWorkingDirectory"></value> +    \
<value type="int" key="PE.EnvironmentAspect.Base">2</value> +    <valuelist \
type="QVariantList" key="PE.EnvironmentAspect.Changes"/> +    <value type="QString" \
key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">TestKoTableColumnAndRowStyleManager</value>
 +    <value type="QString" \
key="ProjectExplorer.ProjectConfiguration.DisplayName">TestKoTableColumnAndRowStyleManager62</value>
 +    <value type="QString" \
key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeRunConfiguration.TestKoTableColumnAndRowStyleManager</value>
 +    <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
+    <value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
+    <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
+    <value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
+    <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
+    <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
+   </valuemap>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.763">
+    <value type="bool" key="Analyzer.Project.UseGlobal">true</value>
+    <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
+    <value type="bool" \
key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> +    <value \
type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> +    \
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> +  \
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> +   \
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> \
+    <value type="double" \
key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> +    <value \
type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
 +    <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
+    <value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
+    <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
+    <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
+    <value type="QString" \
key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> +    <valuelist \
type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> +     <value \
type="int">0</value> +     <value type="int">1</value>
+     <value type="int">2</value>
+     <value type="int">3</value>
+     <value type="int">4</value>
+     <value type="int">5</value>
+     <value type="int">6</value>
+     <value type="int">7</value>
+     <value type="int">8</value>
+     <value type="int">9</value>
+     <value type="int">10</value>
+     <value type="int">11</value>
+     <value type="int">12</value>
+     <value type="int">13</value>
+     <value type="int">14</value>
+    </valuelist>
+    <value type="QString" \
key="CMakeProjectManager.CMakeRunConfiguation.Title">TestKoTableColumnAndRowStyleManager</value>
 +    <value type="QString" \
key="CMakeProjectManager.CMakeRunConfiguration.Arguments"></value> +    <value \
type="bool" key="CMakeProjectManager.CMakeRunConfiguration.UseTerminal">false</value> \
+    <value type="QString" \
key="CMakeProjectManager.CMakeRunConfiguration.UserWorkingDirectory"></value> +    \
<value type="int" key="PE.EnvironmentAspect.Base">2</value> +    <valuelist \
type="QVariantList" key="PE.EnvironmentAspect.Changes"/> +    <value type="QString" \
key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">TestKoTableColumnAndRowStyleManager</value>
 +    <value type="QString" \
key="ProjectExplorer.ProjectConfiguration.DisplayName">TestKoTableColumnAndRowStyleManager63</value>
 +    <value type="QString" \
key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeRunConfiguration.TestKoTableColumnAndRowStyleManager</value>
 +    <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
+    <value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
+    <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
+    <value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
+    <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
+    <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
+   </valuemap>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.764">
+    <value type="bool" key="Analyzer.Project.UseGlobal">true</value>
+    <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
+    <value type="bool" \
key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> +    <value \
type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> +    \
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> +  \
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> +   \
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> \
+    <value type="double" \
key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> +    <value \
type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
 +    <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
+    <value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
+    <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
+    <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
+    <value type="QString" \
key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> +    <valuelist \
type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> +     <value \
type="int">0</value> +     <value type="int">1</value>
+     <value type="int">2</value>
+     <value type="int">3</value>
+     <value type="int">4</value>
+     <value type="int">5</value>
+     <value type="int">6</value>
+     <value type="int">7</value>
+     <value type="int">8</value>
+     <value type="int">9</value>
+     <value type="int">10</value>
+     <value type="int">11</value>
+     <value type="int">12</value>
+     <value type="int">13</value>
+     <value type="int">14</value>
+    </valuelist>
+    <value type="QString" \
key="CMakeProjectManager.CMakeRunConfiguation.Title">TestKoTableColumnAndRowStyleManager</value>
 +    <value type="QString" \
key="CMakeProjectManager.CMakeRunConfiguration.Arguments"></value> +    <value \
type="bool" key="CMakeProjectManager.CMakeRunConfiguration.UseTerminal">false</value> \
+    <value type="QString" \
key="CMakeProjectManager.CMakeRunConfiguration.UserWorkingDirectory"></value> +    \
<value type="int" key="PE.EnvironmentAspect.Base">2</value> +    <valuelist \
type="QVariantList" key="PE.EnvironmentAspect.Changes"/> +    <value type="QString" \
key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">TestKoTableColumnAndRowStyleManager</value>
 +    <value type="QString" \
key="ProjectExplorer.ProjectConfiguration.DisplayName">TestKoTableColumnAndRowStyleManager64</value>
 +    <value type="QString" \
key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeRunConfiguration.TestKoTableColumnAndRowStyleManager</value>
 +    <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
+    <value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
+    <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
+    <value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
+    <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
+    <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
+   </valuemap>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.765">
+    <value type="bool" key="Analyzer.Project.UseGlobal">true</value>
+    <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
+    <value type="bool" \
key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> +    <value \
type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> +    \
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> +  \
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> +   \
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> \
+    <value type="double" \
key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> +    <value \
type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
 +    <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
+    <value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
+    <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
+    <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
+    <value type="QString" \
key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> +    <valuelist \
type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> +     <value \
type="int">0</value> +     <value type="int">1</value>
+     <value type="int">2</value>
+     <value type="int">3</value>
+     <value type="int">4</value>
+     <value type="int">5</value>
+     <value type="int">6</value>
+     <value type="int">7</value>
+     <value type="int">8</value>
+     <value type="int">9</value>
+     <value type="int">10</value>
+     <value type="int">11</value>
+     <value type="int">12</value>
+     <value type="int">13</value>
+     <value type="int">14</value>
+    </valuelist>
+    <value type="QString" \
key="CMakeProjectManager.CMakeRunConfiguation.Title">TestKoTableColumnAndRowStyleManager</value>
 +    <value type="QString" \
key="CMakeProjectManager.CMakeRunConfiguration.Arguments"></value> +    <value \
type="bool" key="CMakeProjectManager.CMakeRunConfiguration.UseTerminal">false</value> \
+    <value type="QString" \
key="CMakeProjectManager.CMakeRunConfiguration.UserWorkingDirectory"></value> +    \
<value type="int" key="PE.EnvironmentAspect.Base">2</value> +    <valuelist \
type="QVariantList" key="PE.EnvironmentAspect.Changes"/> +    <value type="QString" \
key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">TestKoTableColumnAndRowStyleManager</value>
 +    <value type="QString" \
key="ProjectExplorer.ProjectConfiguration.DisplayName">TestKoTableColumnAndRowStyleManager65</value>
 +    <value type="QString" \
key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeRunConfiguration.TestKoTableColumnAndRowStyleManager</value>
 +    <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
+    <value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
+    <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
+    <value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
+    <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
+    <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
+   </valuemap>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.766">
+    <value type="bool" key="Analyzer.Project.UseGlobal">true</value>
+    <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
+    <value type="bool" \
key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> +    <value \
type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> +    \
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> +  \
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> +   \
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> \
+    <value type="double" \
key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> +    <value \
type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
 +    <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
+    <value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
+    <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
+    <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
+    <value type="QString" \
key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> +    <valuelist \
type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> +     <value \
type="int">0</value> +     <value type="int">1</value>
+     <value type="int">2</value>
+     <value type="int">3</value>
+     <value type="int">4</value>
+     <value type="int">5</value>
+     <value type="int">6</value>
+     <value type="int">7</value>
+     <value type="int">8</value>
+     <value type="int">9</value>
+     <value type="int">10</value>
+     <value type="int">11</value>
+     <value type="int">12</value>
+     <value type="int">13</value>
+     <value type="int">14</value>
+    </valuelist>
+    <value type="QString" \
key="CMakeProjectManager.CMakeRunConfiguation.Title">TestKoTableColumnAndRowStyleManager</value>
 +    <value type="QString" \
key="CMakeProjectManager.CMakeRunConfiguration.Arguments"></value> +    <value \
type="bool" key="CMakeProjectManager.CMakeRunConfiguration.UseTerminal">false</value> \
+    <value type="QString" \
key="CMakeProjectManager.CMakeRunConfiguration.UserWorkingDirectory"></value> +    \
<value type="int" key="PE.EnvironmentAspect.Base">2</value> +    <valuelist \
type="QVariantList" key="PE.EnvironmentAspect.Changes"/> +    <value type="QString" \
key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">TestKoTableColumnAndRowStyleManager</value>
 +    <value type="QString" \
key="ProjectExplorer.ProjectConfiguration.DisplayName">TestKoTableColumnAndRowStyleManager66</value>
 +    <value type="QString" \
key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeRunConfiguration.TestKoTableColumnAndRowStyleManager</value>
 +    <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
+    <value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
+    <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
+    <value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
+    <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
+    <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
+   </valuemap>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.767">
+    <value type="bool" key="Analyzer.Project.UseGlobal">true</value>
+    <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
+    <value type="bool" \
key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> +    <value \
type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> +    \
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> +  \
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> +   \
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> \
+    <value type="double" \
key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> +    <value \
type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
 +    <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
+    <value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
+    <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
+    <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
+    <value type="QString" \
key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> +    <valuelist \
type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> +     <value \
type="int">0</value> +     <value type="int">1</value>
+     <value type="int">2</value>
+     <value type="int">3</value>
+     <value type="int">4</value>
+     <value type="int">5</value>
+     <value type="int">6</value>
+     <value type="int">7</value>
+     <value type="int">8</value>
+     <value type="int">9</value>
+     <value type="int">10</value>
+     <value type="int">11</value>
+     <value type="int">12</value>
+     <value type="int">13</value>
+     <value type="int">14</value>
+    </valuelist>
+    <value type="QString" \
key="CMakeProjectManager.CMakeRunConfiguation.Title">TestKoTableColumnAndRowStyleManager</value>
 +    <value type="QString" \
key="CMakeProjectManager.CMakeRunConfiguration.Arguments"></value> +    <value \
type="bool" key="CMakeProjectManager.CMakeRunConfiguration.UseTerminal">false</value> \
+    <value type="QString" \
key="CMakeProjectManager.CMakeRunConfiguration.UserWorkingDirectory"></value> +    \
<value type="int" key="PE.EnvironmentAspect.Base">2</value> +    <valuelist \
type="QVariantList" key="PE.EnvironmentAspect.Changes"/> +    <value type="QString" \
key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">TestKoTableColumnAndRowStyleManager</value>
 +    <value type="QString" \
key="ProjectExplorer.ProjectConfiguration.DisplayName">TestKoTableColumnAndRowStyleManager67</value>
 +    <value type="QString" \
key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeRunConfiguration.TestKoTableColumnAndRowStyleManager</value>
 +    <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
+    <value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
+    <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
+    <value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
+    <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
+    <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
+   </valuemap>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.768">
+    <value type="bool" key="Analyzer.Project.UseGlobal">true</value>
+    <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
+    <value type="bool" \
key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> +    <value \
type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> +    \
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> +  \
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> +   \
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> \
+    <value type="double" \
key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> +    <value \
type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
 +    <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
+    <value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
+    <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
+    <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
+    <value type="QString" \
key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> +    <valuelist \
type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> +     <value \
type="int">0</value> +     <value type="int">1</value>
+     <value type="int">2</value>
+     <value type="int">3</value>
+     <value type="int">4</value>
+     <value type="int">5</value>
+     <value type="int">6</value>
+     <value type="int">7</value>
+     <value type="int">8</value>
+     <value type="int">9</value>
+     <value type="int">10</value>
+     <value type="int">11</value>
+     <value type="int">12</value>
+     <value type="int">13</value>
+     <value type="int">14</value>
+    </valuelist>
+    <value type="QString" \
key="CMakeProjectManager.CMakeRunConfiguation.Title">TestKoTableColumnAndRowStyleManager</value>
 +    <value type="QString" \
key="CMakeProjectManager.CMakeRunConfiguration.Arguments"></value> +    <value \
type="bool" key="CMakeProjectManager.CMakeRunConfiguration.UseTerminal">false</value> \
+    <value type="QString" \
key="CMakeProjectManager.CMakeRunConfiguration.UserWorkingDirectory"></value> +    \
<value type="int" key="PE.EnvironmentAspect.Base">2</value> +    <valuelist \
type="QVariantList" key="PE.EnvironmentAspect.Changes"/> +    <value type="QString" \
key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">TestKoTableColumnAndRowStyleManager</value>
 +    <value type="QString" \
key="ProjectExplorer.ProjectConfiguration.DisplayName">TestKoTableColumnAndRowStyleManager68</value>
 +    <value type="QString" \
key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeRunConfiguration.TestKoTableColumnAndRowStyleManager</value>
 +    <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
+    <value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
+    <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
+    <value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
+    <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
+    <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
+   </valuemap>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.769">
+    <value type="bool" key="Analyzer.Project.UseGlobal">true</value>
+    <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
+    <value type="bool" \
key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> +    <value \
type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> +    \
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> +  \
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> +   \
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> \
+    <value type="double" \
key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> +    <value \
type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
 +    <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
+    <value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
+    <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
+    <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
+    <value type="QString" \
key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> +    <valuelist \
type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> +     <value \
type="int">0</value> +     <value type="int">1</value>
+     <value type="int">2</value>
+     <value type="int">3</value>
+     <value type="int">4</value>
+     <value type="int">5</value>
+     <value type="int">6</value>
+     <value type="int">7</value>
+     <value type="int">8</value>
+     <value type="int">9</value>
+     <value type="int">10</value>
+     <value type="int">11</value>
+     <value type="int">12</value>
+     <value type="int">13</value>
+     <value type="int">14</value>
+    </valuelist>
+    <value type="QString" \
key="CMakeProjectManager.CMakeRunConfiguation.Title">TestKoTableColumnAndRowStyleManager</value>
 +    <value type="QString" \
key="CMakeProjectManager.CMakeRunConfiguration.Arguments"></value> +    <value \
type="bool" key="CMakeProjectManager.CMakeRunConfiguration.UseTerminal">false</value> \
+    <value type="QString" \
key="CMakeProjectManager.CMakeRunConfiguration.UserWorkingDirectory"></value> +    \
<value type="int" key="PE.EnvironmentAspect.Base">2</value> +    <valuelist \
type="QVariantList" key="PE.EnvironmentAspect.Changes"/> +    <value type="QString" \
key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">TestKoTableColumnAndRowStyleManager</value>
 +    <value type="QString" \
key="ProjectExplorer.ProjectConfiguration.DisplayName">TestKoTableColumnAndRowStyleManager69</value>
 +    <value type="QString" \
key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeRunConfiguration.TestKoTableColumnAndRowStyleManager</value>
 +    <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
+    <value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
+    <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
+    <value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
+    <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
+    <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
+   </valuemap>
    <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.77">
     <value type="bool" key="Analyzer.Project.UseGlobal">true</value>
     <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
@@ -35538,6 +35922,198 @@
     <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
     <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
    </valuemap>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.770">
+    <value type="bool" key="Analyzer.Project.UseGlobal">true</value>
+    <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
+    <value type="bool" \
key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> +    <value \
type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> +    \
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> +  \
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> +   \
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> \
+    <value type="double" \
key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> +    <value \
type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
 +    <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
+    <value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
+    <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
+    <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
+    <value type="QString" \
key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> +    <valuelist \
type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> +     <value \
type="int">0</value> +     <value type="int">1</value>
+     <value type="int">2</value>
+     <value type="int">3</value>
+     <value type="int">4</value>
+     <value type="int">5</value>
+     <value type="int">6</value>
+     <value type="int">7</value>
+     <value type="int">8</value>
+     <value type="int">9</value>
+     <value type="int">10</value>
+     <value type="int">11</value>
+     <value type="int">12</value>
+     <value type="int">13</value>
+     <value type="int">14</value>
+    </valuelist>
+    <value type="QString" \
key="CMakeProjectManager.CMakeRunConfiguation.Title">TestKoTableColumnAndRowStyleManager</value>
 +    <value type="QString" \
key="CMakeProjectManager.CMakeRunConfiguration.Arguments"></value> +    <value \
type="bool" key="CMakeProjectManager.CMakeRunConfiguration.UseTerminal">false</value> \
+    <value type="QString" \
key="CMakeProjectManager.CMakeRunConfiguration.UserWorkingDirectory"></value> +    \
<value type="int" key="PE.EnvironmentAspect.Base">2</value> +    <valuelist \
type="QVariantList" key="PE.EnvironmentAspect.Changes"/> +    <value type="QString" \
key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">TestKoTableColumnAndRowStyleManager</value>
 +    <value type="QString" \
key="ProjectExplorer.ProjectConfiguration.DisplayName">TestKoTableColumnAndRowStyleManager70</value>
 +    <value type="QString" \
key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeRunConfiguration.TestKoTableColumnAndRowStyleManager</value>
 +    <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
+    <value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
+    <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
+    <value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
+    <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
+    <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
+   </valuemap>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.771">
+    <value type="bool" key="Analyzer.Project.UseGlobal">true</value>
+    <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
+    <value type="bool" \
key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> +    <value \
type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> +    \
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> +  \
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> +   \
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> \
+    <value type="double" \
key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> +    <value \
type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
 +    <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
+    <value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
+    <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
+    <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
+    <value type="QString" \
key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> +    <valuelist \
type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> +     <value \
type="int">0</value> +     <value type="int">1</value>
+     <value type="int">2</value>
+     <value type="int">3</value>
+     <value type="int">4</value>
+     <value type="int">5</value>
+     <value type="int">6</value>
+     <value type="int">7</value>
+     <value type="int">8</value>
+     <value type="int">9</value>
+     <value type="int">10</value>
+     <value type="int">11</value>
+     <value type="int">12</value>
+     <value type="int">13</value>
+     <value type="int">14</value>
+    </valuelist>
+    <value type="QString" \
key="CMakeProjectManager.CMakeRunConfiguation.Title">TestKoTableColumnAndRowStyleManager</value>
 +    <value type="QString" \
key="CMakeProjectManager.CMakeRunConfiguration.Arguments"></value> +    <value \
type="bool" key="CMakeProjectManager.CMakeRunConfiguration.UseTerminal">false</value> \
+    <value type="QString" \
key="CMakeProjectManager.CMakeRunConfiguration.UserWorkingDirectory"></value> +    \
<value type="int" key="PE.EnvironmentAspect.Base">2</value> +    <valuelist \
type="QVariantList" key="PE.EnvironmentAspect.Changes"/> +    <value type="QString" \
key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">TestKoTableColumnAndRowStyleManager</value>
 +    <value type="QString" \
key="ProjectExplorer.ProjectConfiguration.DisplayName">TestKoTableColumnAndRowStyleManager71</value>
 +    <value type="QString" \
key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeRunConfiguration.TestKoTableColumnAndRowStyleManager</value>
 +    <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
+    <value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
+    <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
+    <value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
+    <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
+    <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
+   </valuemap>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.772">
+    <value type="bool" key="Analyzer.Project.UseGlobal">true</value>
+    <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
+    <value type="bool" \
key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> +    <value \
type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> +    \
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> +  \
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> +   \
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> \
+    <value type="double" \
key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> +    <value \
type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
 +    <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
+    <value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
+    <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
+    <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
+    <value type="QString" \
key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> +    <valuelist \
type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> +     <value \
type="int">0</value> +     <value type="int">1</value>
+     <value type="int">2</value>
+     <value type="int">3</value>
+     <value type="int">4</value>
+     <value type="int">5</value>
+     <value type="int">6</value>
+     <value type="int">7</value>
+     <value type="int">8</value>
+     <value type="int">9</value>
+     <value type="int">10</value>
+     <value type="int">11</value>
+     <value type="int">12</value>
+     <value type="int">13</value>
+     <value type="int">14</value>
+    </valuelist>
+    <value type="QString" \
key="CMakeProjectManager.CMakeRunConfiguation.Title">TestKoTableColumnAndRowStyleManager</value>
 +    <value type="QString" \
key="CMakeProjectManager.CMakeRunConfiguration.Arguments"></value> +    <value \
type="bool" key="CMakeProjectManager.CMakeRunConfiguration.UseTerminal">false</value> \
+    <value type="QString" \
key="CMakeProjectManager.CMakeRunConfiguration.UserWorkingDirectory"></value> +    \
<value type="int" key="PE.EnvironmentAspect.Base">2</value> +    <valuelist \
type="QVariantList" key="PE.EnvironmentAspect.Changes"/> +    <value type="QString" \
key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">TestKoTableColumnAndRowStyleManager</value>
 +    <value type="QString" \
key="ProjectExplorer.ProjectConfiguration.DisplayName">TestKoTableColumnAndRowStyleManager72</value>
 +    <value type="QString" \
key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeRunConfiguration.TestKoTableColumnAndRowStyleManager</value>
 +    <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
+    <value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
+    <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
+    <value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
+    <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
+    <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
+   </valuemap>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.773">
+    <value type="bool" key="Analyzer.Project.UseGlobal">true</value>
+    <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
+    <value type="bool" \
key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> +    <value \
type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> +    \
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> +  \
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> +   \
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> \
+    <value type="double" \
key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> +    <value \
type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
 +    <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
+    <value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
+    <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
+    <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
+    <value type="QString" \
key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> +    <valuelist \
type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> +     <value \
type="int">0</value> +     <value type="int">1</value>
+     <value type="int">2</value>
+     <value type="int">3</value>
+     <value type="int">4</value>
+     <value type="int">5</value>
+     <value type="int">6</value>
+     <value type="int">7</value>
+     <value type="int">8</value>
+     <value type="int">9</value>
+     <value type="int">10</value>
+     <value type="int">11</value>
+     <value type="int">12</value>
+     <value type="int">13</value>
+     <value type="int">14</value>
+    </valuelist>
+    <value type="QString" \
key="CMakeProjectManager.CMakeRunConfiguation.Title">TestKoTableColumnAndRowStyleManager</value>
 +    <value type="QString" \
key="CMakeProjectManager.CMakeRunConfiguration.Arguments"></value> +    <value \
type="bool" key="CMakeProjectManager.CMakeRunConfiguration.UseTerminal">false</value> \
+    <value type="QString" \
key="CMakeProjectManager.CMakeRunConfiguration.UserWorkingDirectory"></value> +    \
<value type="int" key="PE.EnvironmentAspect.Base">-1</value> +    <valuelist \
type="QVariantList" key="PE.EnvironmentAspect.Changes"/> +    <value type="QString" \
key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">TestKoTableColumnAndRowStyleManager</value>
 +    <value type="QString" \
key="ProjectExplorer.ProjectConfiguration.DisplayName">TestKoTableColumnAndRowStyleManager73</value>
 +    <value type="QString" \
key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeRunConfiguration.TestKoTableColumnAndRowStyleManager</value>
 +    <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
+    <value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
+    <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
+    <value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
+    <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
+    <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
+   </valuemap>
    <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.78">
     <value type="bool" key="Analyzer.Project.UseGlobal">true</value>
     <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
@@ -36690,7 +37266,7 @@
     <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
     <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
    </valuemap>
-   <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">762</value>
+   <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">774</value>
   </valuemap>
  </data>
  <data>
diff --git a/krita/plugins/tools/tool_perspectivegridng/CMakeLists.txt \
b/krita/plugins/tools/tool_perspectivegridng/CMakeLists.txt index f5f0c15..a6befa0 \
                100644
--- a/krita/plugins/tools/tool_perspectivegridng/CMakeLists.txt
+++ b/krita/plugins/tools/tool_perspectivegridng/CMakeLists.txt
@@ -9,7 +9,7 @@ kde4_add_ui_files(kritatoolperspectivegridng_PART_SRCS \
PerspectiveGridNgToolOpti  
 kde4_add_plugin(kritatoolperspectivegridng ${kritatoolperspectivegridng_PART_SRCS})
 
-target_link_libraries(kritatoolperspectivegridng kritaui flake ${KDE4_KPARTS_LIBS} \
${KDE4_KDEUI_LIBS} ) +target_link_libraries(kritatoolperspectivegridng kritaui )
 
 install(TARGETS kritatoolperspectivegridng  DESTINATION ${PLUGIN_INSTALL_DIR})
 
diff --git a/krita/plugins/tools/tool_perspectivegridng/kis_tool_perspectivegridng.cc \
b/krita/plugins/tools/tool_perspectivegridng/kis_tool_perspectivegridng.cc index \
                e640570..ec60c28 100644
--- a/krita/plugins/tools/tool_perspectivegridng/kis_tool_perspectivegridng.cc
+++ b/krita/plugins/tools/tool_perspectivegridng/kis_tool_perspectivegridng.cc
@@ -49,6 +49,7 @@ KisPerspectiveGridNgTool::KisPerspectiveGridNgTool(KoCanvasBase * \
canvas)  {
     Q_ASSERT(m_canvas);
     setObjectName("tool_perspectivegridng");
+    qDebug()<<"Shiva: " << "KisPerspectiveGridNgTool";
 }
 
 KisPerspectiveGridNgTool::~KisPerspectiveGridNgTool()
@@ -62,6 +63,7 @@ QPointF adjustPointF(const QPointF& _pt, const QRectF& _rc)
 
 void KisPerspectiveGridNgTool::activate(ToolActivation toolActivation, const \
QSet<KoShape*> &shapes)  {
+    qDebug()<<"Activating tool";
     // Add code here to initialize your tool when it got activated
     KisTool::activate(toolActivation, shapes);
 
@@ -106,12 +108,14 @@ inline double norm2(const QPointF& p)
 
 void KisPerspectiveGridNgTool::mousePressEvent(KoPointerEvent *event)
 {
+    qDebug()<<"Pressed button";
     if(PRESS_CONDITION_OM(event, KisTool::HOVER_MODE,
                        Qt::LeftButton, Qt::ShiftModifier)) {
 
         setMode(KisTool::PAINT_MODE);
 
         if (m_newAssistant) {
+            qDebug()<<"New Assistant Creation " << m_newAssistant ;
             m_internalMode = MODE_CREATION;
             *m_newAssistant->handles().back() = event->point;
             if (m_newAssistant->handles().size() == m_newAssistant->numHandles()) {
@@ -248,8 +252,9 @@ void KisPerspectiveGridNgTool::mousePressEvent(KoPointerEvent \
*event)  }
         }
 
-        QString key = 0;//m_options.comboBox->model()->index( \
                m_options.comboBox->currentIndex(), 0 \
                ).data(Qt::UserRole).toString();
-            m_newAssistant = \
KisPerspectiveGridNgFactoryRegistry::instance()->get(0)->createPerspectiveGridNg(); \
+//        QString key = m_options.comboBox->model()->index( \
m_options.comboBox->currentIndex(), 0 ).data(Qt::UserRole).toString(); +//            \
m_newAssistant = KisPerspectiveGridNgFactoryRegistry::instance()->get(key)->createPerspectiveGridNg();
 +        m_newAssistant = \
KisPerspectiveGridNgFactoryRegistry::instance()->get("perspectivegridng")->createPerspectiveGridNg();
  m_internalMode = MODE_CREATION;
             m_newAssistant->addHandle(new KisPerspectiveGridNgHandle(event->point));
             if (m_newAssistant->numHandles() <= 1) {
@@ -268,20 +273,20 @@ void KisPerspectiveGridNgTool::addAssistant()
 {
     m_canvas->view()->perspectiveGridNgManager()->addAssistant(m_newAssistant);
     m_handles = m_canvas->view()->perspectiveGridNgManager()->handles();
-//    KisAbstractPerspectiveGrid* grid = \
                dynamic_cast<KisAbstractPerspectiveGrid*>(m_newAssistant);
-//    if (grid) {
-//        m_canvas->view()->resourceProvider()->addPerspectiveGrid(grid);
-//    }
+    KisAbstractPerspectiveGrid* grid = \
dynamic_cast<KisAbstractPerspectiveGrid*>(m_newAssistant); +    if (grid) {
+        m_canvas->view()->resourceProvider()->addPerspectiveGrid(grid);
+    }
     m_newAssistant = 0;
 }
 
 
 void KisPerspectiveGridNgTool::removeAssistant(KisPerspectiveGridNg* assistant)
 {
-//    KisAbstractPerspectiveGrid* grid = \
                dynamic_cast<KisAbstractPerspectiveGrid*>(assistant);
-//    if (grid) {
-//        m_canvas->view()->resourceProvider()->removePerspectiveGrid(grid);
-//    }
+    KisAbstractPerspectiveGrid* grid = \
dynamic_cast<KisAbstractPerspectiveGrid*>(assistant); +    if (grid) {
+        m_canvas->view()->resourceProvider()->removePerspectiveGrid(grid);
+    }
     m_canvas->view()->perspectiveGridNgManager()->removeAssistant(assistant);
     m_handles = m_canvas->view()->perspectiveGridNgManager()->handles();
 }
@@ -400,7 +405,7 @@ void KisPerspectiveGridNgTool::paint(QPainter& _gc, const \
KoViewConverter &_conv  
     foreach(const KisPerspectiveGridNgHandleSP handle, m_handles) {
         QRectF ellipse(_converter.documentToView(*handle) -  QPointF(6, 6), \
                QSizeF(12, 12));
-        if (handle == m_handleDrag || handle == m_handleCombine) {
+        if (handle == m_handleDrag /*|| handle == m_handleCombine*/) {
             _gc.save();
             _gc.setPen(Qt::transparent);
             _gc.setBrush(handlesColor);
@@ -554,10 +559,10 @@ void KisPerspectiveGridNgTool::openFinish(KJob* job)
                 if (assistant) {
                     if (assistant->handles().size() == assistant->numHandles()) {
                         \
                m_canvas->view()->perspectiveGridNgManager()->addAssistant(assistant);
                
-//                        KisAbstractPerspectiveGrid* grid = \
                dynamic_cast<KisAbstractPerspectiveGrid*>(assistant);
-//                        if (grid) {
-//                            \
                m_canvas->view()->resourceProvider()->addPerspectiveGrid(grid);
-//                        }
+                        KisAbstractPerspectiveGrid* grid = \
dynamic_cast<KisAbstractPerspectiveGrid*>(assistant); +                        if \
(grid) { +                            \
m_canvas->view()->resourceProvider()->addPerspectiveGrid(grid); +                     \
}  } else {
                         errors = true;
                         delete assistant;
diff --git a/krita/plugins/tools/tool_perspectivegridng/kis_tool_perspectivegridng.h \
b/krita/plugins/tools/tool_perspectivegridng/kis_tool_perspectivegridng.h index \
                4122a3e..a469498 100644
--- a/krita/plugins/tools/tool_perspectivegridng/kis_tool_perspectivegridng.h
+++ b/krita/plugins/tools/tool_perspectivegridng/kis_tool_perspectivegridng.h
@@ -75,7 +75,7 @@ protected:
 
 protected:
     KisCanvas2* m_canvas;
-    QList<KisPerspectiveGridNgHandleSP> m_handles, m_sideHandles;
+    QList<KisPerspectiveGridNgHandleSP> m_handles, \
m_sideHandles,m_perspectiveHandles;  KisPerspectiveGridNgHandleSP m_handleDrag;
     KisPerspectiveGridNgHandleSP m_handleCombine;
     KisPerspectiveGridNg* m_assistantDrag;
@@ -97,6 +97,7 @@ class KisPerspectiveGridNgToolFactory : public KoToolFactoryBase
 public:
     KisPerspectiveGridNgToolFactory()
             : KoToolFactoryBase("KisPerspectiveGridNgTool") {
+        qDebug()<<"Shiva: " << "KisPerspectiveGridNgToolFactory";
         setToolTip(i18n("Perspective Grid Editor"));
         setToolType(TOOL_TYPE_VIEW);
         setIconName(koIconNameCStr("krita_tool_perspectivegridng"));
diff --git a/krita/plugins/tools/tool_perspectivegridng/kritatoolperspectivegrid.desktop \
b/krita/plugins/tools/tool_perspectivegridng/kritatoolperspectivegrid.desktop deleted \
file mode 100644 index 76f47d1..0000000
--- a/krita/plugins/tools/tool_perspectivegridng/kritatoolperspectivegrid.desktop
+++ /dev/null
@@ -1,45 +0,0 @@
-[Desktop Entry]
-Name=Perspective Grid Tool
-Name[bg]=Инструмент перспективна мрежа
-Name[bs]=Alati za perspektivnu mrežu
-Name[ca]=Eina de graella de perspectiva
-Name[ca@valencia]=Eina de graella de perspectiva
-Name[da]=Perspektivgitterværktøj
-Name[de]=Perspektive-Raster-Werkzeug
-Name[el]=Εργαλείο προοπτικού καννάβου
-Name[en_GB]=Perspective Grid Tool
-Name[eo]=Perspektivkrado-ilo
-Name[es]=Herramienta de cuadrícula en perspectiva
-Name[et]=Perspektiivvõrgu tööriist
-Name[fa]=ابزار توری بُعدنما
-Name[fi]=Perspektiiviruudukko
-Name[fr]=Outils de de grille en perspective
-Name[fy]=Perspektive magnetyskfjild ark
-Name[gl]=Ferramenta de grade de perspectiva
-Name[hi]=पर्सपेक्टिव ग्रिड औज़ार
-Name[hne]=पर्सपेक्टिव ग्रिड औजार
-Name[hu]=Perspektívarács
-Name[it]=Strumento di reticolo prospettico
-Name[ja]= 近法グリッドツール
-Name[kk]=Перспективаны бағыттау құралы
-Name[lv]=Perspektīvas režģa rīks
-Name[nb]=Perspektivnett-verktøy
-Name[nds]=Kiekwinkelgadder-Warktüüch
-Name[ne]=दृश्यात्मक ग्रीड उपकरण
-Name[nl]=Perspectiefraster-gereedschap
-Name[pl]=Narzędzie siatki perspektywy
-Name[pt]=Ferramenta de Grelha em Perspectiva
-Name[pt_BR]=Ferramenta de Grade em Perspectiva
-Name[ru]=Перспектива
-Name[sk]=Perspektívna mriežka
-Name[sl]=Orodja Mreža za perspektivo
-Name[sv]=Perspektivrutnätsverktyg
-Name[tr]=Perspektif Izgara Aracı
-Name[uk]=Засіб ґратки перспективи
-Name[wa]=Usteye di grile di pespective
-Name[x-test]=xxPerspective Grid Toolxx
-Name[zh_TW]=透視 工具
-X-KDE-ServiceTypes=Krita/Tool
-Type=Service
-X-KDE-Library=kritatoolperspectivegrid
-X-Krita-Version=28
diff --git a/krita/plugins/tools/tool_perspectivegridng/kritatoolperspectivegridng.desktop \
b/krita/plugins/tools/tool_perspectivegridng/kritatoolperspectivegridng.desktop new \
file mode 100644 index 0000000..2679439
--- /dev/null
+++ b/krita/plugins/tools/tool_perspectivegridng/kritatoolperspectivegridng.desktop
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Name=Perspective GridNg Tool
+X-KDE-ServiceTypes=Krita/Tool
+Type=Service
+X-KDE-Library=kritatoolperspectivegridng
+X-Krita-Version=28
+Name[en]=Perspective GridNg Tool
diff --git a/krita/plugins/tools/tool_perspectivegridng/tool_perspectivegridng.cc \
b/krita/plugins/tools/tool_perspectivegridng/tool_perspectivegridng.cc index \
                c5ceb30..65644e5 100644
--- a/krita/plugins/tools/tool_perspectivegridng/tool_perspectivegridng.cc
+++ b/krita/plugins/tools/tool_perspectivegridng/tool_perspectivegridng.cc
@@ -35,7 +35,7 @@ KisPerspectiveGridNgToolPlugin::KisPerspectiveGridNgToolPlugin(QObject \
*parent,  {
     KoToolRegistry * r = KoToolRegistry::instance();
     r->add(new KisPerspectiveGridNgToolFactory());
-
+//    qDebug()<<"Shiva: " << "KisPerspectiveGridNgToolPlugin";
 //    KisPerspectiveGridNgFactoryRegistry::instance()->add(new \
RulerAssistantFactory);  //    \
KisPerspectiveGridNgFactoryRegistry::instance()->add(new EllipseAssistantFactory);  \
//    KisPerspectiveGridNgFactoryRegistry::instance()->add(new \
                SplineAssistantFactory);
diff --git a/krita/ui/kis_perspective_grid_managerng.cpp \
b/krita/ui/kis_perspective_grid_managerng.cpp index 456cca2..9a68418 100644
--- a/krita/ui/kis_perspective_grid_managerng.cpp
+++ b/krita/ui/kis_perspective_grid_managerng.cpp
@@ -38,9 +38,10 @@ struct KisPerspectiveGridNgManager::Private {
 };
 
 KisPerspectiveGridNgManager::KisPerspectiveGridNgManager(KisView2* parent) :
-        KisCanvasDecoration("paintingAssistantsManager", i18n("Painting \
assistants"), parent), +        KisCanvasDecoration("perspectiveGridNgManager", \
i18n("Perspective GridNg"), parent),  d(new Private)
 {
+    qDebug() << "Shiva --> KisPerspectiveGridNgManager";
 }
 
 KisPerspectiveGridNgManager::~KisPerspectiveGridNgManager()
diff --git a/krita/ui/kis_perspective_gridng.cpp \
b/krita/ui/kis_perspective_gridng.cpp index 9e5f881..97cc8e9 100644
--- a/krita/ui/kis_perspective_gridng.cpp
+++ b/krita/ui/kis_perspective_gridng.cpp
@@ -30,11 +30,25 @@
 #include <QPixmapCache>
 #include <KoStore.h>
 
+#include <math.h>
+#include <limits>
+
 struct KisPerspectiveGridNgHandle::Private {
     QList<KisPerspectiveGridNg*> assistants;
     char handle_type;
 };
 
+// squared distance from a point to a line
+inline qreal distsqr(const QPointF& pt, const QLineF& line)
+{
+    // distance = |(p2 - p1) x (p1 - pt)| / |p2 - p1|
+
+    // magnitude of (p2 - p1) x (p1 - pt)
+    const qreal cross = (line.dx() * (line.y1() - pt.y()) - line.dy() * (line.x1() - \
pt.x())); +
+    return cross * cross / (line.dx() * line.dx() + line.dy() * line.dy());
+}
+
 KisPerspectiveGridNgHandle::KisPerspectiveGridNgHandle(double x, double y) : \
QPointF(x, y), d(new Private)  {
 }
@@ -58,7 +72,7 @@ KisPerspectiveGridNgHandle& \
KisPerspectiveGridNgHandle::operator=(const QPointF  
 void KisPerspectiveGridNgHandle::setType(char type)
 {
-    d->handle_type = type;
+//    d->handle_type = type;
 }
 
 char KisPerspectiveGridNgHandle::handleType()
@@ -69,20 +83,20 @@ char KisPerspectiveGridNgHandle::handleType()
 
 KisPerspectiveGridNgHandle::~KisPerspectiveGridNgHandle()
 {
-    Q_ASSERT(d->assistants.empty());
-    delete d;
+//    Q_ASSERT(d->assistants.empty());
+//    delete d;
 }
 
 void KisPerspectiveGridNgHandle::registerAssistant(KisPerspectiveGridNg* assistant)
 {
-    Q_ASSERT(!d->assistants.contains(assistant));
-    d->assistants.append(assistant);
+//    Q_ASSERT(!d->assistants.contains(assistant));
+//    d->assistants.append(assistant);
 }
 
 void KisPerspectiveGridNgHandle::unregisterAssistant(KisPerspectiveGridNg* \
assistant)  {
-    d->assistants.removeOne(assistant);
-    Q_ASSERT(!d->assistants.contains(assistant));
+//    d->assistants.removeOne(assistant);
+//    Q_ASSERT(!d->assistants.contains(assistant));
 }
 
 bool KisPerspectiveGridNgHandle::containsAssistant(KisPerspectiveGridNg* assistant)
@@ -92,31 +106,31 @@ bool \
KisPerspectiveGridNgHandle::containsAssistant(KisPerspectiveGridNg* assista  
 void KisPerspectiveGridNgHandle::mergeWith(KisPerspectiveGridNgHandleSP handle)
 {
-    if(this->handleType()=='S' || handle.data()->handleType()== 'S')
-        return;
-    foreach(KisPerspectiveGridNg* assistant, handle->d->assistants) {
-        if (!assistant->handles().contains(this)) {
-            assistant->replaceHandle(handle, this);
-        }
-    }
+//    if(this->handleType()=='S' || handle.data()->handleType()== 'S')
+//        return;
+//    foreach(KisPerspectiveGridNg* assistant, handle->d->assistants) {
+//        if (!assistant->handles().contains(this)) {
+//            assistant->replaceHandle(handle, this);
+//        }
+//    }
 }
 
 QList<KisPerspectiveGridNgHandleSP> KisPerspectiveGridNgHandle::split()
 {
     QList<KisPerspectiveGridNgHandleSP> newHandles;
-    foreach(KisPerspectiveGridNg* assistant, d->assistants) {
-        KisPerspectiveGridNgHandleSP newHandle(new \
                KisPerspectiveGridNgHandle(*this));
-        newHandles.append(newHandle);
-        assistant->replaceHandle(this, newHandle);
-    }
+//    foreach(KisPerspectiveGridNg* assistant, d->assistants) {
+//        KisPerspectiveGridNgHandleSP newHandle(new \
KisPerspectiveGridNgHandle(*this)); +//        newHandles.append(newHandle);
+//        assistant->replaceHandle(this, newHandle);
+//    }
     return newHandles;
 }
 
 void KisPerspectiveGridNgHandle::uncache()
 {
-    foreach(KisPerspectiveGridNg* assistant, d->assistants) {
-        assistant->uncache();
-    }
+//    foreach(KisPerspectiveGridNg* assistant, d->assistants) {
+//        assistant->uncache();
+//    }
 }
 
 
@@ -137,6 +151,11 @@ struct KisPerspectiveGridNg::Private {
     } cachedTransform;
 };
 
+KisPerspectiveGridNg::KisPerspectiveGridNg()
+        : KisPerspectiveGridNg("perspectivegridng", i18n("Perspective GridNg"))
+{
+}
+
 KisPerspectiveGridNg::KisPerspectiveGridNg(const QString& id, const QString& name) : \
d(new Private)  {
     d->id = id;
@@ -145,18 +164,65 @@ KisPerspectiveGridNg::KisPerspectiveGridNg(const QString& id, \
const QString& nam  
 void KisPerspectiveGridNg::drawPath(QPainter& painter, const QPainterPath &path)
 {
-    painter.save();
-    QPen pen_a(QColor(0, 0, 0, 100), 2);
-    pen_a.setCosmetic(true);
-    painter.setPen(pen_a);
-    painter.drawPath(path);
-    QPen pen_b(Qt::white, 0.9);
-    pen_b.setCosmetic(true);
-    painter.setPen(pen_b);
-    painter.drawPath(path);
-    painter.restore();
+//    painter.save();
+//    QPen pen_a(QColor(0, 0, 0, 100), 2);
+//    pen_a.setCosmetic(true);
+//    painter.setPen(pen_a);
+//    painter.drawPath(path);
+//    QPen pen_b(Qt::white, 0.9);
+//    pen_b.setCosmetic(true);
+//    painter.setPen(pen_b);
+//    painter.drawPath(path);
+//    painter.restore();
+}
+
+//qreal KisPerspectiveGridNg::distance(const QPointF& pt) const
+//{
+//    QPolygonF poly;
+//    QTransform transform;
+//    if (!getTransform(poly, transform)) return 1.0;
+//    bool invertible;
+//    QTransform inverse = transform.inverted(&invertible);
+//    if (!invertible) return 1.0;
+//    if (inverse.m13() * pt.x() + inverse.m23() * pt.y() + inverse.m33() == 0.0) {
+//        // point at infinity
+//        return 0.0;
+//    }
+//    return localScale(transform, inverse.map(pt)) * \
inverseMaxLocalScale(transform); +//}
+
+bool KisPerspectiveGridNg::getTransform(QPolygonF& poly, QTransform& transform) \
const +{
+    if (m_cachedPolygon.size() != 0 && handles().size() == 4) {
+        for (int i = 0; i <= 4; ++i) {
+            if (i == 4) {
+                poly = m_cachedPolygon;
+                transform = m_cachedTransform;
+                return m_cacheValid;
+            }
+            if (m_cachedPoints[i] != *handles()[i]) break;
+        }
+    }
+    m_cachedPolygon.clear();
+    m_cacheValid = false;
+    if (!quad(poly)) {
+        m_cachedPolygon = poly;
+        return false;
+    }
+    if (!QTransform::squareToQuad(poly, transform)) {
+        qWarning("Failed to create perspective mapping");
+        return false;
+    }
+    for (int i = 0; i < 4; ++i) {
+        m_cachedPoints[i] = *handles()[i];
+    }
+    m_cachedPolygon = poly;
+    m_cachedTransform = transform;
+    m_cacheValid = true;
+    return true;
 }
 
+
 void KisPerspectiveGridNg::initHandles(QList<KisPerspectiveGridNgHandleSP> _handles)
 {
     Q_ASSERT(d->handles.isEmpty());
@@ -189,6 +255,25 @@ const QString& KisPerspectiveGridNg::name() const
     return d->name;
 }
 
+QPointF KisPerspectiveGridNg::adjustPosition(const QPointF& pt, const QPointF& \
strokeBegin) +{
+    return project(pt, strokeBegin);
+}
+
+void KisPerspectiveGridNg::endStroke()
+{
+    m_snapLine = QLineF();
+}
+
+QPointF KisPerspectiveGridNg::buttonPosition() const
+{
+    QPointF centroid(0, 0);
+    for (int i = 0; i < 4; ++i) centroid += *handles()[i];
+    return centroid * 0.25;
+}
+
+
+
 void KisPerspectiveGridNg::replaceHandle(KisPerspectiveGridNgHandleSP _handle, \
KisPerspectiveGridNgHandleSP _with)  {
     Q_ASSERT(d->handles.contains(_handle));
@@ -214,8 +299,33 @@ void \
KisPerspectiveGridNg::addSideHandle(KisPerspectiveGridNgHandleSP handle)  \
handle.data()->setType('S');  }
 
+inline QPainterPath drawX(const QPointF& pt)
+{
+    QPainterPath path;
+    path.moveTo(QPointF(pt.x() - 5.0, pt.y() - 5.0)); path.lineTo(QPointF(pt.x() + \
5.0, pt.y() + 5.0)); +    path.moveTo(QPointF(pt.x() - 5.0, pt.y() + 5.0)); \
path.lineTo(QPointF(pt.x() + 5.0, pt.y() - 5.0)); +    return path;
+}
+
 void KisPerspectiveGridNg::drawAssistant(QPainter& gc, const QRectF& updateRect, \
const KisCoordinatesConverter* converter, bool useCache,KisCanvas2* canvas)  {
+    gc.save();
+    gc.resetTransform();
+    QTransform initialTransform = converter->documentToWidgetTransform();
+    QPolygonF poly;
+    QTransform transform; // unused, but computed for caching purposes
+    if (getTransform(poly, transform)) {
+        // draw vanishing points
+        QPointF intersection(0, 0);
+        if (QLineF(poly[0], poly[1]).intersect(QLineF(poly[2], poly[3]), \
&intersection) != QLineF::NoIntersection) { +            drawPath(gc, \
drawX(initialTransform.map(intersection))); +        }
+        if (QLineF(poly[1], poly[2]).intersect(QLineF(poly[3], poly[0]), \
&intersection) != QLineF::NoIntersection) { +            drawPath(gc, \
drawX(initialTransform.map(intersection))); +        }
+    }
+    gc.restore();
+
     Q_UNUSED(updateRect);
     Q_UNUSED(canvas);
     findHandleLocation();
@@ -227,7 +337,7 @@ void KisPerspectiveGridNg::drawAssistant(QPainter& gc, const \
QRectF& updateRect,  }
     const QRect bound = boundingRect();
     if (bound.isEmpty()) return;
-    const QTransform transform = converter->documentToWidgetTransform();
+    /*const QTransform */transform = converter->documentToWidgetTransform();
     const QRect widgetBound = transform.mapRect(bound);
 
     const QRect paintRect = transform.mapRect(bound).intersected(gc.viewport());
@@ -255,6 +365,43 @@ void KisPerspectiveGridNg::drawAssistant(QPainter& gc, const \
                QRectF& updateRect,
     gc.drawPixmap(paintRect, cached, paintRect.translated(-widgetBound.topLeft() - \
d->cachedRect.topLeft()));  }
 
+
+
+void KisPerspectiveGridNg::drawCache(QPainter& gc, const KisCoordinatesConverter \
*converter) +{
+    gc.setTransform(converter->documentToWidgetTransform());
+    QPolygonF poly;
+    QTransform transform;
+    if (!getTransform(poly, transform)) {
+        // color red for an invalid transform, but not for an incomplete one
+        if(handles().size() == 4)
+        {
+            gc.setPen(QColor(255, 0, 0, 125));
+            gc.drawPolygon(poly);
+        } else {
+            QPainterPath path;
+            path.addPolygon(poly);
+            drawPath(gc, path);
+        }
+    } else {
+        gc.setPen(QColor(0, 0, 0, 125));
+        gc.setTransform(transform, true);
+        QPainterPath path;
+        for (int y = 0; y <= 8; ++y)
+        {
+            path.moveTo(QPointF(0.0, y * 0.125));
+            path.lineTo(QPointF(1.0, y * 0.125));
+        }
+        for (int x = 0; x <= 8; ++x)
+        {
+            path.moveTo(QPointF(x * 0.125, 0.0));
+            path.lineTo(QPointF(x * 0.125, 1.0));
+        }
+        drawPath(gc, path);
+    }
+}
+
+
 void KisPerspectiveGridNg::uncache()
 {
     d->cached = QPixmapCache::Key();
@@ -464,6 +611,113 @@ void KisPerspectiveGridNg::findHandleLocation() {
     }
 }
 
+QPointF KisPerspectiveGridNg::project(const QPointF& pt, const QPointF& strokeBegin)
+{
+    const static QPointF nullPoint(std::numeric_limits<qreal>::quiet_NaN(), \
std::numeric_limits<qreal>::quiet_NaN()); +    Q_ASSERT(handles().size() == 4);
+    if (m_snapLine.isNull()) {
+        QPolygonF poly;
+        QTransform transform;
+        if (!getTransform(poly, transform)) return nullPoint;
+        // avoid problems with multiple assistants: only snap if starting in the \
grid +        if (!poly.containsPoint(strokeBegin, Qt::OddEvenFill)) return \
nullPoint; +
+        const qreal
+            dx = pt.x() - strokeBegin.x(),
+            dy = pt.y() - strokeBegin.y();
+        if (dx * dx + dy * dy < 4.0) {
+            // allow some movement before snapping
+            return strokeBegin;
+        }
+
+        // construct transformation
+        bool invertible;
+        const QTransform inverse = transform.inverted(&invertible);
+        if (!invertible) return nullPoint; // shouldn't happen
+
+        // figure out which direction to go
+        const QPointF start = inverse.map(strokeBegin);
+        const QLineF
+            verticalLine = QLineF(strokeBegin, transform.map(start + QPointF(0, \
1))), +            horizontalLine = QLineF(strokeBegin, transform.map(start + \
QPointF(1, 0))); +        // determine whether the horizontal or vertical line is \
closer to the point +        m_snapLine = distsqr(pt, verticalLine) < distsqr(pt, \
horizontalLine) ? verticalLine : horizontalLine; +    }
+
+    // snap to line
+    const qreal
+        dx = m_snapLine.dx(),
+        dy = m_snapLine.dy(),
+        dx2 = dx * dx,
+        dy2 = dy * dy,
+        invsqrlen = 1.0 / (dx2 + dy2);
+    QPointF r(dx2 * pt.x() + dy2 * m_snapLine.x1() + dx * dy * (pt.y() - \
m_snapLine.y1()), +              dx2 * m_snapLine.y1() + dy2 * pt.y() + dx * dy * \
(pt.x() - m_snapLine.x1())); +    r *= invsqrlen;
+    return r;
+    return QPointF(0,0);
+}
+
+// perpendicular dot product
+inline qreal pdot(const QPointF& a, const QPointF& b)
+{
+    return a.x() * b.y() - a.y() * b.x();
+}
+
+template <typename T> int sign(T a)
+{
+    return (a > 0) - (a < 0);
+}
+
+
+bool KisPerspectiveGridNg::quad(QPolygonF& poly) const
+{
+    for (int i = 0; i < handles().size(); ++i)
+        poly.push_back(*handles()[i]);
+    if (handles().size() != 4) {
+        return false;
+    }
+    int sum = 0;
+    int signs[4];
+    for (int i = 0; i < 4; ++i) {
+        int j = (i == 3) ? 0 : (i + 1);
+        int k = (j == 3) ? 0 : (j + 1);
+        signs[i] = sign(pdot(poly[j] - poly[i], poly[k] - poly[j]));
+        sum += signs[i];
+    }
+    if (sum == 0) {
+        // complex (crossed)
+        for (int i = 0; i < 4; ++i) {
+            int j = (i == 3) ? 0 : (i + 1);
+            if (signs[i] * signs[j] == -1) {
+                // opposite signs: uncross
+                qSwap(poly[i], poly[j]);
+                return true;
+            }
+        }
+        // okay, maybe it's just a line
+        return false;
+    } else if (sum != 4 && sum != -4) {
+        // concave, or a triangle
+        if (sum == 2 || sum == -2) {
+            // concave, let's return a triangle instead
+            for (int i = 0; i < 4; ++i) {
+                int j = (i == 3) ? 0 : (i + 1);
+                if (signs[i] != sign(sum)) {
+                    // wrong sign: drop the inside node
+                    poly.remove(j);
+                    return false;
+                }
+            }
+        }
+        return false;
+    }
+    // convex
+    return true;
+}
+
+
+
 KisPerspectiveGridNgHandleSP KisPerspectiveGridNg::oppHandleOne()
 {
     QPointF intersection(0,0);
@@ -481,6 +735,7 @@ KisPerspectiveGridNgHandleSP KisPerspectiveGridNg::oppHandleOne()
     {
         return d->handles.at(3);
     }
+            return d->handles.at(0);//TODO: comment this line while running
 }
 
 KisPerspectiveGridNgHandleSP KisPerspectiveGridNg::topLeft()
@@ -591,6 +846,22 @@ KisPerspectiveGridNgFactory::~KisPerspectiveGridNgFactory()
 {
 }
 
+QString KisPerspectiveGridNgFactory::id() const
+{
+    return "perspectivegridng";
+}
+
+QString KisPerspectiveGridNgFactory::name() const
+{
+    return i18n("PerspectiveGridNg");
+}
+
+
+KisPerspectiveGridNg* KisPerspectiveGridNgFactory::createPerspectiveGridNg() const
+{
+    return new KisPerspectiveGridNg;
+}
+
 KisPerspectiveGridNgFactoryRegistry::KisPerspectiveGridNgFactoryRegistry()
 {
 }
@@ -609,3 +880,6 @@ KisPerspectiveGridNgFactoryRegistry* \
KisPerspectiveGridNgFactoryRegistry::instan  return s_instance;
 }
 
+
+
+
diff --git a/krita/ui/kis_perspective_gridng.h b/krita/ui/kis_perspective_gridng.h
index 67c1f59..7c8e548 100644
--- a/krita/ui/kis_perspective_gridng.h
+++ b/krita/ui/kis_perspective_gridng.h
@@ -41,6 +41,7 @@ class QRectF;
 class KisCoordinatesConverter;
 class KisDoc2;
 
+#include "kis_abstract_perspective_grid.h"
 #include <kis_shared_ptr.h>
 #include <KoGenericRegistry.h>
 
@@ -80,11 +81,12 @@ private:
  * A KisPerspectiveGridNg is an object that assist the drawing on the canvas.
  * With this class you can implement virtual equivalent to ruler or compas.
  */
-class KRITAUI_EXPORT KisPerspectiveGridNg
+class KRITAUI_EXPORT KisPerspectiveGridNg // : public KisAbstractPerspectiveGrid
 {
 public:
+    KisPerspectiveGridNg();
     KisPerspectiveGridNg(const QString& id, const QString& name);
-    virtual ~KisPerspectiveGridNg();
+    ~KisPerspectiveGridNg();
     const QString& id() const;
     const QString& name() const;
     /**
@@ -92,10 +94,10 @@ public:
      * @param point the coordinates in point in the document reference
      * @param strokeBegin the coordinates of the beginning of the stroke
      */
-    virtual QPointF adjustPosition(const QPointF& point, const QPointF& strokeBegin) \
                = 0;
-    virtual void endStroke() { }
-    virtual QPointF buttonPosition() const = 0;
-    virtual int numHandles() const = 0;
+    virtual QPointF adjustPosition(const QPointF& point, const QPointF& \
strokeBegin); +    virtual void endStroke();
+    virtual QPointF buttonPosition() const;
+    virtual int numHandles() const{ return 4; }
     void replaceHandle(KisPerspectiveGridNgHandleSP _handle, \
KisPerspectiveGridNgHandleSP _with);  void addHandle(KisPerspectiveGridNgHandleSP \
handle);  void addSideHandle(KisPerspectiveGridNgHandleSP handle);
@@ -138,10 +140,24 @@ public:
     static void drawPath(QPainter& painter, const QPainterPath& path);
 protected:
     virtual QRect boundingRect() const;
-    virtual void drawCache(QPainter& gc, const KisCoordinatesConverter *converter) = \
0; +    virtual void drawCache(QPainter& gc, const KisCoordinatesConverter \
*converter);  void initHandles(QList<KisPerspectiveGridNgHandleSP> _handles);
     QList<KisPerspectiveGridNgHandleSP> m_handles;
 private:
+    bool getTransform(QPolygonF& poly, QTransform& transform) const;
+    QPointF project(const QPointF& pt, const QPointF& strokeBegin);
+    // creates the convex hull, returns false if it's not a quadrilateral
+    bool quad(QPolygonF& out) const;
+    // finds the transform from perspective coordinates (a unit square) to the \
document +//    bool getTransform(QPolygonF& polyOut, QTransform& transformOut) \
const; +
+    // which direction to snap to (in transformed coordinates)
+    QLineF m_snapLine;
+    // cached information
+    mutable QTransform m_cachedTransform;
+    mutable QPolygonF m_cachedPolygon;
+    mutable QPointF m_cachedPoints[4];
+    mutable bool m_cacheValid;
     struct Private;
     Private* const d;
 };
@@ -154,9 +170,9 @@ class KRITAUI_EXPORT KisPerspectiveGridNgFactory
 public:
     KisPerspectiveGridNgFactory();
     virtual ~KisPerspectiveGridNgFactory();
-    virtual QString id() const = 0;
-    virtual QString name() const = 0;
-    virtual KisPerspectiveGridNg* createPerspectiveGridNg() const = 0;
+    QString id() const;
+    QString name() const;
+    virtual KisPerspectiveGridNg* createPerspectiveGridNg() const;
 
 };
 
diff --git a/krita/ui/kis_view2.cpp b/krita/ui/kis_view2.cpp
index 5b55c2a..3e7982f 100644
--- a/krita/ui/kis_view2.cpp
+++ b/krita/ui/kis_view2.cpp
@@ -90,6 +90,7 @@
 #include "canvas/kis_canvas_controller.h"
 #include "canvas/kis_grid_manager.h"
 #include "canvas/kis_perspective_grid_manager.h"
+#include "kis_perspective_grid_managerng.h"
 #include "dialogs/kis_dlg_preferences.h"
 #include "dialogs/kis_dlg_blacklist_cleanup.h"
 #include "kis_canvas_resource_provider.h"
@@ -167,6 +168,7 @@ public:
         , imageManager(0)
         , gridManager(0)
         , perspectiveGridManager(0)
+        , perspectiveGridNgManager(0)
         , paintingAssistantManager(0)
         , actionManager(0)
     {
@@ -186,6 +188,7 @@ public:
         delete imageManager;
         delete gridManager;
         delete perspectiveGridManager;
+        delete perspectiveGridNgManager;
         delete paintingAssistantManager;
         delete viewConverter;
         delete statusBar;
@@ -795,6 +798,10 @@ void KisView2::createManagers()
     m_d->perspectiveGridManager->setup(actionCollection());
     m_d->canvas->addDecoration(m_d->perspectiveGridManager);
 
+    m_d->perspectiveGridNgManager = new KisPerspectiveGridNgManager(this);
+    m_d->perspectiveGridNgManager->setup(actionCollection());
+    m_d->canvas->addDecoration(m_d->perspectiveGridNgManager);
+
     m_d->paintingAssistantManager = new KisPaintingAssistantsManager(this);
     m_d->paintingAssistantManager->setup(actionCollection());
     m_d->canvas->addDecoration(m_d->paintingAssistantManager);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic