Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 19363 → Rev 19362

/trunk/Scribus/scribus/ui/polygonwidgetbase.ui
6,8 → 6,8
<rect>
<x>0</x>
<y>0</y>
<width>558</width>
<height>560</height>
<width>510</width>
<height>365</height>
</rect>
</property>
<property name="sizePolicy">
19,80 → 19,243
<property name="windowTitle">
<string>Form</string>
</property>
<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&amp;ers:</string>
</property>
<property name="buddy">
<cstring>cornersSpinBox</cstring>
</property>
</widget>
<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&amp;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>&amp;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 row="0" column="1">
<widget class="ScrSpinBox" name="cornersSpinBox">
<item>
<widget class="QGroupBox" name="applyConvexGroupBox">
<property name="toolTip">
<string>Number of corners for polygons</string>
<string>Apply Convex/Concave Factor to change shape of Polygons</string>
</property>
<property name="suffix">
<string notr="true"/>
<property name="title">
<string>Apply &amp;Factor</string>
</property>
<property name="minimum">
<number>3</number>
<property name="checkable">
<bool>true</bool>
</property>
<property name="maximum">
<number>999</number>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>&amp;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&amp;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>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>&amp;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 row="0" column="1" rowspan="2">
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QLabel" name="Preview">
155,174 → 318,6
</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 &amp;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>&amp;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&amp;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>
<customwidgets>
/trunk/Scribus/scribus/ui/polyprops.h
25,6 → 25,7
~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);
32,6 → 33,7
 
protected:
QVBoxLayout* PolygonPropsLayout;
QHBoxLayout* Layout1;
 
};
 
/trunk/Scribus/scribus/ui/polyprops.cpp
23,9 → 23,19
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 (this, SIGNAL(accepted()), this, SIGNAL(endEdit()));
connect(okButton, SIGNAL(clicked()), this, SIGNAL(endEdit()));
}
 
void PolyVectorDialog::setValues(int polyCorners, double polyF, bool polyUseConvexFactor, double polyRotation, double polyCurvature, double polyInnerRot, double polyOuterCurvature)