r21633 by craig - Clean up some palette code

scribus-commit scribus-commit at lists.scribus.net
Sat Dec 10 20:11:21 UTC 2016


Author: craig
Date: Sat Dec 10 20:11:21 2016
New Revision: 21633

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21633
Log:
Clean up some palette code

Modified:
    trunk/Scribus/scribus/ui/propertiespalette.cpp
    trunk/Scribus/scribus/ui/propertiespalette.h
    trunk/Scribus/scribus/ui/propertiespalette_text.cpp
    trunk/Scribus/scribus/ui/propertiespalette_text.h
    trunk/Scribus/scribus/ui/smtextstyles.cpp

Modified: trunk/Scribus/scribus/ui/propertiespalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21633&path=/trunk/Scribus/scribus/ui/propertiespalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette.cpp	Sat Dec 10 20:11:21 2016
@@ -40,9 +40,7 @@
 #include "commonstrings.h"
 #include "cpalette.h"
 #include "dasheditor.h"
-//#include "fontcombo.h"
 #include "pageitem_table.h"
-//#include "pageitem_textframe.h"
 #include "propertiespalette_group.h"
 #include "propertiespalette_image.h"
 #include "propertiespalette_line.h"
@@ -51,24 +49,13 @@
 #include "propertiespalette_table.h"
 #include "propertiespalette_utils.h"
 #include "propertiespalette_xyz.h"
-//#include "sccolorengine.h"
-//#include "sccombobox.h"
-//#include "scfonts.h"
-//#include "scraction.h"
 #include "scribus.h"
-//#include "scribuscore.h"
 #include "scribusview.h"
 #include "selection.h"
-//#include "spalette.h"
-//#include "styleselect.h"
-//#include "tabmanager.h"
-//#include "transparencypalette.h"
 #include "undomanager.h"
 #include "units.h"
-//#include "util.h"
 #include "util_math.h"
 
-//using namespace std;
 
 PropertiesPalette::PropertiesPalette( QWidget* parent) : ScDockPalette( parent, "PropertiesPalette", 0)
 {
@@ -162,7 +149,6 @@
 	m_ScMW=mw;
 	QPoint p1 = mapToGlobal(pos());
 	QPoint p2 = m_ScMW->mapFromGlobal(p1);
-	//Qt4 reparent(m_ScMW, this->getWFlags(), p2);
 	setParent(m_ScMW);
 	move(p2);
 
@@ -234,7 +220,6 @@
 
 	m_unitRatio = m_doc->unitRatio();
 	m_unitIndex = m_doc->unitIndex();
-//qt4 FIXME here
 	m_haveDoc = true;
 	m_haveItem = false;
 

Modified: trunk/Scribus/scribus/ui/propertiespalette.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21633&path=/trunk/Scribus/scribus/ui/propertiespalette.h
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette.h	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette.h	Sat Dec 10 20:11:21 2016
@@ -53,7 +53,7 @@
 
 public:
 	PropertiesPalette(QWidget* parent);
-	~PropertiesPalette() {};
+	~PropertiesPalette() {}
 
 	virtual void changeEvent(QEvent *e);
 	virtual void closeEvent(QCloseEvent *closeEvent);
@@ -69,7 +69,6 @@
                          // 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
-
 
 	PropertiesPalette_Group* groupPal;
 	PropertiesPalette_Image* imagePal;

Modified: trunk/Scribus/scribus/ui/propertiespalette_text.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21633&path=/trunk/Scribus/scribus/ui/propertiespalette_text.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_text.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_text.cpp	Sat Dec 10 20:11:21 2016
@@ -61,7 +61,6 @@
 	m_unitRatio = 1.0;
 
 	setupUi(this);
-//	setSizePolicy( QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum));
 
 	fontSize->setPrefix( "" );
 	fontSizeLabel->setPixmap(IconManager::instance()->loadPixmap("Zeichen.xpm"));
@@ -74,48 +73,38 @@
 
 	colorWidgets = new PropertyWidget_TextColor(textTree);
 	colorWidgetsItem = textTree->addItem( colorWidgets, tr("Color && Effects") );
-	//colorWidgetsItem = textTree->addWidget( tr("Color && Effects"), colorWidgets);
 
 	flopBox = new PropertyWidget_Flop(textTree);
 	flopItem = textTree->addItem( flopBox, tr("First Line Offset"));
-	//flopItem = textTree->addWidget( tr("First Line Offset"), flopBox);
 
 	orphanBox = new PropertyWidget_Orphans(textTree);
 	orphanItem = textTree->addItem(orphanBox, tr("Orphans and Widows"));
-//	orphanItem = textTree->addWidget( tr("Orphans and Widows"), orphanBox);
 
 	parEffectWidgets = new PropertyWidget_ParEffect(textTree);
 	parEffectItem = textTree->addItem(parEffectWidgets, tr("Paragraph Effects"));
-//	parEffectItem = textTree->addWidget( tr("Paragraph Effects"), parEffectWidgets);
 
 	distanceWidgets = new PropertyWidget_Distance(textTree);
 	distanceItem = textTree->addItem(distanceWidgets, tr("Columns && Text Distances"));
-//	distanceItem = textTree->addWidget( tr("Columns && Text Distances"), distanceWidgets);
 
 	//<< Optical Margins
 	optMargins = new PropertyWidget_OptMargins(textTree);
 	optMarginsItem = textTree->addItem(optMargins, tr("Optical Margins"));
-//	optMarginsItem = textTree->addWidget( tr("Optical Margins"), optMargins);
 	//>> Optical Margins
-	
+
 	hyphenationWidget = new PropertyWidget_Hyphenation(textTree);
 	hyphenationWidgetItem = textTree->addItem(hyphenationWidget, tr("Hyphenation"));
-//	hyphenationWidgetItem = textTree->addWidget(tr("Hyphenation"), hyphenationWidget);
 
 	//<<Advanced Settings
 	advancedWidgets = new PropertyWidget_Advanced(textTree);
 	advancedWidgetsItem = textTree->addItem(advancedWidgets, tr("Advanced Settings"));
-//	advancedWidgetsItem = textTree->addWidget( tr("Advanced Settings"), advancedWidgets);
 
 	//>>Advanced Settings
 	fontfeaturesWidget = new PropertyWidget_FontFeatures(textTree);
 	fontfeaturesWidgetItem = textTree->addItem(fontfeaturesWidget, tr("Open Type Font Features"));
-//	fontfeaturesWidgetItem = textTree->addWidget( tr("Open Type Font Features"), fontfeaturesWidget);
 
 
 	pathTextWidgets = new PropertyWidget_PathText(textTree);
 	pathTextItem = textTree->addItem(pathTextWidgets, tr("Path Text Properties"));
-//	pathTextItem = textTree->addWidget( tr("Path Text Properties"), pathTextWidgets);
 
 	languageChange();
 
@@ -343,30 +332,6 @@
 	{
 		setEnabled(false);
 	}
-//	if (m_item->asPathText())
-//	{
-//		flopItem->setHidden(true);
-//		distanceItem->setHidden(true);
-//		orphanItem->setHidden(true);
-//		parEffectItem->setHidden(true);
-//		pathTextItem->setHidden(false);
-//	}
-//	else if (m_item->asTextFrame() || m_item->asTable())
-//	{
-//		flopItem->setHidden(false);
-//		distanceItem->setHidden(false);
-//		orphanItem->setHidden(false);
-//		parEffectItem->setHidden(false);
-//		pathTextItem->setHidden(true);
-//	}
-//	else
-//	{
-//		flopItem->setHidden(false);
-//		distanceItem->setHidden(false);
-//		orphanItem->setHidden(false);
-//		parEffectItem->setHidden(false);
-//		pathTextItem->setHidden(true);
-//	}
 
 	m_haveItem = true;
 

Modified: trunk/Scribus/scribus/ui/propertiespalette_text.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21633&path=/trunk/Scribus/scribus/ui/propertiespalette_text.h
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_text.h	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_text.h	Sat Dec 10 20:11:21 2016
@@ -13,15 +13,8 @@
 #include "scrpalettebase.h"
 #include "scrspinbox.h"
 
-#include "linecombo.h"
-#include "spalette.h"
-#include "alignselect.h"
-#include "directionselect.h"
-#include "shadebutton.h"
-#include "sclistboxpixmap.h"
 #include "scguardedptr.h"
 #include "sctextstruct.h"
-#include "sctreewidget.h"
 
 class PageItem;
 class PropertyWidget_Advanced;
@@ -45,7 +38,7 @@
 
 public:
 	PropertiesPalette_Text(QWidget* parent);
-	~PropertiesPalette_Text() {};
+	~PropertiesPalette_Text() {}
 
 	virtual void changeEvent(QEvent *e);
 	
@@ -129,16 +122,7 @@
 	PropertyWidget_ParEffect* parEffectWidgets;
 	PropertyWidget_PathText* pathTextWidgets;
 	PropertyWidget_TextColor* colorWidgets;
-//	QTreeWidgetItem* advancedWidgetsItem;
-//	QTreeWidgetItem* colorWidgetsItem;
-//	QTreeWidgetItem* distanceItem;
-//	QTreeWidgetItem* flopItem;
-//	QTreeWidgetItem* fontfeaturesWidgetItem;
-//	QTreeWidgetItem* hyphenationWidgetItem;
-//	QTreeWidgetItem* optMarginsItem;
-//	QTreeWidgetItem* orphanItem;
-//	QTreeWidgetItem* parEffectItem;
-//	QTreeWidgetItem* pathTextItem;
+
 	int advancedWidgetsItem;
 	int colorWidgetsItem;
 	int distanceItem;

Modified: trunk/Scribus/scribus/ui/smtextstyles.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21633&path=/trunk/Scribus/scribus/ui/smtextstyles.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smtextstyles.cpp	(original)
+++ trunk/Scribus/scribus/ui/smtextstyles.cpp	Sat Dec 10 20:11:21 2016
@@ -16,8 +16,6 @@
 #include "langmgr.h"
 #include "ui/scmwmenumanager.h"
 #include "prefsmanager.h"
-#include "propertiespalette.h"
-#include "propertiespalette_text.h"
 #include "sccombobox.h"
 #include "scribus.h"
 #include "scribusdoc.h"




More information about the scribus-commit mailing list