r18775 by fschmid - Added the ability to switch off the clipping of groups

scribus-commit scribus-commit at lists.scribus.net
Mon Jan 27 19:44:13 UTC 2014


Author: fschmid
Date: Mon Jan 27 19:44:13 2014
New Revision: 18775

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18775
Log:
Added the ability to switch off the clipping of groups

Modified:
    trunk/Scribus/scribus/pageitem.h
    trunk/Scribus/scribus/pageitem_group.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
    trunk/Scribus/scribus/ui/propertiespalette_group.cpp
    trunk/Scribus/scribus/ui/propertiespalette_group.h
    trunk/Scribus/scribus/ui/propertiespalette_groupbase.ui

Modified: trunk/Scribus/scribus/pageitem.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18775&path=/trunk/Scribus/scribus/pageitem.h
==============================================================================
--- trunk/Scribus/scribus/pageitem.h (original)
+++ trunk/Scribus/scribus/pageitem.h Mon Jan 27 19:44:13 2014
@@ -1168,6 +1168,8 @@
 	void rotateWelded(double dR, double oldRot);
 	void setWeldPoint(double DX, double DY, PageItem *pItem); 	///< added for autowelding feature of notes frames, setting welding point with given pItem to given coords
 	QString getItemTextSaxed(int selStart, int selLength); ///< used by notes frames to get content of notes from itemText
+	bool groupClipping() { return m_groupClips; }
+	void setGroupClipping(bool val) { m_groupClips = val; }
 
 		// End public functions
 
@@ -1762,6 +1764,7 @@
 	double m_imageRotation; ///< Image rotation in frame
 	bool m_isReversed; ///< Is the frame is reversed?
 	FirstLineOffsetPolicy firstLineOffsetP;
+	bool m_groupClips;
 
 			// End protected variables
 

Modified: trunk/Scribus/scribus/pageitem_group.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18775&path=/trunk/Scribus/scribus/pageitem_group.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_group.cpp (original)
+++ trunk/Scribus/scribus/pageitem_group.cpp Mon Jan 27 19:44:13 2014
@@ -185,7 +185,10 @@
 	else
 		p->setMaskMode(0);
 	p->setFillRule(fillRule);
-	p->beginLayer(1.0 - fillTransparency(), fillBlendmode(), &PoLine);
+	if (m_groupClips)
+		p->beginLayer(1.0 - fillTransparency(), fillBlendmode(), &PoLine);
+	else
+		p->beginLayer(1.0 - fillTransparency(), fillBlendmode());
 	p->setMaskMode(0);
 	p->scale(m_width / groupWidth, m_height / groupHeight);
 	for (int em = 0; em < groupItemList.count(); ++em)

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18775&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp Mon Jan 27 19:44:13 2014
@@ -4609,6 +4609,7 @@
 		break;
 	}
 
+	currItem->setGroupClipping(attrs.valueAsBool("groupClips", true));
 	currItem->FrameType = attrs.valueAsInt("FRTYPE", 0);
 	int startArrowIndex = attrs.valueAsInt("startArrowIndex", 0);
 	if ((startArrowIndex < 0) || (startArrowIndex > static_cast<int>(doc->arrowStyles().size())))

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18775&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp Mon Jan 27 19:44:13 2014
@@ -2776,6 +2776,7 @@
 	{
 		docu.writeAttribute("groupWidth", item->groupWidth);
 		docu.writeAttribute("groupHeight", item->groupHeight);
+		docu.writeAttribute("groupClips", item->groupClipping());
 	}
 	if (item->DashValues.count() != 0)
 	{

Modified: trunk/Scribus/scribus/ui/propertiespalette_group.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18775&path=/trunk/Scribus/scribus/ui/propertiespalette_group.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_group.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette_group.cpp Mon Jan 27 19:44:13 2014
@@ -100,6 +100,7 @@
 	connect(editShape    , SIGNAL(clicked())                 , this, SLOT(handleShapeEdit()));
 	connect(evenOdd      , SIGNAL(clicked())                 , this, SLOT(handleFillRule()) );
 	connect(nonZero      , SIGNAL(clicked())                 , this, SLOT(handleFillRule()) );
+	connect(clipGroups   , SIGNAL(clicked())                 , this, SLOT(handleClipping()) );
 	connect(transPalWidget , SIGNAL(editGradient())          , this, SLOT(handleGradientEdit()));
 	connect(transPalWidget , SIGNAL(NewSpecial(double, double, double, double, double, double, double, double, double, double)), this, SLOT(handleSpecialGradient(double, double, double, double, double, double, double, double )));
 }
@@ -285,6 +286,7 @@
 	transPalWidget->setCurrentItem(m_item);
 	nonZero->setChecked(!m_item->fillRule);
 	evenOdd->setChecked(m_item->fillRule);
+	clipGroups->setChecked(m_item->groupClipping());
 
 	if ((m_item->isGroup()) && (!m_item->isSingleSel))
 	{
@@ -565,6 +567,14 @@
 	m_item->update();
 }
 
+void PropertiesPalette_Group::handleClipping()
+{
+	if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
+		return;
+	m_item->setGroupClipping(clipGroups->isChecked());
+	m_item->update();
+}
+
 void PropertiesPalette_Group::handleShapeEdit()
 {
 	if (!m_ScMW || m_ScMW->scriptIsRunning())

Modified: trunk/Scribus/scribus/ui/propertiespalette_group.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18775&path=/trunk/Scribus/scribus/ui/propertiespalette_group.h
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_group.h (original)
+++ trunk/Scribus/scribus/ui/propertiespalette_group.h Mon Jan 27 19:44:13 2014
@@ -76,6 +76,7 @@
 	void handleNewShape(int f, int c, qreal *vals);
 
 	void handleFillRule();
+	void handleClipping();
 	void handleShapeEdit();
 	void handleShapeEditEnded();
 

Modified: trunk/Scribus/scribus/ui/propertiespalette_groupbase.ui
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18775&path=/trunk/Scribus/scribus/ui/propertiespalette_groupbase.ui
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_groupbase.ui (original)
+++ trunk/Scribus/scribus/ui/propertiespalette_groupbase.ui Mon Jan 27 19:44:13 2014
@@ -15,10 +15,19 @@
   </property>
   <layout class="QVBoxLayout" name="verticalLayout_3">
    <property name="spacing">
-    <number>2</number>
-   </property>
-   <property name="margin">
-    <number>2</number>
+    <number>3</number>
+   </property>
+   <property name="leftMargin">
+    <number>3</number>
+   </property>
+   <property name="topMargin">
+    <number>3</number>
+   </property>
+   <property name="rightMargin">
+    <number>3</number>
+   </property>
+   <property name="bottomMargin">
+    <number>3</number>
    </property>
    <item>
     <widget class="QGroupBox" name="shapeGroup">
@@ -32,7 +41,16 @@
       <property name="spacing">
        <number>5</number>
       </property>
-      <property name="margin">
+      <property name="leftMargin">
+       <number>2</number>
+      </property>
+      <property name="topMargin">
+       <number>2</number>
+      </property>
+      <property name="rightMargin">
+       <number>2</number>
+      </property>
+      <property name="bottomMargin">
        <number>2</number>
       </property>
       <item>
@@ -81,7 +99,16 @@
       <property name="spacing">
        <number>2</number>
       </property>
-      <property name="margin">
+      <property name="leftMargin">
+       <number>2</number>
+      </property>
+      <property name="topMargin">
+       <number>2</number>
+      </property>
+      <property name="rightMargin">
+       <number>2</number>
+      </property>
+      <property name="bottomMargin">
        <number>2</number>
       </property>
       <item>
@@ -105,7 +132,7 @@
          <enum>Qt::ToolButtonTextBesideIcon</enum>
         </property>
         <attribute name="buttonGroup">
-         <string>textFlowBtnGroup</string>
+         <string notr="true">textFlowBtnGroup</string>
         </attribute>
        </widget>
       </item>
@@ -130,7 +157,7 @@
          <enum>Qt::ToolButtonTextBesideIcon</enum>
         </property>
         <attribute name="buttonGroup">
-         <string>textFlowBtnGroup</string>
+         <string notr="true">textFlowBtnGroup</string>
         </attribute>
        </widget>
       </item>
@@ -155,7 +182,7 @@
          <enum>Qt::ToolButtonTextBesideIcon</enum>
         </property>
         <attribute name="buttonGroup">
-         <string>textFlowBtnGroup</string>
+         <string notr="true">textFlowBtnGroup</string>
         </attribute>
        </widget>
       </item>
@@ -180,7 +207,7 @@
          <enum>Qt::ToolButtonTextBesideIcon</enum>
         </property>
         <attribute name="buttonGroup">
-         <string>textFlowBtnGroup</string>
+         <string notr="true">textFlowBtnGroup</string>
         </attribute>
        </widget>
       </item>
@@ -205,7 +232,7 @@
          <enum>Qt::ToolButtonTextBesideIcon</enum>
         </property>
         <attribute name="buttonGroup">
-         <string>textFlowBtnGroup</string>
+         <string notr="true">textFlowBtnGroup</string>
         </attribute>
        </widget>
       </item>
@@ -224,7 +251,16 @@
       <property name="spacing">
        <number>5</number>
       </property>
-      <property name="margin">
+      <property name="leftMargin">
+       <number>2</number>
+      </property>
+      <property name="topMargin">
+       <number>2</number>
+      </property>
+      <property name="rightMargin">
+       <number>2</number>
+      </property>
+      <property name="bottomMargin">
        <number>2</number>
       </property>
       <item>
@@ -283,6 +319,13 @@
     </widget>
    </item>
    <item>
+    <widget class="QCheckBox" name="clipGroups">
+     <property name="text">
+      <string>Group clips Contents</string>
+     </property>
+    </widget>
+   </item>
+   <item>
     <widget class="QGroupBox" name="transparencyGroup">
      <property name="title">
       <string>Transparency</string>
@@ -294,7 +337,16 @@
       <property name="spacing">
        <number>2</number>
       </property>
-      <property name="margin">
+      <property name="leftMargin">
+       <number>2</number>
+      </property>
+      <property name="topMargin">
+       <number>2</number>
+      </property>
+      <property name="rightMargin">
+       <number>2</number>
+      </property>
+      <property name="bottomMargin">
        <number>2</number>
       </property>
       <item>




More information about the scribus-commit mailing list