Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 1833 → Rev 1834

/branches/Version13x/Scribus/scribus/tabguides.h
28,9 → 28,7
MSpinBox* majorSpace;
MSpinBox* minorSpace;
MSpinBox* snapDistance;
QCheckBox* checkMargin;
QCheckBox* checkGuides;
QCheckBox* checkBaseline;
QLabel* checkBaseline;
QColor colorGuides;
QColor colorMargin;
QColor colorMajorGrid;
44,6 → 42,7
QGroupBox* guideBox;
QGroupBox* marginBox;
QGroupBox* baselineBox;
QGroupBox* baseGridBox;
QButtonGroup* buttonGroup1;
QRadioButton* inBackground;
QRadioButton* inForeground;
53,6 → 52,8
QLabel* textLabel7;
QLabel* textLabel8;
QLabel* textLabel82;
QLabel* checkMargin;
QLabel* checkGuides;
QPushButton* majorGridColor;
QPushButton* minorGridColor;
QPushButton* baselineColor;
60,7 → 61,6
QPushButton* marginColor;
QSpinBox* grabDistance;
QLabel* textLabel6a;
QSpinBox* autoLine;
QLabel* textLabel7a;
MSpinBox* baseGrid;
MSpinBox* baseOffset;
83,8 → 83,10
QHBoxLayout* guideBoxLayout;
QHBoxLayout* marginBoxLayout;
QGridLayout* baselineBoxLayout;
QGridLayout* baseGridBoxLayout;
QVBoxLayout* buttonGroup1Layout;
QHBoxLayout* layout9;
QHBoxLayout* layout9a;
double unitRatio;
QString unit;
/branches/Version13x/Scribus/scribus/prefs.cpp
767,11 → 767,11
pageHeight->setValue(prefsData->PageHeight * unitRatio);
 
//unitChange();
 
prefsWidgets->raiseWidget(0);
resize( minimumSizeHint() );
arrangeIcons();
backToDefaults->hide();
prefsSelection->setSelected(prefsSelection->firstItem(), true);
itemSelected(prefsSelection->firstItem());
clearWState( WState_Polished );
}
 
/branches/Version13x/Scribus/scribus/reformdoc.cpp
377,7 → 377,8
arrangeIcons();
resize( minimumSizeHint() );
clearWState( WState_Polished );
prefsWidgets->raiseWidget(0);
prefsSelection->setSelected(prefsSelection->firstItem(), true);
itemSelected(prefsSelection->firstItem());
}
 
void ReformDoc::restoreDefaults()
/branches/Version13x/Scribus/scribus/tabtypography.h
31,6 → 31,9
QGroupBox* groupBox3a;
QLabel* textLabel5a;
QSpinBox* capsScaling;
QGroupBox* groupBox4a;
QLabel* textLabel8a;
QSpinBox* autoLine;
 
protected:
QGridLayout* tabTypoLayout;
37,6 → 40,7
QGridLayout* groupBox1aLayout;
QGridLayout* groupBox2aLayout;
QGridLayout* groupBox3aLayout;
QGridLayout* groupBox4aLayout;
};
 
#endif
/branches/Version13x/Scribus/scribus/tabtypography.cpp
73,6 → 73,23
textLabel5a = new QLabel(capsScaling, tr( "Sc&aling:" ), groupBox3a, "textLabel5a" );
groupBox3aLayout->addWidget( textLabel5a, 0, 0 );
tabTypoLayout->addWidget( groupBox3a, 2, 0 );
groupBox4a = new QGroupBox( this, "groupBox3a" );
groupBox4a->setColumnLayout(0, Qt::Vertical );
groupBox4a->layout()->setSpacing( 6 );
groupBox4a->layout()->setMargin( 11 );
groupBox4a->setTitle( tr( "Automatic &Line Spacing" ) );
groupBox4aLayout = new QGridLayout( groupBox4a->layout() );
groupBox4aLayout->setAlignment( Qt::AlignTop );
autoLine = new QSpinBox( groupBox4a, "autoLine" );
autoLine->setMaxValue( 100 );
autoLine->setMinValue( 1 );
autoLine->setValue( prefsData->autoLineSpacing );
autoLine->setSuffix( tr( " %" ) );
groupBox4aLayout->addWidget( autoLine, 1, 1 );
textLabel8a = new QLabel( autoLine, tr( "Line Spacing:" ), groupBox4a, "textLabel8a" );
groupBox4aLayout->addWidget( textLabel8a, 1, 0 );
tabTypoLayout->addWidget( groupBox4a, 3, 0 );
 
QToolTip::add( superDisplacement, tr( "Displacement above the baseline of the font on a line" ) );
QToolTip::add( superScaling, tr( "Relative size of the superscript compared to the normal font" ) );
79,6 → 96,7
QToolTip::add( subDisplacement, tr( "Displacement below the baseline of the normal font on a line" ) );
QToolTip::add( subScaling, tr( "Relative size of the subscript compared to the normal font" ) );
QToolTip::add( capsScaling, tr( "Relative size of the small caps font compared to the normal font" ) );
QToolTip::add( autoLine, tr( "Percentage increase over the font size for the line spacing" ) );
}
 
void TabTypograpy::restoreDefaults(struct typoPrefs *prefsData)
87,4 → 105,5
capsScaling->setValue( prefsData->valueSmallCaps );
superScaling->setValue( prefsData->scalingSuperScript );
subScaling->setValue( prefsData->scalingSubScript );
autoLine->setValue( prefsData->autoLineSpacing );
}
/branches/Version13x/Scribus/scribus/tabguides.cpp
76,14 → 76,15
tabGuidesLayout->addWidget( commonBox );
layout9 = new QHBoxLayout( 0, 0, 5, "layout9");
guideBox = new QGroupBox( this, "guideBox" );
guideBox->setTitle( tr( "Guides" ) );
guideBox->setTitle( tr( "Show Guides" ) );
guideBox->setCheckable( true );
guideBox->setChecked(prefsData->guidesShown);
guideBox->setColumnLayout(0, Qt::Vertical );
guideBox->layout()->setSpacing( 5 );
guideBox->layout()->setMargin( 10 );
guideBoxLayout = new QHBoxLayout( guideBox->layout() );
checkGuides = new QCheckBox( guideBox, "checkGuides" );
checkGuides->setText( tr( "Show Guides" ) );
checkGuides->setChecked(prefsData->guidesShown);
checkGuides = new QLabel( guideBox, "checkGuides" );
checkGuides->setText( tr( "Color:" ) );
guideBoxLayout->addWidget( checkGuides );
guideColor = new QPushButton( guideBox, "guideColor" );
guideColor->setMinimumSize( QSize( 60, 20 ) );
98,14 → 99,15
guideBoxLayout->addWidget( guideColor );
layout9->addWidget( guideBox );
marginBox = new QGroupBox( this, "guideBox" );
marginBox->setTitle( tr( "Margins" ) );
marginBox->setCheckable( true );
marginBox->setTitle( tr( "Show Margins" ) );
marginBox->setChecked(prefsData->marginsShown);
marginBox->setColumnLayout(0, Qt::Vertical );
marginBox->layout()->setSpacing( 5 );
marginBox->layout()->setMargin( 10 );
marginBoxLayout = new QHBoxLayout( marginBox->layout() );
checkMargin = new QCheckBox( marginBox, "checkMargin" );
checkMargin->setText( tr( "Show Margins" ) );
checkMargin->setChecked(prefsData->marginsShown);
checkMargin = new QLabel( marginBox, "checkMargin" );
checkMargin->setText( tr( "Color:" ) );
marginBoxLayout->addWidget( checkMargin );
marginColor = new QPushButton( marginBox, "marginColor" );
marginColor->setMinimumSize( QSize( 60, 20 ) );
190,16 → 192,18
checkGridLayout->addWidget( groupBox2, 0, 1 );
tabGuidesLayout->addWidget( checkGrid );
 
layout9a = new QHBoxLayout( 0, 0, 5, "layout9");
baselineBox = new QGroupBox( this, "baselineBox" );
baselineBox->setTitle( tr( "Baseline Grid" ) );
baselineBox->setTitle( tr( "Show Baseline Grid" ) );
baselineBox->setCheckable( true );
baselineBox->setChecked(prefsData->baseShown);
baselineBox->setColumnLayout(0, Qt::Vertical );
baselineBox->layout()->setSpacing( 5 );
baselineBox->layout()->setMargin( 10 );
baselineBoxLayout = new QGridLayout( baselineBox->layout() );
baselineBoxLayout->setAlignment( Qt::AlignTop );
checkBaseline = new QCheckBox( baselineBox, "checkBaseline" );
checkBaseline = new QLabel( baselineBox, "checkBaseline" );
checkBaseline->setText( tr( "Show Baseline Grid" ) );
checkBaseline->setChecked(prefsData->baseShown);
baselineBoxLayout->addWidget( checkBaseline, 0, 0 );
baselineColor = new QPushButton( baselineBox, "baselineColor" );
baselineColor->setMinimumSize( QSize( 60, 20 ) );
212,27 → 216,29
baselineColor->setPixmap(pm4);
baselineColor->setText( QString::null );
baselineBoxLayout->addWidget( baselineColor, 0, 1 );
autoLine = new QSpinBox( baselineBox, "autoLine" );
autoLine->setMaxValue( 100 );
autoLine->setMinValue( 1 );
autoLine->setValue( prefsData2->autoLineSpacing );
autoLine->setSuffix( tr( " %" ) );
baselineBoxLayout->addWidget( autoLine, 1, 1 );
textLabel8a = new QLabel( autoLine, tr( "Automatic &Line Spacing:" ), baselineBox, "textLabel8a" );
baselineBoxLayout->addWidget( textLabel8a, 1, 0 );
baseGrid = new MSpinBox( 1, 1000, baselineBox, precision );
layout9a->addWidget( baselineBox );
 
baseGridBox = new QGroupBox( this, "baseGridBox" );
baseGridBox->setTitle( tr( "Baseline Settings" ) );
baseGridBox->setColumnLayout(0, Qt::Vertical );
baseGridBox->layout()->setSpacing( 5 );
baseGridBox->layout()->setMargin( 10 );
baseGridBoxLayout = new QGridLayout( baseGridBox->layout() );
baseGridBoxLayout->setAlignment( Qt::AlignTop );
baseGrid = new MSpinBox( 1, 1000, baseGridBox, precision );
baseGrid->setSuffix( unit );
baseGrid->setValue(prefsData2->valueBaseGrid * unitRatio);
baselineBoxLayout->addWidget( baseGrid, 0, 3 );
textLabel6a = new QLabel(baseGrid, tr( "Baseline &Grid:" ), baselineBox, "textLabel6a" );
baselineBoxLayout->addWidget( textLabel6a, 0, 2 );
baseOffset = new MSpinBox( 0, 1000, baselineBox, precision );
baseGridBoxLayout->addWidget( baseGrid, 0, 1 );
textLabel6a = new QLabel(baseGrid, tr( "Baseline &Grid:" ), baseGridBox, "textLabel6a" );
baseGridBoxLayout->addWidget( textLabel6a, 0, 0 );
baseOffset = new MSpinBox( 0, 1000, baseGridBox, precision );
baseOffset->setSuffix( unit );
baseOffset->setValue(prefsData2->offsetBaseGrid * unitRatio);
baselineBoxLayout->addWidget( baseOffset, 1, 3 );
textLabel7a = new QLabel(baseOffset, tr( "Baseline &Offset:" ), baselineBox, "textLabel7a" );
baselineBoxLayout->addWidget( textLabel7a, 1, 2 );
tabGuidesLayout->addWidget( baselineBox );
baseGridBoxLayout->addWidget( baseOffset, 1, 1 );
textLabel7a = new QLabel(baseOffset, tr( "Baseline &Offset:" ), baseGridBox, "textLabel7a" );
baseGridBoxLayout->addWidget( textLabel7a, 1, 0 );
layout9a->addWidget( baseGridBox );
tabGuidesLayout->addLayout( layout9a );
 
connect(majorGridColor, SIGNAL(clicked()), this, SLOT(changeMajorColor()));
connect(minorGridColor, SIGNAL(clicked()), this, SLOT(changeMinorColor()));
248,11 → 254,10
QToolTip::add( guideColor, tr( "Color of the guide lines you insert" ) );
QToolTip::add( marginColor, tr( "Color for the margin lines" ) );
QToolTip::add( baselineColor, tr( "Color for the basegrid lines" ) );
QToolTip::add( checkBaseline, tr("Turns the basegrid on or off"));
QToolTip::add( baselineBox, tr("Turns the basegrid on or off"));
QToolTip::add( checkGrid, tr("Turns the gridlines on or off"));
QToolTip::add( checkGuides, tr("Turns the guides on or off"));
QToolTip::add( checkMargin, tr("Turns the margins on or off"));
QToolTip::add( autoLine, tr( "Percentage increase over the font size for the line spacing" ) );
QToolTip::add( guideBox, tr("Turns the guides on or off"));
QToolTip::add( marginBox, tr("Turns the margins on or off"));
}
 
void TabGuides::restoreDefaults(struct guidesPrefs *prefsData, struct typoPrefs *prefsData2, int unitIndex)
288,10 → 293,10
baseOffset->setValue(prefsData2->offsetBaseGrid * unitRatio);
inBackground->setChecked( prefsData->before );
inForeground->setChecked( !prefsData->before );
checkBaseline->setChecked(prefsData->baseShown);
baselineBox->setChecked(prefsData->baseShown);
checkGrid->setChecked(prefsData->gridShown);
checkMargin->setChecked(prefsData->marginsShown);
checkGuides->setChecked(prefsData->guidesShown);
marginBox->setChecked(prefsData->marginsShown);
guideBox->setChecked(prefsData->guidesShown);
}
 
void TabGuides::changeMajorColor()
/branches/Version13x/Scribus/scribus/prefsdialogbase.cpp
5,6 → 5,8
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <qlabel.h>
#include <qfont.h>
extern QPixmap loadIcon(QString nam);
 
PrefsDialogBase::PrefsDialogBase( QWidget* parent ) : QDialog( parent, "PrefsDialogBase", true, 0 )
25,8 → 27,17
prefsSelection->setFocusPolicy(QWidget::NoFocus);
prefsSelection->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)7, 0, 0, prefsSelection->sizePolicy().hasHeightForWidth() ) );
layout3->addWidget( prefsSelection );
layout5 = new QVBoxLayout( 0, 0, 6, "layout5");
textLabel1 = new QLabel( this, "textLabel1" );
QFont f(textLabel1->font());
f.setPointSize(f.pointSize()+4);
f.setBold(true);
textLabel1->setFont(f);
textLabel1->setText("");
layout5->addWidget( textLabel1 );
prefsWidgets = new QWidgetStack( this, "prefsWidgets" );
layout3->addWidget( prefsWidgets );
layout5->addWidget( prefsWidgets );
layout3->addLayout(layout5);
prefsLayout->addLayout( layout3 );
layout4 = new QHBoxLayout( 0, 0, 6, "layout4");
QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
89,7 → 100,10
if (ic == 0)
return;
if (itemMap.contains(ic))
{
prefsWidgets->raiseWidget(itemMap[ic]);
textLabel1->setText(ic->text());
}
}
/*
* Sets the strings of the subwidgets using the current
/branches/Version13x/Scribus/scribus/scribus.cpp
3308,11 → 3308,11
doc->guidesSettings.before = dia->tabGuides->inBackground->isChecked();
doc->marginColored = dia->checkUnprintable->isChecked();
doc->papColor = dia->colorPaper;
doc->guidesSettings.marginsShown = dia->tabGuides->checkMargin->isChecked();
doc->guidesSettings.marginsShown = dia->tabGuides->marginBox->isChecked();
doc->guidesSettings.framesShown = dia->checkFrame->isChecked();
doc->guidesSettings.gridShown = dia->tabGuides->checkGrid->isChecked();
doc->guidesSettings.guidesShown = dia->tabGuides->checkGuides->isChecked();
doc->guidesSettings.baseShown = dia->tabGuides->checkBaseline->isChecked();
doc->guidesSettings.guidesShown = dia->tabGuides->guideBox->isChecked();
doc->guidesSettings.baseShown = dia->tabGuides->baselineBox->isChecked();
doc->guidesSettings.showPic = dia->checkPictures->isChecked();
doc->guidesSettings.linkShown = dia->checkLink->isChecked();
doc->guidesSettings.grabRad = dia->tabGuides->grabDistance->value();
3331,7 → 3331,7
doc->typographicSetttings.valueSubScript = dia->tabTypo->subDisplacement->value();
doc->typographicSetttings.scalingSubScript = dia->tabTypo->subScaling->value();
doc->typographicSetttings.valueSmallCaps = dia->tabTypo->capsScaling->value();
doc->typographicSetttings.autoLineSpacing = dia->tabGuides->autoLine->value();
doc->typographicSetttings.autoLineSpacing = dia->tabTypo->autoLine->value();
doc->typographicSetttings.valueBaseGrid = dia->tabGuides->baseGrid->value() / UmReFaktor;
doc->typographicSetttings.offsetBaseGrid = dia->tabGuides->baseOffset->value() / UmReFaktor;
doc->toolSettings.defFont = dia->tabTools->fontComboText->currentText();
8037,11 → 8037,11
Prefs.DpapColor = dia->colorPaper;
Prefs.toolSettings.defFont = dia->tabTools->fontComboText->currentText();
Prefs.toolSettings.defSize = dia->tabTools->sizeComboText->currentText().left(2).toInt() * 10;
Prefs.guidesSettings.marginsShown = dia->tabGuides->checkMargin->isChecked();
Prefs.guidesSettings.marginsShown = dia->tabGuides->marginBox->isChecked();
Prefs.guidesSettings.framesShown = dia->checkFrame->isChecked();
Prefs.guidesSettings.gridShown = dia->tabGuides->checkGrid->isChecked();
Prefs.guidesSettings.guidesShown = dia->tabGuides->checkGuides->isChecked();
Prefs.guidesSettings.baseShown = dia->tabGuides->checkBaseline->isChecked();
Prefs.guidesSettings.guidesShown = dia->tabGuides->guideBox->isChecked();
Prefs.guidesSettings.baseShown = dia->tabGuides->baselineBox->isChecked();
Prefs.guidesSettings.showPic = dia->checkPictures->isChecked();
Prefs.guidesSettings.linkShown = dia->checkLink->isChecked();
Prefs.guidesSettings.grabRad = dia->tabGuides->grabDistance->value();
8060,7 → 8060,7
Prefs.typographicSetttings.valueSubScript = dia->tabTypo->subDisplacement->value();
Prefs.typographicSetttings.scalingSubScript = dia->tabTypo->subScaling->value();
Prefs.typographicSetttings.valueSmallCaps = dia->tabTypo->capsScaling->value();
Prefs.typographicSetttings.autoLineSpacing = dia->tabGuides->autoLine->value();
Prefs.typographicSetttings.autoLineSpacing = dia->tabTypo->autoLine->value();
Prefs.typographicSetttings.valueBaseGrid = dia->tabGuides->baseGrid->value() / UmReFaktor;
Prefs.typographicSetttings.offsetBaseGrid = dia->tabGuides->baseOffset->value() / UmReFaktor;
Prefs.toolSettings.dPen = dia->tabTools->colorComboLineShape->currentText();
/branches/Version13x/Scribus/scribus/prefsdialogbase.h
13,6 → 13,7
class QGridLayout;
class QSpacerItem;
class QPushButton;
class QLabel;
 
class PrefsDialogBase : public QDialog
{
23,17 → 24,16
~PrefsDialogBase() {};
int addItem(QString name, QPixmap icon, QWidget *tab);
void arrangeIcons();
QLabel* textLabel1;
QWidgetStack* prefsWidgets;
QPushButton* backToDefaults;
QPushButton* buttonOk;
QPushButton* buttonCancel;
 
private:
QIconView* prefsSelection;
QMap<QIconViewItem*, int> itemMap;
int counter;
 
private slots:
public slots:
void itemSelected(QIconViewItem* ic);
 
protected:
40,6 → 40,7
QVBoxLayout* prefsLayout;
QHBoxLayout* layout3;
QHBoxLayout* layout4;
QVBoxLayout* layout5;
 
protected slots:
virtual void languageChange();