More through removal of the vertex object

Sun, 30 Aug 2015 04:57:09 +0300

author
Teemu Piippo <crimsondusk64@gmail.com>
date
Sun, 30 Aug 2015 04:57:09 +0300
changeset 963
c1526d1877d7
parent 962
a4b463a7ee82
child 964
70f6900a92d5

More through removal of the vertex object

icons/add-vertex.png file | annotate | diff | comparison | revisions
icons/corner-verts.png file | annotate | diff | comparison | revisions
icons/vertex.png file | annotate | diff | comparison | revisions
ldforge.qrc file | annotate | diff | comparison | revisions
src/actions.cpp file | annotate | diff | comparison | revisions
src/addObjectDialog.cpp file | annotate | diff | comparison | revisions
src/ldObject.cpp file | annotate | diff | comparison | revisions
src/ldObject.h file | annotate | diff | comparison | revisions
src/mainwindow.cpp file | annotate | diff | comparison | revisions
src/mainwindow.h file | annotate | diff | comparison | revisions
src/mainwindow.ui file | annotate | diff | comparison | revisions
Binary file icons/add-vertex.png has changed
Binary file icons/corner-verts.png has changed
Binary file icons/vertex.png has changed
--- a/ldforge.qrc	Sun Aug 30 04:53:37 2015 +0300
+++ b/ldforge.qrc	Sun Aug 30 04:57:09 2015 +0300
@@ -9,7 +9,6 @@
 	<file>./icons/add-radial.png</file>
 	<file>./icons/add-subfile.png</file>
 	<file>./icons/add-triangle.png</file>
-	<file>./icons/add-vertex.png</file>
 	<file>./icons/arrow-down.png</file>
 	<file>./icons/arrow-left.png</file>
 	<file>./icons/arrow-right.png</file>
@@ -34,7 +33,6 @@
 	<file>./icons/comment.png</file>
 	<file>./icons/condline.png</file>
 	<file>./icons/copy.png</file>
-	<file>./icons/corner-verts.png</file>
 	<file>./icons/coverer.png</file>
 	<file>./icons/cut.png</file>
 	<file>./icons/delete.png</file>
@@ -102,7 +100,6 @@
 	<file>./icons/triangle.png</file>
 	<file>./icons/uncolorize.png</file>
 	<file>./icons/undo.png</file>
-	<file>./icons/vertex.png</file>
 	<file>./icons/visibility-hide.png</file>
 	<file>./icons/visibility-show.png</file>
 	<file>./icons/visibility-toggle.png</file>
--- a/src/actions.cpp	Sun Aug 30 04:53:37 2015 +0300
+++ b/src/actions.cpp	Sun Aug 30 04:57:09 2015 +0300
@@ -201,13 +201,6 @@
 
 // =============================================================================
 //
-void MainWindow::slot_actionNewVertex()
-{
-	AddObjectDialog::staticDialog (OBJ_Vertex, nullptr);
-}
-
-// =============================================================================
-//
 void MainWindow::slot_actionEdit()
 {
 	if (Selection().size() != 1)
--- a/src/addObjectDialog.cpp	Sun Aug 30 04:53:37 2015 +0300
+++ b/src/addObjectDialog.cpp	Sun Aug 30 04:57:09 2015 +0300
@@ -73,11 +73,6 @@
 			coordCount = 12;
 		} break;
 
-		case OBJ_Vertex:
-		{
-			coordCount = 3;
-		} break;
-
 		case OBJ_BFC:
 		{
 			rb_bfcType = new RadioGroup ("Statement", {}, 0, Qt::Vertical);
--- a/src/ldObject.cpp	Sun Aug 30 04:53:37 2015 +0300
+++ b/src/ldObject.cpp	Sun Aug 30 04:57:09 2015 +0300
@@ -511,11 +511,6 @@
 			text += ", ";
 
 		QString noun = format ("%1%2", typeName (objType), Plural (count));
-
-		// Plural of "vertex" is "vertices", correct that
-		if (objType == OBJ_Vertex and count != 1)
-			noun = "vertices";
-
 		text += format ("%1 %2", count, noun);
 	}
 
--- a/src/ldObject.h	Sun Aug 30 04:53:37 2015 +0300
+++ b/src/ldObject.h	Sun Aug 30 04:57:09 2015 +0300
@@ -67,7 +67,6 @@
 	OBJ_Triangle,		//	Object represents a	triangle
 	OBJ_Line,			//	Object represents a	line
 	OBJ_CondLine,		//	Object represents a	conditional line
-	OBJ_Vertex,			//	Object is a	vertex,	LDForge extension object
 	OBJ_BFC,			//	Object represents a	BFC statement
 	OBJ_Overlay,		//	Object contains meta-info about an overlay image.
 	OBJ_Comment,		//	Object represents a	comment
--- a/src/mainwindow.cpp	Sun Aug 30 04:53:37 2015 +0300
+++ b/src/mainwindow.cpp	Sun Aug 30 04:57:09 2015 +0300
@@ -48,7 +48,7 @@
 #include "addObjectDialog.h"
 #include "messageLog.h"
 #include "configuration.h"
-#include "ui_ldforge.h"
+#include "ui_mainwindow.h"
 #include "primitives.h"
 #include "editmodes/abstractEditMode.h"
 
@@ -1090,6 +1090,13 @@
 
 // =============================================================================
 //
+QTreeWidget* MainWindow::getPrimitivesTree() const
+{
+	return ui->primitives;
+}
+
+// =============================================================================
+//
 QKeySequence MainWindow::defaultShortcut (QAction* act) // [static]
 {
 	return g_defaultShortcuts[act];
--- a/src/mainwindow.h	Sun Aug 30 04:53:37 2015 +0300
+++ b/src/mainwindow.h	Sun Aug 30 04:57:09 2015 +0300
@@ -22,9 +22,9 @@
 #include <QAction>
 #include <QListWidget>
 #include <QRadioButton>
+#include <QTreeWidget>
 #include "configuration.h"
 #include "ldObject.h"
-#include "ui_ldforge.h"
 #include "colors.h"
 
 class MessageManager;
@@ -158,14 +158,8 @@
 
 	// Updates the object list. Right now this just rebuilds it.
 	void refreshObjectList();
-
 	void endAction();
-
-	inline QTreeWidget* getPrimitivesTree() const
-	{
-		return ui->primitives;
-	}
-
+	QTreeWidget* getPrimitivesTree() const;
 	static QKeySequence defaultShortcut (QAction* act);
 	void loadShortcuts (QSettings const* settings);
 	void saveShortcuts (QSettings* settings);
@@ -211,7 +205,6 @@
 	void slot_actionNewCLine();
 	void slot_actionNewComment();
 	void slot_actionNewBFC();
-	void slot_actionNewVertex();
 	void slot_actionUndo();
 	void slot_actionRedo();
 	void slot_actionCut();
--- a/src/mainwindow.ui	Sun Aug 30 04:53:37 2015 +0300
+++ b/src/mainwindow.ui	Sun Aug 30 04:57:09 2015 +0300
@@ -265,7 +265,6 @@
     <addaction name="actionNewCLine"/>
     <addaction name="actionNewComment"/>
     <addaction name="actionNewBFC"/>
-    <addaction name="actionNewVertex"/>
    </widget>
    <widget class="QMenu" name="menuEdit">
     <property name="title">
@@ -436,7 +435,6 @@
    <addaction name="actionNewCLine"/>
    <addaction name="actionNewComment"/>
    <addaction name="actionNewBFC"/>
-   <addaction name="actionNewVertex"/>
   </widget>
   <widget class="QToolBar" name="toolBarBasicTools">
    <property name="windowTitle">
@@ -841,15 +839,6 @@
     <string>New &amp;BFC Statement</string>
    </property>
   </action>
-  <action name="actionNewVertex">
-   <property name="icon">
-    <iconset resource="../ldforge.qrc">
-     <normaloff>:/icons/add-vertex.png</normaloff>:/icons/add-vertex.png</iconset>
-   </property>
-   <property name="text">
-    <string>New &amp;Vertex</string>
-   </property>
-  </action>
   <action name="actionUndo">
    <property name="icon">
     <iconset>
@@ -1196,7 +1185,7 @@
   </action>
   <action name="actionDemote">
    <property name="text">
-    <string>Demote Conditional Lines</string>
+    <string>Demote &amp;Conditional Lines</string>
    </property>
    <property name="statusTip">
     <string>Demote conditional lines down to normal lines.</string>

mercurial