View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0010409 | Scribus | User Interface | public | 2011-11-27 16:30 | 2024-01-02 19:22 |
Reporter | JLuc | Assigned To | ale | ||
Priority | normal | Severity | feature | Reproducibility | always |
Status | assigned | Resolution | open | ||
Summary | 0010409: [PATCH] Improve access to contour editing | ||||
Description | Adding an Edit button on the right of the "Contour" radio button would easyen the access to the contour editing. | ||||
Additional Information | See proposed UI in attached file. | ||||
Tags | #easyhack, #rottenpatch, HOST-Oman, patch_tested_ok | ||||
Patch | Yes | ||||
related to | 0003436 | closed | nitramr | Add "edit style" buttons to the properties palette |
related to | 0015811 | closed | ale | [PATCH] Indigo UI: shrink the "shape" tab of the properties palette |
related to | 0006044 | closed | nitramr | Properties Palette could use far less screen estate |
related to | 0013650 | new | simplify contour line editing | |
related to | 0007754 | new | Import contour line | |
related to | 0015926 | assigned | ale | make the node editor slimmer and use it as a toolbar placed at top the shape |
child of | 0002464 | acknowledged | Metabug: GUI appearance | |
child of | 0013906 | acknowledged | Metabug: UI enhancement proposals (1.5.x.svn) |
|
|
|
imo better than the current checkbox solution... (even if sometimes it can be interesting to switch back and forth between the contour line and the frame's shape |
|
The UI_IV_UI team has already proposed to to simplify the workflow about contour line. One of the most important thing was : 1.have a modify button and auto check the "contour line" box in the Points window (something similar to your proposal) 2.have a value field near to the option to set a simple margin around the frame without having to go through the point window |
|
contourEditBox.diff (25,264 bytes)
Index: scribus/ui/propertiespalette_shapebase.ui =================================================================== --- scribus/ui/propertiespalette_shapebase.ui (revision 17400) +++ scribus/ui/propertiespalette_shapebase.ui (working copy) @@ -1,350 +1,376 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ui version="4.0"> - <class>PropertiesPalette_ShapeBase</class> - <widget class="QWidget" name="PropertiesPalette_ShapeBase"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>280</width> - <height>281</height> - </rect> - </property> - <property name="windowTitle"> - <string>Form</string> - </property> - <layout class="QVBoxLayout" name="verticalLayout"> - <property name="spacing"> - <number>2</number> - </property> - <property name="margin"> - <number>2</number> - </property> - <item> - <widget class="QGroupBox" name="shapeGroup"> - <property name="title"> - <string>Shape</string> - </property> - <property name="flat"> - <bool>true</bool> - </property> - <layout class="QVBoxLayout" name="verticalLayout_2"> - <property name="spacing"> - <number>5</number> - </property> - <property name="margin"> - <number>2</number> - </property> - <item> - <layout class="QHBoxLayout" name="horizontalLayout"> - <item> - <spacer name="horizontalSpacer"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="Autoforms" name="customShape"> - <property name="text"> - <string>...</string> - </property> - </widget> - </item> - <item> - <widget class="QToolButton" name="editShape"> - <property name="text"> - <string>&Edit...</string> - </property> - </widget> - </item> - </layout> - </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_2"> - <item> - <widget class="QLabel" name="roundRectLabel"> - <property name="text"> - <string>Round Corners</string> - </property> - </widget> - </item> - <item> - <widget class="ScrSpinBox" name="roundRect"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </widget> - </item> - <item> - <widget class="QGroupBox" name="textFlowGroup"> - <property name="title"> - <string>Text Flow Around Frame</string> - </property> - <property name="flat"> - <bool>true</bool> - </property> - <layout class="QVBoxLayout" name="verticalLayout_3"> - <property name="spacing"> - <number>5</number> - </property> - <property name="margin"> - <number>2</number> - </property> - <item> - <widget class="QToolButton" name="textFlowDisabled"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Disabled</string> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - <property name="autoExclusive"> - <bool>true</bool> - </property> - <property name="toolButtonStyle"> - <enum>Qt::ToolButtonTextBesideIcon</enum> - </property> - <attribute name="buttonGroup"> - <string>textFlowBtnGroup</string> - </attribute> - </widget> - </item> - <item> - <widget class="QToolButton" name="textFlowUsesFrameShape"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Use &Frame Shape</string> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - <property name="autoExclusive"> - <bool>true</bool> - </property> - <property name="toolButtonStyle"> - <enum>Qt::ToolButtonTextBesideIcon</enum> - </property> - <attribute name="buttonGroup"> - <string>textFlowBtnGroup</string> - </attribute> - </widget> - </item> - <item> - <widget class="QToolButton" name="textFlowUsesBoundingBox"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Use &Bounding Box</string> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - <property name="autoExclusive"> - <bool>true</bool> - </property> - <property name="toolButtonStyle"> - <enum>Qt::ToolButtonTextBesideIcon</enum> - </property> - <attribute name="buttonGroup"> - <string>textFlowBtnGroup</string> - </attribute> - </widget> - </item> - <item> - <widget class="QToolButton" name="textFlowUsesContourLine"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>&Use Contour Line</string> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - <property name="autoExclusive"> - <bool>true</bool> - </property> - <property name="toolButtonStyle"> - <enum>Qt::ToolButtonTextBesideIcon</enum> - </property> - <attribute name="buttonGroup"> - <string>textFlowBtnGroup</string> - </attribute> - </widget> - </item> - <item> - <widget class="QToolButton" name="textFlowUsesImageClipping"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Use Image Clip Path</string> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - <property name="autoExclusive"> - <bool>true</bool> - </property> - <property name="toolButtonStyle"> - <enum>Qt::ToolButtonTextBesideIcon</enum> - </property> - <attribute name="buttonGroup"> - <string>textFlowBtnGroup</string> - </attribute> - </widget> - </item> - </layout> - </widget> - </item> - <item> - <widget class="QStackedWidget" name="stackedWidget"> - <property name="currentIndex"> - <number>1</number> - </property> - <widget class="QWidget" name="page"/> - <widget class="QWidget" name="page_2"> - <layout class="QVBoxLayout" name="verticalLayout_4"> - <item> - <widget class="QGroupBox" name="fillRuleGroup"> - <property name="title"> - <string>Fill Rule</string> - </property> - <property name="flat"> - <bool>true</bool> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_3"> - <property name="spacing"> - <number>5</number> - </property> - <property name="margin"> - <number>2</number> - </property> - <item> - <spacer name="horizontalSpacer_2"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QRadioButton" name="evenOdd"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Even-Odd</string> - </property> - </widget> - </item> - <item> - <widget class="QRadioButton" name="nonZero"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Non Zero</string> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_3"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - </layout> - </widget> - </item> - </layout> - </widget> - </widget> - </item> - <item> - <spacer name="verticalSpacer"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>40</height> - </size> - </property> - </spacer> - </item> - </layout> - </widget> - <customwidgets> - <customwidget> - <class>ScrSpinBox</class> - <extends>QDoubleSpinBox</extends> - <header>ui/scrspinbox.h</header> - </customwidget> - <customwidget> - <class>Autoforms</class> - <extends>QToolButton</extends> - <header>ui/autoform.h</header> - </customwidget> - </customwidgets> - <resources/> - <connections/> - <buttongroups> - <buttongroup name="textFlowBtnGroup"/> - </buttongroups> -</ui> +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>PropertiesPalette_ShapeBase</class> + <widget class="QWidget" name="PropertiesPalette_ShapeBase"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>280</width> + <height>320</height> + </rect> + </property> + <property name="windowTitle"> + <string>Form</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <property name="spacing"> + <number>2</number> + </property> + <property name="margin"> + <number>2</number> + </property> + <item> + <widget class="QGroupBox" name="shapeGroup"> + <property name="title"> + <string>Shape</string> + </property> + <property name="flat"> + <bool>true</bool> + </property> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <property name="spacing"> + <number>5</number> + </property> + <property name="margin"> + <number>2</number> + </property> + <item> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="Autoforms" name="customShape"> + <property name="text"> + <string>...</string> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="editShape"> + <property name="text"> + <string>&Edit...</string> + </property> + </widget> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <item> + <widget class="QLabel" name="roundRectLabel"> + <property name="text"> + <string>Round Corners</string> + </property> + </widget> + </item> + <item> + <widget class="ScrSpinBox" name="roundRect"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QGroupBox" name="textFlowGroup"> + <property name="title"> + <string>Text Flow Around Frame</string> + </property> + <property name="flat"> + <bool>true</bool> + </property> + <layout class="QVBoxLayout" name="verticalLayout_3"> + <property name="spacing"> + <number>5</number> + </property> + <property name="margin"> + <number>2</number> + </property> + <item> + <widget class="QToolButton" name="textFlowDisabled"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Disabled</string> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="autoExclusive"> + <bool>true</bool> + </property> + <property name="toolButtonStyle"> + <enum>Qt::ToolButtonTextBesideIcon</enum> + </property> + <attribute name="buttonGroup"> + <string>textFlowBtnGroup</string> + </attribute> + </widget> + </item> + <item> + <widget class="QToolButton" name="textFlowUsesFrameShape"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Use &Frame Shape</string> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="autoExclusive"> + <bool>true</bool> + </property> + <property name="toolButtonStyle"> + <enum>Qt::ToolButtonTextBesideIcon</enum> + </property> + <attribute name="buttonGroup"> + <string>textFlowBtnGroup</string> + </attribute> + </widget> + </item> + <item> + <widget class="QToolButton" name="textFlowUsesBoundingBox"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Use &Bounding Box</string> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="autoExclusive"> + <bool>true</bool> + </property> + <property name="toolButtonStyle"> + <enum>Qt::ToolButtonTextBesideIcon</enum> + </property> + <attribute name="buttonGroup"> + <string>textFlowBtnGroup</string> + </attribute> + </widget> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_4"> + <property name="spacing"> + <number>6</number> + </property> + <property name="sizeConstraint"> + <enum>QLayout::SetDefaultConstraint</enum> + </property> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QToolButton" name="textFlowUsesContourLine"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>&Use Contour Line</string> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="autoExclusive"> + <bool>true</bool> + </property> + <property name="toolButtonStyle"> + <enum>Qt::ToolButtonTextBesideIcon</enum> + </property> + <attribute name="buttonGroup"> + <string>textFlowBtnGroup</string> + </attribute> + </widget> + </item> + <item> + <widget class="QToolButton" name="editCont"> + <property name="text"> + <string>&Edit...</string> + </property> + </widget> + </item> + </layout> + </item> + <item> + <widget class="QToolButton" name="textFlowUsesImageClipping"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Use Image Clip Path</string> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="autoExclusive"> + <bool>true</bool> + </property> + <property name="toolButtonStyle"> + <enum>Qt::ToolButtonTextBesideIcon</enum> + </property> + <attribute name="buttonGroup"> + <string>textFlowBtnGroup</string> + </attribute> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QStackedWidget" name="stackedWidget"> + <property name="currentIndex"> + <number>1</number> + </property> + <widget class="QWidget" name="page"/> + <widget class="QWidget" name="page_2"> + <layout class="QVBoxLayout" name="verticalLayout_4"> + <item> + <widget class="QGroupBox" name="fillRuleGroup"> + <property name="title"> + <string>Fill Rule</string> + </property> + <property name="flat"> + <bool>true</bool> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_3"> + <property name="spacing"> + <number>5</number> + </property> + <property name="margin"> + <number>2</number> + </property> + <item> + <spacer name="horizontalSpacer_2"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QRadioButton" name="evenOdd"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Even-Odd</string> + </property> + </widget> + </item> + <item> + <widget class="QRadioButton" name="nonZero"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Non Zero</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_3"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> + </item> + </layout> + </widget> + </widget> + </item> + <item> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> + <customwidgets> + <customwidget> + <class>ScrSpinBox</class> + <extends>QDoubleSpinBox</extends> + <header>ui/scrspinbox.h</header> + </customwidget> + <customwidget> + <class>Autoforms</class> + <extends>QToolButton</extends> + <header>ui/autoform.h</header> + </customwidget> + </customwidgets> + <resources/> + <connections/> + <buttongroups> + <buttongroup name="textFlowBtnGroup"/> + </buttongroups> +</ui> Index: scribus/ui/propertiespalette_shape.h =================================================================== --- scribus/ui/propertiespalette_shape.h (revision 17400) +++ scribus/ui/propertiespalette_shape.h (working copy) @@ -76,6 +76,7 @@ void handleTextFlow(); void handleShapeEdit(); + void handleContEdit(); void handleShapeEditEnded(); void handleCornerRadius(); void handleFillRule(); Index: scribus/ui/propertiespalette_shape.cpp =================================================================== --- scribus/ui/propertiespalette_shape.cpp (revision 17400) +++ scribus/ui/propertiespalette_shape.cpp (working copy) @@ -62,6 +62,7 @@ connect(textFlowBtnGroup, SIGNAL(buttonClicked(int)), this, SLOT(handleTextFlow())); connect(editShape , SIGNAL(clicked()) , this, SLOT(handleShapeEdit())); + connect(editCont , SIGNAL(clicked()) ,this, SLOT(handleContEdit())); connect(roundRect , SIGNAL(valueChanged(double)) , this, SLOT(handleCornerRadius())); connect(evenOdd , SIGNAL(clicked()) , this, SLOT(handleFillRule()) ); connect(nonZero , SIGNAL(clicked()) , this, SLOT(handleFillRule()) ); @@ -450,6 +451,42 @@ } } +void PropertiesPalette_Shape::handleContEdit() +{ + if (!m_ScMW || m_ScMW->scriptIsRunning()) + return; + if ((m_haveDoc) && (m_haveItem)) + { + m_tmpSelection->clear(); + if (m_item->asRegularPolygon()) + { + m_ScMW->view->requestMode(modeEditPolygon); + roundRect->setEnabled(false); + } + else if (m_item->asArc()) + { + m_ScMW->view->requestMode(modeEditArc); + roundRect->setEnabled(false); + } + else if (m_item->asSpiral()) + { + m_ScMW->view->requestMode(modeEditSpiral); + roundRect->setEnabled(false); + } + else + { + //m_ScMW->nodePalette->EditCont->setChecked(true); + //m_ScMW->doc->nodeEdit.isContourLine=true; + m_ScMW->view->requestMode(modeEditClip); + m_ScMW->nodePalette->EditCont->setChecked(true); + m_ScMW->doc->nodeEdit.isContourLine=true; + m_ScMW->nodePalette->ResetCont->setEnabled(true); + roundRect->setEnabled(false); + } + m_doc->changed(); + } +} + void PropertiesPalette_Shape::handleShapeEditEnded() { disconnect(m_ScMW->nodePalette, SIGNAL(paletteClosed()), this, SLOT(handleShapeEditEnded())); |
|
The contourEditBox.diff file that I uploaded resolves the feature to add the an edit(modifier) button aside contour radio button to improve the access to contour editing by reducing a mouseclick. 1)made a new toolbox in propertiesPalette_shapebase.ui named editCont using qtDesigner and set it right to contour radio button. 2)made a click handler to this button in propertiesPalette_shape.cpp which is similar to handleShapeEdit(used when edit button is clicked) 3)modified this handler to give access to contour editing by checking EditContour checkbox of nodeeditpalette through use of docs class. I also tried to resolve the feature by making another mode(modeContEdit) but this would have led to big changes in structure of code(changing scribus.cpp ,new canvas class for this appmode , etc )so tried out the easier way. |
|
contourEdit.diff (26,013 bytes)
Index: scribus/ui/propertiespalette_shapebase.ui =================================================================== --- scribus/ui/propertiespalette_shapebase.ui (revision 17405) +++ scribus/ui/propertiespalette_shapebase.ui (working copy) @@ -1,350 +1,364 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ui version="4.0"> - <class>PropertiesPalette_ShapeBase</class> - <widget class="QWidget" name="PropertiesPalette_ShapeBase"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>280</width> - <height>281</height> - </rect> - </property> - <property name="windowTitle"> - <string>Form</string> - </property> - <layout class="QVBoxLayout" name="verticalLayout"> - <property name="spacing"> - <number>2</number> - </property> - <property name="margin"> - <number>2</number> - </property> - <item> - <widget class="QGroupBox" name="shapeGroup"> - <property name="title"> - <string>Shape</string> - </property> - <property name="flat"> - <bool>true</bool> - </property> - <layout class="QVBoxLayout" name="verticalLayout_2"> - <property name="spacing"> - <number>5</number> - </property> - <property name="margin"> - <number>2</number> - </property> - <item> - <layout class="QHBoxLayout" name="horizontalLayout"> - <item> - <spacer name="horizontalSpacer"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="Autoforms" name="customShape"> - <property name="text"> - <string>...</string> - </property> - </widget> - </item> - <item> - <widget class="QToolButton" name="editShape"> - <property name="text"> - <string>&Edit...</string> - </property> - </widget> - </item> - </layout> - </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_2"> - <item> - <widget class="QLabel" name="roundRectLabel"> - <property name="text"> - <string>Round Corners</string> - </property> - </widget> - </item> - <item> - <widget class="ScrSpinBox" name="roundRect"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </widget> - </item> - <item> - <widget class="QGroupBox" name="textFlowGroup"> - <property name="title"> - <string>Text Flow Around Frame</string> - </property> - <property name="flat"> - <bool>true</bool> - </property> - <layout class="QVBoxLayout" name="verticalLayout_3"> - <property name="spacing"> - <number>5</number> - </property> - <property name="margin"> - <number>2</number> - </property> - <item> - <widget class="QToolButton" name="textFlowDisabled"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Disabled</string> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - <property name="autoExclusive"> - <bool>true</bool> - </property> - <property name="toolButtonStyle"> - <enum>Qt::ToolButtonTextBesideIcon</enum> - </property> - <attribute name="buttonGroup"> - <string>textFlowBtnGroup</string> - </attribute> - </widget> - </item> - <item> - <widget class="QToolButton" name="textFlowUsesFrameShape"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Use &Frame Shape</string> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - <property name="autoExclusive"> - <bool>true</bool> - </property> - <property name="toolButtonStyle"> - <enum>Qt::ToolButtonTextBesideIcon</enum> - </property> - <attribute name="buttonGroup"> - <string>textFlowBtnGroup</string> - </attribute> - </widget> - </item> - <item> - <widget class="QToolButton" name="textFlowUsesBoundingBox"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Use &Bounding Box</string> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - <property name="autoExclusive"> - <bool>true</bool> - </property> - <property name="toolButtonStyle"> - <enum>Qt::ToolButtonTextBesideIcon</enum> - </property> - <attribute name="buttonGroup"> - <string>textFlowBtnGroup</string> - </attribute> - </widget> - </item> - <item> - <widget class="QToolButton" name="textFlowUsesContourLine"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>&Use Contour Line</string> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - <property name="autoExclusive"> - <bool>true</bool> - </property> - <property name="toolButtonStyle"> - <enum>Qt::ToolButtonTextBesideIcon</enum> - </property> - <attribute name="buttonGroup"> - <string>textFlowBtnGroup</string> - </attribute> - </widget> - </item> - <item> - <widget class="QToolButton" name="textFlowUsesImageClipping"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Use Image Clip Path</string> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - <property name="autoExclusive"> - <bool>true</bool> - </property> - <property name="toolButtonStyle"> - <enum>Qt::ToolButtonTextBesideIcon</enum> - </property> - <attribute name="buttonGroup"> - <string>textFlowBtnGroup</string> - </attribute> - </widget> - </item> - </layout> - </widget> - </item> - <item> - <widget class="QStackedWidget" name="stackedWidget"> - <property name="currentIndex"> - <number>1</number> - </property> - <widget class="QWidget" name="page"/> - <widget class="QWidget" name="page_2"> - <layout class="QVBoxLayout" name="verticalLayout_4"> - <item> - <widget class="QGroupBox" name="fillRuleGroup"> - <property name="title"> - <string>Fill Rule</string> - </property> - <property name="flat"> - <bool>true</bool> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_3"> - <property name="spacing"> - <number>5</number> - </property> - <property name="margin"> - <number>2</number> - </property> - <item> - <spacer name="horizontalSpacer_2"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QRadioButton" name="evenOdd"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Even-Odd</string> - </property> - </widget> - </item> - <item> - <widget class="QRadioButton" name="nonZero"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Non Zero</string> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_3"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - </layout> - </widget> - </item> - </layout> - </widget> - </widget> - </item> - <item> - <spacer name="verticalSpacer"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>40</height> - </size> - </property> - </spacer> - </item> - </layout> - </widget> - <customwidgets> - <customwidget> - <class>ScrSpinBox</class> - <extends>QDoubleSpinBox</extends> - <header>ui/scrspinbox.h</header> - </customwidget> - <customwidget> - <class>Autoforms</class> - <extends>QToolButton</extends> - <header>ui/autoform.h</header> - </customwidget> - </customwidgets> - <resources/> - <connections/> - <buttongroups> - <buttongroup name="textFlowBtnGroup"/> - </buttongroups> -</ui> +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>PropertiesPalette_ShapeBase</class> + <widget class="QWidget" name="PropertiesPalette_ShapeBase"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>280</width> + <height>320</height> + </rect> + </property> + <property name="windowTitle"> + <string>Form</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <property name="spacing"> + <number>2</number> + </property> + <property name="margin"> + <number>2</number> + </property> + <item> + <widget class="QGroupBox" name="shapeGroup"> + <property name="title"> + <string>Shape</string> + </property> + <property name="flat"> + <bool>true</bool> + </property> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <property name="spacing"> + <number>5</number> + </property> + <property name="margin"> + <number>2</number> + </property> + <item> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="Autoforms" name="customShape"> + <property name="text"> + <string>...</string> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="editShape"> + <property name="text"> + <string>&Edit...</string> + </property> + </widget> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <item> + <widget class="QLabel" name="roundRectLabel"> + <property name="text"> + <string>Round Corners</string> + </property> + </widget> + </item> + <item> + <widget class="ScrSpinBox" name="roundRect"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QGroupBox" name="textFlowGroup"> + <property name="title"> + <string>Text Flow Around Frame</string> + </property> + <property name="flat"> + <bool>true</bool> + </property> + <layout class="QVBoxLayout" name="verticalLayout_3"> + <property name="spacing"> + <number>5</number> + </property> + <property name="margin"> + <number>2</number> + </property> + <item> + <widget class="QToolButton" name="textFlowDisabled"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Disabled</string> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="autoExclusive"> + <bool>true</bool> + </property> + <property name="toolButtonStyle"> + <enum>Qt::ToolButtonTextBesideIcon</enum> + </property> + <attribute name="buttonGroup"> + <string>textFlowBtnGroup</string> + </attribute> + </widget> + </item> + <item> + <widget class="QToolButton" name="textFlowUsesFrameShape"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Use &Frame Shape</string> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="autoExclusive"> + <bool>true</bool> + </property> + <property name="toolButtonStyle"> + <enum>Qt::ToolButtonTextBesideIcon</enum> + </property> + <attribute name="buttonGroup"> + <string>textFlowBtnGroup</string> + </attribute> + </widget> + </item> + <item> + <widget class="QToolButton" name="textFlowUsesBoundingBox"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Use &Bounding Box</string> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="autoExclusive"> + <bool>true</bool> + </property> + <property name="toolButtonStyle"> + <enum>Qt::ToolButtonTextBesideIcon</enum> + </property> + <attribute name="buttonGroup"> + <string>textFlowBtnGroup</string> + </attribute> + </widget> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_4"> + <property name="topMargin"> + <number>0</number> + </property> + <item> + <widget class="QToolButton" name="textFlowUsesContourLine"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>&Use Contour Line</string> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="autoExclusive"> + <bool>true</bool> + </property> + <property name="toolButtonStyle"> + <enum>Qt::ToolButtonTextBesideIcon</enum> + </property> + <attribute name="buttonGroup"> + <string>textFlowBtnGroup</string> + </attribute> + </widget> + </item> + <item> + <widget class="QToolButton" name="editContour"> + <property name="text"> + <string>&Edit</string> + </property> + </widget> + </item> + </layout> + </item> + <item> + <widget class="QToolButton" name="textFlowUsesImageClipping"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Use Image Clip Path</string> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="autoExclusive"> + <bool>true</bool> + </property> + <property name="toolButtonStyle"> + <enum>Qt::ToolButtonTextBesideIcon</enum> + </property> + <attribute name="buttonGroup"> + <string>textFlowBtnGroup</string> + </attribute> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QStackedWidget" name="stackedWidget"> + <property name="currentIndex"> + <number>1</number> + </property> + <widget class="QWidget" name="page"/> + <widget class="QWidget" name="page_2"> + <layout class="QVBoxLayout" name="verticalLayout_4"> + <item> + <widget class="QGroupBox" name="fillRuleGroup"> + <property name="title"> + <string>Fill Rule</string> + </property> + <property name="flat"> + <bool>true</bool> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_3"> + <property name="spacing"> + <number>5</number> + </property> + <property name="margin"> + <number>2</number> + </property> + <item> + <spacer name="horizontalSpacer_2"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QRadioButton" name="evenOdd"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Even-Odd</string> + </property> + </widget> + </item> + <item> + <widget class="QRadioButton" name="nonZero"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Non Zero</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_3"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> + </item> + </layout> + </widget> + </widget> + </item> + <item> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> + <customwidgets> + <customwidget> + <class>Autoforms</class> + <extends>QToolButton</extends> + <header>ui/autoform.h</header> + </customwidget> + <customwidget> + <class>ScrSpinBox</class> + <extends>QDoubleSpinBox</extends> + <header>ui/scrspinbox.h</header> + </customwidget> + </customwidgets> + <resources/> + <connections/> + <buttongroups> + <buttongroup name="textFlowBtnGroup"/> + </buttongroups> +</ui> Index: scribus/ui/propertiespalette_shape.h =================================================================== --- scribus/ui/propertiespalette_shape.h (revision 17405) +++ scribus/ui/propertiespalette_shape.h (working copy) @@ -76,7 +76,9 @@ void handleTextFlow(); void handleShapeEdit(); + void handleContourEdit(); void handleShapeEditEnded(); + void handleContourEditEnded(); void handleCornerRadius(); void handleFillRule(); void handleNewShape(int, int, qreal *); Index: scribus/ui/propertiespalette_shape.cpp =================================================================== --- scribus/ui/propertiespalette_shape.cpp (revision 17405) +++ scribus/ui/propertiespalette_shape.cpp (working copy) @@ -62,6 +62,7 @@ connect(textFlowBtnGroup, SIGNAL(buttonClicked(int)), this, SLOT(handleTextFlow())); connect(editShape , SIGNAL(clicked()) , this, SLOT(handleShapeEdit())); + connect(editContour,SIGNAL(clicked()) ,this, SLOT(handleContourEdit())); connect(roundRect , SIGNAL(valueChanged(double)) , this, SLOT(handleCornerRadius())); connect(evenOdd , SIGNAL(clicked()) , this, SLOT(handleFillRule()) ); connect(nonZero , SIGNAL(clicked()) , this, SLOT(handleFillRule()) ); @@ -450,6 +451,41 @@ } } +void PropertiesPalette_Shape::handleContourEdit() +{ + if (!m_ScMW || m_ScMW->scriptIsRunning()) + return; + if ((m_haveDoc) && (m_haveItem)) + { + m_tmpSelection->clear(); + if (m_item->asRegularPolygon()) + { + m_ScMW->view->requestMode(modeEditPolygon); + roundRect->setEnabled(false); + } + else if (m_item->asArc()) + { + m_ScMW->view->requestMode(modeEditArc); + roundRect->setEnabled(false); + } + else if (m_item->asSpiral()) + { + m_ScMW->view->requestMode(modeEditSpiral); + roundRect->setEnabled(false); + } + else + { + m_ScMW->view->requestMode(modeEditClip); + m_ScMW->nodePalette->EditCont->setChecked(true); + m_ScMW->doc->nodeEdit.isContourLine=true; + m_ScMW->nodePalette->ResetCont->setEnabled(true); + roundRect->setEnabled(false); + connect(m_ScMW->nodePalette, SIGNAL(paletteClosed()), this, SLOT(handleContourEditEnded())); + } + m_doc->changed(); + } +} + void PropertiesPalette_Shape::handleShapeEditEnded() { disconnect(m_ScMW->nodePalette, SIGNAL(paletteClosed()), this, SLOT(handleShapeEditEnded())); @@ -464,6 +500,20 @@ } } +void PropertiesPalette_Shape::handleContourEditEnded() +{ + disconnect(m_ScMW->nodePalette, SIGNAL(paletteClosed()), this, SLOT(handleContourEditEnded())); + if ((m_haveDoc) && (m_haveItem)) + { + if (m_tmpSelection->count() > 0) + { + m_doc->m_Selection->copy(*m_tmpSelection, false); + m_doc->m_Selection->connectItemToGUI(); + } + m_tmpSelection->clear(); + } +} + void PropertiesPalette_Shape::handleCornerRadius() { if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning()) |
|
latest patch added with slot handleContourEditEnded - it can handle bad behavior(as reviewed by pygmee) if you get an error while patching the diff file, add QToolButton *editContour; on line 52 of ui_propertiespalette_shapebase.h This is because svn diff command cannot diff ui_propertiespalette_shapebase.h - it is not a part of repository. |
|
the ui_*.h files are generated from the .ui files. If your patch doesn't work, then maybe you need to look there? If it doesn't apply or doesn't build then please don't randomly add the pointer to attempt to fix it. |
|
The patch works perfectly fine for me: I followed these steps: 1) command patch -p0 < /filepath/EditContour.diff 2) on qt creator click run button. if you use terminal, command make -j2 command make install command cd ~/bin/scribus/bin command ./scribus |
|
since the older patch file is on another revision revert back to older version on which patch has been made, else patch may not work.(17405) I am adding a new patch with latest revision 17429 |
|
noError.diff (25,808 bytes)
Index: scribus/ui/propertiespalette_shapebase.ui =================================================================== --- scribus/ui/propertiespalette_shapebase.ui (revision 17429) +++ scribus/ui/propertiespalette_shapebase.ui (working copy) @@ -1,350 +1,364 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ui version="4.0"> - <class>PropertiesPalette_ShapeBase</class> - <widget class="QWidget" name="PropertiesPalette_ShapeBase"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>280</width> - <height>281</height> - </rect> - </property> - <property name="windowTitle"> - <string>Form</string> - </property> - <layout class="QVBoxLayout" name="verticalLayout"> - <property name="spacing"> - <number>2</number> - </property> - <property name="margin"> - <number>2</number> - </property> - <item> - <widget class="QGroupBox" name="shapeGroup"> - <property name="title"> - <string>Shape</string> - </property> - <property name="flat"> - <bool>true</bool> - </property> - <layout class="QVBoxLayout" name="verticalLayout_2"> - <property name="spacing"> - <number>5</number> - </property> - <property name="margin"> - <number>2</number> - </property> - <item> - <layout class="QHBoxLayout" name="horizontalLayout"> - <item> - <spacer name="horizontalSpacer"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="Autoforms" name="customShape"> - <property name="text"> - <string>...</string> - </property> - </widget> - </item> - <item> - <widget class="QToolButton" name="editShape"> - <property name="text"> - <string>&Edit...</string> - </property> - </widget> - </item> - </layout> - </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_2"> - <item> - <widget class="QLabel" name="roundRectLabel"> - <property name="text"> - <string>Round Corners</string> - </property> - </widget> - </item> - <item> - <widget class="ScrSpinBox" name="roundRect"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </widget> - </item> - <item> - <widget class="QGroupBox" name="textFlowGroup"> - <property name="title"> - <string>Text Flow Around Frame</string> - </property> - <property name="flat"> - <bool>true</bool> - </property> - <layout class="QVBoxLayout" name="verticalLayout_3"> - <property name="spacing"> - <number>5</number> - </property> - <property name="margin"> - <number>2</number> - </property> - <item> - <widget class="QToolButton" name="textFlowDisabled"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Disabled</string> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - <property name="autoExclusive"> - <bool>true</bool> - </property> - <property name="toolButtonStyle"> - <enum>Qt::ToolButtonTextBesideIcon</enum> - </property> - <attribute name="buttonGroup"> - <string>textFlowBtnGroup</string> - </attribute> - </widget> - </item> - <item> - <widget class="QToolButton" name="textFlowUsesFrameShape"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Use &Frame Shape</string> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - <property name="autoExclusive"> - <bool>true</bool> - </property> - <property name="toolButtonStyle"> - <enum>Qt::ToolButtonTextBesideIcon</enum> - </property> - <attribute name="buttonGroup"> - <string>textFlowBtnGroup</string> - </attribute> - </widget> - </item> - <item> - <widget class="QToolButton" name="textFlowUsesBoundingBox"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Use &Bounding Box</string> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - <property name="autoExclusive"> - <bool>true</bool> - </property> - <property name="toolButtonStyle"> - <enum>Qt::ToolButtonTextBesideIcon</enum> - </property> - <attribute name="buttonGroup"> - <string>textFlowBtnGroup</string> - </attribute> - </widget> - </item> - <item> - <widget class="QToolButton" name="textFlowUsesContourLine"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>&Use Contour Line</string> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - <property name="autoExclusive"> - <bool>true</bool> - </property> - <property name="toolButtonStyle"> - <enum>Qt::ToolButtonTextBesideIcon</enum> - </property> - <attribute name="buttonGroup"> - <string>textFlowBtnGroup</string> - </attribute> - </widget> - </item> - <item> - <widget class="QToolButton" name="textFlowUsesImageClipping"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Use Image Clip Path</string> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - <property name="autoExclusive"> - <bool>true</bool> - </property> - <property name="toolButtonStyle"> - <enum>Qt::ToolButtonTextBesideIcon</enum> - </property> - <attribute name="buttonGroup"> - <string>textFlowBtnGroup</string> - </attribute> - </widget> - </item> - </layout> - </widget> - </item> - <item> - <widget class="QStackedWidget" name="stackedWidget"> - <property name="currentIndex"> - <number>1</number> - </property> - <widget class="QWidget" name="page"/> - <widget class="QWidget" name="page_2"> - <layout class="QVBoxLayout" name="verticalLayout_4"> - <item> - <widget class="QGroupBox" name="fillRuleGroup"> - <property name="title"> - <string>Fill Rule</string> - </property> - <property name="flat"> - <bool>true</bool> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_3"> - <property name="spacing"> - <number>5</number> - </property> - <property name="margin"> - <number>2</number> - </property> - <item> - <spacer name="horizontalSpacer_2"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QRadioButton" name="evenOdd"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Even-Odd</string> - </property> - </widget> - </item> - <item> - <widget class="QRadioButton" name="nonZero"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Non Zero</string> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_3"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - </layout> - </widget> - </item> - </layout> - </widget> - </widget> - </item> - <item> - <spacer name="verticalSpacer"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>40</height> - </size> - </property> - </spacer> - </item> - </layout> - </widget> - <customwidgets> - <customwidget> - <class>ScrSpinBox</class> - <extends>QDoubleSpinBox</extends> - <header>ui/scrspinbox.h</header> - </customwidget> - <customwidget> - <class>Autoforms</class> - <extends>QToolButton</extends> - <header>ui/autoform.h</header> - </customwidget> - </customwidgets> - <resources/> - <connections/> - <buttongroups> - <buttongroup name="textFlowBtnGroup"/> - </buttongroups> -</ui> +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>PropertiesPalette_ShapeBase</class> + <widget class="QWidget" name="PropertiesPalette_ShapeBase"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>280</width> + <height>334</height> + </rect> + </property> + <property name="windowTitle"> + <string>Form</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <property name="spacing"> + <number>2</number> + </property> + <property name="margin"> + <number>2</number> + </property> + <item> + <widget class="QGroupBox" name="shapeGroup"> + <property name="title"> + <string>Shape</string> + </property> + <property name="flat"> + <bool>true</bool> + </property> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <property name="spacing"> + <number>5</number> + </property> + <property name="margin"> + <number>2</number> + </property> + <item> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="Autoforms" name="customShape"> + <property name="text"> + <string>...</string> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="editShape"> + <property name="text"> + <string>&Edit...</string> + </property> + </widget> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <item> + <widget class="QLabel" name="roundRectLabel"> + <property name="text"> + <string>Round Corners</string> + </property> + </widget> + </item> + <item> + <widget class="ScrSpinBox" name="roundRect"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QGroupBox" name="textFlowGroup"> + <property name="title"> + <string>Text Flow Around Frame</string> + </property> + <property name="flat"> + <bool>true</bool> + </property> + <layout class="QVBoxLayout" name="verticalLayout_3"> + <property name="spacing"> + <number>5</number> + </property> + <property name="margin"> + <number>2</number> + </property> + <item> + <widget class="QToolButton" name="textFlowDisabled"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Disabled</string> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="autoExclusive"> + <bool>true</bool> + </property> + <property name="toolButtonStyle"> + <enum>Qt::ToolButtonTextBesideIcon</enum> + </property> + <attribute name="buttonGroup"> + <string>textFlowBtnGroup</string> + </attribute> + </widget> + </item> + <item> + <widget class="QToolButton" name="textFlowUsesFrameShape"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Use &Frame Shape</string> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="autoExclusive"> + <bool>true</bool> + </property> + <property name="toolButtonStyle"> + <enum>Qt::ToolButtonTextBesideIcon</enum> + </property> + <attribute name="buttonGroup"> + <string>textFlowBtnGroup</string> + </attribute> + </widget> + </item> + <item> + <widget class="QToolButton" name="textFlowUsesBoundingBox"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Use &Bounding Box</string> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="autoExclusive"> + <bool>true</bool> + </property> + <property name="toolButtonStyle"> + <enum>Qt::ToolButtonTextBesideIcon</enum> + </property> + <attribute name="buttonGroup"> + <string>textFlowBtnGroup</string> + </attribute> + </widget> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_4"> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QToolButton" name="textFlowUsesContourLine"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>&Use Contour Line</string> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="autoExclusive"> + <bool>true</bool> + </property> + <property name="toolButtonStyle"> + <enum>Qt::ToolButtonTextBesideIcon</enum> + </property> + <attribute name="buttonGroup"> + <string>textFlowBtnGroup</string> + </attribute> + </widget> + </item> + <item> + <widget class="QToolButton" name="editCont"> + <property name="text"> + <string>&Edit...</string> + </property> + </widget> + </item> + </layout> + </item> + <item> + <widget class="QToolButton" name="textFlowUsesImageClipping"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Use Image Clip Path</string> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="autoExclusive"> + <bool>true</bool> + </property> + <property name="toolButtonStyle"> + <enum>Qt::ToolButtonTextBesideIcon</enum> + </property> + <attribute name="buttonGroup"> + <string>textFlowBtnGroup</string> + </attribute> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QStackedWidget" name="stackedWidget"> + <property name="currentIndex"> + <number>1</number> + </property> + <widget class="QWidget" name="page"/> + <widget class="QWidget" name="page_2"> + <layout class="QVBoxLayout" name="verticalLayout_4"> + <item> + <widget class="QGroupBox" name="fillRuleGroup"> + <property name="title"> + <string>Fill Rule</string> + </property> + <property name="flat"> + <bool>true</bool> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_3"> + <property name="spacing"> + <number>5</number> + </property> + <property name="margin"> + <number>2</number> + </property> + <item> + <spacer name="horizontalSpacer_2"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QRadioButton" name="evenOdd"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Even-Odd</string> + </property> + </widget> + </item> + <item> + <widget class="QRadioButton" name="nonZero"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Non Zero</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_3"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> + </item> + </layout> + </widget> + </widget> + </item> + <item> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> + <customwidgets> + <customwidget> + <class>ScrSpinBox</class> + <extends>QDoubleSpinBox</extends> + <header>ui/scrspinbox.h</header> + </customwidget> + <customwidget> + <class>Autoforms</class> + <extends>QToolButton</extends> + <header>ui/autoform.h</header> + </customwidget> + </customwidgets> + <resources/> + <connections/> + <buttongroups> + <buttongroup name="textFlowBtnGroup"/> + </buttongroups> +</ui> Index: scribus/ui/propertiespalette_shape.h =================================================================== --- scribus/ui/propertiespalette_shape.h (revision 17429) +++ scribus/ui/propertiespalette_shape.h (working copy) @@ -76,7 +76,9 @@ void handleTextFlow(); void handleShapeEdit(); + void handleContEdit(); void handleShapeEditEnded(); + void handleContEditEnded(); void handleCornerRadius(); void handleFillRule(); void handleNewShape(int, int, qreal *); Index: scribus/ui/propertiespalette_shape.cpp =================================================================== --- scribus/ui/propertiespalette_shape.cpp (revision 17429) +++ scribus/ui/propertiespalette_shape.cpp (working copy) @@ -62,6 +62,7 @@ connect(textFlowBtnGroup, SIGNAL(buttonClicked(int)), this, SLOT(handleTextFlow())); connect(editShape , SIGNAL(clicked()) , this, SLOT(handleShapeEdit())); + connect(editCont , SIGNAL(clicked()) , this, SLOT(handleContEdit())); connect(roundRect , SIGNAL(valueChanged(double)) , this, SLOT(handleCornerRadius())); connect(evenOdd , SIGNAL(clicked()) , this, SLOT(handleFillRule()) ); connect(nonZero , SIGNAL(clicked()) , this, SLOT(handleFillRule()) ); @@ -464,6 +465,56 @@ } } + +void PropertiesPalette_Shape::handleContEdit() +{ + if (!m_ScMW || m_ScMW->scriptIsRunning()) + return; + if ((m_haveDoc) && (m_haveItem)) + { + m_tmpSelection->clear(); + if (m_item->asRegularPolygon()) + { + m_ScMW->view->requestMode(modeEditPolygon); + roundRect->setEnabled(false); + } + else if (m_item->asArc()) + { + m_ScMW->view->requestMode(modeEditArc); + roundRect->setEnabled(false); + } + else if (m_item->asSpiral()) + { + m_ScMW->view->requestMode(modeEditSpiral); + roundRect->setEnabled(false); + } + else + { + m_ScMW->view->requestMode(modeEditClip); + m_ScMW->nodePalette->EditCont->setChecked(true); + m_ScMW->doc->nodeEdit.isContourLine=true; + m_ScMW->nodePalette->ResetCont->setEnabled(true); + roundRect->setEnabled(false); + connect(m_ScMW->nodePalette, SIGNAL(paletteClosed()), this, SLOT(handleContEditEnded())); + } + m_doc->changed(); + } +} + +void PropertiesPalette_Shape::handleContEditEnded() +{ + disconnect(m_ScMW->nodePalette, SIGNAL(paletteClosed()), this, SLOT(handleContEditEnded())); + if ((m_haveDoc) && (m_haveItem)) + { + if (m_tmpSelection->count() > 0) + { + m_doc->m_Selection->copy(*m_tmpSelection, false); + m_doc->m_Selection->connectItemToGUI(); + } + m_tmpSelection->clear(); + } +} + void PropertiesPalette_Shape::handleCornerRadius() { if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning()) |
|
Yes ! noError.diff applies well and runs as requested. |
|
ubdated_patch.diff (25,808 bytes)
Index: scribus/ui/propertiespalette_shape.cpp =================================================================== --- scribus/ui/propertiespalette_shape.cpp (revision 20473) +++ scribus/ui/propertiespalette_shape.cpp (working copy) @@ -62,6 +62,7 @@ connect(textFlowBtnGroup, SIGNAL(buttonClicked(int)), this, SLOT(handleTextFlow())); connect(editShape , SIGNAL(clicked()) , this, SLOT(handleShapeEdit())); + connect(editCont , SIGNAL(clicked()) , this, SLOT(handleContEdit())); connect(roundRect , SIGNAL(valueChanged(double)) , this, SLOT(handleCornerRadius())); connect(evenOdd , SIGNAL(clicked()) , this, SLOT(handleFillRule()) ); connect(nonZero , SIGNAL(clicked()) , this, SLOT(handleFillRule()) ); @@ -472,6 +473,56 @@ } } + +void PropertiesPalette_Shape::handleContEdit() +{ + if (!m_ScMW || m_ScMW->scriptIsRunning()) + return; + if ((m_haveDoc) && (m_haveItem)) + { + m_tmpSelection->clear(); + if (m_item->asRegularPolygon()) + { + m_ScMW->view->requestMode(modeEditPolygon); + roundRect->setEnabled(false); + } + else if (m_item->asArc()) + { + m_ScMW->view->requestMode(modeEditArc); + roundRect->setEnabled(false); + } + else if (m_item->asSpiral()) + { + m_ScMW->view->requestMode(modeEditSpiral); + roundRect->setEnabled(false); + } + else + { + m_ScMW->view->requestMode(modeEditClip); + m_ScMW->nodePalette->EditCont->setChecked(true); + m_ScMW->doc->nodeEdit.setIsContourLine(true); + m_ScMW->nodePalette->ResetCont->setEnabled(true); + roundRect->setEnabled(false); + connect(m_ScMW->nodePalette, SIGNAL(paletteClosed()), this, SLOT(handleContEditEnded())); + } + m_doc->changed(); + } +} + +void PropertiesPalette_Shape::handleContEditEnded() +{ + disconnect(m_ScMW->nodePalette, SIGNAL(paletteClosed()), this, SLOT(handleContEditEnded())); + if ((m_haveDoc) && (m_haveItem)) + { + if (m_tmpSelection->count() > 0) + { + m_doc->m_Selection->copy(*m_tmpSelection, false); + m_doc->m_Selection->connectItemToGUI(); + } + m_tmpSelection->clear(); + } +} + void PropertiesPalette_Shape::handleCornerRadius() { if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning()) Index: scribus/ui/propertiespalette_shape.h =================================================================== --- scribus/ui/propertiespalette_shape.h (revision 20473) +++ scribus/ui/propertiespalette_shape.h (working copy) @@ -77,7 +77,9 @@ void handleTextFlow(); void handleShapeEdit(); + void handleContEdit(); void handleShapeEditEnded(); + void handleContEditEnded(); void handleCornerRadius(); void handleFillRule(); void handleNewShape(int, int, qreal *); Index: scribus/ui/propertiespalette_shapebase.ui =================================================================== --- scribus/ui/propertiespalette_shapebase.ui (revision 20473) +++ scribus/ui/propertiespalette_shapebase.ui (working copy) @@ -1,350 +1,364 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ui version="4.0"> - <class>PropertiesPalette_ShapeBase</class> - <widget class="QWidget" name="PropertiesPalette_ShapeBase"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>280</width> - <height>281</height> - </rect> - </property> - <property name="windowTitle"> - <string>Form</string> - </property> - <layout class="QVBoxLayout" name="verticalLayout"> - <property name="spacing"> - <number>2</number> - </property> - <property name="margin"> - <number>2</number> - </property> - <item> - <widget class="QGroupBox" name="shapeGroup"> - <property name="title"> - <string>Shape</string> - </property> - <property name="flat"> - <bool>true</bool> - </property> - <layout class="QVBoxLayout" name="verticalLayout_2"> - <property name="spacing"> - <number>5</number> - </property> - <property name="margin"> - <number>2</number> - </property> - <item> - <layout class="QHBoxLayout" name="horizontalLayout"> - <item> - <spacer name="horizontalSpacer"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="Autoforms" name="customShape"> - <property name="text"> - <string>...</string> - </property> - </widget> - </item> - <item> - <widget class="QToolButton" name="editShape"> - <property name="text"> - <string>&Edit...</string> - </property> - </widget> - </item> - </layout> - </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_2"> - <item> - <widget class="QLabel" name="roundRectLabel"> - <property name="text"> - <string>Round Corners</string> - </property> - </widget> - </item> - <item> - <widget class="ScrSpinBox" name="roundRect"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </widget> - </item> - <item> - <widget class="QGroupBox" name="textFlowGroup"> - <property name="title"> - <string>Text Flow Around Frame</string> - </property> - <property name="flat"> - <bool>true</bool> - </property> - <layout class="QVBoxLayout" name="verticalLayout_3"> - <property name="spacing"> - <number>5</number> - </property> - <property name="margin"> - <number>2</number> - </property> - <item> - <widget class="QToolButton" name="textFlowDisabled"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Disabled</string> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - <property name="autoExclusive"> - <bool>true</bool> - </property> - <property name="toolButtonStyle"> - <enum>Qt::ToolButtonTextBesideIcon</enum> - </property> - <attribute name="buttonGroup"> - <string>textFlowBtnGroup</string> - </attribute> - </widget> - </item> - <item> - <widget class="QToolButton" name="textFlowUsesFrameShape"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Use &Frame Shape</string> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - <property name="autoExclusive"> - <bool>true</bool> - </property> - <property name="toolButtonStyle"> - <enum>Qt::ToolButtonTextBesideIcon</enum> - </property> - <attribute name="buttonGroup"> - <string>textFlowBtnGroup</string> - </attribute> - </widget> - </item> - <item> - <widget class="QToolButton" name="textFlowUsesBoundingBox"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Use &Bounding Box</string> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - <property name="autoExclusive"> - <bool>true</bool> - </property> - <property name="toolButtonStyle"> - <enum>Qt::ToolButtonTextBesideIcon</enum> - </property> - <attribute name="buttonGroup"> - <string>textFlowBtnGroup</string> - </attribute> - </widget> - </item> - <item> - <widget class="QToolButton" name="textFlowUsesContourLine"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>&Use Contour Line</string> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - <property name="autoExclusive"> - <bool>true</bool> - </property> - <property name="toolButtonStyle"> - <enum>Qt::ToolButtonTextBesideIcon</enum> - </property> - <attribute name="buttonGroup"> - <string>textFlowBtnGroup</string> - </attribute> - </widget> - </item> - <item> - <widget class="QToolButton" name="textFlowUsesImageClipping"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Use Image Clip Path</string> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - <property name="autoExclusive"> - <bool>true</bool> - </property> - <property name="toolButtonStyle"> - <enum>Qt::ToolButtonTextBesideIcon</enum> - </property> - <attribute name="buttonGroup"> - <string>textFlowBtnGroup</string> - </attribute> - </widget> - </item> - </layout> - </widget> - </item> - <item> - <widget class="QStackedWidget" name="stackedWidget"> - <property name="currentIndex"> - <number>1</number> - </property> - <widget class="QWidget" name="page"/> - <widget class="QWidget" name="page_2"> - <layout class="QVBoxLayout" name="verticalLayout_4"> - <item> - <widget class="QGroupBox" name="fillRuleGroup"> - <property name="title"> - <string>Fill Rule</string> - </property> - <property name="flat"> - <bool>true</bool> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_3"> - <property name="spacing"> - <number>5</number> - </property> - <property name="margin"> - <number>2</number> - </property> - <item> - <spacer name="horizontalSpacer_2"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QRadioButton" name="evenOdd"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Even-Odd</string> - </property> - </widget> - </item> - <item> - <widget class="QRadioButton" name="nonZero"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Non Zero</string> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_3"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - </layout> - </widget> - </item> - </layout> - </widget> - </widget> - </item> - <item> - <spacer name="verticalSpacer"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>40</height> - </size> - </property> - </spacer> - </item> - </layout> - </widget> - <customwidgets> - <customwidget> - <class>ScrSpinBox</class> - <extends>QDoubleSpinBox</extends> - <header>ui/scrspinbox.h</header> - </customwidget> - <customwidget> - <class>Autoforms</class> - <extends>QToolButton</extends> - <header>ui/autoform.h</header> - </customwidget> - </customwidgets> - <resources/> - <connections/> - <buttongroups> - <buttongroup name="textFlowBtnGroup"/> - </buttongroups> -</ui> +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>PropertiesPalette_ShapeBase</class> + <widget class="QWidget" name="PropertiesPalette_ShapeBase"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>280</width> + <height>334</height> + </rect> + </property> + <property name="windowTitle"> + <string>Form</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <property name="spacing"> + <number>2</number> + </property> + <property name="margin"> + <number>2</number> + </property> + <item> + <widget class="QGroupBox" name="shapeGroup"> + <property name="title"> + <string>Shape</string> + </property> + <property name="flat"> + <bool>true</bool> + </property> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <property name="spacing"> + <number>5</number> + </property> + <property name="margin"> + <number>2</number> + </property> + <item> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="Autoforms" name="customShape"> + <property name="text"> + <string>...</string> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="editShape"> + <property name="text"> + <string>&Edit...</string> + </property> + </widget> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <item> + <widget class="QLabel" name="roundRectLabel"> + <property name="text"> + <string>Round Corners</string> + </property> + </widget> + </item> + <item> + <widget class="ScrSpinBox" name="roundRect"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QGroupBox" name="textFlowGroup"> + <property name="title"> + <string>Text Flow Around Frame</string> + </property> + <property name="flat"> + <bool>true</bool> + </property> + <layout class="QVBoxLayout" name="verticalLayout_3"> + <property name="spacing"> + <number>5</number> + </property> + <property name="margin"> + <number>2</number> + </property> + <item> + <widget class="QToolButton" name="textFlowDisabled"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Disabled</string> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="autoExclusive"> + <bool>true</bool> + </property> + <property name="toolButtonStyle"> + <enum>Qt::ToolButtonTextBesideIcon</enum> + </property> + <attribute name="buttonGroup"> + <string>textFlowBtnGroup</string> + </attribute> + </widget> + </item> + <item> + <widget class="QToolButton" name="textFlowUsesFrameShape"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Use &Frame Shape</string> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="autoExclusive"> + <bool>true</bool> + </property> + <property name="toolButtonStyle"> + <enum>Qt::ToolButtonTextBesideIcon</enum> + </property> + <attribute name="buttonGroup"> + <string>textFlowBtnGroup</string> + </attribute> + </widget> + </item> + <item> + <widget class="QToolButton" name="textFlowUsesBoundingBox"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Use &Bounding Box</string> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="autoExclusive"> + <bool>true</bool> + </property> + <property name="toolButtonStyle"> + <enum>Qt::ToolButtonTextBesideIcon</enum> + </property> + <attribute name="buttonGroup"> + <string>textFlowBtnGroup</string> + </attribute> + </widget> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_4"> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QToolButton" name="textFlowUsesContourLine"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>&Use Contour Line</string> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="autoExclusive"> + <bool>true</bool> + </property> + <property name="toolButtonStyle"> + <enum>Qt::ToolButtonTextBesideIcon</enum> + </property> + <attribute name="buttonGroup"> + <string>textFlowBtnGroup</string> + </attribute> + </widget> + </item> + <item> + <widget class="QToolButton" name="editCont"> + <property name="text"> + <string>&Edit...</string> + </property> + </widget> + </item> + </layout> + </item> + <item> + <widget class="QToolButton" name="textFlowUsesImageClipping"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Use Image Clip Path</string> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="autoExclusive"> + <bool>true</bool> + </property> + <property name="toolButtonStyle"> + <enum>Qt::ToolButtonTextBesideIcon</enum> + </property> + <attribute name="buttonGroup"> + <string>textFlowBtnGroup</string> + </attribute> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QStackedWidget" name="stackedWidget"> + <property name="currentIndex"> + <number>1</number> + </property> + <widget class="QWidget" name="page"/> + <widget class="QWidget" name="page_2"> + <layout class="QVBoxLayout" name="verticalLayout_4"> + <item> + <widget class="QGroupBox" name="fillRuleGroup"> + <property name="title"> + <string>Fill Rule</string> + </property> + <property name="flat"> + <bool>true</bool> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_3"> + <property name="spacing"> + <number>5</number> + </property> + <property name="margin"> + <number>2</number> + </property> + <item> + <spacer name="horizontalSpacer_2"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QRadioButton" name="evenOdd"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Even-Odd</string> + </property> + </widget> + </item> + <item> + <widget class="QRadioButton" name="nonZero"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Non Zero</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_3"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> + </item> + </layout> + </widget> + </widget> + </item> + <item> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> + <customwidgets> + <customwidget> + <class>ScrSpinBox</class> + <extends>QDoubleSpinBox</extends> + <header>ui/scrspinbox.h</header> + </customwidget> + <customwidget> + <class>Autoforms</class> + <extends>QToolButton</extends> + <header>ui/autoform.h</header> + </customwidget> + </customwidgets> + <resources/> + <connections/> + <buttongroups> + <buttongroup name="textFlowBtnGroup"/> + </buttongroups> +</ui> |
|
hello guys I slightly modify the old patch to be compotable with the new version 1.5.1 please check it thank you |
|
I tested and confirm it works OK. It brings ease in the use of contour. |
|
Haven't tested it but I like the idea |
|
I hope you try the new feature kunda Its very nice if they add it in Official version of scribus |
|
Jean, thoughts ? |
|
Per jean:<Kunda> jghali, quick question: what are you thoughts on: 0010409 <jghali> makes GUI ugly, a better solution would likely to have a drop down menu on modify button to allow editing contour directly <Kunda> where would the dropdown be triggered from in the gui ? <jghali> Kunda, the drop down would be in the "modify" button at the top of PP shape tab |
|
please no dropdown... i still think that this is not a good solution, but better what we have now. i would accept this patch until something provides a better solution. |
|
"Ugly ??? How dare you ?" Plz Look at today's shape tab in the PP ! |
|
I agree about accepting the patch till a better solution appears. |
|
bumping issue to top of queue for decision by the devs |
|
The proposed solution looks ok to me. Not perfect, but better than it is now. |
|
Developers, Craig and Jean, don't seem pleased by the idea proposed in this patch. Perhaps we could offer this an option to set in preferences that we could turn on and off depending on taste ? |
|
no kunda. Dont increase the complexity of the preferences for such a trivial UI improvement. |
|
Jluc, for example, we could have an experimental tab in Preferences where we'd add all sorts of new functionality that we could test drive. If we don't like it we get rid of it ? |
|
A 'test and report' preferences tab. I like that idea. |
|
What if all this gets implemented as QPushButton but with ::setMenu() method? That way we could treat it as a simple button, but, because an arrow will appear on Button itself, it would be obvious that there is another option - "Edit Contour line..." could appear. It's the same approach we use for changing shape, for example, and it works well. |
|
8 years later... |
|
0015811 might help implementing this. i need two icons: one of editing the shape, the other for editing the contour. |
|
Another idea : - The edit shape window is kept as is now - Double clicking a "Choose text flow" button triggers the edit shape window and opens it either in "edit shape" or "edit contour" mode depending on what is relevant for this button Great, isnt ? |
Date Modified | Username | Field | Change |
---|---|---|---|
2011-11-27 16:30 | JLuc | New Issue | |
2011-11-27 16:30 | JLuc | File Added: PP.JPG | |
2011-11-28 12:47 | ale | Note Added: 0027292 | |
2012-03-20 14:48 | pygmee | Note Added: 0027833 | |
2012-03-31 00:18 | baazigar | File Added: contourEditBox.diff | |
2012-03-31 00:43 | baazigar | Note Added: 0027883 | |
2012-04-03 12:13 | baazigar | File Added: contourEdit.diff | |
2012-04-03 12:26 | baazigar | Note Added: 0027891 | |
2012-04-10 18:29 | cbradney | Note Added: 0027913 | |
2012-04-11 19:57 | baazigar | Note Added: 0027919 | |
2012-04-11 20:05 | baazigar | Note Added: 0027920 | |
2012-04-11 20:05 | baazigar | File Added: noError.diff | |
2012-04-11 20:56 | JLuc | Note Added: 0027921 | |
2014-01-14 19:52 | JLuc | Tag Attached: easyhack | |
2014-08-01 09:33 | JLuc | Relationship added | related to 0006044 |
2014-08-01 09:36 | JLuc | Relationship added | child of 0002464 |
2014-08-08 19:20 | Kunda | Status | new => feedback |
2014-08-08 19:20 | Kunda | Summary | Improve access to contour editinig => [PATCH] Improve access to contour editinig |
2014-08-08 19:20 | Kunda | Summary | [PATCH] Improve access to contour editinig => [PATCH] Improve access to contour editing |
2014-10-15 17:07 | Kunda | Tag Renamed | easyhack => #easyhack |
2014-10-24 23:00 | Kunda | Patch | => Yes |
2015-10-22 07:15 | Dawoodalbadi | File Added: ubdated_patch.diff | |
2015-10-22 07:17 | Dawoodalbadi | Note Added: 0036806 | |
2015-10-22 16:17 | JLuc | Note Added: 0036831 | |
2015-10-22 16:17 | JLuc | Status | feedback => new |
2015-10-22 16:17 | JLuc | Tag Attached: patch_tested_ok | |
2015-10-22 16:56 | Kunda | Note Added: 0036833 | |
2015-10-23 08:48 | Dawoodalbadi | Note Added: 0036852 | |
2015-10-23 08:49 | Dawoodalbadi | Note Edited: 0036852 | |
2015-10-25 13:48 |
|
Tag Attached: HOST-Oman | |
2015-10-25 14:04 | Kunda | Note Added: 0036914 | |
2015-10-27 23:44 | Kunda | Note Added: 0037008 | |
2015-10-28 16:03 | ale | Note Added: 0037049 | |
2015-10-28 18:52 | JLuc | Note Added: 0037054 | |
2015-10-30 20:44 | Kunda | Note Added: 0037125 | |
2015-10-31 13:07 | Kunda | Note Added: 0037135 | |
2015-11-04 21:16 | christoph_s | Note Added: 0037225 | |
2015-11-05 12:23 | Kunda | Sticky Issue | No => Yes |
2015-11-10 15:43 | Kunda | Note Added: 0037384 | |
2015-11-23 11:53 | JLuc | Note Added: 0037604 | |
2015-12-01 16:04 | Kunda | Note Added: 0037774 | |
2015-12-02 09:54 | JLuc | Note Added: 0037785 | |
2016-01-13 01:52 | Kunda | Relationship added | related to 0003436 |
2016-01-13 18:51 | Kunda | Relationship added | related to 0013650 |
2016-01-19 16:47 | Kunda | Relationship added | related to 0007754 |
2016-02-22 17:36 | Vladimir Savic | Note Added: 0038862 | |
2016-04-06 04:01 | Kunda | Relationship added | child of 0013906 |
2019-06-15 14:47 | JLuc | Tag Attached: #rottenpatch | |
2019-10-13 09:48 | JLuc | Note Added: 0046770 | |
2019-10-14 07:17 | ale | Note Added: 0046778 | |
2019-10-14 07:17 | ale | Relationship added | related to 0015811 |
2019-11-09 11:34 | ale | Relationship added | related to 0015926 |
2019-11-09 11:35 | ale | Assigned To | => ale |
2019-11-09 11:35 | ale | Status | new => assigned |
2023-09-24 16:37 | JLuc | Note Added: 0050351 | |
2024-01-02 19:22 | cbradney | Sticky Issue | Yes => No |