Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 2606 → Rev 2607

/branches/Version13x/Scribus/scribus/mpalette.cpp
839,8 → 839,8
{
doc = d;
Umrech=doc->unitRatio;
double maxXYWHVal=(QMAX(doc->pageWidth, doc->pageHeight) + QMAX(doc->pageWidth, doc->pageHeight) * 0.1) * Umrech;
double minXYVal=-3000 * Umrech;
double maxXYWHVal= 30000 * Umrech;
double minXYVal= -30000 * Umrech;
HaveDoc = true;
HaveItem = false;
 
848,8 → 848,8
Ypos->setValues( minXYVal, maxXYWHVal, 100, minXYVal);
Width->setValues( Umrech, maxXYWHVal, 100, Umrech);
Height->setValues( Umrech, maxXYWHVal, 100, Umrech);
LXpos->setValues( -3000, maxXYWHVal, 100, 0);
LYpos->setValues( -3000, maxXYWHVal, 100, 0);
LXpos->setValues( -30000, maxXYWHVal, 100, 0);
LYpos->setValues( -30000, maxXYWHVal, 100, 0);
 
Rot->setValues( 0, 359.99, 100, 0);
RoundRect->setValues( -300, 300, 10, 0);
856,10 → 856,10
Extra->setValues( -300, 300, 10, 0);
Size->setValues( 0.5, 2048, 10, 1);
LineSp->setValues( 1, 2048, 10, 1);
ScaleX->setValues( 1, 3000, 10, 1);
ScaleY->setValues( 1, 3000, 10, 1);
imgDpiX->setValues( 1, 3000, 10, 1);
imgDpiY->setValues( 1, 3000, 10, 1);
ScaleX->setValues( 1, 30000, 10, 1);
ScaleY->setValues( 1, 30000, 10, 1);
imgDpiX->setValues( 1, 30000, 10, 1);
imgDpiY->setValues( 1, 30000, 10, 1);
 
dGap->setDecimals(10);
DTop->setDecimals(10);
1270,8 → 1270,8
Umrech = doc->unitRatio;
bool tmp = HaveItem;
HaveItem = false;
double maxXYWHVal=(QMAX(doc->pageWidth, doc->pageHeight) + QMAX(doc->pageWidth, doc->pageHeight) * 0.1) * Umrech;
double minXYVal=-3000 * Umrech;
double maxXYWHVal=30000 * Umrech;
double minXYVal=-30000 * Umrech;
 
double ratioDivisor = Umrech / oldRatio;
double newX = Xpos->value() * ratioDivisor;
/branches/Version13x/Scribus/scribus/prefs.cpp
788,7 → 788,6
 
setSize(prefsData->pageSize);
setOrien(prefsData->pageOrientation);
 
pageWidth->setValue(prefsData->PageWidth * unitRatio);
pageHeight->setValue(prefsData->PageHeight * unitRatio);
 
1000,7 → 999,7
PageSize *ps2=new PageSize(gr);
 
prefsPageSizeName=ps2->getPageName();
if (gr==tr("Custom"))
if (gr == tr("Custom"))
{
pageWidth->setEnabled(true);
pageHeight->setEnabled(true);
1020,6 → 1019,7
BottomR->setMaxValue(pageHeight->value() - TopR->value());
connect(pageWidth, SIGNAL(valueChanged(int)), this, SLOT(setPageWidth(int)));
connect(pageHeight, SIGNAL(valueChanged(int)), this, SLOT(setPageHeight(int)));
delete ps2;
}
 
/*!
/branches/Version13x/Scribus/scribus/about.cpp
51,7 → 51,7
tabLayout1->addWidget( pixmapLabel1 );
buildID = new QLabel( tab, "BB" );
buildID->setAlignment(Qt::AlignCenter);
QString bu = tr("%1 %2 %3 ").arg("28").arg("June").arg("2005");
QString bu = tr("%1 %2 %3 ").arg("29").arg("June").arg("2005");
#ifdef HAVE_CMS
bu += "C";
#else
/branches/Version13x/Scribus/scribus/reformdoc.cpp
52,10 → 52,11
dsLayout4->setSpacing( 6 );
dsLayout4->setMargin( 0 );
sizeQComboBox = new QComboBox( true, dsGroupBox7, "sizeQComboBox" );
sizeQComboBox->setEditable(false);
sizeQLabel = new QLabel( sizeQComboBox, tr( "&Size:" ), dsGroupBox7, "sizeQLabel" );
 
PageSize *ps=new PageSize(doc->PageSize);
QStringList pageSizes=ps->getPageSizeList();
QStringList pageSizes=ps->getTrPageSizeList();
sizeQComboBox->insertStringList(pageSizes);
sizeQComboBox->insertItem( tr( "Custom" ) );
 
65,7 → 66,6
sizeQComboBox->setCurrentItem(sizeIndex);
else
sizeQComboBox->setCurrentItem(sizeQComboBox->count()-1);
sizeQComboBox->setEnabled(false);
 
dsLayout4->addWidget( sizeQLabel, 0, 0 );
dsLayout4->addWidget( sizeQComboBox, 0, 1 );
73,8 → 73,8
orientationQLabel = new QLabel( orientationQComboBox, tr( "Orie&ntation:" ), dsGroupBox7, "orientationQLabel" );
orientationQComboBox->insertItem( tr( "Portrait" ) );
orientationQComboBox->insertItem( tr( "Landscape" ) );
orientationQComboBox->setEnabled(false);
orientationQComboBox->setCurrentItem(doc->PageOri);
orientationQComboBox->setEditable(false);
dsLayout4->addWidget( orientationQLabel, 0, 2 );
dsLayout4->addWidget( orientationQComboBox, 0, 3 );
widthMSpinBox = new MSpinBox( 1, 100000, dsGroupBox7, 2 );
92,6 → 92,11
heightQLabel = new QLabel(heightMSpinBox, tr( "&Height:" ), dsGroupBox7, "heightLabel" );
dsLayout4->addWidget( heightQLabel, 1, 2 );
dsLayout4->addWidget( heightMSpinBox, 1, 3 );
if (sizeQComboBox->currentText() == tr("Custom"))
{
heightMSpinBox->setEnabled( true );
widthMSpinBox->setEnabled( true );
}
unitCombo = new QComboBox( true, dsGroupBox7, "unitCombo" );
unitCombo->insertStringList(unitGetTextUnitList());
unitCombo->setEditable(false);
353,6 → 358,10
leftR->setMaxValue(pageWidth - rightR->value());
topR->setMaxValue(pageHeight - bottomR->value());
bottomR->setMaxValue(pageHeight - topR->value());
RandR = rightR->value() / unitRatio;
RandL = leftR->value() / unitRatio;
RandB = bottomR->value() / unitRatio;
RandT = topR->value() / unitRatio;
//tooltips
QToolTip::add( checkLink, "<qt>" + tr("Turns the of linked frames on or off") + "</qt>");
QToolTip::add( checkControl, "<qt>" + tr("Display non-printing characters such as paragraph markers in text frames") + "</qt>");
369,6 → 378,8
 
// signals and slots connections
connect( facingPages, SIGNAL( clicked() ), this, SLOT( setDS() ) );
connect(widthMSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setPageWidth(int)));
connect(heightMSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setPageHeight(int)));
connect(topR, SIGNAL(valueChanged(int)), this, SLOT(setTop(int)));
connect(bottomR, SIGNAL(valueChanged(int)), this, SLOT(setBottom(int)));
connect(leftR, SIGNAL(valueChanged(int)), this, SLOT(setLeft(int)));
376,6 → 387,8
connect(backColor, SIGNAL(clicked()), this, SLOT(changePaperColor()));
connect(unitCombo, SIGNAL(activated(int)), this, SLOT(unitChange()));
connect(backToDefaults, SIGNAL(clicked()), this, SLOT(restoreDefaults()));
connect(orientationQComboBox, SIGNAL(activated(int)), this, SLOT(setOrien(int)));
connect(sizeQComboBox, SIGNAL(activated(const QString &)), this, SLOT(setSize(const QString &)));
 
if (CMSavail)
{
405,6 → 418,10
bottomR->setValue(currDoc->pageMargins.Bottom * unitRatio);
leftR->setValue(currDoc->pageMargins.Left * unitRatio);
topR->setValue(currDoc->pageMargins.Top * unitRatio);
RandR = rightR->value() / unitRatio;
RandL = leftR->value() / unitRatio;
RandB = bottomR->value() / unitRatio;
RandT = topR->value() / unitRatio;
}
else if (current == tabView)
{
449,6 → 466,8
 
void ReformDoc::unitChange()
{
disconnect(widthMSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setPageWidth(int)));
disconnect(heightMSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setPageHeight(int)));
disconnect(topR, SIGNAL(valueChanged(int)), this, SLOT(setTop(int)));
disconnect(bottomR, SIGNAL(valueChanged(int)), this, SLOT(setBottom(int)));
disconnect(leftR, SIGNAL(valueChanged(int)), this, SLOT(setLeft(int)));
528,8 → 547,8
tabPDF->BleedLeft->getValues(&oldMin, &oldMax, &decimalsOld, &val);
tabPDF->BleedLeft->setValues(oldMin * invUnitConversion, oldMax * invUnitConversion, decimals, val * invUnitConversion);
tabPDF->unitRatio = unitRatio;
pageWidth = currDoc->pageWidth * unitRatio;
pageHeight = currDoc->pageHeight * unitRatio;
pageWidth = widthMSpinBox->value() / unitRatio;
pageHeight = heightMSpinBox->value() / unitRatio;
rightR->setMaxValue(pageWidth - leftR->value());
leftR->setMaxValue(pageWidth - rightR->value());
topR->setMaxValue(pageHeight - bottomR->value());
538,6 → 557,8
connect(bottomR, SIGNAL(valueChanged(int)), this, SLOT(setBottom(int)));
connect(leftR, SIGNAL(valueChanged(int)), this, SLOT(setLeft(int)));
connect(rightR, SIGNAL(valueChanged(int)), this, SLOT(setRight(int)));
connect(widthMSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setPageWidth(int)));
connect(heightMSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setPageHeight(int)));
}
 
void ReformDoc::changePaperColor()
555,21 → 576,25
 
void ReformDoc::setTop(int )
{
RandT = topR->value() / unitRatio;
bottomR->setMaxValue(pageHeight - topR->value());
}
 
void ReformDoc::setBottom(int )
{
RandB = bottomR->value() / unitRatio;
topR->setMaxValue(pageHeight - bottomR->value());
}
 
void ReformDoc::setLeft(int )
{
RandL = leftR->value() / unitRatio;
rightR->setMaxValue(pageWidth - leftR->value());
}
 
void ReformDoc::setRight(int )
{
RandR = rightR->value() / unitRatio;
leftR->setMaxValue(pageWidth - rightR->value());
}
 
589,6 → 614,82
}
}
 
void ReformDoc::setPageWidth(int)
{
pageWidth = widthMSpinBox->value() / unitRatio;
rightR->setMaxValue(widthMSpinBox->value() - leftR->value());
leftR->setMaxValue(widthMSpinBox->value() - rightR->value());
topR->setMaxValue(heightMSpinBox->value() - bottomR->value());
bottomR->setMaxValue(heightMSpinBox->value() - topR->value());
}
 
void ReformDoc::setPageHeight(int)
{
pageHeight = heightMSpinBox->value() / unitRatio;
rightR->setMaxValue(widthMSpinBox->value() - leftR->value());
leftR->setMaxValue(widthMSpinBox->value() - rightR->value());
topR->setMaxValue(heightMSpinBox->value() - bottomR->value());
bottomR->setMaxValue(heightMSpinBox->value() - topR->value());
}
 
void ReformDoc::setSize(const QString & gr)
{
pageWidth = widthMSpinBox->value() / unitRatio;
pageHeight = heightMSpinBox->value() / unitRatio;
widthMSpinBox->setEnabled(false);
heightMSpinBox->setEnabled(false);
PageSize *ps2=new PageSize(gr);
prefsPageSizeName=ps2->getPageName();
if (gr == tr("Custom"))
{
widthMSpinBox->setEnabled(true);
heightMSpinBox->setEnabled(true);
}
else
{
pageWidth = ps2->getPageWidth();
pageHeight = ps2->getPageHeight();
}
disconnect(widthMSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setPageWidth(int)));
disconnect(heightMSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setPageHeight(int)));
widthMSpinBox->setValue(pageWidth * unitRatio);
heightMSpinBox->setValue(pageHeight * unitRatio);
rightR->setMaxValue(widthMSpinBox->value() - leftR->value());
leftR->setMaxValue(widthMSpinBox->value() - rightR->value());
topR->setMaxValue(heightMSpinBox->value() - bottomR->value());
bottomR->setMaxValue(heightMSpinBox->value() - topR->value());
connect(widthMSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setPageWidth(int)));
connect(heightMSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setPageHeight(int)));
delete ps2;
}
 
void ReformDoc::setOrien(int ori)
{
double br;
setSize(sizeQComboBox->currentText());
disconnect(widthMSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setPageWidth(int)));
disconnect(heightMSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setPageHeight(int)));
if (ori == 0)
{
if (sizeQComboBox->currentText() == tr("Custom"))
{
br = widthMSpinBox->value();
widthMSpinBox->setValue(heightMSpinBox->value());
heightMSpinBox->setValue(br);
}
}
else
{
br = widthMSpinBox->value();
widthMSpinBox->setValue(heightMSpinBox->value());
heightMSpinBox->setValue(br);
}
pageWidth = widthMSpinBox->value() / unitRatio;
pageHeight = heightMSpinBox->value() / unitRatio;
connect(widthMSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setPageWidth(int)));
connect(heightMSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setPageHeight(int)));
}
 
void ReformDoc::switchCMS(bool enable)
{
tabPDF->enableCMS(enable);
/branches/Version13x/Scribus/scribus/story.cpp
2230,12 → 2230,12
setCaption( tr("Story Editor - %1").arg(currItem->itemName()));
firstSet = false;
Editor->loadItemText(currItem);
Editor->sync();
Editor->repaintContents();
EditorBar->setRepaint(true);
EditorBar->doRepaint();
updateProps(0,0);
updateStatus();
Editor->sync();
Editor->repaintContents();
connectSignals();
}
else
2340,10 → 2340,10
textChanged = false;
Editor->loadItemText(currItem);
updateStatus();
Editor->sync();
Editor->repaintContents();
EditorBar->setRepaint(true);
EditorBar->doRepaint();
Editor->sync();
Editor->repaintContents();
textChanged = false;
connectSignals();
}
3038,10 → 3038,10
Editor->setCursorPosition(p, i);
updateProps(p, i);
connect(Editor, SIGNAL(cursorPositionChanged(int, int)), this, SLOT(updateProps(int, int)));
Editor->sync();
Editor-> repaintContents();
EditorBar->setRepaint(true);
EditorBar->doRepaint();
Editor->sync();
Editor-> repaintContents();
qApp->processEvents();
blockUpdate = false;
}
/branches/Version13x/Scribus/scribus/reformdoc.h
106,7 → 106,12
double unitRatio;
double pageWidth;
double pageHeight;
double RandT;
double RandB;
double RandL;
double RandR;
QColor colorPaper;
QString prefsPageSizeName;
 
protected:
QVBoxLayout* reformDocLayout;
137,6 → 142,10
virtual void setBottom(int v);
virtual void setLeft(int v);
virtual void setRight(int v);
virtual void setSize(const QString &);
virtual void setOrien(int ori);
virtual void setPageWidth(int v);
virtual void setPageHeight(int v);
virtual void switchCMS(bool enable);
virtual void setTOCIndexData(QWidget *widgetToShow);
};
/branches/Version13x/Scribus/scribus/scribusview.cpp
8482,6 → 8482,8
for (uint a = 0; a < Doc->Pages.count(); ++a)
{
Seite = Doc->Pages.at(a);
Seite->Width = Doc->pageWidth;
Seite->Height = Doc->pageHeight;
oldPg.oldXO = Seite->Xoffset;
oldPg.oldYO = Seite->Yoffset;
oldPg.newPg = a;
8586,10 → 8588,7
{
PageItem *item = Doc->Items.at(ite);
if (item->OwnPage < 0)
{
item->OwnPage = OnPage(item);
setRedrawBounding(item);
}
else
{
oldPg = pageTable[item->OwnPage];
8596,8 → 8595,8
item->Xpos = item->Xpos - oldPg.oldXO + Doc->Pages.at(oldPg.newPg)->Xoffset;
item->Ypos = item->Ypos - oldPg.oldYO + Doc->Pages.at(oldPg.newPg)->Yoffset;
item->OwnPage = static_cast<int>(oldPg.newPg);
setRedrawBounding(item);
}
setRedrawBounding(item);
}
if (Doc->PageFP)
{
/branches/Version13x/Scribus/scribus/scribus.cpp
3036,15 → 3036,19
if (dia->exec())
{
slotChangeUnit(dia->unitCombo->currentItem(), false);
tpr2 = dia->topR->value() / doc->unitRatio;
lr2 = dia->leftR->value() / doc->unitRatio;
rr2 = dia->rightR->value() / doc->unitRatio;
br2 = dia->bottomR->value() / doc->unitRatio;
tpr2 = dia->RandT;
br2 = dia->RandB;
lr2 = dia->RandL;
rr2 = dia->RandR;
fp = dia->facingPages->isChecked();
if (fp)
doc->FirstPageLeft = dia->firstPage->isChecked();
doc->FirstPnum = dia->pageNumber->value();
doc->resetPage(tpr2, lr2, rr2, br2, fp);
doc->PageOri = dia->orientationQComboBox->currentItem();
doc->PageSize = dia->prefsPageSizeName;
doc->pageWidth = dia->pageWidth;
doc->pageHeight = dia->pageHeight;
doc->guidesSettings.before = dia->tabGuides->inBackground->isChecked();
doc->marginColored = dia->checkUnprintable->isChecked();
doc->papColor = dia->colorPaper;
/branches/Version13x/Scribus/scribus/plugins/svgimplugin/svgplugin.cpp
188,11 → 188,11
{
bool ret = false;
SvgStyle *gc = new SvgStyle;
Conversion = 1.0; // 0.8;
Conversion = 0.8;
QDomElement docElem = inpdoc.documentElement();
double width = !docElem.attribute("width").isEmpty() ? parseUnit(docElem.attribute( "width" )) : 550.0;
double height = !docElem.attribute("height").isEmpty() ? parseUnit(docElem.attribute( "height" )) : 841.0;
Conversion = 0.8; // 0.8;
Conversion = 0.8;
if (Prog->pluginManager->dllInput != "")
{
Prog->doc->setPage(width, height, 0, 0, 0, 0, 0, 0, false, false);
233,12 → 233,16
haveViewBox = false;
if( !docElem.attribute( "viewBox" ).isEmpty() )
{
Conversion = 1.0;
double w2 = !docElem.attribute("width").isEmpty() ? parseUnit(docElem.attribute( "width" )) : 550.0;
double h2 = !docElem.attribute("height").isEmpty() ? parseUnit(docElem.attribute( "height" )) : 841.0;
Conversion = 0.8;
QString viewbox( docElem.attribute( "viewBox" ) );
QStringList points = QStringList::split( ' ', viewbox.replace( QRegExp(","), " ").simplifyWhiteSpace() );
viewTransformX = points[0].toDouble();
viewTransformY = points[1].toDouble();
viewScaleX = width / points[2].toDouble();
viewScaleY = height / points[3].toDouble();
viewScaleX = w2 / points[2].toDouble();
viewScaleY = h2 / points[3].toDouble();
haveViewBox = true;
}
parseGroup( docElem );