Thu, 27 Jun 2013 02:46:12 +0300
Added an ui file for a to-be edger2 launcher
ldforge.pro | file | annotate | diff | comparison | revisions | |
src/extprogs.cpp | file | annotate | diff | comparison | revisions | |
src/extprogs.h | file | annotate | diff | comparison | revisions | |
src/gui.cpp | file | annotate | diff | comparison | revisions | |
src/ui/edger2.ui | file | annotate | diff | comparison | revisions |
--- a/ldforge.pro Fri Jun 21 18:41:44 2013 +0300 +++ b/ldforge.pro Thu Jun 27 02:46:12 2013 +0300 @@ -2,21 +2,6 @@ # Automatically generated by qmake (2.01a) Sat Sep 22 17:29:49 2012 ###################################################################### -TEMPLATE = app -TARGET = ldforge -DEPENDPATH += . -INCLUDEPATH += . -OBJECTS_DIR = ./build/ -RC_FILE = ldforge.rc -RESOURCES = ldforge.qrc -MOC_DIR = ./autogen/ -RCC_DIR = ./autogen/ -SOURCES = ./src/*.cpp -HEADERS = ./src/*.h - -QMAKE_CXXFLAGS += -std=c++0x -QT += opengl - -unix { - LIBS += -lGLU -} \ No newline at end of file +TEMPLATE = subdirs +TARGET = ldforge +SUBDIRS += ./src \ No newline at end of file
--- a/src/extprogs.cpp Fri Jun 21 18:41:44 2013 +0300 +++ b/src/extprogs.cpp Thu Jun 27 02:46:12 2013 +0300 @@ -34,6 +34,7 @@ #include "widgets.h" #include "history.h" #include "labeledwidget.h" +#include "ui_edger2.h" // ============================================================================= cfg (str, prog_isecalc, ""); @@ -41,6 +42,7 @@ cfg (str, prog_coverer, ""); cfg (str, prog_ytruder, ""); cfg (str, prog_rectifier, ""); +cfg (str, prog_edger2, ""); #ifndef _WIN32 cfg (bool, prog_isecalc_wine, false); @@ -48,6 +50,7 @@ cfg (bool, prog_coverer_wine, false); cfg (bool, prog_ytruder_wine, false); cfg (bool, prog_rectifier_wine, false); +cfg (bool, prog_edger2_wine, false); boolconfig* const g_extProgWine[] = { &prog_isecalc_wine, @@ -55,6 +58,7 @@ &prog_coverer_wine, &prog_ytruder_wine, &prog_rectifier_wine, + &prog_edger2_wine, }; #endif // _WIN32 @@ -64,6 +68,7 @@ "Coverer", "Ytruder", "Rectifier", + "Edger2" }; // ============================================================================= @@ -252,6 +257,8 @@ } // ============================================================================= +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +// ============================================================================= // Interface for Ytruder void runYtruder () { setlocale (LC_ALL, "C"); @@ -313,7 +320,9 @@ insertOutput (outDATName, false, {}); } -// ======================================================================================================================================== +// ============================================================================= +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +// ============================================================================= // Rectifier interface void runRectifier () { setlocale (LC_ALL, "C"); @@ -382,9 +391,9 @@ return widget; } -// ======================================================================================================================================= -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -// ======================================================================================================================================= +// ============================================================================= +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +// ============================================================================= // Intersector interface void runIntersector () { setlocale (LC_ALL, "C"); @@ -494,9 +503,9 @@ } } -// ======================================================================================================================================= -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -// ======================================================================================================================================= +// ============================================================================= +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +// ============================================================================= void runCoverer () { setlocale (LC_ALL, "C"); @@ -568,6 +577,9 @@ insertOutput (outDATName, false, {}); } +// ============================================================================= +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +// ============================================================================= void runIsecalc () { setlocale (LC_ALL, "C"); @@ -612,4 +624,19 @@ writeColorGroup (in2Col, in2DATName); runUtilityProcess (Isecalc, prog_isecalc, argv); insertOutput (outDATName, false, {}); +} + +// ============================================================================= +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +// ============================================================================= +MAKE_ACTION( edger2, "Edger 2", "edger2", "Compute edgelines", 0 ) { + QDialog* form = new QDialog; + Ui::Edger2Dialog ui; + ui.setupUi( form ); + +exec: + if( !form->exec() ) + return; + + } \ No newline at end of file
--- a/src/extprogs.h Fri Jun 21 18:41:44 2013 +0300 +++ b/src/extprogs.h Thu Jun 27 02:46:12 2013 +0300 @@ -27,6 +27,7 @@ Coverer, Ytruder, Rectifier, + Edger2, }; void runYtruder ();
--- a/src/gui.cpp Fri Jun 21 18:41:44 2013 +0300 +++ b/src/gui.cpp Thu Jun 27 02:46:12 2013 +0300 @@ -171,111 +171,111 @@ // File menu initMenu ("&File"); - addMenuAction ("newFile"); // New - addMenuAction ("open"); // Open - menu->addMenu (m_recentFilesMenu); // Open Recent - addMenuAction ("save"); // Save - addMenuAction ("saveAs"); // Save As - menu->addSeparator (); // ------- - addMenuAction ("insertFrom"); // Insert from File - addMenuAction ("exportTo"); // Export to File - menu->addSeparator (); // ------- - addMenuAction ("settings"); // Settings - addMenuAction ("setLDrawPath"); // Set LDraw Path - menu->addSeparator (); // ------- - addMenuAction ("testpic"); // Set LDraw Path + addMenuAction ("newFile"); + addMenuAction ("open"); + menu->addMenu (m_recentFilesMenu); + addMenuAction ("save"); + addMenuAction ("saveAs"); + menu->addSeparator (); + addMenuAction ("insertFrom"); + addMenuAction ("exportTo"); + menu->addSeparator (); + addMenuAction ("settings"); + addMenuAction ("setLDrawPath"); + menu->addSeparator (); + addMenuAction ("testpic"); addMenuAction ("reloadPrimitives"); - menu->addSeparator (); // ------- - addMenuAction ("exit"); // Exit + menu->addSeparator (); + addMenuAction ("exit"); // View menu initMenu ("&View"); - addMenuAction ("resetView"); // Reset View - addMenuAction ("axes"); // Draw Axes - addMenuAction ("wireframe"); // Wireframe - menu->addSeparator (); // ----- - addMenuAction ("setOverlay"); // Set Overlay Image - addMenuAction ("clearOverlay"); // Clear Overlay Image - menu->addSeparator (); // ----- - addMenuAction ("screencap"); // Screencap Part - addMenuAction ("showHistory"); // Edit History + addMenuAction ("resetView"); + addMenuAction ("axes"); + addMenuAction ("wireframe"); + menu->addSeparator (); + addMenuAction ("setOverlay"); + addMenuAction ("clearOverlay"); + menu->addSeparator (); + addMenuAction ("screencap"); + addMenuAction ("showHistory"); // Insert menu initMenu ("&Insert"); - addMenuAction ("insertRaw"); // Insert Raw - menu->addSeparator (); // ------- - addMenuAction ("newSubfile"); // New Subfile - addMenuAction ("newLine"); // New Line - addMenuAction ("newTriangle"); // New Triangle - addMenuAction ("newQuad"); // New Quad - addMenuAction ("newCondLine"); // New Conditional Line - addMenuAction ("newComment"); // New Comment - addMenuAction ("newBFC"); // New BFC Statment - addMenuAction ("newVertex"); // New Vertex - addMenuAction ("newRadial"); // New Radial + addMenuAction ("insertRaw"); + menu->addSeparator (); + addMenuAction ("newSubfile"); + addMenuAction ("newLine"); + addMenuAction ("newTriangle"); + addMenuAction ("newQuad"); + addMenuAction ("newCondLine"); + addMenuAction ("newComment"); + addMenuAction ("newBFC"); + addMenuAction ("newVertex"); + addMenuAction ("newRadial"); // Edit menu initMenu ("&Edit"); - addMenuAction ("undo"); // Undo - addMenuAction ("redo"); // Redo - menu->addSeparator (); // ----- - addMenuAction ("cut"); // Cut - addMenuAction ("copy"); // Copy - addMenuAction ("paste"); // Paste - addMenuAction ("del"); // Delete - menu->addSeparator (); // ----- - addMenuAction ("selectAll"); // Select All - addMenuAction ("selectByColor"); // Select by Color - addMenuAction ("selectByType"); // Select by Type - menu->addSeparator (); // ----- - addMenuAction ("modeSelect"); // Select Mode - addMenuAction ("modeDraw"); // Draw Mode - menu->addSeparator (); // ----- - addMenuAction ("setDrawDepth"); // Set Draw Depth + addMenuAction ("undo"); + addMenuAction ("redo"); + menu->addSeparator (); + addMenuAction ("cut"); + addMenuAction ("copy"); + addMenuAction ("paste"); + addMenuAction ("del"); + menu->addSeparator (); + addMenuAction ("selectAll"); + addMenuAction ("selectByColor"); + addMenuAction ("selectByType"); + menu->addSeparator (); + addMenuAction ("modeSelect"); + addMenuAction ("modeDraw"); + menu->addSeparator (); + addMenuAction ("setDrawDepth"); initMenu ("&Tools"); - addMenuAction ("setColor"); // Set Color - addMenuAction ("autoColor"); // Auto-color - addMenuAction ("uncolorize"); // Uncolorize - menu->addSeparator (); // ----- - addMenuAction ("invert"); // Invert - addMenuAction ("inlineContents"); // Inline - addMenuAction ("deepInline"); // Deep Inline - addMenuAction ("radialConvert"); // Radials to Subfiles - menu->addSeparator (); // ----- - addMenuAction ("splitQuads"); // Split Quads - addMenuAction ("setContents"); // Set Contents - addMenuAction ("makeBorders"); // Make Borders - addMenuAction ("makeCornerVerts"); // Make Corner Vertices - addMenuAction ("roundCoords"); // Round Coordinates - addMenuAction ("visibility"); // Toggle Visibility - addMenuAction ("replaceCoords"); // Replace Coordinates - addMenuAction ("flip"); // Flip - addMenuAction ("demote"); // Demote Conditional Lines + addMenuAction ("setColor"); + addMenuAction ("autoColor"); + addMenuAction ("uncolorize"); + menu->addSeparator (); + addMenuAction ("invert"); + addMenuAction ("inlineContents"); + addMenuAction ("deepInline"); + addMenuAction ("radialConvert"); + menu->addSeparator (); + addMenuAction ("splitQuads"); + addMenuAction ("setContents"); + addMenuAction ("makeBorders"); + addMenuAction ("makeCornerVerts"); + addMenuAction ("roundCoords"); + addMenuAction ("visibility"); + addMenuAction ("replaceCoords"); + addMenuAction ("flip"); + addMenuAction ("demote"); // Move menu initMenu ("&Move"); - addMenuAction ("moveUp"); // Move Up - addMenuAction ("moveDown"); // Move Down - menu->addSeparator (); // ----- - addMenuAction ("gridCoarse"); // Coarse Grid - addMenuAction ("gridMedium"); // Medium Grid - addMenuAction ("gridFine"); // Fine Grid - menu->addSeparator (); // ----- - addMenuAction ("moveXPos"); // Move +X - addMenuAction ("moveXNeg"); // Move -X - addMenuAction ("moveYPos"); // Move +Y - addMenuAction ("moveYNeg"); // Move -Y - addMenuAction ("moveZPos"); // Move +Z - addMenuAction ("moveZNeg"); // Move -Z - menu->addSeparator (); // ----- - addMenuAction ("rotateXPos"); // Rotate +X - addMenuAction ("rotateXNeg"); // Rotate -X - addMenuAction ("rotateYPos"); // Rotate +Y - addMenuAction ("rotateYNeg"); // Rotate -Y - addMenuAction ("rotateZPos"); // Rotate +Z - addMenuAction ("rotateZNeg"); // Rotate -Z - addMenuAction ("rotpoint"); // Set Rotation Point + addMenuAction ("moveUp"); + addMenuAction ("moveDown"); + menu->addSeparator (); + addMenuAction ("gridCoarse"); + addMenuAction ("gridMedium"); + addMenuAction ("gridFine"); + menu->addSeparator (); + addMenuAction ("moveXPos"); + addMenuAction ("moveXNeg"); + addMenuAction ("moveYPos"); + addMenuAction ("moveYNeg"); + addMenuAction ("moveZPos"); + addMenuAction ("moveZNeg"); + menu->addSeparator (); + addMenuAction ("rotateXPos"); + addMenuAction ("rotateXNeg"); + addMenuAction ("rotateYPos"); + addMenuAction ("rotateYNeg"); + addMenuAction ("rotateZPos"); + addMenuAction ("rotateZNeg"); + addMenuAction ("rotpoint"); initMenu ("E&xternal Programs"); addMenuAction ("ytruder"); @@ -283,6 +283,7 @@ addMenuAction ("intersector"); addMenuAction ("isecalc"); addMenuAction ("coverer"); + addMenuAction ("edger2"); // Help menu initMenu ("&Help");
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/ui/edger2.ui Thu Jun 27 02:46:12 2013 +0300 @@ -0,0 +1,269 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>Edger2Dialog</class> + <widget class="QDialog" name="Edger2Dialog"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>418</width> + <height>257</height> + </rect> + </property> + <property name="windowTitle"> + <string>Edger 2</string> + </property> + <property name="windowOpacity"> + <double>1.000000000000000</double> + </property> + <widget class="QDialogButtonBox" name="buttonBox"> + <property name="geometry"> + <rect> + <x>30</x> + <y>220</y> + <width>341</width> + <height>32</height> + </rect> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="standardButtons"> + <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> + </property> + </widget> + <widget class="QWidget" name="gridLayoutWidget"> + <property name="geometry"> + <rect> + <x>10</x> + <y>0</y> + <width>401</width> + <height>220</height> + </rect> + </property> + <layout class="QGridLayout" name="gridLayout"> + <item row="6" column="1"> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <widget class="QCheckBox" name="cb_colored"> + <property name="text"> + <string>Color-coded</string> + </property> + </widget> + </item> + <item> + <widget class="QCheckBox" name="cb_dellines"> + <property name="text"> + <string>Delete existing lines</string> + </property> + </widget> + </item> + <item> + <widget class="QCheckBox" name="cb_delcond"> + <property name="text"> + <string>Delete existing cond. lines</string> + </property> + </widget> + </item> + </layout> + </item> + <item row="3" column="2"> + <widget class="QDoubleSpinBox" name="dsb_edgeangle"> + <property name="suffix"> + <string>°</string> + </property> + <property name="decimals"> + <number>4</number> + </property> + <property name="maximum"> + <double>360.000000000000000</double> + </property> + <property name="singleStep"> + <double>0.100000000000000</double> + </property> + <property name="value"> + <double>60.000000000000000</double> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="QLabel" name="label_2"> + <property name="text"> + <string>Conditional line angle</string> + </property> + </widget> + </item> + <item row="2" column="2"> + <widget class="QDoubleSpinBox" name="dsb_condangle"> + <property name="suffix"> + <string>°</string> + </property> + <property name="decimals"> + <number>4</number> + </property> + <property name="maximum"> + <double>360.000000000000000</double> + </property> + <property name="singleStep"> + <double>0.100000000000000</double> + </property> + <property name="value"> + <double>60.000000000000000</double> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QLabel" name="label_3"> + <property name="text"> + <string>Flat angle</string> + </property> + </widget> + </item> + <item row="3" column="1"> + <widget class="QLabel" name="label_4"> + <property name="text"> + <string>Edge line angle</string> + </property> + </widget> + </item> + <item row="0" column="2"> + <widget class="QDoubleSpinBox" name="dsb_precision"> + <property name="suffix"> + <string/> + </property> + <property name="decimals"> + <number>4</number> + </property> + <property name="value"> + <double>0.001000000000000</double> + </property> + </widget> + </item> + <item row="4" column="2"> + <widget class="QComboBox" name="cmb_unmatched"> + <property name="currentIndex"> + <number>1</number> + </property> + <item> + <property name="text"> + <string>Only</string> + </property> + </item> + <item> + <property name="text"> + <string>Normally</string> + </property> + </item> + <item> + <property name="text"> + <string>Never</string> + </property> + </item> + </widget> + </item> + <item row="0" column="1"> + <widget class="QLabel" name="label"> + <property name="text"> + <string>Precision</string> + </property> + </widget> + </item> + <item row="1" column="2"> + <widget class="QDoubleSpinBox" name="dsb_flatangle"> + <property name="suffix"> + <string>°</string> + </property> + <property name="decimals"> + <number>4</number> + </property> + <property name="minimum"> + <double>0.000000000000000</double> + </property> + <property name="maximum"> + <double>360.000000000000000</double> + </property> + <property name="singleStep"> + <double>0.100000000000000</double> + </property> + <property name="value"> + <double>0.100000000000000</double> + </property> + </widget> + </item> + <item row="4" column="1"> + <widget class="QLabel" name="label_5"> + <property name="text"> + <string>Create unmatched edges</string> + </property> + </widget> + </item> + <item row="6" column="2"> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <item> + <widget class="QCheckBox" name="cb_bfc"> + <property name="text"> + <string>File is BFCd</string> + </property> + </widget> + </item> + <item> + <widget class="QCheckBox" name="cb_convex"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>Convex cond. lines only</string> + </property> + </widget> + </item> + <item> + <widget class="QCheckBox" name="cb_concave"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>Concave cond. lines only</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + </widget> + <resources/> + <connections> + <connection> + <sender>buttonBox</sender> + <signal>accepted()</signal> + <receiver>Edger2Dialog</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>Edger2Dialog</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>