r19143 by craig - BUmp COPYING to include 2014

scribus-commit scribus-commit at lists.scribus.net
Sun May 25 20:26:57 UTC 2014


Author: craig
Date: Sun May 25 20:26:57 2014
New Revision: 19143

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19143
Log:
BUmp COPYING to include 2014

Modified:
    trunk/Scribus/COPYING
    trunk/Scribus/scribus/ui/propertiespalette_shadow.cpp
    trunk/Scribus/scribus/ui/propertiespalette_shadow.h
    trunk/Scribus/scribus/ui/proptree.cpp
    trunk/Scribus/scribus/ui/proptree.h

Modified: trunk/Scribus/COPYING
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19143&path=/trunk/Scribus/COPYING
==============================================================================
--- trunk/Scribus/COPYING (original)
+++ trunk/Scribus/COPYING Sun May 25 20:26:57 2014
@@ -1,5 +1,5 @@
 Scribus Copyright
-Copyright 2001–2013 Franz Schmid and rest of the members of the Scribus Team.
+Copyright 2001–2014 Franz Schmid and rest of the members of the Scribus Team.
 
 The "Scribus Team" is informally defined as the following people: Franz Schmid, Peter Linnell, Craig Bradney, Jean Ghali, Hermann Kraus, Riku Leino, Oleksandr Moskalenko, Christoph Schäfer, Petr Vaněk, Andreas Vox, and Jain Basil.
 

Modified: trunk/Scribus/scribus/ui/propertiespalette_shadow.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19143&path=/trunk/Scribus/scribus/ui/propertiespalette_shadow.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_shadow.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette_shadow.cpp Sun May 25 20:26:57 2014
@@ -18,7 +18,7 @@
 
 #include "scribuscore.h"
 #include "scraction.h"
-
+#include "scribusview.h"
 #include "selection.h"
 #include "units.h"
 #include "undomanager.h"
@@ -33,6 +33,12 @@
 	m_haveDoc  = false;
 	m_haveItem = false;
 	m_unitRatio = 1.0;
+
+	_userActionOn = false;
+	userActionSniffer = new UserActionSniffer(this);
+	connect(userActionSniffer, SIGNAL(actionStart()), this, SLOT(spinboxStartUserAction()));
+	connect(userActionSniffer, SIGNAL(actionEnd()), this, SLOT(spinboxFinishUserAction()));
+
 	hasSoftShadow = new PropTreeItem(this, PropTreeItem::CheckBox, tr( "Has Drop Shadow"));
 	hasSoftShadow->setBoolValue(false);
 
@@ -42,6 +48,7 @@
 	softShadowXOffset->setMinMaxValues(-200.0, 200.0);
 	softShadowXOffset->setDoubleValue(5.0);
 
+
 	softShadowYOffset = new PropTreeItem(this, PropTreeItem::DoubleSpinBox, tr( "Y-Offset:"));
 	softShadowYOffset->setUnitValue(0);
 	softShadowYOffset->setDecimalsValue(2);
@@ -73,6 +80,12 @@
 	QStringList modes;
 	softShadowBlendMode->setComboStrings(modes);
 	softShadowBlendMode->setStringValue( tr( "Normal"));
+
+	installSniffer(softShadowXOffset);
+	installSniffer(softShadowYOffset);
+	installSniffer(softShadowShade);
+	installSniffer(softShadowOpacity);
+	installSniffer(softShadowBlurRadius);
 
 	languageChange();
 	m_haveItem = false;
@@ -465,6 +478,62 @@
 
 }
 
+void PropertiesPalette_Shadow::installSniffer(ScrSpinBox *spinBox)
+{
+	const QList<QObject*> list = spinBox->children();
+	if (!list.isEmpty())
+	{
+		QListIterator<QObject*> it(list);
+		QObject *obj;
+		while (it.hasNext())
+		{
+			obj = it.next();
+			obj->installEventFilter(userActionSniffer);
+		}
+	}
+}
+
+void PropertiesPalette_Shadow::installSniffer(PropTreeItem *ptitem)
+{
+	if (ptitem->type()==PropTreeItem::DoubleSpinBox)
+	{
+/*		ScrSpinBox *spinBox = static_cast<ScrSpinBox*>(ptitem->ed);
+	const QList<QObject*> list = ptitem->children();
+	if (!list.isEmpty())
+	{
+		QListIterator<QObject*> it(list);
+		QObject *obj;
+		while (it.hasNext())
+		{
+			obj = it.next();
+			obj->installEventFilter(userActionSniffer);
+		}
+	}*/
+	}
+}
+
+bool PropertiesPalette_Shadow::userActionOn()
+{
+	return _userActionOn;
+}
+
+void PropertiesPalette_Shadow::spinboxStartUserAction()
+{
+	_userActionOn = true;
+}
+
+void PropertiesPalette_Shadow::spinboxFinishUserAction()
+{
+	_userActionOn = false;
+
+	for (int i = 0; i < m_doc->m_Selection->count(); ++i)
+		m_doc->m_Selection->itemAt(i)->checkChanges(true);
+	if (m_ScMW->view->groupTransactionStarted())
+	{
+		m_ScMW->view->endGroupTransaction();
+	}
+}
+
 /*
 PropertiesPalette_Shadow::PropertiesPalette_Shadow( QWidget* parent) : QWidget(parent)
 {

Modified: trunk/Scribus/scribus/ui/propertiespalette_shadow.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19143&path=/trunk/Scribus/scribus/ui/propertiespalette_shadow.h
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_shadow.h (original)
+++ trunk/Scribus/scribus/ui/propertiespalette_shadow.h Sun May 25 20:26:57 2014
@@ -8,6 +8,7 @@
 #define PROPERTIESPALETTE_SHADOW_H
 
 #include "scribusapi.h"
+#include "scrspinbox.h"
 #include "scguardedptr.h"
 
 #include "proptree.h"
@@ -17,6 +18,7 @@
 class ScribusDoc;
 class Selection;
 class ScribusMainWindow;
+class UserActionSniffer;
 
 class SCRIBUS_API PropertiesPalette_Shadow : public PropTreeWidget
 {
@@ -27,6 +29,11 @@
 	~PropertiesPalette_Shadow() {};
 
 	virtual void changeEvent(QEvent *e);
+	//	 @brief Returns true if there is a user action going on at the moment of call.
+	bool userActionOn(); // not yet implemented!!! This is needed badly.
+							 // When user releases the mouse button or arrow key, changes must be checked
+							 // and if in ScribusView a groupTransaction has been started it must be also
+							 // commmited
 	void updateColorList();
 
 private:
@@ -58,6 +65,8 @@
 	void handleNewBlendmode(int value);
 
 protected slots:
+	void spinboxStartUserAction();
+	void spinboxFinishUserAction();
 	void updateSpinBoxConstants();
 
 protected:
@@ -78,6 +87,11 @@
 	int       m_unitIndex;
 	PageItem *m_item;
 	ScGuardedPtr<ScribusDoc> m_doc;
+
+	bool _userActionOn;
+	UserActionSniffer *userActionSniffer;
+	void installSniffer(ScrSpinBox *spinBox);
+	void installSniffer(PropTreeItem *ptitem);
 };
 
 /*

Modified: trunk/Scribus/scribus/ui/proptree.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19143&path=/trunk/Scribus/scribus/ui/proptree.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/proptree.cpp (original)
+++ trunk/Scribus/scribus/ui/proptree.cpp Sun May 25 20:26:57 2014
@@ -248,6 +248,7 @@
 
 void PropTreeItemDelegate::destroyEditor(QWidget * editor, const QModelIndex & index) const
 {
+	qDebug()<<"pid:de";
 	m_edit = NULL;
 	PropTreeItem* item = (PropTreeItem*)m_parent->indexToItem(index);
 	if (item)

Modified: trunk/Scribus/scribus/ui/proptree.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19143&path=/trunk/Scribus/scribus/ui/proptree.h
==============================================================================
--- trunk/Scribus/scribus/ui/proptree.h (original)
+++ trunk/Scribus/scribus/ui/proptree.h Sun May 25 20:26:57 2014
@@ -91,6 +91,7 @@
 	void setMinMaxValues(int min, int max);
 	void setMinMaxValues(double min, double max);
 	void setColorList(ColorList colors);
+	int type() { return m_type; };
 	int m_type;
 	int m_unit;
 	int m_decimals;




More information about the scribus-commit mailing list