# HG changeset patch # User Teemu Piippo # Date 1413983452 -10800 # Node ID c64c83cede6e8cab77f202c47797924f07e56c5b # Parent 3feb4d20092dd97ceb969fce7119a6d59ae6b3c8 - added integrity scan first steps diff -r 3feb4d20092d -r c64c83cede6e src/actions.cc --- 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() +{ + +} diff -r 3feb4d20092d -r c64c83cede6e src/integrityScan.cc --- /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 diff -r 3feb4d20092d -r c64c83cede6e src/integrityScan.h --- /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> 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 diff -r 3feb4d20092d -r c64c83cede6e src/mainWindow.h --- 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); diff -r 3feb4d20092d -r c64c83cede6e ui/integrityScan.ui --- /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 @@ + + + IntegrityScan + + + + 0 + 0 + 657 + 472 + + + + Integrity scan + + + + + + Tests + + + + + + + + Collinear objects + + + true + + + + + + + Non-coplanar quads + + + true + + + + + + + + + + + Stub polygons + + + true + + + + + + + Double lines + + + true + + + + + + + + + + + + Results + + + + + + true + + + + Line + + + + + Class + + + + + Details + + + + + + + + + + + 0 + + + true + + + QProgressBar::BottomToTop + + + + + + + + + false + + + Copy results to clipboard + + + + + + + false + + + Select offending objects + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Close|QDialogButtonBox::Ok + + + + + + + + + + + buttonBox + accepted() + IntegrityScan + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + IntegrityScan + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff -r 3feb4d20092d -r c64c83cede6e ui/ldforge.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 @@ 0 0 - 237 - 414 + 233 + 399 @@ -75,8 +75,8 @@ 0 0 - 237 - 414 + 256 + 384 @@ -157,8 +157,8 @@ 0 0 - 237 - 414 + 233 + 399 @@ -194,7 +194,7 @@ 0 0 1010 - 26 + 27 @@ -311,16 +311,8 @@ - - - - - - - - @@ -394,12 +386,28 @@ + + + Procedures + + + + + + + + + + + + + @@ -1719,6 +1727,14 @@ P + + + Integrity scan + + + Integrity scan + +