Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 16052 → Rev 16053

/branches/ScribusOIF/scribus/ui/propertiespalette_shapebase.ui
0,0 → 1,350
<?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>&amp;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 &amp;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 &amp;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>&amp;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>autoform.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
<buttongroups>
<buttongroup name="textFlowBtnGroup"/>
</buttongroups>
</ui>
/branches/ScribusOIF/scribus/ui/propertiespalette_shape.h
29,6 → 29,7
class QVBoxLayout;
class QWidget;
 
#include "ui_propertiespalette_shapebase.h"
 
#include "scribusapi.h"
#include "scrspinbox.h"
46,7 → 47,7
class ScribusMainWindow;
class Selection;
 
class SCRIBUS_API PropertiesPalette_Shape : public QWidget
class SCRIBUS_API PropertiesPalette_Shape : public QWidget, Ui::PropertiesPalette_ShapeBase
{
Q_OBJECT
 
56,10 → 57,9
 
virtual void changeEvent(QEvent *e);
 
Autoforms* SCustom;
ScrSpinBox* RoundRect;
 
void setCustomShapeIcon(int submode);
void setLocked(bool isLocked);
void setRoundRectEnabled(bool enabled);
void displayTextFlowMode(PageItem::TextFlowMode mode);
 
protected:
80,37 → 80,6
protected:
ScribusMainWindow *m_ScMW;
 
QHBoxLayout* Layout13;
QHBoxLayout* ShapeGroupLayout;
 
QVBoxLayout* FillRuleLayout;
QVBoxLayout* pageLayout_2;
QVBoxLayout* pageLayout_2c;
QVBoxLayout* textFlowOptionsLayout;
 
QGroupBox* FillRuleGroup;
QGroupBox* ShapeGroup;
QGroupBox* textFlowOptions;
 
QLabel* rndCornersLabel;
QLabel* SRect;
 
QButtonGroup* textFlowOptionsB;
QRadioButton* EvenOdd;
QRadioButton* NonZero;
 
QToolButton* EditShape;
QToolButton* textFlowDisabled;
QToolButton* textFlowUsesFrameShape;
QToolButton* textFlowUsesBoundingBox;
QToolButton* textFlowUsesContourLine;
QToolButton* textFlowUsesImageClipping;
 
QStackedWidget* TabStack2;
 
QWidget* page_2a;
QWidget* page_2c;
 
public slots:
void setMainWindow(ScribusMainWindow *mw);
 
/branches/ScribusOIF/scribus/ui/propertiespalette.cpp
692,12 → 692,12
 
if ((m_item->itemType() == PageItem::ImageFrame) || (m_item->itemType() == PageItem::TextFrame))
{
shapePal->RoundRect->setEnabled(frameType == 0);
shapePal->setRoundRectEnabled(frameType == 0);
return;
}
// m_item->convertTo(PageItem::Polygon);
// newSelection(6);
shapePal->RoundRect->setEnabled(frameType == 0);
shapePal->setRoundRectEnabled(frameType == 0);
}
}
 
989,6 → 989,6
return;
if ((m_haveDoc) && (m_haveItem))
{
shapePal->RoundRect->setEnabled(false);
shapePal->setRoundRectEnabled(false);
}
}
/branches/ScribusOIF/scribus/ui/propertiespalette_shape.cpp
85,128 → 85,32
m_haveDoc = false;
m_haveItem = false;
m_unitRatio = 1.0;
 
m_tmpSelection = new Selection(this, false);
m_tmpSelection->clear();
 
setupUi(this);
setSizePolicy( QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum));
 
pageLayout_2 = new QVBoxLayout( this );
pageLayout_2->setSpacing( 5 );
pageLayout_2->setMargin( 0 );
roundRectLabel->setBuddy(roundRect);
 
ShapeGroup = new QGroupBox( this );
ShapeGroupLayout = new QHBoxLayout( ShapeGroup );
ShapeGroupLayout->setSpacing( 2 );
ShapeGroupLayout->setMargin( 0 );
ShapeGroupLayout->setAlignment( Qt::AlignTop );
SRect = new QLabel( "Shape:", ShapeGroup );
ShapeGroupLayout->addWidget( SRect );
SCustom = new Autoforms( ShapeGroup );
ShapeGroupLayout->addWidget( SCustom );
 
EditShape = new QToolButton( ShapeGroup );
ShapeGroupLayout->addWidget( EditShape );
pageLayout_2->addWidget( ShapeGroup );
 
Layout13 = new QHBoxLayout;
Layout13->setSpacing( 2 );
Layout13->setMargin( 0 );
 
RoundRect = new ScrSpinBox( this, 0 );
rndCornersLabel = new QLabel( "R&ound\nCorners:", this );
rndCornersLabel->setBuddy(RoundRect);
Layout13->addWidget( rndCornersLabel );
Layout13->addWidget( RoundRect );
pageLayout_2->addLayout( Layout13 );
 
textFlowOptions = new QGroupBox( this );
textFlowOptionsLayout = new QVBoxLayout( textFlowOptions );
textFlowOptionsLayout->setSpacing( 5 );
textFlowOptionsLayout->setMargin( 5 );
textFlowOptionsLayout->setAlignment( Qt::AlignTop );
textFlowDisabled = new QToolButton( textFlowOptions );
textFlowDisabled->setCheckable( true );
textFlowDisabled->setAutoExclusive(true);
textFlowDisabled->setToolButtonStyle( Qt::ToolButtonTextBesideIcon );
textFlowDisabled->setText( "Disabled" );
textFlowDisabled->setIcon(QIcon(loadIcon("flow-none.png")));
textFlowOptionsLayout->addWidget( textFlowDisabled );
textFlowUsesFrameShape = new QToolButton( textFlowOptions );
textFlowUsesFrameShape->setCheckable( true );
textFlowUsesFrameShape->setAutoExclusive(true);
textFlowUsesFrameShape->setToolButtonStyle( Qt::ToolButtonTextBesideIcon );
textFlowUsesFrameShape->setText( "Use &Frame Shape" );
textFlowUsesFrameShape->setIcon(QIcon(loadIcon("flow-frame.png")));
textFlowOptionsLayout->addWidget( textFlowUsesFrameShape );
textFlowUsesBoundingBox = new QToolButton( textFlowOptions );
textFlowUsesBoundingBox->setCheckable( true );
textFlowUsesBoundingBox->setAutoExclusive(true);
textFlowUsesBoundingBox->setToolButtonStyle( Qt::ToolButtonTextBesideIcon );
textFlowUsesBoundingBox->setText( "Use &Bounding Box" );
textFlowUsesBoundingBox->setIcon(QIcon(loadIcon("flow-bounding.png")));
textFlowOptionsLayout->addWidget( textFlowUsesBoundingBox );
textFlowUsesContourLine = new QToolButton( textFlowOptions );
textFlowUsesContourLine->setCheckable( true );
textFlowUsesContourLine->setAutoExclusive(true);
textFlowUsesContourLine->setToolButtonStyle( Qt::ToolButtonTextBesideIcon );
textFlowUsesContourLine->setText( "&Use Contour Line" );
textFlowUsesContourLine->setIcon(QIcon(loadIcon("flow-contour.png")));
textFlowOptionsLayout->addWidget( textFlowUsesContourLine );
textFlowUsesImageClipping = new QToolButton( textFlowOptions );
textFlowUsesImageClipping->setCheckable( true );
textFlowUsesImageClipping->setAutoExclusive(true);
textFlowUsesImageClipping->setToolButtonStyle( Qt::ToolButtonTextBesideIcon );
textFlowUsesImageClipping->setText( "Use Image Clip Path" );
textFlowUsesImageClipping->setIcon(QIcon(loadIcon("flow-contour.png")));
textFlowOptionsLayout->addWidget( textFlowUsesImageClipping );
pageLayout_2->addWidget( textFlowOptions );
textFlowDisabled->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
textFlowUsesFrameShape->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
textFlowUsesBoundingBox->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
textFlowUsesContourLine->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
textFlowUsesImageClipping->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
textFlowOptionsB = new QButtonGroup( this );
textFlowOptionsB->addButton(textFlowDisabled, 0);
textFlowOptionsB->addButton(textFlowUsesFrameShape, 1);
textFlowOptionsB->addButton(textFlowUsesBoundingBox, 2);
textFlowOptionsB->addButton(textFlowUsesContourLine, 3);
textFlowOptionsB->addButton(textFlowUsesImageClipping, 4);
 
TabStack2 = new QStackedWidget( this );
 
page_2a = new QWidget( TabStack2 );
TabStack2->addWidget( page_2a );
 
page_2c = new QWidget( TabStack2 );
pageLayout_2c = new QVBoxLayout( page_2c );
pageLayout_2c->setSpacing( 5 );
pageLayout_2c->setMargin( 0 );
FillRuleGroup = new QGroupBox( page_2c );
FillRuleLayout = new QVBoxLayout( FillRuleGroup );
FillRuleLayout->setSpacing( 2 );
FillRuleLayout->setMargin( 5 );
FillRuleLayout->setAlignment( Qt::AlignTop );
EvenOdd = new QRadioButton( "Even-Odd", FillRuleGroup );
FillRuleLayout->addWidget( EvenOdd );
NonZero = new QRadioButton( "Non Zero", FillRuleGroup );
FillRuleLayout->addWidget( NonZero );
EvenOdd->setChecked( true );
FillRuleGroup->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Minimum);
pageLayout_2c->addWidget(FillRuleGroup);
TabStack2->addWidget( page_2c );
 
pageLayout_2->addWidget( TabStack2 );
 
languageChange();
 
connect(textFlowOptionsB , SIGNAL(buttonClicked(int)), this, SLOT(handleTextFlow()));
connect(EditShape, SIGNAL(clicked()) , this, SLOT(handleShapeEdit()));
connect(RoundRect, SIGNAL(valueChanged(double)) , this, SLOT(handleCornerRadius()));
connect(EvenOdd , SIGNAL(clicked()) , this, SLOT(handleFillRule()) );
connect(NonZero , SIGNAL(clicked()) , this, SLOT(handleFillRule()) );
connect(SCustom , SIGNAL(FormSel(int, int, qreal *)), this, SLOT(handleNewShape(int, int, qreal *)));
connect(textFlowBtnGroup, SIGNAL(buttonClicked(int)), this, SLOT(handleTextFlow()));
connect(editShape , SIGNAL(clicked()) , this, SLOT(handleShapeEdit()));
connect(roundRect , SIGNAL(valueChanged(double)) , this, SLOT(handleCornerRadius()));
connect(evenOdd , SIGNAL(clicked()) , this, SLOT(handleFillRule()) );
connect(nonZero , SIGNAL(clicked()) , this, SLOT(handleFillRule()) );
connect(customShape, SIGNAL(FormSel(int, int, qreal *)), this, SLOT(handleNewShape(int, int, qreal *)));
 
RoundRect->showValue(0);
TabStack2->setCurrentIndex(0);
roundRect->showValue(0);
stackedWidget->setCurrentIndex(0);
}
 
void PropertiesPalette_Shape::changeEvent(QEvent *e)
247,7 → 151,7
m_haveDoc = true;
m_haveItem = false;
 
RoundRect->setValues( -300, 300, 2, 0);
roundRect->setValues( -300, 300, 2, 0);
 
connect(m_doc->m_Selection, SIGNAL(selectionChanged()), this, SLOT(handleSelectionChanged()));
connect(m_doc , SIGNAL(docChanged()) , this, SLOT(handleSelectionChanged()));
266,9 → 170,9
m_doc = NULL;
m_item = NULL;
 
EditShape->setEnabled(false);
RoundRect->setEnabled(false);
RoundRect->showValue(0);
editShape->setEnabled(false);
roundRect->setEnabled(false);
roundRect->showValue(0);
setEnabled(false);
}
 
304,6 → 208,11
return currentItem;
}
 
void PropertiesPalette_Shape::setCustomShapeIcon(int submode)
{
customShape->setIcon( customShape->getIconPixmap(submode) );
}
 
void PropertiesPalette_Shape::setLocked(bool isLocked)
{
QPalette pal(qApp->palette());
310,17 → 219,22
if (isLocked)
pal.setCurrentColorGroup(QPalette::Disabled);
 
EditShape->setEnabled(!isLocked);
editShape->setEnabled(!isLocked);
if ((m_haveDoc) && (m_haveItem))
{
SCustom->setEnabled(!m_item->asLine() && !m_item->asPolyLine() && !m_item->asPathText() && !isLocked);
customShape->setEnabled(!m_item->asLine() && !m_item->asPolyLine() && !m_item->asPathText() && !isLocked);
if (((m_item->asTextFrame()) || (m_item->asImageFrame()) || (m_item->asPolygon())) && (!m_item->ClipEdited) && ((m_item->FrameType == 0) || (m_item->FrameType == 2)))
RoundRect->setEnabled(!isLocked);
roundRect->setEnabled(!isLocked);
else
RoundRect->setEnabled(false);
roundRect->setEnabled(false);
}
}
 
void PropertiesPalette_Shape::setRoundRectEnabled(bool enabled)
{
roundRect->setEnabled(enabled);
}
 
void PropertiesPalette_Shape::handleSelectionChanged()
{
if (!m_haveDoc || !m_ScMW || m_ScMW->scriptIsRunning())
329,7 → 243,7
PageItem* currItem = currentItemFromSelection();
if (m_doc->m_Selection->count() > 1)
{
RoundRect->showValue(0);
roundRect->showValue(0);
}
else
{
338,20 → 252,20
m_haveItem = (itemType != -1);
if (itemType != -1)
{
EditShape->setEnabled(!currItem->locked());
SCustom->setEnabled(itemType != 5 && itemType!= 7 && itemType !=8 && !currItem->locked());
editShape->setEnabled(!currItem->locked());
customShape->setEnabled(itemType != 5 && itemType!= 7 && itemType !=8 && !currItem->locked());
}
else
{
EditShape->setEnabled(false);
SCustom->setEnabled(false);
editShape->setEnabled(false);
customShape->setEnabled(false);
}
switch (itemType)
{
case -1:
setEnabled(false);
RoundRect->setEnabled(false);
RoundRect->showValue(0);
roundRect->setEnabled(false);
roundRect->showValue(0);
break;
case PageItem::ImageFrame:
case PageItem::LatexFrame:
359,31 → 273,31
if (currItem->asOSGFrame())
{
setEnabled(false);
RoundRect->setEnabled(false);
EditShape->setEnabled(false);
SCustom->setEnabled(false);
roundRect->setEnabled(false);
editShape->setEnabled(false);
customShape->setEnabled(false);
}
else
{
setEnabled(true);
if ((!currItem->ClipEdited) && ((currItem->FrameType == 0) || (currItem->FrameType == 2)))
RoundRect->setEnabled(!currItem->locked());
roundRect->setEnabled(!currItem->locked());
else
RoundRect->setEnabled(false);
roundRect->setEnabled(false);
if ((m_doc->m_Selection->itemAt(0)->FrameType == 0) || (m_doc->m_Selection->itemAt(0)->FrameType == 2))
RoundRect->setEnabled(!currItem->locked());
roundRect->setEnabled(!currItem->locked());
}
break;
case PageItem::TextFrame:
setEnabled(true);
if ((!currItem->ClipEdited) && ((currItem->FrameType == 0) || (currItem->FrameType == 2)))
RoundRect->setEnabled(!currItem->locked());
roundRect->setEnabled(!currItem->locked());
else
RoundRect->setEnabled(false);
roundRect->setEnabled(false);
break;
case PageItem::Line:
setEnabled(false);
RoundRect->setEnabled(false);
roundRect->setEnabled(false);
break;
case PageItem::ItemType1:
case PageItem::ItemType3:
390,24 → 304,24
case PageItem::Polygon:
setEnabled(true);
if ((!currItem->ClipEdited) && ((currItem->FrameType == 0) || (currItem->FrameType == 2)))
RoundRect->setEnabled(!currItem->locked());
roundRect->setEnabled(!currItem->locked());
else
RoundRect->setEnabled(false);
roundRect->setEnabled(false);
break;
case PageItem::PolyLine:
setEnabled(true);
RoundRect->setEnabled(false);
roundRect->setEnabled(false);
break;
case PageItem::PathText:
setEnabled(true);
RoundRect->setEnabled(false);
roundRect->setEnabled(false);
break;
case PageItem::Symbol:
setEnabled(false);
if ((!currItem->ClipEdited) && ((currItem->FrameType == 0) || (currItem->FrameType == 2)))
RoundRect->setEnabled(!currItem->locked());
roundRect->setEnabled(!currItem->locked());
else
RoundRect->setEnabled(false);
roundRect->setEnabled(false);
break;
}
}
437,48 → 351,48
m_item = item;
 
if (m_item->FrameType == 0)
SCustom->setIcon(SCustom->getIconPixmap(0));
customShape->setIcon(customShape->getIconPixmap(0));
if (m_item->FrameType == 1)
SCustom->setIcon(SCustom->getIconPixmap(1));
customShape->setIcon(customShape->getIconPixmap(1));
if (m_item->FrameType > 3)
SCustom->setIcon(SCustom->getIconPixmap(m_item->FrameType-2));
customShape->setIcon(customShape->getIconPixmap(m_item->FrameType-2));
 
RoundRect->setValue(m_item->cornerRadius()*m_unitRatio);
roundRect->setValue(m_item->cornerRadius()*m_unitRatio);
displayTextFlowMode(m_item->textFlowMode());
 
if (m_item->asPathText())
{
TabStack2->setCurrentIndex(0);
stackedWidget->setCurrentIndex(0);
}
else if (m_item->asTextFrame())
{
TabStack2->setCurrentIndex(0);
stackedWidget->setCurrentIndex(0);
}
else
{
TabStack2->setCurrentIndex(1);
FillRuleGroup->setVisible(m_item->itemType() != PageItem::ImageFrame);
stackedWidget->setCurrentIndex(1);
fillRuleGroup->setVisible(m_item->itemType() != PageItem::ImageFrame);
}
 
setLocked(m_item->locked());
NonZero->setChecked(!m_item->fillRule);
EvenOdd->setChecked(m_item->fillRule);
nonZero->setChecked(!m_item->fillRule);
evenOdd->setChecked(m_item->fillRule);
 
// Frame type 3 is obsolete: CR 2005-02-06
//if (((i->itemType() == PageItem::TextFrame) || (i->itemType() == PageItem::ImageFrame) || (i->itemType() == 3)) && (!i->ClipEdited))
if (((m_item->asTextFrame()) || (m_item->asImageFrame())) && (!m_item->ClipEdited) && ((m_item->FrameType == 0) || (m_item->FrameType == 2)))
RoundRect->setEnabled(true);
roundRect->setEnabled(true);
else
{
RoundRect->setEnabled ((m_item->asPolygon()) && (!m_item->ClipEdited) && ((m_item->FrameType == 0) || (m_item->FrameType == 2)));
roundRect->setEnabled ((m_item->asPolygon()) && (!m_item->ClipEdited) && ((m_item->FrameType == 0) || (m_item->FrameType == 2)));
}
 
if (m_item->asOSGFrame())
{
setEnabled(false);
RoundRect->setEnabled(false);
EditShape->setEnabled(false);
SCustom->setEnabled(false);
roundRect->setEnabled(false);
editShape->setEnabled(false);
customShape->setEnabled(false);
}
 
if (m_item->asSymbolFrame())
523,7 → 437,7
{
m_tmpSelection->clear();
m_ScMW->view->requestMode(modeEditClip);
RoundRect->setEnabled(false);
roundRect->setEnabled(false);
connect(m_ScMW->nodePalette, SIGNAL(paletteClosed()), this, SLOT(handleShapeEditEnded()));
}
}
546,7 → 460,7
{
if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
return;
m_item->setCornerRadius(RoundRect->value() / m_unitRatio);
m_item->setCornerRadius(roundRect->value() / m_unitRatio);
m_ScMW->view->SetFrameRounded();
emit DocChanged();
m_doc->regionsChanged()->update(QRect());
556,7 → 470,7
{
if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
return;
m_item->fillRule = EvenOdd->isChecked();
m_item->fillRule = evenOdd->isChecked();
m_item->update();
emit DocChanged();
}
578,12 → 492,12
 
if ((m_item->itemType() == PageItem::ImageFrame) || (m_item->itemType() == PageItem::TextFrame))
{
RoundRect->setEnabled(f == 0);
roundRect->setEnabled(f == 0);
return;
}
// m_item->convertTo(PageItem::Polygon);
// newSelection(6);
RoundRect->setEnabled(f == 0);
roundRect->setEnabled(f == 0);
}
}
 
614,18 → 528,18
{
QString ptSuffix = tr(" pt");
QString suffix = m_doc ? unitGetSuffixFromIndex(m_doc->unitIndex()) : ptSuffix;
RoundRect->setSuffix(suffix);
roundRect->setSuffix(suffix);
 
SRect->setText( tr("Shape:"));
SCustom->setToolTip( tr("Choose the shape of frame..."));
EditShape->setText( tr("&Edit..."));
RoundRect->setToolTip( tr("Set radius of corner rounding"));
rndCornersLabel->setText( tr("R&ound\nCorners:"));
FillRuleGroup->setTitle( tr("Fill Rule"));
EvenOdd->setText( tr("Even-Odd"));
NonZero->setText( tr("Non Zero"));
shapeGroup->setTitle( tr("Shape:"));
customShape->setToolTip( tr("Choose the shape of frame..."));
editShape->setText( tr("&Edit..."));
roundRect->setToolTip( tr("Set radius of corner rounding"));
roundRectLabel->setText( tr("R&ound Corners:"));
fillRuleGroup->setTitle( tr("Fill Rule"));
evenOdd->setText( tr("Even-Odd"));
nonZero->setText( tr("Non Zero"));
 
textFlowOptions->setTitle( tr("Text &Flow Around Frame"));
textFlowGroup->setTitle( tr("Text &Flow Around Frame"));
textFlowDisabled->setText( tr("Disabled"));
textFlowUsesFrameShape->setText( tr("Use Frame &Shape"));
textFlowUsesBoundingBox->setText( tr("Use &Bounding Box"));
642,7 → 556,7
m_unitRatio = m_doc->unitRatio();
m_unitIndex = m_doc->unitIndex();
 
RoundRect->blockSignals(true);
RoundRect->setNewUnit( m_unitIndex );
RoundRect->blockSignals(false);
roundRect->blockSignals(true);
roundRect->setNewUnit( m_unitIndex );
roundRect->blockSignals(false);
}
/branches/ScribusOIF/scribus/scribus.cpp
6553,7 → 6553,7
doc->SubMode = modeToolBar->SubMode;
doc->ShapeValues = modeToolBar->ShapeVals;
doc->ValCount = modeToolBar->ValCount;
propertiesPalette->shapePal->SCustom->setIcon(propertiesPalette->shapePal->SCustom->getIconPixmap(doc->SubMode));
propertiesPalette->shapePal->setCustomShapeIcon(doc->SubMode);
}
else
doc->SubMode = -1;
/branches/ScribusOIF/scribus/CMakeLists.txt
123,6 → 123,7
ui/prefs_documentitemattributesbase.ui
ui/printdialogbase.ui
ui/propertiespalette_imagebase.ui
ui/propertiespalette_shapebase.ui
ui/propertiespalette_textbase.ui
ui/propertiespalette_xyzbase.ui
ui/replacecolors.ui
/branches/ScribusOIF/win32/vc8/Scribus.vcproj
1079,10 → 1079,6
>
</File>
<File
RelativePath="..\..\scribus\text\legacylayout.cpp"
>
</File>
<File
RelativePath="..\..\scribus\ui\linecombo.cpp"
>
</File>
5288,10 → 5284,6
</FileConfiguration>
</File>
<File
RelativePath="..\..\scribus\text\legacylayout.h"
>
</File>
<File
RelativePath="..\..\scribus\ui\linecombo.h"
>
<FileConfiguration
11721,6 → 11713,10
>
</File>
<File
RelativePath="..\..\scribus\ui\ui_propertiespalette_shapebase.h"
>
</File>
<File
RelativePath="..\..\scribus\ui\ui_propertiespalette_textbase.h"
>
</File>
13043,6 → 13039,10
>
</File>
<File
RelativePath="..\..\scribus\ui\propertiespalette_shapebase.ui"
>
</File>
<File
RelativePath="..\..\scribus\ui\propertiespalette_textbase.ui"
>
</File>