- added integrity scan first steps experimental

Wed, 22 Oct 2014 16:10:52 +0300

author
Teemu Piippo <crimsondusk64@gmail.com>
date
Wed, 22 Oct 2014 16:10:52 +0300
branch
experimental
changeset 915
c64c83cede6e
parent 912
3feb4d20092d
child 1356
8bcf7a81ab35

- added integrity scan first steps

src/actions.cc file | annotate | diff | comparison | revisions
src/integrityScan.cc file | annotate | diff | comparison | revisions
src/integrityScan.h file | annotate | diff | comparison | revisions
src/mainWindow.h file | annotate | diff | comparison | revisions
ui/integrityScan.ui file | annotate | diff | comparison | revisions
ui/ldforge.ui file | annotate | diff | comparison | revisions
--- a/src/actions.cc	Thu Nov 06 15:44:11 2014 +0200
+++ b/src/actions.cc	Wed Oct 22 16:10:52 2014 +0300
@@ -916,3 +916,8 @@
 	updateActions();
 	update();
 }
+
+void MainWindow::slot_actionIntegrityScan()
+{
+	
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/integrityScan.cc	Wed Oct 22 16:10:52 2014 +0300
@@ -0,0 +1,6 @@
+void IntegrityScan()
+{
+	QDialog* dlg = new QDialog;
+	Ui_IntegrityScan ui;
+	ui.setupUi (dlg);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/integrityScan.h	Wed Oct 22 16:10:52 2014 +0300
@@ -0,0 +1,43 @@
+#include "main.h"
+
+class Ui_IntegrityScan;
+
+class IntegrityScan
+{
+public:
+	class Procedure
+	{
+	public:
+		Procedure (IntegrityScan* scan);
+		virtual int numIterations() const = 0;
+		virtual int currentIteration() const = 0;
+		virtual void work() = 0;
+
+		DELETE_COPY (Procedure)
+	};
+
+	IntegrityScan();
+	~IntegrityScan();
+
+	DELETE_COPY (IntegrityScan)
+	LDDocumentPtr document() const;
+
+private:
+	Ui_IntegrityScan ui;
+	QVector<QSharedPtr<Procedure>> m_procedures;
+	LDDocumentPtr m_document;
+};
+
+class DoubleLineScan : public IntegrityScan::Procedure
+{
+public:
+	DoubleLineScan (IntegrityScan* scan);
+
+	int numIterations() const override;
+	int currentIteration() const override;
+	void work();
+
+private:
+	int m_i = 0;
+	
+};
\ No newline at end of file
--- a/src/mainWindow.h	Thu Nov 06 15:44:11 2014 +0200
+++ b/src/mainWindow.h	Wed Oct 22 16:10:52 2014 +0300
@@ -285,6 +285,7 @@
 	void slot_actionDrawSurfaces();
 	void slot_actionDrawEdgeLines();
 	void slot_actionDrawConditionalLines();
+	void slot_actionIntegrityScan();
 
 protected:
 	void closeEvent (QCloseEvent* ev);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ui/integrityScan.ui	Wed Oct 22 16:10:52 2014 +0300
@@ -0,0 +1,189 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>IntegrityScan</class>
+ <widget class="QDialog" name="IntegrityScan">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>657</width>
+    <height>472</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Integrity scan</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <item>
+    <widget class="QGroupBox" name="groupBox">
+     <property name="title">
+      <string>Tests</string>
+     </property>
+     <layout class="QHBoxLayout" name="horizontalLayout">
+      <item>
+       <layout class="QVBoxLayout" name="verticalLayout_3">
+        <item>
+         <widget class="QCheckBox" name="checkCollinear">
+          <property name="text">
+           <string>Collinear objects</string>
+          </property>
+          <property name="checked">
+           <bool>true</bool>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QCheckBox" name="checkNonCoplanar">
+          <property name="text">
+           <string>Non-coplanar quads</string>
+          </property>
+          <property name="checked">
+           <bool>true</bool>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+      <item>
+       <layout class="QVBoxLayout" name="verticalLayout_4">
+        <item>
+         <widget class="QCheckBox" name="checkStubs">
+          <property name="text">
+           <string>Stub polygons</string>
+          </property>
+          <property name="checked">
+           <bool>true</bool>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QCheckBox" name="checkDoubleLines">
+          <property name="text">
+           <string>Double lines</string>
+          </property>
+          <property name="checked">
+           <bool>true</bool>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QGroupBox" name="groupBox_2">
+     <property name="title">
+      <string>Results</string>
+     </property>
+     <layout class="QVBoxLayout" name="verticalLayout_2">
+      <item>
+       <widget class="QTableWidget" name="results">
+        <attribute name="horizontalHeaderStretchLastSection">
+         <bool>true</bool>
+        </attribute>
+        <column>
+         <property name="text">
+          <string>Line</string>
+         </property>
+        </column>
+        <column>
+         <property name="text">
+          <string>Class</string>
+         </property>
+        </column>
+        <column>
+         <property name="text">
+          <string>Details</string>
+         </property>
+        </column>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QProgressBar" name="progressBar">
+     <property name="value">
+      <number>0</number>
+     </property>
+     <property name="textVisible">
+      <bool>true</bool>
+     </property>
+     <property name="textDirection">
+      <enum>QProgressBar::BottomToTop</enum>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <layout class="QHBoxLayout" name="horizontalLayout_2">
+     <item>
+      <widget class="QPushButton" name="copyResults">
+       <property name="enabled">
+        <bool>false</bool>
+       </property>
+       <property name="text">
+        <string>Copy results to clipboard</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="selectObjects">
+       <property name="enabled">
+        <bool>false</bool>
+       </property>
+       <property name="text">
+        <string>Select offending objects</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QDialogButtonBox" name="buttonBox">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="standardButtons">
+        <set>QDialogButtonBox::Close|QDialogButtonBox::Ok</set>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>IntegrityScan</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>IntegrityScan</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
--- a/ui/ldforge.ui	Thu Nov 06 15:44:11 2014 +0200
+++ b/ui/ldforge.ui	Wed Oct 22 16:10:52 2014 +0300
@@ -47,8 +47,8 @@
           <rect>
            <x>0</x>
            <y>0</y>
-           <width>237</width>
-           <height>414</height>
+           <width>233</width>
+           <height>399</height>
           </rect>
          </property>
          <attribute name="label">
@@ -75,8 +75,8 @@
           <rect>
            <x>0</x>
            <y>0</y>
-           <width>237</width>
-           <height>414</height>
+           <width>256</width>
+           <height>384</height>
           </rect>
          </property>
          <attribute name="label">
@@ -157,8 +157,8 @@
           <rect>
            <x>0</x>
            <y>0</y>
-           <width>237</width>
-           <height>414</height>
+           <width>233</width>
+           <height>399</height>
           </rect>
          </property>
          <attribute name="label">
@@ -194,7 +194,7 @@
      <x>0</x>
      <y>0</y>
      <width>1010</width>
-     <height>26</height>
+     <height>27</height>
     </rect>
    </property>
    <widget class="QMenu" name="menuFile">
@@ -311,16 +311,8 @@
     <addaction name="separator"/>
     <addaction name="actionAddHistoryLine"/>
     <addaction name="separator"/>
-    <addaction name="actionSplitQuads"/>
-    <addaction name="actionEditRaw"/>
-    <addaction name="actionBorders"/>
-    <addaction name="actionCornerVerts"/>
-    <addaction name="actionRoundCoordinates"/>
-    <addaction name="actionReplaceCoords"/>
     <addaction name="actionFlip"/>
-    <addaction name="actionDemote"/>
     <addaction name="actionOpenSubfiles"/>
-    <addaction name="actionSplitLines"/>
     <addaction name="separator"/>
     <addaction name="actionVisibilityHide"/>
     <addaction name="actionVisibilityToggle"/>
@@ -394,12 +386,28 @@
     <addaction name="separator"/>
     <addaction name="actionRotationPoint"/>
    </widget>
+   <widget class="QMenu" name="menuProcedures">
+    <property name="title">
+     <string>Procedures</string>
+    </property>
+    <addaction name="actionEditRaw"/>
+    <addaction name="actionSplitQuads"/>
+    <addaction name="actionBorders"/>
+    <addaction name="actionCornerVerts"/>
+    <addaction name="actionRoundCoordinates"/>
+    <addaction name="actionReplaceCoords"/>
+    <addaction name="actionDemote"/>
+    <addaction name="actionSplitLines"/>
+    <addaction name="separator"/>
+    <addaction name="actionIntegrityScan"/>
+   </widget>
    <addaction name="menuFile"/>
    <addaction name="menuView"/>
    <addaction name="menuInsert"/>
    <addaction name="menuEdit"/>
    <addaction name="menuMov"/>
    <addaction name="menuTools"/>
+   <addaction name="menuProcedures"/>
    <addaction name="menuExternal_Tools"/>
    <addaction name="menuHelp"/>
   </widget>
@@ -1719,6 +1727,14 @@
     <string>P</string>
    </property>
   </action>
+  <action name="actionIntegrityScan">
+   <property name="text">
+    <string>Integrity scan</string>
+   </property>
+   <property name="toolTip">
+    <string>Integrity scan</string>
+   </property>
+  </action>
  </widget>
  <resources>
   <include location="../ldforge.qrc"/>

mercurial