r19363 by craig - #12532: Inner rotation of polygons needs convex/concave factor applied. Remove ugly End Edit button

scribus-commit scribus-commit at lists.scribus.net
Tue Jul 22 22:05:05 UTC 2014


Author: craig
Date: Tue Jul 22 22:05:04 2014
New Revision: 19363

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19363
Log:
#12532: Inner rotation of polygons needs convex/concave factor applied. Remove ugly End Edit button

Modified:
    trunk/Scribus/scribus/ui/polygonwidgetbase.ui
    trunk/Scribus/scribus/ui/polyprops.cpp
    trunk/Scribus/scribus/ui/polyprops.h

Modified: trunk/Scribus/scribus/ui/polygonwidgetbase.ui
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19363&path=/trunk/Scribus/scribus/ui/polygonwidgetbase.ui
==============================================================================
--- trunk/Scribus/scribus/ui/polygonwidgetbase.ui (original)
+++ trunk/Scribus/scribus/ui/polygonwidgetbase.ui Tue Jul 22 22:05:04 2014
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>510</width>
-    <height>365</height>
+    <width>558</width>
+    <height>560</height>
    </rect>
   </property>
   <property name="sizePolicy">
@@ -19,243 +19,80 @@
   <property name="windowTitle">
    <string>Form</string>
   </property>
-  <layout class="QHBoxLayout" name="horizontalLayout">
-   <property name="margin">
-    <number>0</number>
-   </property>
-   <item>
-    <layout class="QVBoxLayout" name="verticalLayout">
-     <item>
-      <layout class="QGridLayout" name="gridLayout">
-       <item row="0" column="0">
-        <widget class="QLabel" name="label">
-         <property name="text">
-          <string>Corn&ers:</string>
-         </property>
-         <property name="buddy">
-          <cstring>cornersSpinBox</cstring>
-         </property>
-        </widget>
-       </item>
-       <item row="0" column="1">
-        <widget class="ScrSpinBox" name="cornersSpinBox">
-         <property name="toolTip">
-          <string>Number of corners for polygons</string>
-         </property>
-         <property name="suffix">
-          <string notr="true"> </string>
-         </property>
-         <property name="minimum">
-          <number>3</number>
-         </property>
-         <property name="maximum">
-          <number>999</number>
-         </property>
-        </widget>
-       </item>
-       <item row="1" column="0">
-        <widget class="QLabel" name="label_2">
-         <property name="text">
-          <string>&Rotation:</string>
-         </property>
-         <property name="buddy">
-          <cstring>rotationSpinBox</cstring>
-         </property>
-        </widget>
-       </item>
-       <item row="1" column="1">
-        <widget class="ScrSpinBox" name="rotationSpinBox">
-         <property name="toolTip">
-          <string>Degrees of rotation for polygons</string>
-         </property>
-         <property name="minimum">
-          <number>-180</number>
-         </property>
-         <property name="maximum">
-          <number>180</number>
-         </property>
-        </widget>
-       </item>
-       <item row="2" column="0" colspan="2">
-        <widget class="QSlider" name="rotationSlider">
-         <property name="toolTip">
-          <string>Degrees of rotation for polygons</string>
-         </property>
-         <property name="minimum">
-          <number>-180</number>
-         </property>
-         <property name="maximum">
-          <number>180</number>
-         </property>
-         <property name="orientation">
-          <enum>Qt::Horizontal</enum>
-         </property>
-         <property name="tickPosition">
-          <enum>QSlider::TicksBelow</enum>
-         </property>
-        </widget>
-       </item>
-       <item row="3" column="0">
-        <widget class="QLabel" name="label_4">
-         <property name="text">
-          <string>Inner Rotation:</string>
-         </property>
-        </widget>
-       </item>
-       <item row="3" column="1">
-        <widget class="ScrSpinBox" name="innerRotationspinBox">
-         <property name="minimum">
-          <number>-180</number>
-         </property>
-         <property name="maximum">
-          <number>180</number>
-         </property>
-        </widget>
-       </item>
-       <item row="4" column="0" colspan="2">
-        <widget class="QSlider" name="innerRotationSlider">
-         <property name="minimum">
-          <number>-180</number>
-         </property>
-         <property name="maximum">
-          <number>180</number>
-         </property>
-         <property name="orientation">
-          <enum>Qt::Horizontal</enum>
-         </property>
-         <property name="tickPosition">
-          <enum>QSlider::TicksBelow</enum>
-         </property>
-        </widget>
-       </item>
-      </layout>
-     </item>
-     <item>
-      <widget class="QGroupBox" name="applyConvexGroupBox">
+  <layout class="QGridLayout" name="gridLayout_3">
+   <item row="0" column="0">
+    <layout class="QGridLayout" name="gridLayout">
+     <item row="0" column="0">
+      <widget class="QLabel" name="label">
+       <property name="text">
+        <string>Corn&ers:</string>
+       </property>
+       <property name="buddy">
+        <cstring>cornersSpinBox</cstring>
+       </property>
+      </widget>
+     </item>
+     <item row="0" column="1">
+      <widget class="ScrSpinBox" name="cornersSpinBox">
        <property name="toolTip">
-        <string>Apply Convex/Concave Factor to change shape of Polygons</string>
-       </property>
-       <property name="title">
-        <string>Apply &Factor</string>
-       </property>
-       <property name="checkable">
-        <bool>true</bool>
-       </property>
-       <layout class="QGridLayout" name="gridLayout_2">
-        <item row="0" column="0">
-         <widget class="QLabel" name="label_3">
-          <property name="text">
-           <string>&Factor:</string>
-          </property>
-          <property name="buddy">
-           <cstring>factorSpinBox</cstring>
-          </property>
-         </widget>
-        </item>
-        <item row="0" column="1">
-         <widget class="ScrSpinBox" name="factorSpinBox">
-          <property name="toolTip">
-           <string>A negative value will make the polygon concave (or star shaped), a positive value will make it convex</string>
-          </property>
-          <property name="suffix">
-           <string> %</string>
-          </property>
-          <property name="minimum">
-           <number>-100</number>
-          </property>
-          <property name="maximum">
-           <number>100</number>
-          </property>
-         </widget>
-        </item>
-        <item row="1" column="0" colspan="2">
-         <widget class="QSlider" name="factorSlider">
-          <property name="toolTip">
-           <string>A negative value will make the polygon concave (or star shaped), a positive value will make it convex</string>
-          </property>
-          <property name="minimum">
-           <number>-100</number>
-          </property>
-          <property name="maximum">
-           <number>100</number>
-          </property>
-          <property name="orientation">
-           <enum>Qt::Horizontal</enum>
-          </property>
-          <property name="tickPosition">
-           <enum>QSlider::TicksBelow</enum>
-          </property>
-         </widget>
-        </item>
-        <item row="2" column="0">
-         <widget class="QLabel" name="label_5">
-          <property name="text">
-           <string>Inner C&urvature:</string>
-          </property>
-          <property name="buddy">
-           <cstring>curvatureSpinBox</cstring>
-          </property>
-         </widget>
-        </item>
-        <item row="2" column="1">
-         <widget class="ScrSpinBox" name="curvatureSpinBox">
-          <property name="suffix">
-           <string> %</string>
-          </property>
-          <property name="maximum">
-           <number>100</number>
-          </property>
-         </widget>
-        </item>
-        <item row="3" column="0" colspan="2">
-         <widget class="QSlider" name="curvatureSlider">
-          <property name="maximum">
-           <number>100</number>
-          </property>
-          <property name="orientation">
-           <enum>Qt::Horizontal</enum>
-          </property>
-          <property name="tickPosition">
-           <enum>QSlider::TicksBelow</enum>
-          </property>
-         </widget>
-        </item>
-        <item row="4" column="0">
-         <widget class="QLabel" name="label_6">
-          <property name="text">
-           <string>Outer Curvature:</string>
-          </property>
-         </widget>
-        </item>
-        <item row="4" column="1">
-         <widget class="ScrSpinBox" name="OuterCurvatureSpinBox">
-          <property name="suffix">
-           <string> %</string>
-          </property>
-          <property name="maximum">
-           <number>100</number>
-          </property>
-         </widget>
-        </item>
-        <item row="5" column="0" colspan="2">
-         <widget class="QSlider" name="OuterCurvatureSlider">
-          <property name="maximum">
-           <number>100</number>
-          </property>
-          <property name="orientation">
-           <enum>Qt::Horizontal</enum>
-          </property>
-          <property name="tickPosition">
-           <enum>QSlider::TicksBelow</enum>
-          </property>
-         </widget>
-        </item>
-       </layout>
+        <string>Number of corners for polygons</string>
+       </property>
+       <property name="suffix">
+        <string notr="true"/>
+       </property>
+       <property name="minimum">
+        <number>3</number>
+       </property>
+       <property name="maximum">
+        <number>999</number>
+       </property>
+      </widget>
+     </item>
+     <item row="1" column="0">
+      <widget class="QLabel" name="label_2">
+       <property name="text">
+        <string>&Rotation:</string>
+       </property>
+       <property name="buddy">
+        <cstring>rotationSpinBox</cstring>
+       </property>
+      </widget>
+     </item>
+     <item row="1" column="1">
+      <widget class="ScrSpinBox" name="rotationSpinBox">
+       <property name="toolTip">
+        <string>Degrees of rotation for polygons</string>
+       </property>
+       <property name="minimum">
+        <number>-180</number>
+       </property>
+       <property name="maximum">
+        <number>180</number>
+       </property>
+      </widget>
+     </item>
+     <item row="2" column="0">
+      <widget class="QSlider" name="rotationSlider">
+       <property name="toolTip">
+        <string>Degrees of rotation for polygons</string>
+       </property>
+       <property name="minimum">
+        <number>-180</number>
+       </property>
+       <property name="maximum">
+        <number>180</number>
+       </property>
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="tickPosition">
+        <enum>QSlider::TicksBelow</enum>
+       </property>
       </widget>
      </item>
     </layout>
    </item>
-   <item>
+   <item row="0" column="1" rowspan="2">
     <layout class="QVBoxLayout" name="verticalLayout_2">
      <item>
       <widget class="QLabel" name="Preview">
@@ -317,6 +154,174 @@
       </spacer>
      </item>
     </layout>
+   </item>
+   <item row="1" column="0">
+    <widget class="QGroupBox" name="applyConvexGroupBox">
+     <property name="toolTip">
+      <string>Apply Convex/Concave Factor to change shape of Polygons</string>
+     </property>
+     <property name="title">
+      <string>Apply &Factor</string>
+     </property>
+     <property name="checkable">
+      <bool>true</bool>
+     </property>
+     <layout class="QGridLayout" name="gridLayout_2">
+      <item row="0" column="0">
+       <widget class="QLabel" name="label_3">
+        <property name="text">
+         <string>&Factor:</string>
+        </property>
+        <property name="buddy">
+         <cstring>factorSpinBox</cstring>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="ScrSpinBox" name="factorSpinBox">
+        <property name="toolTip">
+         <string>A negative value will make the polygon concave (or star shaped), a positive value will make it convex</string>
+        </property>
+        <property name="suffix">
+         <string> %</string>
+        </property>
+        <property name="minimum">
+         <number>-100</number>
+        </property>
+        <property name="maximum">
+         <number>100</number>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QSlider" name="factorSlider">
+        <property name="toolTip">
+         <string>A negative value will make the polygon concave (or star shaped), a positive value will make it convex</string>
+        </property>
+        <property name="minimum">
+         <number>-100</number>
+        </property>
+        <property name="maximum">
+         <number>100</number>
+        </property>
+        <property name="orientation">
+         <enum>Qt::Horizontal</enum>
+        </property>
+        <property name="tickPosition">
+         <enum>QSlider::TicksBelow</enum>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0">
+       <widget class="QLabel" name="label_4">
+        <property name="text">
+         <string>Inner Rotation:</string>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1">
+       <widget class="ScrSpinBox" name="innerRotationspinBox">
+        <property name="minimum">
+         <number>-180</number>
+        </property>
+        <property name="maximum">
+         <number>180</number>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0">
+       <widget class="QSlider" name="innerRotationSlider">
+        <property name="minimum">
+         <number>-180</number>
+        </property>
+        <property name="maximum">
+         <number>180</number>
+        </property>
+        <property name="orientation">
+         <enum>Qt::Horizontal</enum>
+        </property>
+        <property name="tickPosition">
+         <enum>QSlider::TicksBelow</enum>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="0">
+       <widget class="QLabel" name="label_5">
+        <property name="text">
+         <string>Inner C&urvature:</string>
+        </property>
+        <property name="buddy">
+         <cstring>curvatureSpinBox</cstring>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="1">
+       <widget class="ScrSpinBox" name="curvatureSpinBox">
+        <property name="suffix">
+         <string> %</string>
+        </property>
+        <property name="maximum">
+         <number>100</number>
+        </property>
+       </widget>
+      </item>
+      <item row="5" column="0">
+       <widget class="QSlider" name="curvatureSlider">
+        <property name="maximum">
+         <number>100</number>
+        </property>
+        <property name="orientation">
+         <enum>Qt::Horizontal</enum>
+        </property>
+        <property name="tickPosition">
+         <enum>QSlider::TicksBelow</enum>
+        </property>
+       </widget>
+      </item>
+      <item row="6" column="0">
+       <widget class="QLabel" name="label_6">
+        <property name="text">
+         <string>Outer Curvature:</string>
+        </property>
+       </widget>
+      </item>
+      <item row="6" column="1">
+       <widget class="ScrSpinBox" name="OuterCurvatureSpinBox">
+        <property name="suffix">
+         <string> %</string>
+        </property>
+        <property name="maximum">
+         <number>100</number>
+        </property>
+       </widget>
+      </item>
+      <item row="7" column="0">
+       <widget class="QSlider" name="OuterCurvatureSlider">
+        <property name="maximum">
+         <number>100</number>
+        </property>
+        <property name="orientation">
+         <enum>Qt::Horizontal</enum>
+        </property>
+        <property name="tickPosition">
+         <enum>QSlider::TicksBelow</enum>
+        </property>
+       </widget>
+      </item>
+     </layout>
+     <zorder>label_3</zorder>
+     <zorder>factorSpinBox</zorder>
+     <zorder>factorSlider</zorder>
+     <zorder>label_5</zorder>
+     <zorder>curvatureSpinBox</zorder>
+     <zorder>curvatureSlider</zorder>
+     <zorder>label_6</zorder>
+     <zorder>OuterCurvatureSpinBox</zorder>
+     <zorder>OuterCurvatureSlider</zorder>
+     <zorder>innerRotationSlider</zorder>
+     <zorder>innerRotationspinBox</zorder>
+     <zorder>label_4</zorder>
+    </widget>
    </item>
   </layout>
  </widget>

Modified: trunk/Scribus/scribus/ui/polyprops.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19363&path=/trunk/Scribus/scribus/ui/polyprops.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/polyprops.cpp (original)
+++ trunk/Scribus/scribus/ui/polyprops.cpp Tue Jul 22 22:05:04 2014
@@ -23,19 +23,9 @@
 	PolygonPropsLayout->setSpacing(5);
 	polyWidget = new PolygonWidget(this, polyC, polyF, polyS, polyR, polyCurvature, polyInnerRot, polyOuterCurvature, true);
 	PolygonPropsLayout->addWidget( polyWidget );
-	Layout1 = new QHBoxLayout;
-	Layout1->setMargin(0);
-	Layout1->setSpacing(5);
-	QSpacerItem* spacer_2 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
-	Layout1->addItem( spacer_2 );
-	okButton = new QPushButton(this);
-	okButton->setText( tr("End Edit"));
-	okButton->setDefault( true );
-	Layout1->addWidget( okButton );
-	PolygonPropsLayout->addLayout( Layout1 );
 	// signals and slots connections
 	connect(polyWidget, SIGNAL(NewVectors(int, double, bool, double, double, double, double)), this, SIGNAL(NewVectors(int, double, bool, double, double, double, double)));
-	connect(okButton, SIGNAL(clicked()), this, SIGNAL(endEdit()));
+	connect (this, SIGNAL(accepted()), this, SIGNAL(endEdit()));
 }
 
 void PolyVectorDialog::setValues(int polyCorners, double polyF, bool polyUseConvexFactor, double polyRotation, double polyCurvature, double polyInnerRot, double polyOuterCurvature)

Modified: trunk/Scribus/scribus/ui/polyprops.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19363&path=/trunk/Scribus/scribus/ui/polyprops.h
==============================================================================
--- trunk/Scribus/scribus/ui/polyprops.h (original)
+++ trunk/Scribus/scribus/ui/polyprops.h Tue Jul 22 22:05:04 2014
@@ -25,7 +25,6 @@
 	~PolyVectorDialog() {};
 	void setValues(int polyC, double polyF, bool polyS, double polyR, double polyCurvature, double polyInnerRot, double polyOuterCurvature);
 	PolygonWidget* polyWidget;
-	QPushButton* okButton;
 
 signals:
 	void NewVectors(int, double, bool, double, double, double, double);
@@ -33,7 +32,6 @@
 
 protected:
 	QVBoxLayout* PolygonPropsLayout;
-	QHBoxLayout* Layout1;
 
 };
 




More information about the scribus-commit mailing list