[kde-doc-english] [symboleditor] /: Added option to simplify the number of angles checked for guides

Steve Allewell steve.allewell at gmail.com
Sun Jul 27 19:40:51 UTC 2014


Git commit 8e1ccf95f3d9c56983f0a238f63aeec245639f39 by Steve Allewell.
Committed on 27/07/2014 at 16:10.
Pushed by sallewell into branch 'master'.

Added option to simplify the number of angles checked for guides

With the option unchecked angles are checked at each 15 degrees, when
checked the angles checked are every 45 degree.

GUI: New gui option in configuration dialog

M  +4    -0    SymbolEditor.kcfg
M  +8    -2    src/Editor.cpp
M  +9    -2    ui/EditorConfigPage.ui

http://commits.kde.org/symboleditor/8e1ccf95f3d9c56983f0a238f63aeec245639f39

diff --git a/SymbolEditor.kcfg b/SymbolEditor.kcfg
index 7ba4d1c..82eff01 100644
--- a/SymbolEditor.kcfg
+++ b/SymbolEditor.kcfg
@@ -38,5 +38,9 @@
             <label>The color of the guide lines</label>
             <default>#FF0000</default>
         </entry>
+        <entry name="Editor_SimplifiedGuideLines" type="Bool">
+            <label>Whether to use a simplified range of angles to test</label>
+            <default>false</default>
+        </entry>
     </group>
 </kcfg>
diff --git a/src/Editor.cpp b/src/Editor.cpp
index e7a121c..d18866b 100644
--- a/src/Editor.cpp
+++ b/src/Editor.cpp
@@ -215,8 +215,6 @@ Editor::Editor(QWidget *parent)
     m_bottomEdge = QLineF(0.0, 1.0, 1.0, 1.0);
     m_leftEdge = QLineF(0.0, 0.0, 0.0, 1.0);
     m_rightEdge = QLineF(1.0, 0, 1.0, 1.0);
-
-    m_angles << 0 << 15 << 30 << 45 << 60 << 75 << 90 << 105 << 120 << 135 << 150 << 165;
 }
 
 
@@ -785,6 +783,14 @@ void Editor::readSettings()
     m_preferredSizeColor = Configuration::editor_PreferredSizeColor();
     m_guideLineColor     = Configuration::editor_GuideLineColor();
 
+    m_angles.clear();
+
+    if (Configuration::editor_SimplifiedGuideLines()) {
+        m_angles << 0 << 45 << 90 << 135;
+    } else {
+        m_angles << 0 << 15 << 30 << 45 << 60 << 75 << 90 << 105 << 120 << 135 << 150 << 165;
+    }
+
     int minimumSize = m_elementSize * m_gridElements + 1;
     setMinimumSize(minimumSize, minimumSize);
 }
diff --git a/ui/EditorConfigPage.ui b/ui/EditorConfigPage.ui
index 76d86af..9a3cd68 100644
--- a/ui/EditorConfigPage.ui
+++ b/ui/EditorConfigPage.ui
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>251</width>
-    <height>214</height>
+    <width>260</width>
+    <height>239</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -170,6 +170,13 @@
      </property>
     </widget>
    </item>
+   <item row="8" column="0">
+    <widget class="QCheckBox" name="kcfg_Editor_SimplifiedGuideLines">
+     <property name="text">
+      <string>Simplified guide lines</string>
+     </property>
+    </widget>
+   </item>
   </layout>
  </widget>
  <customwidgets>



More information about the kde-doc-english mailing list