r16957 by jghali - add group related properties to content props palette
scribus-commit
scribus-commit at lists.scribus.net
Sat Nov 5 15:06:58 UTC 2011
Author: jghali
Date: Sat Nov 5 15:06:58 2011
New Revision: 16957
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=16957
Log:
add group related properties to content props palette
Added:
branches/ScribusOIF/scribus/ui/propertywidget_group.cpp
branches/ScribusOIF/scribus/ui/propertywidget_group.h
branches/ScribusOIF/scribus/ui/propertywidget_groupshape.cpp
branches/ScribusOIF/scribus/ui/propertywidget_groupshape.h
Modified:
branches/ScribusOIF/scribus/CMakeLists.txt
branches/ScribusOIF/scribus/scribus.cpp
branches/ScribusOIF/scribus/scribus.h
branches/ScribusOIF/scribus/ui/propertiespalette.cpp
branches/ScribusOIF/scribus/ui/propertiespalette.h
branches/ScribusOIF/scribus/ui/propertiespalette_content.cpp
branches/ScribusOIF/scribus/ui/propertiespalette_content.h
branches/ScribusOIF/scribus/ui/propertiespalette_group.cpp
branches/ScribusOIF/scribus/ui/propertiespalette_group.h
branches/ScribusOIF/scribus/ui/propertywidget_imagebase.ui
branches/ScribusOIF/scribus/ui/propertywidget_pos.cpp
branches/ScribusOIF/scribus/ui/propertywidget_shape.cpp
branches/ScribusOIF/scribus/ui/propertywidget_shape.h
branches/ScribusOIF/scribus/ui/transparencypalette.h
branches/ScribusOIF/win32/vc9/scribus-main/Scribus.vcproj
Modified: branches/ScribusOIF/scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16957&path=/branches/ScribusOIF/scribus/CMakeLists.txt
==============================================================================
--- branches/ScribusOIF/scribus/CMakeLists.txt (original)
+++ branches/ScribusOIF/scribus/CMakeLists.txt Sat Nov 5 15:06:58 2011
@@ -393,6 +393,8 @@
ui/propertywidget_colortrans.h
ui/propertywidget_distance.h
ui/propertywidget_flop.h
+ ui/propertywidget_group.h
+ ui/propertywidget_groupshape.h
ui/propertywidget_image.h
ui/propertywidget_line.h
ui/propertywidget_optmargins.h
@@ -826,6 +828,8 @@
ui/propertywidget_distance.cpp
ui/propertywidget_flop.cpp
ui/propertywidget_image.cpp
+ ui/propertywidget_group.cpp
+ ui/propertywidget_groupshape.cpp
ui/propertywidget_line.cpp
ui/propertywidget_optmargins.cpp
ui/propertywidget_orphans.cpp
Modified: branches/ScribusOIF/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16957&path=/branches/ScribusOIF/scribus/scribus.cpp
==============================================================================
--- branches/ScribusOIF/scribus/scribus.cpp (original)
+++ branches/ScribusOIF/scribus/scribus.cpp Sat Nov 5 15:06:58 2011
@@ -7438,22 +7438,6 @@
}
}
-void ScribusMainWindow::updtGradMask()
-{
- if (!HaveDoc)
- return;
- VGradient vg(propertiesPalette->getMaskGradient());
- doc->itemSelection_SetMaskGradient(vg);
-}
-
-void ScribusMainWindow::updtGradMaskGroup()
-{
- if (!HaveDoc)
- return;
- VGradient vg(propertiesPalette->getMaskGradientGroup());
- doc->itemSelection_SetMaskGradient(vg);
-}
-
//CB-->??
void ScribusMainWindow::MakeFrame(int f, int c, double *vals)
{
Modified: branches/ScribusOIF/scribus/scribus.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16957&path=/branches/ScribusOIF/scribus/scribus.h
==============================================================================
--- branches/ScribusOIF/scribus/scribus.h (original)
+++ branches/ScribusOIF/scribus/scribus.h Sat Nov 5 15:06:58 2011
@@ -455,21 +455,7 @@
/** Color Replacement */
void slotReplaceColors();
/** Style Manager */
- /*
- // Setzt den Pen-Tonwert
- void setPenShade(int sh);
- // Setzt den Brush-Tonwert
- void setBrushShade(int sh);
- void setGradFill(int typ);
- */
- void updtGradMask();
- void updtGradMaskGroup();
- /*
- // Setzt die Pen-Farbe
- void setPenFarbe(QString farbe);
- // Setzt die Brush-Farbe
- void setBrushFarbe(QString farbe);
- */
+
//CB: void setCSMenu();
/** Erzeugt einen Rahmen */
void MakeFrame(int f, int c, double *vals);
Modified: branches/ScribusOIF/scribus/ui/propertiespalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16957&path=/branches/ScribusOIF/scribus/ui/propertiespalette.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette.cpp Sat Nov 5 15:06:58 2011
@@ -246,7 +246,7 @@
connect(this, SIGNAL(DocChanged()), m_ScMW, SLOT(slotDocCh()));
//connect(this->Cpal, SIGNAL(gradientChanged()), m_ScMW, SLOT(updtGradFill()));
//connect(this->Cpal, SIGNAL(strokeGradientChanged()), m_ScMW, SLOT(updtGradStroke()));
- connect(this->Tpal, SIGNAL(gradientChanged()), m_ScMW, SLOT(updtGradMask()));
+ connect(this->Tpal, SIGNAL(gradientChanged()), this, SLOT(handleGradientChanged()));
}
void PropertiesPalette::SelTab(int t)
@@ -673,13 +673,6 @@
repaint();
}
-void PropertiesPalette::NewAlignement(int a)
-{
- if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
- return;
- m_doc->itemSelection_SetAlignment(a);
-}
-
void PropertiesPalette::handleNewShape(int frameType)
{
if (!m_ScMW || m_ScMW->scriptIsRunning())
@@ -938,16 +931,6 @@
tablePal->languageChange();
}
-const VGradient PropertiesPalette::getMaskGradient()
-{
- return Tpal->gradEdit->gradient();
-}
-
-const VGradient PropertiesPalette::getMaskGradientGroup()
-{
- return groupPal->getMaskGradientGroup();
-}
-
void PropertiesPalette::setGradientEditMode(bool on)
{
Cpal->gradEditButton->setChecked(on);
@@ -1004,3 +987,14 @@
shapePal->setRoundRectEnabled(false);
}
}
+
+void PropertiesPalette::handleGradientChanged()
+{
+ if (!m_ScMW || m_ScMW->scriptIsRunning())
+ return;
+ if ((m_haveDoc) && (m_haveItem))
+ {
+ VGradient vg(Tpal->gradEdit->gradient());
+ m_doc->itemSelection_SetMaskGradient(vg);
+ }
+}
Modified: branches/ScribusOIF/scribus/ui/propertiespalette.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16957&path=/branches/ScribusOIF/scribus/ui/propertiespalette.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette.h (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette.h Sat Nov 5 15:06:58 2011
@@ -59,8 +59,6 @@
void endPatchAdd();
void updateColorSpecialGradient();
- const VGradient getMaskGradient();
- const VGradient getMaskGradientGroup();
void updateColorList();
void setGradientEditMode(bool);
void setTextFlowMode(PageItem::TextFlowMode mode);
@@ -105,7 +103,7 @@
void SelTab(int t);
void NewLineMode(int mode);
- void NewAlignement(int a);
+ void handleGradientChanged();
void handleNewShape(int frameType);
void NewSpGradient(double x1, double y1, double x2, double y2, double fx, double fy, double sg, double sk, double cx, double cy);
void toggleGradientEdit(int);
Modified: branches/ScribusOIF/scribus/ui/propertiespalette_content.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16957&path=/branches/ScribusOIF/scribus/ui/propertiespalette_content.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_content.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_content.cpp Sat Nov 5 15:06:58 2011
@@ -16,6 +16,7 @@
#include "commonstrings.h"
#include "pageitem.h"
#include "propertiespalette_content.h"
+#include "propertywidget_group.h"
#include "propertywidget_image.h"
#include "propertywidget_text.h"
#include "scribus.h"
@@ -71,6 +72,13 @@
textButton->setText("");
hboxLayout->addWidget(textButton);
+ QToolButton* groupButton = new QToolButton(widget);
+ groupButton->setObjectName(QString::fromUtf8("groupButton"));
+ groupButton->setSizePolicy( QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed));
+ //groupButton->setIcon( loadIcon("16/insert-table.png") );
+ groupButton->setText("");
+ hboxLayout->addWidget(groupButton);
+
QToolButton* tableButton = new QToolButton(widget);
tableButton->setObjectName(QString::fromUtf8("tableButton"));
tableButton->setSizePolicy( QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed));
@@ -82,6 +90,7 @@
buttonGroup->addButton(imageButton);
buttonGroup->addButton(textButton);
+ buttonGroup->addButton(groupButton);
buttonGroup->addButton(tableButton);
imageButton->setChecked(true);
@@ -95,6 +104,10 @@
textWidget = new PropertyWidget_Text(widgetStack);
textWidget->setObjectName(QString::fromUtf8("textPropsWidget"));
widgetStack->addWidget(textWidget);
+
+ groupWidget = new PropertyWidget_Group(widgetStack);
+ groupWidget->setObjectName(QString::fromUtf8("groupPropsWidget"));
+ widgetStack->addWidget(groupWidget);
vboxLayout->addWidget(widgetStack);
@@ -114,6 +127,8 @@
widgetStack->setCurrentIndex(0);
if (button->objectName() == "textButton")
widgetStack->setCurrentIndex(1);
+ if (button->objectName() == "groupButton")
+ widgetStack->setCurrentIndex(2);
}
void PropertiesPalette_Content::connectSignals()
@@ -145,6 +160,7 @@
setParent(m_ScMW);
move(p2);
+ groupWidget->setMainWindow(mw);
imageWidget->setMainWindow(mw);
textWidget->setMainWindow(mw);
}
@@ -163,6 +179,7 @@
m_doc = d;
m_item = NULL;
+ groupWidget->setDoc(m_doc);
imageWidget->setDoc(m_doc);
textWidget->setDoc(m_doc);
@@ -230,6 +247,7 @@
{
setWindowTitle( tr("Content Properties"));
+ groupWidget->languageChange();
imageWidget->languageChange();
textWidget->languageChange();
}
@@ -242,6 +260,7 @@
m_unitRatio = m_doc->unitRatio();
m_unitIndex = m_doc->unitIndex();
+ groupWidget->unitChange();
imageWidget->unitChange();
textWidget->unitChange();
}
Modified: branches/ScribusOIF/scribus/ui/propertiespalette_content.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16957&path=/branches/ScribusOIF/scribus/ui/propertiespalette_content.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_content.h (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_content.h Sat Nov 5 15:06:58 2011
@@ -15,6 +15,7 @@
class QAbstractButton;
class PageItem;
+class PropertyWidget_Group;
class PropertyWidget_Image;
class PropertyWidget_Text;
class ScribusDoc;
@@ -45,6 +46,7 @@
void setCurrentItem(PageItem *i);
private:
+ PropertyWidget_Group* groupWidget;
PropertyWidget_Image* imageWidget;
PropertyWidget_Text* textWidget;
Modified: branches/ScribusOIF/scribus/ui/propertiespalette_group.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16957&path=/branches/ScribusOIF/scribus/ui/propertiespalette_group.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_group.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_group.cpp Sat Nov 5 15:06:58 2011
@@ -125,7 +125,7 @@
{
m_ScMW = mw;
- connect(this->transPalWidget, SIGNAL(gradientChanged()), m_ScMW, SLOT(updtGradMaskGroup()));
+ connect(this->transPalWidget, SIGNAL(gradientChanged()), this, SLOT(handleGradientChanged()));
connect(this , SIGNAL(DocChanged()) , m_ScMW, SLOT(slotDocCh()));
connect(m_ScMW, SIGNAL(UpdateRequest(int)), this, SLOT(handleUpdateRequest(int)));
}
@@ -361,11 +361,6 @@
}
}
-const VGradient PropertiesPalette_Group::getMaskGradientGroup()
-{
- return transPalWidget->gradEdit->gradient();
-}
-
void PropertiesPalette_Group::updateColorList()
{
if (!m_haveDoc || !m_ScMW || m_ScMW->scriptIsRunning())
@@ -399,6 +394,15 @@
if (currItem->isGroup())
transPalWidget->setSpecialGradient(currItem->GrMaskStartX * ratio, currItem->GrMaskStartY * ratio, currItem->GrMaskEndX * ratio, currItem->GrMaskEndY * ratio, currItem->GrMaskFocalX * ratio, currItem->GrMaskFocalY * ratio, currItem->GrMaskScale, currItem->GrMaskSkew);
}
+ }
+}
+
+void PropertiesPalette_Group::handleGradientChanged()
+{
+ if (m_haveDoc)
+ {
+ VGradient vg(transPalWidget->gradEdit->gradient());
+ m_doc->itemSelection_SetMaskGradient(vg);
}
}
Modified: branches/ScribusOIF/scribus/ui/propertiespalette_group.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16957&path=/branches/ScribusOIF/scribus/ui/propertiespalette_group.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_group.h (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_group.h Sat Nov 5 15:06:58 2011
@@ -26,8 +26,6 @@
~PropertiesPalette_Group() {};
virtual void changeEvent(QEvent *e);
-
- const VGradient getMaskGradientGroup();
void displayTextFlowMode(PageItem::TextFlowMode mode);
@@ -67,6 +65,7 @@
private slots:
+ void handleGradientChanged();
void handleGroupTransparency(double trans);
void handleGroupBlending(int blend);
void handleGroupGradMask(int typ);
Modified: branches/ScribusOIF/scribus/ui/propertywidget_imagebase.ui
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16957&path=/branches/ScribusOIF/scribus/ui/propertywidget_imagebase.ui
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_imagebase.ui (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_imagebase.ui Sat Nov 5 15:06:58 2011
@@ -100,6 +100,9 @@
<property name="title">
<string>Scaling</string>
</property>
+ <property name="flat">
+ <bool>true</bool>
+ </property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="2" column="0">
<widget class="QLabel" name="xscaleLabel">
@@ -222,6 +225,9 @@
<property name="title">
<string>Color Management</string>
</property>
+ <property name="flat">
+ <bool>true</bool>
+ </property>
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0">
<widget class="QLabel" name="inputProfLabel">
@@ -257,6 +263,9 @@
<widget class="QGroupBox" name="pdfCompressionGroup">
<property name="title">
<string>PDF Compression</string>
+ </property>
+ <property name="flat">
+ <bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
Modified: branches/ScribusOIF/scribus/ui/propertywidget_pos.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16957&path=/branches/ScribusOIF/scribus/ui/propertywidget_pos.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_pos.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_pos.cpp Sat Nov 5 15:06:58 2011
@@ -44,6 +44,7 @@
m_item = 0;
m_lineMode = false;
m_oldRotation = 0;
+ m_unitIndex = 0;
m_unitRatio = 1.0;
setupUi(this);
Modified: branches/ScribusOIF/scribus/ui/propertywidget_shape.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16957&path=/branches/ScribusOIF/scribus/ui/propertywidget_shape.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_shape.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_shape.cpp Sat Nov 5 15:06:58 2011
@@ -56,13 +56,6 @@
textFlowUsesImageClipping->setIcon(QIcon(loadIcon("flow-contour.png")));
languageChange();
-
- 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);
fillRuleLabel->setEnabled(false);
@@ -490,7 +483,7 @@
customShape->setToolTip( tr("Choose the shape of frame..."));
roundRect->setToolTip( tr("Set radius of corner rounding"));
- textFlowLabel->setText( tr("Text &Flow Around Frame"));
+ textFlowLabel->setText( tr("Text Wrap"));
textFlowDisabled->setToolTip( tr("Disabled"));
textFlowUsesFrameShape->setToolTip( tr("Use Frame Shape"));
textFlowUsesBoundingBox->setToolTip( tr("Use Bounding Box"));
Modified: branches/ScribusOIF/scribus/ui/propertywidget_shape.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16957&path=/branches/ScribusOIF/scribus/ui/propertywidget_shape.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_shape.h (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_shape.h Sat Nov 5 15:06:58 2011
@@ -17,7 +17,7 @@
class ScribusMainWindow;
class Selection;
-class SCRIBUS_API PropertyWidget_Shape : public QGroupBox, Ui::PropertyWidget_ShapeBase,
+class SCRIBUS_API PropertyWidget_Shape : public QGroupBox, protected Ui::PropertyWidget_ShapeBase,
public PropertyWidgetBase
{
Q_OBJECT
Modified: branches/ScribusOIF/scribus/ui/transparencypalette.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16957&path=/branches/ScribusOIF/scribus/ui/transparencypalette.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/transparencypalette.h (original)
+++ branches/ScribusOIF/scribus/ui/transparencypalette.h Sat Nov 5 15:06:58 2011
@@ -54,6 +54,7 @@
friend class PropertiesPalette;
friend class PropertiesPalette_Group;
+ friend class PropertyWidget_Group;
public:
Tpalette(QWidget* parent);
Modified: branches/ScribusOIF/win32/vc9/scribus-main/Scribus.vcproj
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16957&path=/branches/ScribusOIF/win32/vc9/scribus-main/Scribus.vcproj
==============================================================================
--- branches/ScribusOIF/win32/vc9/scribus-main/Scribus.vcproj (original)
+++ branches/ScribusOIF/win32/vc9/scribus-main/Scribus.vcproj Sat Nov 5 15:06:58 2011
@@ -1483,6 +1483,14 @@
>
</File>
<File
+ RelativePath="..\..\..\scribus\ui\propertywidget_group.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\scribus\ui\propertywidget_groupshape.cpp"
+ >
+ </File>
+ <File
RelativePath="..\..\..\scribus\ui\propertywidget_image.cpp"
>
</File>
@@ -6362,6 +6370,42 @@
</FileConfiguration>
</File>
<File
+ RelativePath="..\..\..\scribus\ui\propertywidget_group.h"
+ >
+ <FileConfiguration
+ Name="Debug-cairo|Win32"
+ >
+ <Tool
+ Name="moc.exe"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release-cairo|Win32"
+ >
+ <Tool
+ Name="moc.exe"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\scribus\ui\propertywidget_groupshape.h"
+ >
+ <FileConfiguration
+ Name="Debug-cairo|Win32"
+ >
+ <Tool
+ Name="moc.exe"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release-cairo|Win32"
+ >
+ <Tool
+ Name="moc.exe"
+ />
+ </FileConfiguration>
+ </File>
+ <File
RelativePath="..\..\..\scribus\ui\propertywidget_image.h"
>
<FileConfiguration
@@ -9029,11 +9073,11 @@
>
</File>
<File
+ RelativePath="..\..\..\..\scribus-1.5.x-svn\Scribus\scribus\ui\ui_propertywidget_imagebase.h"
+ >
+ </File>
+ <File
RelativePath="..\..\..\scribus\ui\ui_propertywidget_imagebase.h"
- >
- </File>
- <File
- RelativePath="..\..\..\..\scribus-1.5.x-svn\Scribus\scribus\ui\ui_propertywidget_imagebase.h"
>
</File>
<File
@@ -9958,6 +10002,14 @@
>
</File>
<File
+ RelativePath="..\..\..\scribus\ui\moc_propertywidget_group.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\scribus\ui\moc_propertywidget_groupshape.cpp"
+ >
+ </File>
+ <File
RelativePath="..\..\..\scribus\ui\moc_propertywidget_image.cpp"
>
</File>
More information about the scribus-commit
mailing list