r14611 by cbradney - Enable new prefs miscellaneous pane
scribus-commit
scribus-commit at lists.scribus.net
Mon Feb 1 19:56:57 CET 2010
Revision: 14611
Author: cbradney
Date: 2010-01-31T22:32:07.910782Z
Commit message: Enable new prefs miscellaneous pane
Changeset:
M /trunk/Scribus/scribus/ui/preferencesdialog.cpp
M /trunk/Scribus/scribus/ui/prefs_miscellaneous.cpp
M /trunk/Scribus/scribus/ui/prefs_miscellaneous.h
M /trunk/Scribus/scribus/ui/prefs_externaltoolsbase.ui
M /trunk/Scribus/scribus/ui/prefs_miscellaneousbase.ui
Diffs:
Index: scribus/ui/prefs_externaltoolsbase.ui
===================================================================
--- scribus/ui/prefs_externaltoolsbase.ui (revision 14610)
+++ scribus/ui/prefs_externaltoolsbase.ui (revision 14611)
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>782</width>
- <height>984</height>
+ <width>770</width>
+ <height>933</height>
</rect>
</property>
<property name="windowTitle">
@@ -45,7 +45,7 @@
<rect>
<x>0</x>
<y>0</y>
- <width>739</width>
+ <width>727</width>
<height>877</height>
</rect>
</property>
Index: scribus/ui/prefs_miscellaneousbase.ui
===================================================================
--- scribus/ui/prefs_miscellaneousbase.ui (revision 14610)
+++ scribus/ui/prefs_miscellaneousbase.ui (revision 14611)
@@ -46,19 +46,19 @@
<x>0</x>
<y>0</y>
<width>663</width>
- <height>349</height>
+ <height>350</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
- <widget class="QCheckBox" name="checkBox">
+ <widget class="QCheckBox" name="confirmFontReplacementsCheckBox">
<property name="text">
<string>Always ask before fonts are replaced when loading a document</string>
</property>
</widget>
</item>
<item>
- <widget class="QCheckBox" name="checkBox_2">
+ <widget class="QCheckBox" name="previewParaStylesCheckBox">
<property name="text">
<string>Preview of current Paragraph Style is visible when editing Styles</string>
</property>
@@ -102,7 +102,7 @@
</widget>
</item>
<item>
- <widget class="QCheckBox" name="checkBox_3">
+ <widget class="QCheckBox" name="useStandardLoremIpsumCheckBox">
<property name="text">
<string>Always use standard Lorem Ipsum text</string>
</property>
@@ -118,7 +118,7 @@
</widget>
</item>
<item>
- <widget class="QSpinBox" name="spinBox"/>
+ <widget class="QSpinBox" name="loremIpsumParaCountSpinBox"/>
</item>
<item>
<spacer name="horizontalSpacer_2">
Index: scribus/ui/prefs_miscellaneous.cpp
===================================================================
--- scribus/ui/prefs_miscellaneous.cpp (revision 14610)
+++ scribus/ui/prefs_miscellaneous.cpp (revision 14611)
@@ -5,16 +5,37 @@
for which a new license (GPL+exception) is in place.
*/
-#include "prefs_miscellaneous.h"
+#include "ui/prefs_miscellaneous.h"
+#include "prefsstructs.h"
Prefs_Miscellaneous::Prefs_Miscellaneous(QWidget* parent)
- : QWidget(parent)
+ : Prefs_Pane(parent)
{
setupUi(this);
-
+ languageChange();
}
Prefs_Miscellaneous::~Prefs_Miscellaneous()
{
}
+void Prefs_Miscellaneous::languageChange()
+{
+}
+
+void Prefs_Miscellaneous::restoreDefaults(struct ApplicationPrefs *prefsData)
+{
+ confirmFontReplacementsCheckBox->setChecked(prefsData->fontPrefs.askBeforeSubstitute);
+ previewParaStylesCheckBox->setChecked(prefsData->miscPrefs.haveStylePreview);
+ useStandardLoremIpsumCheckBox->setChecked(prefsData->miscPrefs.useStandardLI);
+ loremIpsumParaCountSpinBox->setValue(prefsData->miscPrefs.paragraphsLI);
+}
+
+void Prefs_Miscellaneous::saveGuiToPrefs(struct ApplicationPrefs *prefsData) const
+{
+ prefsData->fontPrefs.askBeforeSubstitute = confirmFontReplacementsCheckBox->isChecked();
+ prefsData->miscPrefs.haveStylePreview = previewParaStylesCheckBox->isChecked();
+ prefsData->miscPrefs.useStandardLI = useStandardLoremIpsumCheckBox->isChecked();
+ prefsData->miscPrefs.paragraphsLI = loremIpsumParaCountSpinBox->value();
+}
+
Index: scribus/ui/prefs_miscellaneous.h
===================================================================
--- scribus/ui/prefs_miscellaneous.h (revision 14610)
+++ scribus/ui/prefs_miscellaneous.h (revision 14611)
@@ -9,15 +9,21 @@
#define PREFS_MISCELLANEOUS_H
#include "ui_prefs_miscellaneousbase.h"
+#include "prefs_pane.h"
#include "scribusapi.h"
-class SCRIBUS_API Prefs_Miscellaneous : public QWidget, Ui::Prefs_Miscellaneous
+class SCRIBUS_API Prefs_Miscellaneous : public Prefs_Pane, Ui::Prefs_Miscellaneous
{
Q_OBJECT
public:
Prefs_Miscellaneous(QWidget* parent=0);
~Prefs_Miscellaneous();
+ virtual void restoreDefaults(struct ApplicationPrefs *prefsData);
+ virtual void saveGuiToPrefs(struct ApplicationPrefs *prefsData) const;
+
+ public slots:
+ void languageChange();
};
#endif // PREFS_MISCELLANEOUS_H
Index: scribus/ui/preferencesdialog.cpp
===================================================================
--- scribus/ui/preferencesdialog.cpp (revision 14610)
+++ scribus/ui/preferencesdialog.cpp (revision 14611)
@@ -134,6 +134,7 @@
prefs_Scrapbook->restoreDefaults(&localPrefs);
prefs_Display->restoreDefaults(&localPrefs);
prefs_ExternalTools->restoreDefaults(&localPrefs);
+ prefs_Miscellaneous->restoreDefaults(&localPrefs);
prefs_ImageCache->restoreDefaults(&localPrefs);
}
@@ -159,6 +160,7 @@
prefs_Scrapbook->saveGuiToPrefs(&localPrefs);
prefs_Display->saveGuiToPrefs(&localPrefs);
prefs_ExternalTools->saveGuiToPrefs(&localPrefs);
+ prefs_Miscellaneous->saveGuiToPrefs(&localPrefs);
prefs_ImageCache->saveGuiToPrefs(&localPrefs);
}
More information about the scribus-commit
mailing list