Subversion Repositories Scribus

Compare Revisions

Regard whitespace Rev 14090 → Rev 14091

/trunk/Scribus/scribus/ui/prefs_scrapbookbase.ui
15,7 → 15,7
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="label">
<widget class="QLabel" name="titleLabel">
<property name="font">
<font>
<pointsize>14</pointsize>
51,7 → 51,7
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QCheckBox" name="checkBox">
<widget class="QCheckBox" name="autoSendCopiedToScrapCheckBox">
<property name="text">
<string>Send Copied Items Automatically to the Scrapbook</string>
</property>
58,7 → 58,7
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_2">
<widget class="QCheckBox" name="keepCopiedAcrossSessionsCheckBox">
<property name="text">
<string>Keep Copied Items Permanently Across Sessions</string>
</property>
70,14 → 70,17
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<item>
<widget class="QLabel" name="label_2">
<widget class="QLabel" name="itemCountKeptInScrapbookLabel">
<property name="text">
<string>Number of Copied Items to Keep in Scrapbook</string>
</property>
<property name="buddy">
<cstring>itemCountKeptInScrapbookSpinBox</cstring>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox"/>
<widget class="QSpinBox" name="itemCountKeptInScrapbookSpinBox"/>
</item>
<item>
<spacer name="horizontalSpacer">
/trunk/Scribus/scribus/ui/prefs_scrapbook.cpp
6,12 → 6,13
*/
 
#include "prefs_scrapbook.h"
#include "prefsstructs.h"
 
Prefs_Scrapbook::Prefs_Scrapbook(QWidget* parent)
: QWidget(parent)
: Prefs_Pane(parent)
{
setupUi(this);
 
languageChange();
}
 
Prefs_Scrapbook::~Prefs_Scrapbook()
18,3 → 19,26
{
}
 
void Prefs_Scrapbook::languageChange()
{
autoSendCopiedToScrapCheckBox->setToolTip( "<qt>" + tr( "" ) + "</qt>");
keepCopiedAcrossSessionsCheckBox->setToolTip( "<qt>" + tr( "" ) + "</qt>" );
itemCountKeptInScrapbookSpinBox->setToolTip( "<qt>" + tr("") + "</qt>");
}
 
void Prefs_Scrapbook::restoreDefaults(struct ApplicationPrefs *prefsData)
{
 
autoSendCopiedToScrapCheckBox->setChecked(prefsData->scrapbookPrefs.doCopyToScrapbook);
keepCopiedAcrossSessionsCheckBox->setChecked(prefsData->scrapbookPrefs.persistentScrapbook);
itemCountKeptInScrapbookSpinBox->setValue(prefsData->scrapbookPrefs.numScrapbookCopies);
 
}
 
void Prefs_Scrapbook::saveGuiToPrefs(struct ApplicationPrefs *prefsData) const
{
prefsData->scrapbookPrefs.doCopyToScrapbook=autoSendCopiedToScrapCheckBox->isChecked();
prefsData->scrapbookPrefs.persistentScrapbook=keepCopiedAcrossSessionsCheckBox->isChecked();
prefsData->scrapbookPrefs.numScrapbookCopies=itemCountKeptInScrapbookSpinBox->value();
}
 
/trunk/Scribus/scribus/ui/prefs_scrapbook.h
9,9 → 9,10
#define PREFS_SCRAPBOOK_H
 
#include "ui_prefs_scrapbookbase.h"
#include "prefs_pane.h"
#include "scribusapi.h"
 
class SCRIBUS_API Prefs_Scrapbook : public QWidget, Ui::Prefs_Scrapbook
class SCRIBUS_API Prefs_Scrapbook : public Prefs_Pane, Ui::Prefs_Scrapbook
{
Q_OBJECT
 
18,6 → 19,11
public:
Prefs_Scrapbook(QWidget* parent=0);
~Prefs_Scrapbook();
virtual void restoreDefaults(struct ApplicationPrefs *prefsData);
virtual void saveGuiToPrefs(struct ApplicationPrefs *prefsData) const;
 
public slots:
void languageChange();
};
 
#endif // PREFS_SCRAPBOOK_H
/trunk/Scribus/scribus/ui/preferencesdialog.cpp
104,6 → 104,7
 
void PreferencesDialog::setupGui()
{
prefs_Scrapbook->restoreDefaults(&localPrefs);
prefs_Display->restoreDefaults(&localPrefs);
}
 
228,6 → 229,7
 
void PreferencesDialog::saveGuiToPrefs()
{
prefs_Scrapbook->saveGuiToPrefs(&localPrefs);
prefs_Display->saveGuiToPrefs(&localPrefs);
}