r15017 by cbradney - Minor updates to the doc sections and information tabs

scribus-commit scribus-commit at lists.scribus.net
Tue Apr 27 00:10:27 CEST 2010


Revision: 15017
Author: cbradney
Date: 2010-04-26T22:08:42.881753Z
Commit message: Minor updates to the doc sections and information tabs

Changeset: 
M  /trunk/Scribus/scribus/scribus.cpp
M  /trunk/Scribus/scribus/ui/preferencesdialog.cpp
M  /trunk/Scribus/scribus/ui/preferencesdialog.h
M  /trunk/Scribus/scribus/ui/prefs_documentinformationbase.ui

Diffs:
Index: scribus/ui/prefs_documentinformationbase.ui
===================================================================
--- scribus/ui/prefs_documentinformationbase.ui	(revision 15016)
+++ scribus/ui/prefs_documentinformationbase.ui	(revision 15017)
@@ -15,6 +15,27 @@
   </property>
   <layout class="QVBoxLayout" name="verticalLayout">
    <item>
+    <widget class="QLabel" name="label">
+     <property name="font">
+      <font>
+       <pointsize>14</pointsize>
+       <weight>75</weight>
+       <bold>true</bold>
+      </font>
+     </property>
+     <property name="text">
+      <string>Document Information</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="Line" name="line">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+    </widget>
+   </item>
+   <item>
     <widget class="QTabWidget" name="tabWidget">
      <property name="currentIndex">
       <number>0</number>
Index: scribus/ui/preferencesdialog.h
===================================================================
--- scribus/ui/preferencesdialog.h	(revision 15016)
+++ scribus/ui/preferencesdialog.h	(revision 15017)
@@ -18,6 +18,8 @@
 
 #include "ui/prefs_colormanagement.h"
 #include "ui/prefs_userinterface.h"
+#include "ui/prefs_documentinformation.h"
+#include "ui/prefs_documentsections.h"
 #include "ui/prefs_documentsetup.h"
 #include "ui/prefs_display.h"
 #include "ui/prefs_guides.h"
@@ -41,6 +43,7 @@
 
 class PrefsManager;
 class ScribusMainWindow;
+class ScribusDoc;
 
 
 /*! \brief The Scribus Preferences Dialog
@@ -50,7 +53,7 @@
 	Q_OBJECT
 
 	public:
-		PreferencesDialog(QWidget* parent, ApplicationPrefs& prefsData);
+		PreferencesDialog(QWidget* parent, ApplicationPrefs& prefsData, ScribusDoc *doc=NULL);
 		~PreferencesDialog();
 
 		virtual void changeEvent(QEvent *e);
@@ -81,6 +84,8 @@
 
 		Prefs_ColorManagement *prefs_ColorManagement;
 		Prefs_UserInterface *prefs_UserInterface;
+		Prefs_DocumentInformation *prefs_DocumentInformation;
+		Prefs_DocumentSections *prefs_DocumentSections;
 		Prefs_DocumentSetup *prefs_DocumentSetup;
 		Prefs_Display *prefs_Display;
 		Prefs_ExternalTools *prefs_ExternalTools;
@@ -108,7 +113,7 @@
 		int docUnitIndex;
 		ScribusMainWindow* mainWin;
 		PrefsManager* prefsManager;
-
+		ScribusDoc* m_Doc;
 		ApplicationPrefs localPrefs;
 };
 
Index: scribus/ui/preferencesdialog.cpp
===================================================================
--- scribus/ui/preferencesdialog.cpp	(revision 15016)
+++ scribus/ui/preferencesdialog.cpp	(revision 15017)
@@ -19,12 +19,14 @@
 #include "scplugin.h"
 #include "scribus.h"
 #include "scribuscore.h"
+#include "scribusdoc.h"
 #include "units.h"
 #include "util_icon.h"
 
-PreferencesDialog::PreferencesDialog(QWidget* parent, ApplicationPrefs& prefsData)
+PreferencesDialog::PreferencesDialog(QWidget* parent, ApplicationPrefs& prefsData, ScribusDoc* doc)
 	: QDialog(parent),
-	counter(0)
+	counter(0),
+	m_Doc(doc)
 {
 	setupUi(this);
 	setObjectName(QString::fromLocal8Bit("PreferencesDialog"));
@@ -37,6 +39,12 @@
 	addItem( tr("Paths"), loadIcon("22/system-file-manager.png"), prefs_Paths);
 	prefs_DocumentSetup = new Prefs_DocumentSetup(prefsStackWidget);
 	addItem( tr("Document Setup"), loadIcon("scribusdoc.png"), prefs_DocumentSetup);
+	if (doc)
+	{
+		prefs_DocumentInformation = new Prefs_DocumentInformation(prefsStackWidget);
+		addItem( tr("Document Information"), loadIcon("documentinfo32.png"), prefs_DocumentInformation);
+	}
+	else prefs_DocumentInformation=0;
 	prefs_Guides = new Prefs_Guides(prefsStackWidget);
 	addItem( tr("Guides"), loadIcon("guides.png"), prefs_Guides);
 	prefs_Typography = new Prefs_Typography(prefsStackWidget);
@@ -61,6 +69,12 @@
 	addItem( tr("Document Item Attributes"), loadIcon("docattributes.png"), prefs_DocumentItemAttributes);
 	prefs_TableOfContents = new Prefs_TableOfContents(prefsStackWidget);
 	addItem( tr("Tables of Contents"), loadIcon("tabtocindex.png"), prefs_TableOfContents);
+	if (doc)
+	{
+		prefs_DocumentSections  = new Prefs_DocumentSections(prefsStackWidget);
+		addItem( tr("Sections"), loadIcon("tabtocindex.png"), prefs_DocumentSections);
+	}
+	else prefs_DocumentSections=0;
 	prefs_KeyboardShortcuts = new Prefs_KeyboardShortcuts(prefsStackWidget);
 	addItem( tr("Keyboard Shortcuts"), loadIcon("22/preferences-desktop-keyboard-shortcuts.png"), prefs_KeyboardShortcuts);
 	prefs_Scrapbook = new Prefs_Scrapbook(prefsStackWidget);
Index: scribus/scribus.cpp
===================================================================
--- scribus/scribus.cpp	(revision 15016)
+++ scribus/scribus.cpp	(revision 15017)
@@ -7668,7 +7668,7 @@
 	if (!doc)
 		return;
 	struct ApplicationPrefs oldDocPrefs(doc->prefsData());
-	PreferencesDialog prefsDialog(this, oldDocPrefs);
+	PreferencesDialog prefsDialog(this, oldDocPrefs, doc);
 	int prefsResult=prefsDialog.exec();
 	if (prefsResult==QDialog::Accepted)
 	{




More information about the scribus-commit mailing list