Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 145 → Rev 146

/trunk/Scribus/ChangeLogCVS
1,4 → 1,7
Changes since Version 1.1.4
06.01.2004 The Tab-Key switches now between Docs when not in Edit-Mode.
Improved the MSpinBox API.
 
05.01.2004 Fixed Bug with multicolumn Textframes.
Started Code Documentation.
 
/trunk/Scribus/scribus/pageback.h
21,9 → 21,10
#include <qwidget.h>
#include <qpainter.h>
 
/**Seitenhintergrund
*@author Franz Schmid
*/
/*!
* \brief Page background
* \author Franz Schmid
*/
 
class PageBack : public QWidget {
public:
/trunk/Scribus/scribus/pdfopts.cpp
665,24 → 665,20
}
BleedTop->setSuffix( EinTxt );
BleedTop->setMinValue(0);
BleedTop->setMaxValue(qRound(view->Doc->PageH*UmReFaktor*100));
BleedTop->setValue(qRound(Optionen->BleedTop*UmReFaktor*100));
BleedTop->setLineStep(100);
BleedTop->setMaxValue(view->Doc->PageH*UmReFaktor);
BleedTop->setValue(Optionen->BleedTop*UmReFaktor);
BleedBottom->setSuffix( EinTxt );
BleedBottom->setMinValue(0);
BleedBottom->setMaxValue(qRound(view->Doc->PageH*UmReFaktor*100));
BleedBottom->setValue(qRound(Optionen->BleedBottom*UmReFaktor*100));
BleedBottom->setLineStep(100);
BleedBottom->setMaxValue(view->Doc->PageH*UmReFaktor);
BleedBottom->setValue(Optionen->BleedBottom*UmReFaktor);
BleedRight->setSuffix( EinTxt );
BleedRight->setMinValue(0);
BleedRight->setMaxValue(qRound(view->Doc->PageB*UmReFaktor*100));
BleedRight->setValue(qRound(Optionen->BleedRight*UmReFaktor*100));
BleedRight->setLineStep(100);
BleedRight->setMaxValue(view->Doc->PageB*UmReFaktor);
BleedRight->setValue(Optionen->BleedRight*UmReFaktor);
BleedLeft->setSuffix( EinTxt );
BleedLeft->setMinValue(0);
BleedLeft->setMaxValue(qRound(view->Doc->PageB*UmReFaktor*100));
BleedLeft->setValue(qRound(Optionen->BleedLeft*UmReFaktor*100));
BleedLeft->setLineStep(100);
BleedLeft->setMaxValue(view->Doc->PageB*UmReFaktor);
BleedLeft->setValue(Optionen->BleedLeft*UmReFaktor);
#ifdef HAVE_CMS
if ((!CMSuse) || (!CMSavail))
Options->setTabEnabled(tabpdfx, false);
782,10 → 778,10
 
void PDF_Opts::BleedChanged()
{
BleedTop->setMaxValue(qRound(view->Doc->PageH*UmReFaktor*100)-BleedBottom->value());
BleedBottom->setMaxValue(qRound(view->Doc->PageH*UmReFaktor*100)-BleedTop->value());
BleedRight->setMaxValue(qRound(view->Doc->PageB*UmReFaktor*100)-BleedLeft->value());
BleedLeft->setMaxValue(qRound(view->Doc->PageB*UmReFaktor*100)-BleedRight->value());
BleedTop->setMaxValue(view->Doc->PageH*UmReFaktor-BleedBottom->value());
BleedBottom->setMaxValue(view->Doc->PageH*UmReFaktor-BleedTop->value());
BleedRight->setMaxValue(view->Doc->PageB*UmReFaktor-BleedLeft->value());
BleedLeft->setMaxValue(view->Doc->PageB*UmReFaktor-BleedRight->value());
QPixmap pm = QPixmap(70,80);
pm.fill(white);
QPainter p;
794,10 → 790,10
p.setPen(black);
p.drawRect(0, 0, pm.width(), pm.height());
p.setPen(QPen(black, 1, DotLine, FlatCap, MiterJoin));
int x = qRound((BleedLeft->value() / UmReFaktor / 100.0) * (70.0 / view->Doc->PageB));
int y = qRound((BleedTop->value() / UmReFaktor / 100.0) * (80.0 / view->Doc->PageH));
int w = qRound((view->Doc->PageB-((BleedLeft->value()+BleedRight->value())/UmReFaktor/100.0))*(70.0/view->Doc->PageB));
int h = qRound((view->Doc->PageH-((BleedTop->value()+BleedBottom->value())/UmReFaktor/100.0))*(80.0/view->Doc->PageH));
int x = qRound((BleedLeft->value() / UmReFaktor) * (70.0 / view->Doc->PageB));
int y = qRound((BleedTop->value() / UmReFaktor) * (80.0 / view->Doc->PageH));
int w = qRound((view->Doc->PageB-((BleedLeft->value()+BleedRight->value())/UmReFaktor))*(70.0/view->Doc->PageB));
int h = qRound((view->Doc->PageH-((BleedTop->value()+BleedBottom->value())/UmReFaktor))*(80.0/view->Doc->PageH));
p.drawRect(x, y, w, h);
BleedIcon->setPixmap(pm);
p.end();
/trunk/Scribus/scribus/mpalette.h
208,7 → 208,7
ScribusDoc *doc;
double Umrech;
bool LMode;
int RoVal;
double RoVal;
 
public slots:
void SetDoc(ScribusDoc *d);
/trunk/Scribus/scribus/align.cpp
50,8 → 50,8
AHor = new MSpinBox( ButtonGroup1, 2 );
AHor->setEnabled( true );
AHor->setMinimumSize( QSize( 80, 20 ) );
AHor->setMaxValue( 100000 );
AHor->setMinValue( -100000 );
AHor->setMaxValue( 1000 );
AHor->setMinValue( -1000 );
AHor->setValue( 0 );
AHor->setEnabled(false);
ButtonGroup1Layout->addWidget( AHor, 3, 2, Qt::AlignRight);
117,12 → 117,10
AVert->setSuffix( tr( " p" ) );
break;
}
AVert->setMaxValue( 100000 );
AVert->setMinValue( -100000 );
AVert->setMaxValue( 1000 );
AVert->setMinValue( -1000 );
AVert->setValue( 0 );
AVert->setEnabled(false);
AHor->setLineStep(100);
AVert->setLineStep(100);
ButtonGroup1_2Layout->addWidget( AVert, 3, 2, Qt::AlignRight);
VerteilenV = new QRadioButton( ButtonGroup1_2, "VerteilenH" );
VerteilenV->setText( tr( "Distribute evenly" ) );
193,9 → 191,9
 
void Align::slotApplyDiag()
{
double xdp = static_cast<double>(AHor->value()) / UmReFaktor / 100.0;
double xdp = AHor->value() / UmReFaktor;
bool xa = (CheckH->isChecked() || VerteilenH->isChecked());
double ydp = static_cast<double>(AVert->value()) / UmReFaktor / 100.0;
double ydp = AVert->value() / UmReFaktor;
bool ya = (CheckV->isChecked() || VerteilenV->isChecked());
int xart = VartH->currentItem();
int yart = VartV->currentItem();
/trunk/Scribus/scribus/mpalette.cpp
116,13 → 116,13
GeoGroupLayout->addWidget( Text2a, 3, 0 );
Xpos = new MSpinBox( GeoGroup, 2 );
Xpos->setSuffix( tr( " pt" ) );
Xpos->setMaxValue( 300000 );
Xpos->setMinValue( -300000 );
Xpos->setMaxValue( 3000 );
Xpos->setMinValue( -3000 );
GeoGroupLayout->addWidget( Xpos, 0, 1 );
Ypos = new MSpinBox( GeoGroup, 2 );
Ypos->setSuffix( tr( " pt" ) );
Ypos->setMaxValue( 300000 );
Ypos->setMinValue( -300000 );
Ypos->setMaxValue( 3000 );
Ypos->setMinValue( -3000 );
GeoGroupLayout->addWidget( Ypos, 1, 1 );
Width = new MSpinBox( GeoGroup, 2 );
Width->setSuffix( tr( " pt" ) );
359,27 → 359,27
DistanceLayout->addWidget( DCol, 0, 1 );
DGap = new MSpinBox( Distance, 1 );
DGap->setSuffix( tr( " pt" ) );
DGap->setMaxValue( 3000 );
DGap->setMaxValue( 300 );
DGap->setMinValue( 0 );
DistanceLayout->addWidget( DGap, 1, 1 );
DTop = new MSpinBox( Distance, 1 );
DTop->setSuffix( tr( " pt" ) );
DTop->setMaxValue( 3000 );
DTop->setMaxValue( 300 );
DTop->setMinValue( 0 );
DistanceLayout->addWidget( DTop, 2, 1 );
DBottom = new MSpinBox( Distance, 1 );
DBottom->setSuffix( tr( " pt" ) );
DBottom->setMaxValue( 3000 );
DBottom->setMaxValue( 300 );
DBottom->setMinValue( 0 );
DistanceLayout->addWidget( DBottom, 3, 1 );
DLeft = new MSpinBox( Distance, 1 );
DLeft->setSuffix( tr( " pt" ) );
DLeft->setMaxValue( 3000 );
DLeft->setMaxValue( 300 );
DLeft->setMinValue( 0 );
DistanceLayout->addWidget( DLeft, 4, 1 );
DRight = new MSpinBox( Distance, 1 );
DRight->setSuffix( tr( " pt" ) );
DRight->setMaxValue( 3000 );
DRight->setMaxValue( 300 );
DRight->setMinValue( 0 );
DistanceLayout->addWidget( DRight, 5, 1 );
TabsButton = new QPushButton( Distance, "Tabul" );
407,7 → 407,7
DistanceLayout2->addWidget( TextLabel3, 1, 0);
Dist = new MSpinBox( Distance2, 1 );
Dist->setSuffix( tr( " pt" ) );
Dist->setMaxValue( 3000 );
Dist->setMaxValue( 300 );
Dist->setMinValue( 0 );
Dist->setLineStep(10);
DistanceLayout2->addWidget( Dist, 1, 1);
416,8 → 416,8
DistanceLayout2->addWidget( TextLabel2, 2, 0);
LineW = new MSpinBox( Distance2, 1 );
LineW->setSuffix( tr( " pt" ) );
LineW->setMaxValue( 3000 );
LineW->setMinValue( -3000 );
LineW->setMaxValue( 300 );
LineW->setMinValue( -300 );
LineW->setLineStep(10);
DistanceLayout2->addWidget( LineW, 2, 1);
pageLayout_2b->addWidget(Distance2);
447,8 → 447,8
Size = new MSpinBox( page_3, 1 );
Size->setPrefix( "" );
Size->setSuffix( tr( " pt" ) );
Size->setMaxValue( 3000 );
Size->setMinValue( -3000 );
Size->setMaxValue( 1024 );
Size->setMinValue( 1 );
layout41->addWidget( Size, 1, 1 );
layout46->addLayout( layout41 );
 
812,7 → 812,6
Layout12_2->addWidget( TextLabel1, 2, 0 );
LSize = new MSpinBox( page_5, 1 );
LSize->setSuffix( tr( " pt" ) );
LSize->setDecimals(10);
Layout12_2->addWidget( LSize, 3, 0 );
Text9 = new QLabel( page_5, "Text9" );
Text9->setText( tr( "Edges:" ) );
976,33 → 975,33
{
doc = d;
HaveDoc = true;
Xpos->setMaxValue( 300000 );
Xpos->setMinValue( -300000 );
Ypos->setMaxValue( 300000 );
Ypos->setMinValue( -300000 );
Width->setMaxValue( 300000 );
Xpos->setMaxValue( 3000 );
Xpos->setMinValue( -3000 );
Ypos->setMaxValue( 3000 );
Ypos->setMinValue( -3000 );
Width->setMaxValue( 3000 );
Width->setMinValue( 1 );
Height->setMaxValue( 300000 );
Height->setMaxValue( 3000 );
Height->setMinValue( 1 );
Rot->setMaxValue( 36000 );
Rot->setMaxValue( 360 );
Rot->setMinValue( 0 );
RoundRect->setMaxValue( 30000 );
RoundRect->setMinValue( -30000);
LYpos->setMaxValue( 300000 );
LYpos->setMinValue( -300000 );
RoundRect->setMaxValue( 300 );
RoundRect->setMinValue( -300);
LYpos->setMaxValue( 3000 );
LYpos->setMinValue( -3000 );
ScaleY->setMaxValue( 3000 );
ScaleY->setMinValue( 1 );
ScaleX->setMaxValue( 3000 );
ScaleX->setMinValue( 1 );
LXpos->setMaxValue( 300000 );
LXpos->setMinValue( -300000 );
Size->setMaxValue( 10240 );
LXpos->setMaxValue( 3000 );
LXpos->setMinValue( -3000 );
Size->setMaxValue( 1024 );
Size->setMinValue( 1 );
LineSp->setMaxValue( 3000 );
LineSp->setMaxValue( 300 );
LineSp->setMinValue( 1 );
Extra->setMaxValue( 3000 );
Extra->setMinValue( -3000 );
LSize->setMaxValue( 360 );
Extra->setMaxValue( 300 );
Extra->setMinValue( -300 );
LSize->setMaxValue( 36 );
LSize->setMinValue( 1 );
Xpos->setDecimals(100);
Ypos->setDecimals(100);
1022,11 → 1021,11
DLeft->setDecimals(10);
DBottom->setDecimals(10);
DRight->setDecimals(10);
Dist->setMaxValue( 3000 );
Dist->setMaxValue( 300 );
Dist->setMinValue( 0 );
Dist->setLineStep(10);
LineW->setMaxValue( 3000 );
LineW->setMinValue( -3000 );
LineW->setMaxValue( 300 );
LineW->setMinValue( -300 );
LineW->setLineStep(10);
updateCList();
}
1043,17 → 1042,17
HaveItem = false;
CurItem = i;
NameEdit->setText(i->AnName);
RoundRect->setValue(qRound(i->RadRect*UmReFaktor*RoundRect->Decimals));
RoundRect->setValue(i->RadRect*UmReFaktor);
DCol->setValue(i->Cols);
DGap->setValue(qRound(i->ColGap*UmReFaktor*DGap->Decimals));
DGap->setValue(i->ColGap*UmReFaktor);
DCol->setMaxValue(QMAX(qRound(i->Width / QMAX(i->ColGap, 10.0)), 1));
DGap->setMaxValue(QMAX(qRound((i->Width / i->Cols - i->Extra - i->RExtra)*UmReFaktor*DGap->Decimals), 0));
DGap->setMaxValue(QMAX((i->Width / i->Cols - i->Extra - i->RExtra)*UmReFaktor, 0));
DCol->setMinValue(1);
DGap->setMinValue(0);
DLeft->setValue(qRound(i->Extra*UmReFaktor*DLeft->Decimals));
DTop->setValue(qRound(i->TExtra*UmReFaktor*DTop->Decimals));
DBottom->setValue(qRound(i->BExtra*UmReFaktor*DBottom->Decimals));
DRight->setValue(qRound(i->RExtra*UmReFaktor*DRight->Decimals));
DLeft->setValue(i->Extra*UmReFaktor);
DTop->setValue(i->TExtra*UmReFaktor);
DBottom->setValue(i->BExtra*UmReFaktor);
DRight->setValue(i->RExtra*UmReFaktor);
Revert->setOn(i->Reverse);
Textflow->setChecked(i->Textflow);
Textflow2->setChecked(i->Textflow2);
1103,8 → 1102,8
{
TabStack2->raiseWidget(1);
NormText2->setChecked(i->PoShow);
LineW->setValue( qRound(i->BaseOffs * -10) );
Dist->setValue(static_cast<int>(i->Extra*10));
LineW->setValue(i->BaseOffs * -1);
Dist->setValue(i->Extra);
}
else
TabStack2->raiseWidget(0);
1415,20 → 1414,20
bool tmp = HaveItem;
HaveItem = false;
QString ein;
double oldX = static_cast<double>(Xpos->value()) / old / Xpos->Decimals;
double oldY = static_cast<double>(Ypos->value()) / old / Ypos->Decimals;
double oldW = static_cast<double>(Width->value()) / old / Width->Decimals;
double oldH = static_cast<double>(Height->value()) / old / Height->Decimals;
double oldLX = static_cast<double>(LXpos->value()) / old / LXpos->Decimals;
double oldLY = static_cast<double>(LYpos->value()) / old / LYpos->Decimals;
double oldG = static_cast<double>(DGap->value()) / old / DGap->Decimals;
double oldGM = static_cast<double>(DGap->maxValue()) / old / DGap->Decimals;
double oldDT = static_cast<double>(DTop->value()) / old / DTop->Decimals;
double oldDL = static_cast<double>(DLeft->value()) / old / DLeft->Decimals;
double oldDB = static_cast<double>(DBottom->value()) / old / DBottom->Decimals;
double oldDR = static_cast<double>(DRight->value()) / old / DRight->Decimals;
double oldRR = static_cast<double>(RoundRect->value()) / old / RoundRect->Decimals;
double oldRM = static_cast<double>(RoundRect->maxValue()) / old / RoundRect->Decimals;
double oldX = Xpos->value() / old;
double oldY = Ypos->value() / old;
double oldW = Width->value() / old;
double oldH = Height->value() / old;
double oldLX = LXpos->value() / old;
double oldLY = LYpos->value() / old;
double oldG = DGap->value() / old;
double oldGM = DGap->maxValue() / old;
double oldDT = DTop->value() / old;
double oldDL = DLeft->value() / old;
double oldDB = DBottom->value() / old;
double oldDR = DRight->value() / old;
double oldRR = RoundRect->value() / old;
double oldRM = RoundRect->maxValue() / old;
Umrech = UmReFaktor;
Width->setLineStep(100);
Height->setLineStep(100);
1485,20 → 1484,20
DBottom->setSuffix( ein );
DRight->setSuffix( ein );
RoundRect->setSuffix( ein );
Xpos->setValue(qRound(oldX * UmReFaktor * Xpos->Decimals));
Ypos->setValue(qRound(oldY * UmReFaktor * Ypos->Decimals));
Width->setValue(qRound(oldW * UmReFaktor * Width->Decimals));
Height->setValue(qRound(oldH * UmReFaktor * Height->Decimals));
LXpos->setValue(qRound(oldLX * UmReFaktor * LXpos->Decimals));
LYpos->setValue(qRound(oldLY * UmReFaktor * LYpos->Decimals));
DGap->setMaxValue(qRound(oldGM * UmReFaktor * DGap->Decimals));
DGap->setValue(qRound(oldG * UmReFaktor * DGap->Decimals));
DLeft->setValue(qRound(oldDL * UmReFaktor * DLeft->Decimals));
DTop->setValue(qRound(oldDT * UmReFaktor * DTop->Decimals));
DBottom->setValue(qRound(oldDB * UmReFaktor * DBottom->Decimals));
DRight->setValue(qRound(oldDR * UmReFaktor * DRight->Decimals));
RoundRect->setMaxValue(qRound(oldRM * UmReFaktor * RoundRect->Decimals));
RoundRect->setValue(qRound(oldRR * UmReFaktor * RoundRect->Decimals));
Xpos->setValue(oldX * UmReFaktor);
Ypos->setValue(oldY * UmReFaktor);
Width->setValue(oldW * UmReFaktor);
Height->setValue(oldH * UmReFaktor);
LXpos->setValue(oldLX * UmReFaktor);
LYpos->setValue(oldLY * UmReFaktor);
DGap->setMaxValue(oldGM * UmReFaktor);
DGap->setValue(oldG * UmReFaktor);
DLeft->setValue(oldDL * UmReFaktor);
DTop->setValue(oldDT * UmReFaktor);
DBottom->setValue(oldDB * UmReFaktor);
DRight->setValue(oldDR * UmReFaktor);
RoundRect->setMaxValue(oldRM * UmReFaktor);
RoundRect->setValue(oldRR * UmReFaktor);
HaveItem = tmp;
}
 
1543,8 → 1542,8
n = FPoint(b, h);
inX = ma.m11() * n.x() + ma.m21() * n.y() + ma.dx();
inY = ma.m22() * n.y() + ma.m12() * n.x() + ma.dy();
Xpos->setValue(qRound(inX*UmReFaktor*Xpos->Decimals));
Ypos->setValue(qRound(inY*UmReFaktor*Ypos->Decimals));
Xpos->setValue(inX*UmReFaktor);
Ypos->setValue(inY*UmReFaktor);
if ((LMode) && (tmp))
setBH(CurItem->Width, CurItem->Height);
HaveItem = tmp;
1561,14 → 1560,14
ma.translate(static_cast<double>(Xpos->value()) / UmReFaktor / Xpos->Decimals, static_cast<double>(Ypos->value()) / UmReFaktor / Ypos->Decimals);
ma.rotate(static_cast<double>(Rot->value())/100.0*(-1));
dp = ma * QPoint(static_cast<int>(x), static_cast<int>(y));
Width->setValue(qRound(dp.x()*UmReFaktor*Width->Decimals));
Height->setValue(qRound(dp.y()*UmReFaktor*Height->Decimals));
Width->setValue(dp.x()*UmReFaktor);
Height->setValue(dp.y()*UmReFaktor);
}
else
{
RoundRect->setMaxValue(qRound(QMIN(x, y)/2*UmReFaktor*RoundRect->Decimals));
Width->setValue(qRound(x*UmReFaktor*Width->Decimals));
Height->setValue(qRound(y*UmReFaktor*Height->Decimals));
RoundRect->setMaxValue(QMIN(x, y)/2*UmReFaktor);
Width->setValue(x*UmReFaktor);
Height->setValue(y*UmReFaktor);
}
HaveItem = tmp;
}
1580,7 → 1579,7
if (r > 0)
rr = 360 - rr;
HaveItem = false;
Rot->setValue(qRound(fabs(rr)*100));
Rot->setValue(fabs(rr));
HaveItem = tmp;
}
 
1588,7 → 1587,7
{
bool tmp = HaveItem;
HaveItem = false;
RoundRect->setValue(qRound(r*UmReFaktor*RoundRect->Decimals));
RoundRect->setValue(r*UmReFaktor);
HaveItem = tmp;
}
 
1597,11 → 1596,11
bool tmp = HaveItem;
HaveItem = false;
DCol->setValue(r);
DGap->setValue(qRound(g*UmReFaktor*DGap->Decimals));
DGap->setValue(g*UmReFaktor);
if (tmp)
{
DCol->setMaxValue(QMAX(qRound(CurItem->Width / QMAX(CurItem->ColGap, 10.0)), 1));
DGap->setMaxValue(QMAX(qRound((CurItem->Width / CurItem->Cols - CurItem->Extra - CurItem->RExtra)*DGap->Decimals), 0));
DGap->setMaxValue(QMAX((CurItem->Width / CurItem->Cols - CurItem->Extra - CurItem->RExtra), 0));
}
DCol->setMinValue(1);
DGap->setMinValue(0);
1612,7 → 1611,7
{
bool tmp = HaveItem;
HaveItem = false;
LineSp->setValue(qRound(r*10));
LineSp->setValue(r);
HaveItem = tmp;
}
 
1620,7 → 1619,7
{
bool tmp = HaveItem;
HaveItem = false;
Size->setValue(s);
Size->setValue(s / 10.0);
HaveItem = tmp;
}
 
1628,7 → 1627,7
{
bool tmp = HaveItem;
HaveItem = false;
Extra->setValue(qRound(e*10));
Extra->setValue(e);
HaveItem = tmp;
}
 
1662,10 → 1661,10
{
bool tmp = HaveItem;
HaveItem = false;
LXpos->setValue(qRound(x * UmReFaktor * LXpos->Decimals));
LYpos->setValue(qRound(y * UmReFaktor * LYpos->Decimals));
ScaleX->setValue(qRound(scx * 1000));
ScaleY->setValue(qRound(scy * 1000));
LXpos->setValue(x * UmReFaktor);
LYpos->setValue(y * UmReFaktor);
ScaleX->setValue(scx * 100);
ScaleY->setValue(scy * 100);
HaveItem = tmp;
}
 
1673,7 → 1672,7
{
bool tmp = HaveItem;
HaveItem = false;
LSize->setValue(qRound(s*10));
LSize->setValue(s);
HaveItem = tmp;
}
 
1819,10 → 1818,10
{
double x,y,w,h, gx, gy, gh, gw, base;
QWMatrix ma;
x = static_cast<double>(Xpos->value()) / UmReFaktor / Xpos->Decimals;
y = static_cast<double>(Ypos->value()) / UmReFaktor / Ypos->Decimals;
w = static_cast<double>(Width->value()) / UmReFaktor / Width->Decimals;
h = static_cast<double>(Height->value()) / UmReFaktor / Height->Decimals;
x = Xpos->value() / UmReFaktor;
y = Ypos->value() / UmReFaktor;
w = Width->value() / UmReFaktor;
h = Height->value() / UmReFaktor;
if ((HaveDoc) && (HaveItem))
{
if (doc->ActPage->GroupSel)
1871,10 → 1870,10
{
double x,y,w,h, gx, gy, gh, gw, base;
QWMatrix ma;
x = static_cast<double>(Xpos->value()) / UmReFaktor / Xpos->Decimals;
y = static_cast<double>(Ypos->value()) / UmReFaktor / Ypos->Decimals;
w = static_cast<double>(Width->value()) / UmReFaktor / Width->Decimals;
h = static_cast<double>(Height->value()) / UmReFaktor / Height->Decimals;
x = Xpos->value() / UmReFaktor;
y = Ypos->value() / UmReFaktor;
w = Width->value() / UmReFaktor;
h = Height->value() / UmReFaktor;
if ((HaveDoc) && (HaveItem))
{
if (doc->ActPage->GroupSel)
1922,10 → 1921,10
void Mpalette::NewW()
{
double x,y,w,h, gx, gy, gh, gw;
x = static_cast<double>(Xpos->value()) / UmReFaktor / Xpos->Decimals;
y = static_cast<double>(Ypos->value()) / UmReFaktor / Ypos->Decimals;
w = static_cast<double>(Width->value()) / UmReFaktor / Width->Decimals;
h = static_cast<double>(Height->value()) / UmReFaktor / Height->Decimals;
x = Xpos->value() / UmReFaktor;
y = Ypos->value() / UmReFaktor;
w = Width->value() / UmReFaktor;
h = Height->value() / UmReFaktor;
if ((HaveDoc) && (HaveItem))
{
if (doc->ActPage->GroupSel)
1959,10 → 1958,10
void Mpalette::NewH()
{
double x,y,w,h, gx, gy, gh, gw;
x = static_cast<double>(Xpos->value()) / UmReFaktor / Xpos->Decimals;
y = static_cast<double>(Ypos->value()) / UmReFaktor / Ypos->Decimals;
w = static_cast<double>(Width->value()) / UmReFaktor / Width->Decimals;
h = static_cast<double>(Height->value()) / UmReFaktor / Height->Decimals;
x = Xpos->value() / UmReFaktor;
y = Ypos->value() / UmReFaktor;
w = Width->value() / UmReFaktor;
h = Height->value() / UmReFaktor;
if ((HaveDoc) && (HaveItem))
{
if (doc->ActPage->GroupSel)
2000,12 → 1999,12
{
if (doc->ActPage->GroupSel)
{
doc->ActPage->RotateGroup(static_cast<double>(Rot->value() - RoVal)/100.0*(-1));
doc->ActPage->RotateGroup((Rot->value() - RoVal)*(-1));
doc->ActPage->getGroupRect(&gx, &gy, &gw, &gh);
setXY(gx, gy);
}
else
doc->ActPage->RotateItem(static_cast<double>(Rot->value())/100.0*(-1), CurItem->ItemNr);
doc->ActPage->RotateItem(Rot->value()*(-1), CurItem->ItemNr);
emit DocChanged();
RoVal = Rot->value();
}
2015,7 → 2014,7
{
if ((HaveDoc) && (HaveItem))
{
CurItem->RadRect = static_cast<double>(RoundRect->value()) / UmReFaktor / RoundRect->Decimals;
CurItem->RadRect = RoundRect->value() / UmReFaktor;
doc->ActPage->SetFrameRounded();
emit DocChanged();
}
2025,7 → 2024,7
{
if ((HaveDoc) && (HaveItem))
{
doc->ActPage->ChLineSpa(static_cast<double>(LineSp->value())/10.0);
doc->ActPage->ChLineSpa(LineSp->value());
emit DocChanged();
}
}
2044,7 → 2043,7
{
if ((HaveDoc) && (HaveItem))
{
CurItem->ColGap = static_cast<double>(DGap->value()) / UmReFaktor / DGap->Decimals;
CurItem->ColGap = DGap->value() / UmReFaktor;
doc->ActPage->RefreshItem(CurItem);
emit DocChanged();
}
2054,7 → 2053,7
{
if ((HaveDoc) && (HaveItem))
{
doc->ActPage->chFSize(Size->value());
doc->ActPage->chFSize(qRound(Size->value()*10.0));
emit DocChanged();
}
}
2065,7 → 2064,7
{
if ((CurItem->HasSel) || (doc->AppMode == 1))
{
doc->ActPage->chKerning(static_cast<double>(Extra->value())/10);
doc->ActPage->chKerning(Extra->value());
emit DocChanged();
}
else
2072,7 → 2071,7
{
if (uint(CurItem->CPos) != CurItem->Ptext.count())
{
CurItem->Ptext.at(CurItem->CPos)->cextra = static_cast<double>(Extra->value())/10;
CurItem->Ptext.at(CurItem->CPos)->cextra = Extra->value();
CurItem->Dirty = true;
doc->ActPage->RefreshItem(CurItem);
emit DocChanged();
2085,7 → 2084,7
{
if ((HaveDoc) && (HaveItem))
{
doc->ActPage->ChLocalXY(static_cast<double>(LXpos->value()) / UmReFaktor / LXpos->Decimals, static_cast<double>(LYpos->value()) / UmReFaktor / LYpos->Decimals);
doc->ActPage->ChLocalXY(LXpos->value() / UmReFaktor, LYpos->value() / UmReFaktor);
emit DocChanged();
}
}
2094,7 → 2093,7
{
if ((HaveDoc) && (HaveItem))
{
doc->ActPage->ChLocalSc(static_cast<double>(ScaleX->value()) / 1000.0, static_cast<double>(ScaleY->value()) / 1000.0);
doc->ActPage->ChLocalSc(ScaleX->value() / 100.0, ScaleY->value() / 100.0);
emit DocChanged();
}
}
2103,7 → 2102,7
{
if ((HaveDoc) && (HaveItem))
{
doc->ActPage->ChLineWidth(static_cast<double>(LSize->value())/10.0);
doc->ActPage->ChLineWidth(LSize->value());
emit DocChanged();
}
}
2389,8 → 2388,8
inX = gx+gw;
inY = gy+gh;
}
Xpos->setValue(qRound(inX*UmReFaktor*Xpos->Decimals));
Ypos->setValue(qRound(inY*UmReFaktor*Ypos->Decimals));
Xpos->setValue(inX*UmReFaktor);
Ypos->setValue(inY*UmReFaktor);
}
else
{
2414,8 → 2413,8
n = FPoint(b, h);
inX = ma.m11() * n.x() + ma.m21() * n.y() + ma.dx();
inY = ma.m22() * n.y() + ma.m12() * n.x() + ma.dy();
Xpos->setValue(qRound(inX*UmReFaktor*Xpos->Decimals));
Ypos->setValue(qRound(inY*UmReFaktor*Ypos->Decimals));
Xpos->setValue(inX*UmReFaktor);
Ypos->setValue(inY*UmReFaktor);
}
HaveItem = true;
doc->RotMode = m;
2490,10 → 2489,10
{
if ((HaveDoc) && (HaveItem))
{
CurItem->Extra = static_cast<double>(DLeft->value()) / UmReFaktor / DLeft->Decimals;
CurItem->TExtra = static_cast<double>(DTop->value()) / UmReFaktor / DTop->Decimals;
CurItem->BExtra = static_cast<double>(DBottom->value()) / UmReFaktor / DBottom->Decimals;
CurItem->RExtra = static_cast<double>(DRight->value()) / UmReFaktor / DRight->Decimals;
CurItem->Extra = DLeft->value() / UmReFaktor;
CurItem->TExtra = DTop->value() / UmReFaktor;
CurItem->BExtra = DBottom->value() / UmReFaktor;
CurItem->RExtra = DRight->value() / UmReFaktor;
doc->ActPage->RefreshItem(CurItem);
emit DocChanged();
}
2648,21 → 2647,9
else
{
if ((CMSavail) && (doc->CMSSettings.CMSinUse))
{
GroupBoxCM->show();
/* TextCms1->show();
InputP->show();
TextCms2->show();
MonitorI->show(); */
}
else
{
GroupBoxCM->hide();
/* TextCms1->hide();
TextCms2->hide();
InputP->hide();
MonitorI->hide(); */
}
}
}
 
2831,7 → 2818,7
{
if ((HaveDoc) && (HaveItem))
{
CurItem->Extra = static_cast<double>(Dist->value()) / 10;
CurItem->Extra = Dist->value();
doc->ActPage->UpdatePolyClip(CurItem);
doc->ActPage->AdjustItemSize(CurItem);
doc->ActPage->RefreshItem(CurItem);
2843,7 → 2830,7
{
if ((HaveDoc) && (HaveItem))
{
CurItem->BaseOffs = static_cast<double>(-LineW->value()) / 10;
CurItem->BaseOffs = -LineW->value();
doc->ActPage->UpdatePolyClip(CurItem);
doc->ActPage->AdjustItemSize(CurItem);
doc->ActPage->RefreshItem(CurItem);
/trunk/Scribus/scribus/edit1format.cpp
53,8 → 53,7
SizeC->setMinimumSize( QSize( 70, 22 ) );
SizeC->setSuffix( tr( " pt" ) );
SizeC->setMinValue(1);
SizeC->setMaxValue(5120);
SizeC->setLineStep(10);
SizeC->setMaxValue(1024);
SizeC->setValue(vor->FontSize);
 
GroupFontLayout->addWidget( SizeC, 1, 1 );
85,15 → 84,13
GroupBox10Layout->addWidget( TextLabel2, 0, 0 );
 
LeftInd = new MSpinBox( GroupBox10, 1 );
LeftInd->setMaxValue( 3000 );
LeftInd->setMinValue( -3000 );
LeftInd->setLineStep(10);
LeftInd->setMaxValue( 300 );
LeftInd->setMinValue( -300 );
GroupBox10Layout->addWidget( LeftInd, 1, 1 );
 
FirstLin = new MSpinBox( GroupBox10, 1);
FirstLin->setMaxValue( 3000 );
FirstLin->setMinValue( -3000 );
FirstLin->setLineStep(10);
FirstLin->setMaxValue( 300 );
FirstLin->setMinValue( -300 );
GroupBox10Layout->addWidget( FirstLin, 0, 1 );
TabsButton = new QPushButton( GroupBox10, "Tabul" );
TabsButton->setText( tr( "Tabulators..." ) );
162,25 → 159,22
 
AboveV = new MSpinBox( AbstandV, 1 );
AboveV->setMinimumSize( QSize( 70, 22 ) );
AboveV->setMaxValue( 3000 );
AboveV->setMaxValue( 300 );
AboveV->setMinValue( 0 );
AboveV->setLineStep(10);
AbstandVLayout->addWidget( AboveV, 0, 1 );
 
BelowV = new MSpinBox( AbstandV, 1 );
BelowV->setMinimumSize( QSize( 70, 22 ) );
BelowV->setMaxValue( 3000 );
BelowV->setMaxValue( 300 );
BelowV->setMinValue( 0 );
BelowV->setLineStep(10);
AbstandVLayout->addWidget( BelowV, 1, 1 );
 
LineSpVal = new MSpinBox( AbstandV, 1 );
LineSpVal->setMinimumSize( QSize( 70, 22 ) );
LineSpVal->setSuffix( tr( " pt" ) );
LineSpVal->setMaxValue( 3000 );
LineSpVal->setMaxValue( 300 );
LineSpVal->setMinValue( 1 );
LineSpVal->setLineStep(10);
LineSpVal->setValue(qRound(vor->LineSpa * 10));
LineSpVal->setValue(vor->LineSpa);
AbstandVLayout->addWidget( LineSpVal, 2, 1 );
 
TextLabel3 = new QLabel( AbstandV, "TextLabel3" );
252,10 → 246,10
FirstLin->setSuffix(ein);
AboveV->setSuffix(ein);
BelowV->setSuffix(ein);
BelowV->setValue(qRound(vor->Anach * UmReFaktor * BelowV->Decimals));
AboveV->setValue(qRound(vor->Avor * UmReFaktor * AboveV->Decimals));
FirstLin->setValue(qRound(vor->First * UmReFaktor * FirstLin->Decimals));
LeftInd->setValue(qRound(vor->Indent * UmReFaktor * LeftInd->Decimals));
BelowV->setValue(vor->Anach * UmReFaktor);
AboveV->setValue(vor->Avor * UmReFaktor);
FirstLin->setValue(vor->First * UmReFaktor);
LeftInd->setValue(vor->Indent * UmReFaktor);
}
 
void EditStyle::ManageTabs()
312,13 → 306,13
werte->Ausri = 3;
if (Forced->isChecked())
werte->Ausri = 4;
werte->LineSpa = static_cast<double>(LineSpVal->value()) / 10.0;
werte->Indent = static_cast<double>(LeftInd->value() / UmReFaktor / LeftInd->Decimals);
werte->First = static_cast<double>(FirstLin->value() / UmReFaktor / FirstLin->Decimals);
werte->Avor = static_cast<double>(AboveV->value() / UmReFaktor / AboveV->Decimals);
werte->Anach = static_cast<double>(BelowV->value() / UmReFaktor / BelowV->Decimals);
werte->LineSpa = LineSpVal->value();
werte->Indent = LeftInd->value() / UmReFaktor;
werte->First = FirstLin->value() / UmReFaktor;
werte->Avor = AboveV->value() / UmReFaktor;
werte->Anach = BelowV->value() / UmReFaktor;
werte->Vname = Name->text();
werte->Font = FontC->currentText();
werte->FontSize = SizeC->value();
werte->FontSize = qRound(SizeC->value() * 10.0);
accept();
}
/trunk/Scribus/scribus/linecombo.cpp
18,6 → 18,14
#include "linecombo.h"
#include "icons5.h"
 
/*!
\fn LineCombo::LineCombo(QWidget* pa)
\author Franz Schmid
\date
\brief Creates Combobox and inserts line type variations
\param pa Parent Window
\retval None
*/
LineCombo::LineCombo(QWidget* pa) : QComboBox(true, pa)
{
setEditable(false);
/trunk/Scribus/scribus/cmsprefs.cpp
167,7 → 167,12
 
BlackP = new QCheckBox( this, "Black" );
BlackP->setText( tr( "Use Blackpoint Compensation" ) );
#ifdef cmsFLAGS_BLACKPOINTCOMPENSATION
BlackP->setChecked(Vor->BlackPoint);
#else
BlackP->setChecked(false);
BlackP->hide();
#endif
CMSPrefsLayout->addWidget( BlackP );
 
if (!CheckBox1->isChecked())
174,6 → 179,7
{
Simulate->setEnabled( false );
GamutC->setEnabled( false );
BlackP->setEnabled( false );
}
 
Layout1 = new QHBoxLayout;
242,6 → 248,7
SysProfiles->setEnabled(setter);
Render->setEnabled(setter);
Simulate->setEnabled(setter);
BlackP->setEnabled(setter);
if (setter == true)
slotSimula();
else
/trunk/Scribus/scribus/reformdoc.h
39,8 → 39,8
QPushButton* OKButton;
QPushButton* CancelB;
int einheit;
int Breite;
int Hoehe;
double Breite;
double Hoehe;
 
protected:
QVBoxLayout* ReformDocLayout;
/trunk/Scribus/scribus/guidemanager.cpp
33,8 → 33,7
TextLabel1->setText( tr( "Y-Pos:" ) );
Layout2->addWidget( TextLabel1 );
VertSpin = new MSpinBox( VerGroup, 2 );
VertSpin->setLineStep(100);
VertSpin->setMaxValue(static_cast<int>(page->doku->PageH*100));
VertSpin->setMaxValue(page->doku->PageH);
VertSpin->setMinValue(0);
Layout2->addWidget( VertSpin );
VerGroupLayout->addLayout( Layout2 );
65,8 → 64,7
TextLabel2->setText( tr( "X-Pos:" ) );
Layout4->addWidget( TextLabel2 );
HoriSpin = new MSpinBox( HorGroup, 2 );
HoriSpin->setLineStep(100);
HoriSpin->setMaxValue(static_cast<int>(page->doku->PageB*100));
HoriSpin->setMaxValue(page->doku->PageB);
HoriSpin->setMinValue(0);
Layout4->addWidget( HoriSpin );
HorGroupLayout->addLayout( Layout4 );
191,7 → 189,7
 
void GuideManager::GetHVal(int n)
{
HoriSpin->setValue(qRound(XLocal[n]*UmReFaktor*100));
HoriSpin->setValue(XLocal[n]*UmReFaktor);
curX = n;
HoriDel->setEnabled(true);
}
198,7 → 196,7
 
void GuideManager::GetVVal(int n)
{
VertSpin->setValue(qRound(YLocal[n]*UmReFaktor*100));
VertSpin->setValue(YLocal[n]*UmReFaktor);
curY = n;
VertDel->setEnabled(true);
}
205,7 → 203,7
 
void GuideManager::SetHVal()
{
XLocal.append(qRound(HoriSpin->value() / UmReFaktor) / 100.0);
XLocal.append(HoriSpin->value() / UmReFaktor);
qHeapSort(XLocal);
UpdateHList();
setFocus();
213,7 → 211,7
 
void GuideManager::SetVVal()
{
YLocal.append(qRound(VertSpin->value() / UmReFaktor) / 100.0);
YLocal.append(VertSpin->value() / UmReFaktor);
qHeapSort(YLocal);
UpdateVList();
setFocus();
/trunk/Scribus/scribus/scribusview.cpp
55,10 → 55,9
LE = new MSpinBox( this, 2 );
LE->setFont(fo);
LE->setSuffix( tr( " %" ) );
LE->setMaxValue( 320000 );
LE->setMinValue( 1000 );
LE->setValue( 10000 );
LE->setDecimals( 100 );
LE->setMaxValue( 3200 );
LE->setMinValue( 10 );
LE->setValue( 100 );
LE->setFocusPolicy(QWidget::ClickFocus);
SB1 = new QPushButton(this);
SB1->setPixmap(loadIcon("Klein.xpm"));
176,7 → 175,7
 
void ScribusView::Zval()
{
Doc->Scale = static_cast<double>(LE->value()) / 10000.0 * Prefs->DisScale;
Doc->Scale = LE->value() / 100.0 * Prefs->DisScale;
slotDoZoom();
setFocus();
}
470,7 → 469,7
setContentsPos(0, childY(Doc->ActPage->parentWidget())-static_cast<int>(10*Doc->Scale));
}
disconnect(LE, SIGNAL(valueChanged(int)), this, SLOT(Zval()));
LE->setValue(qRound(Doc->Scale/Prefs->DisScale*10000));
LE->setValue(Doc->Scale/Prefs->DisScale*100);
connect(LE, SIGNAL(valueChanged(int)), this, SLOT(Zval()));
setRulerPos(contentsX(), contentsY());
if (Doc->ActPage->SelItem.count() != 0)
598,7 → 597,7
VR->repaint();
Doc->ActPage = b;
disconnect(LE, SIGNAL(valueChanged(int)), this, SLOT(Zval()));
LE->setValue(qRound(Doc->Scale/Prefs->DisScale*10000));
LE->setValue(Doc->Scale/Prefs->DisScale*100);
connect(LE, SIGNAL(valueChanged(int)), this, SLOT(Zval()));
}
 
/trunk/Scribus/scribus/libabout/about.cpp
54,7 → 54,7
tabLayout1->addWidget( PixmapLabel1 );
BuildID = new QLabel( tab, "BB" );
BuildID->setAlignment(Qt::AlignCenter);
QString bu = tr("%1. %2 %3 ").arg(5).arg("January").arg(2004);
QString bu = tr("%1. %2 %3 ").arg(6).arg("January").arg(2004);
#ifdef HAVE_CMS
bu += "C";
#else
/trunk/Scribus/scribus/newfile.cpp
95,7 → 95,7
Breite->setEnabled( false );
Breite->setMinimumSize( QSize( 70, 20 ) );
Breite->setSuffix(ein);
Breite->setMaxValue( 1000000 );
Breite->setMaxValue( 10000 );
Breite->setMinValue( 1 );
Layout5->addWidget( Breite );
TextLabel2_2 = new QLabel( ButtonGroup1_2, "TextLabel2_2" );
105,7 → 105,7
Hoehe->setEnabled( false );
Hoehe->setMinimumSize( QSize( 70, 20 ) );
Hoehe->setSuffix(ein);
Hoehe->setMaxValue( 1000000 );
Hoehe->setMaxValue( 10000 );
Hoehe->setMinValue( 1 );
Layout5->addWidget( Hoehe );
ButtonGroup1_2Layout->addLayout( Layout5 );
121,10 → 121,8
ButtonGroup1_2Layout->addLayout( Layout8 );
Layout9->addWidget( ButtonGroup1_2 );
ComboBox1->setCurrentItem(Vor->PageFormat);
Breite->setValue(qRound(Vor->PageBreite * Umrech) * 100);
Hoehe->setValue(qRound(Vor->PageHoehe * Umrech) * 100);
Breite->setLineStep(100);
Hoehe->setLineStep(100);
Breite->setValue(Vor->PageBreite * Umrech);
Hoehe->setValue(Vor->PageHoehe * Umrech);
 
GroupBox7 = new QGroupBox( this, "GroupBox7" );
GroupBox7->setTitle( tr( "Margin Guides" ) );
152,34 → 150,34
Layout3->addWidget( TextLabel7, 1, 0 );
TopR = new MSpinBox( GroupBox7, 2 );
TopR->setMinimumSize( QSize( 70, 20 ) );
TopR->setMaxValue( 100000 );
TopR->setMaxValue( 1000 );
TopR->setMinValue( 0 );
TopR->setSuffix( ein );
TopR->setValue( qRound(Vor->RandOben * Umrech * 100));
TopR->setValue(Vor->RandOben * Umrech);
Top = Vor->RandOben;
Layout3->addWidget( TopR, 0, 1 );
BottomR = new MSpinBox( GroupBox7, 2 );
BottomR->setMinimumSize( QSize( 70, 20 ) );
BottomR->setSuffix( ein );
BottomR->setMaxValue( 100000 );
BottomR->setMaxValue( 1000 );
BottomR->setMinValue( 0 );
BottomR->setValue( qRound(Vor->RandUnten * Umrech * 100) );
BottomR->setValue(Vor->RandUnten * Umrech);
Bottom = Vor->RandUnten;
Layout3->addWidget( BottomR, 1, 1 );
LeftR = new MSpinBox( GroupBox7, 2 );
LeftR->setMinimumSize( QSize( 70, 20 ) );
LeftR->setSuffix( ein );
LeftR->setMaxValue( 100000 );
LeftR->setMaxValue( 1000 );
LeftR->setMinValue( 0 );
LeftR->setValue( qRound(Vor->RandLinks * Umrech * 100) );
LeftR->setValue(Vor->RandLinks * Umrech);
Left = Vor->RandLinks;
Layout3->addWidget( LeftR, 0, 3 );
RightR = new MSpinBox( GroupBox7, 2 );
RightR->setMinimumSize( QSize( 70, 20 ) );
RightR->setSuffix( ein );
RightR->setMaxValue( 100000 );
RightR->setMaxValue( 1000 );
RightR->setMinValue( 0 );
RightR->setValue( qRound(Vor->RandRechts * Umrech * 100) );
RightR->setValue(Vor->RandRechts * Umrech);
Right = Vor->RandRechts;
Layout3->addWidget( RightR, 1, 3 );
GroupBox7Layout->addLayout( Layout3 );
186,10 → 184,6
Layout9->addWidget( GroupBox7 );
NewDocLayout->addLayout( Layout9 );
setDS();
TopR->setDecimals(100);
LeftR->setDecimals(100);
RightR->setDecimals(100);
BottomR->setDecimals(100);
setSize(Vor->PageFormat);
setOrien(Vor->Ausrichtung);
 
246,9 → 240,8
Layout2->addWidget( TextLabel3, 0, 0 );
Distance = new MSpinBox( GroupBox4, 2 );
Distance->setSuffix( ein );
Distance->setMaxValue( 100000 );
Distance->setValue( qRound(11 * Umrech * 100) );
Distance->setDecimals(100);
Distance->setMaxValue( 1000 );
Distance->setValue(11 * Umrech);
Dist = 11;
Layout2->addWidget( Distance, 1, 1, Qt::AlignLeft );
SpinBox10 = new QSpinBox( GroupBox4, "SpinBox10" );
316,45 → 309,45
}
}
void NewDoc::setBreite(int v)
void NewDoc::setBreite(int)
{
Pagebr = v / Umrech / 100.0;
Pagebr = Breite->value() / Umrech;
code_repeat(0);
}
 
void NewDoc::setHoehe(int v)
void NewDoc::setHoehe(int)
{
Pageho = v / Umrech / 100.0;
Pageho = Hoehe->value() / Umrech;
code_repeat(0);
}
 
void NewDoc::setTop(int v)
void NewDoc::setTop(int)
{
Top = v / Umrech / 100.0;
Top = TopR->value() / Umrech;
code_repeat(1);
}
 
void NewDoc::setBottom(int v)
void NewDoc::setBottom(int)
{
Bottom = v / Umrech / 100.0;
Bottom = BottomR->value() / Umrech;
code_repeat(2);
}
 
void NewDoc::setLeft(int v)
void NewDoc::setLeft(int)
{
Left = v / Umrech / 100.0;
Left = LeftR->value() / Umrech;
code_repeat(3);
}
 
void NewDoc::setRight(int v)
void NewDoc::setRight(int)
{
Right = v / Umrech / 100.0;
Right = RightR->value() / Umrech;
code_repeat(4);
}
 
void NewDoc::setDist(int v)
{
Dist = v / Umrech / 100.0;
Dist = Distance->value() / Umrech;
}
 
void NewDoc::setUnit(int u)
385,16 → 378,16
disconnect(BottomR, SIGNAL(valueChanged(int)), this, SLOT(setBottom(int)));
disconnect(LeftR, SIGNAL(valueChanged(int)), this, SLOT(setLeft(int)));
disconnect(RightR, SIGNAL(valueChanged(int)), this, SLOT(setRight(int)));
Breite->setValue(qRound(Pagebr * Umrech * 100));
Hoehe->setValue(qRound(Pageho * Umrech * 100));
RightR->setMaxValue(Breite->value() - qRound(Left * Umrech * 100));
LeftR->setMaxValue(Breite->value() - qRound(Right * Umrech * 100));
TopR->setMaxValue(Hoehe->value() - qRound(Bottom * Umrech * 100));
BottomR->setMaxValue(Hoehe->value() - qRound(Top * Umrech * 100));
TopR->setValue(qRound(Top * Umrech * 100));
BottomR->setValue(qRound(Bottom * Umrech * 100));
LeftR->setValue(qRound(Left * Umrech * 100));
RightR->setValue(qRound(Right * Umrech * 100));
Breite->setValue(Pagebr * Umrech);
Hoehe->setValue(Pageho * Umrech);
RightR->setMaxValue(Breite->value() - Left * Umrech);
LeftR->setMaxValue(Breite->value() - Right * Umrech);
TopR->setMaxValue(Hoehe->value() - Bottom * Umrech);
BottomR->setMaxValue(Hoehe->value() - Top * Umrech);
TopR->setValue(Top * Umrech);
BottomR->setValue(Bottom * Umrech);
LeftR->setValue(Left * Umrech);
RightR->setValue(Right * Umrech);
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)));
401,8 → 394,7
connect(RightR, SIGNAL(valueChanged(int)), this, SLOT(setRight(int)));
connect(Breite, SIGNAL(valueChanged(int)), this, SLOT(setBreite(int)));
connect(Hoehe, SIGNAL(valueChanged(int)), this, SLOT(setHoehe(int)));
Distance->setValue(qRound(Dist * Umrech * 100));
// setSize(ComboBox1->currentItem());
Distance->setValue(Dist * Umrech);
TopR->setSuffix(ein);
BottomR->setSuffix(ein);
LeftR->setSuffix(ein);
416,8 → 408,8
{
if (ComboBox1->currentItem() == 30)
{
Pagebr = Breite->value() / 100.0 / Umrech;
Pageho = Hoehe->value() / 100.0 / Umrech;
Pagebr = Breite->value() / Umrech;
Pageho = Hoehe->value() / Umrech;
}
if (Orient == 1)
{
430,7 → 422,7
 
void NewDoc::setOrien(int ori)
{
int br;
double br;
setSize(ComboBox1->currentItem());
disconnect(Breite, SIGNAL(valueChanged(int)), this, SLOT(setBreite(int)));
disconnect(Hoehe, SIGNAL(valueChanged(int)), this, SLOT(setHoehe(int)));
469,8 → 461,8
 
void NewDoc::setSize(int gr)
{
Pagebr = Breite->value() / 100.0;
Pageho = Hoehe->value() / 100.0;
Pagebr = Breite->value();
Pageho = Hoehe->value();
disconnect(Breite, SIGNAL(valueChanged(int)), this, SLOT(setBreite(int)));
disconnect(Hoehe, SIGNAL(valueChanged(int)), this, SLOT(setHoehe(int)));
Breite->setEnabled(false);
602,8 → 594,8
Hoehe->setEnabled(true);
break;
}
Breite->setValue(qRound(Pagebr * Umrech * 100));
Hoehe->setValue(qRound(Pageho * Umrech * 100));
Breite->setValue(Pagebr * Umrech);
Hoehe->setValue(Pageho * Umrech);
RightR->setMaxValue(Breite->value() - LeftR->value());
LeftR->setMaxValue(Breite->value() - RightR->value());
TopR->setMaxValue(Hoehe->value() - BottomR->value());
/trunk/Scribus/scribus/mspinbox.h
28,6 → 28,10
public:
MSpinBox(QWidget *pa, int s);
~MSpinBox() {};
void setMaxValue(double val);
void setMinValue(double val);
void setValue(double val);
double value();
QString mapValueToText(int value);
int mapTextToValue(bool *ok);
int Decimals;
/trunk/Scribus/scribus/scribus.cpp
913,6 → 913,8
 
void ScribusApp::keyPressEvent(QKeyEvent *k)
{
QWidgetList windows;
QWidget* w;
struct Pti *hg;
int kk = k->key();
int as = k->ascii();
936,21 → 938,48
break;
default:
KeyMod = 0;
break;
}
if ((HaveDoc) && (!view->LE->hasFocus()))
{
switch (kk)
{
case Key_Prior:
view->scrollBy(0, -Prefs.Wheelval);
keyrep = false;
return;
break;
case Key_Next:
view->scrollBy(0, Prefs.Wheelval);
keyrep = false;
return;
break;
if (doc->AppMode != 7)
{
switch (kk)
{
case Key_Prior:
view->scrollBy(0, -Prefs.Wheelval);
keyrep = false;
return;
break;
case Key_Next:
view->scrollBy(0, Prefs.Wheelval);
keyrep = false;
return;
break;
case Key_Tab:
keyrep = false;
windows = wsp->windowList();
if (windows.count() > 1)
{
for (int i = 0; i < static_cast<int>(windows.count()); ++i)
{
if (wsp->activeWindow() == windows.at(i))
{
if (i == static_cast<int>(windows.count()-1))
w = windows.at(0);
else
w = windows.at(i+1);
break;
}
}
doc->OpenNodes = Tpal->buildReopenVals();
if ( w )
w->showNormal();
newActWin(w);
}
return;
break;
}
}
if (doc->ActPage->SelItem.count() != 0)
{
1754,10 → 1783,10
ReformDoc* dia = new ReformDoc(this, tpr, lr, rr, br, doc->PageB, doc->PageH, fp, fpe, doc->Einheit);
if (dia->exec())
{
tpr2 = dia->TopR->value() / UmReFaktor / 100.0;
lr2 = dia->LeftR->value() / UmReFaktor / 100.0;
rr2 = dia->RightR->value() / UmReFaktor / 100.0;
br2 = dia->BottomR->value() / UmReFaktor / 100.0;
tpr2 = dia->TopR->value() / UmReFaktor;
lr2 = dia->LeftR->value() / UmReFaktor;
rr2 = dia->RightR->value() / UmReFaktor;
br2 = dia->BottomR->value() / UmReFaktor;
fp = dia->Doppelseiten->isChecked();
if (fp)
doc->FirstPageLeft = dia->ErsteSeite->isChecked();
4884,8 → 4913,8
if (dia->exec())
{
int anz = dia->Ncopies->value();
double dH = static_cast<double>(dia->ShiftH->value()) / UmReFaktor / 100.0;
double dV = static_cast<double>(dia->ShiftV->value()) / UmReFaktor / 100.0;
double dH = dia->ShiftH->value() / UmReFaktor;
double dV = dia->ShiftV->value() / UmReFaktor;
double dH2 = dH;
double dV2 = dV;
int a;
4966,9 → 4995,9
this, SLOT(DoAlign(bool, bool, bool, bool, double, double, int, int)));
if (dia->exec())
{
xdp = static_cast<double>(dia->AHor->value()) / UmReFaktor / 100.0;
xdp = dia->AHor->value() / UmReFaktor;
xa = (dia->CheckH->isChecked() || dia->VerteilenH->isChecked());
ydp = static_cast<double>(dia->AVert->value()) / UmReFaktor/ 100.0;
ydp = dia->AVert->value() / UmReFaktor;
ya = (dia->CheckV->isChecked() || dia->VerteilenV->isChecked());
xart = dia->VartH->currentItem();
yart = dia->VartV->currentItem();
5153,11 → 5182,11
if (zChange)
slotZoomAbs(doc->Scale*Prefs.DisScale);
doc->GrabRad = dia->SpinBox3_2->value();
doc->GuideRad = dia->SpinBox2g->value() / UmReFaktor / 100;
doc->GuideRad = dia->SpinBox2g->value() / UmReFaktor;
doc->Dfont = dia->FontComb->currentText();
doc->Dsize = dia->SizeCombo->currentText().left(2).toInt() * 10;
doc->minorGrid = dia->SpinBox1->value() / UmReFaktor / 100;
doc->majorGrid = dia->SpinBox2->value() / UmReFaktor / 100;
doc->minorGrid = dia->SpinBox1->value() / UmReFaktor;
doc->majorGrid = dia->SpinBox2->value() / UmReFaktor;
doc->minorColor = dia->Cmin;
doc->majorColor = dia->Cmax;
doc->papColor = dia->Cpaper;
5197,13 → 5226,13
doc->DLineArt = DashDotDotLine;
break;
}
doc->Dwidth = dia->LineW->value()/10;
doc->Dwidth = dia->LineW->value();
doc->DpenLine = dia->Foreground2->currentText();
if (doc->DpenLine == tr("None"))
doc->DpenLine = "None";
doc->DshadeLine = dia->Shade22->value();
doc->DCols = dia->TextColVal->value();
doc->DGap = dia->TextGapVal->value() / UmReFaktor / 10;
doc->DGap = dia->TextGapVal->value() / UmReFaktor;
switch (dia->Linestyle2->currentItem())
{
case 0:
5222,7 → 5251,7
doc->DLstyleLine = DashDotDotLine;
break;
}
doc->DwidthLine = dia->LineW2->value()/10;
doc->DwidthLine = dia->LineW2->value();
doc->MagMin = dia->MinMag->value();
doc->MagMax = dia->MaxMag->value();
doc->MagStep = dia->StepMag->value();
5230,8 → 5259,8
if (doc->DbrushPict == tr("None"))
doc->DbrushPict = "None";
doc->ShadePict = dia->ShadeP->value();
doc->ScaleX = static_cast<double>(dia->XScale->value()) / 100;
doc->ScaleY = static_cast<double>(dia->YScale->value()) / 100;
doc->ScaleX = dia->XScale->value();
doc->ScaleY = dia->YScale->value();
doc->ScaleType = dia->FreeScale->isChecked();
doc->AspectRatio = dia->Aspect->isChecked();
doc->Before = dia->RadioButton6->isChecked();
5267,11 → 5296,11
break;
}
Prefs.GrabRad = dia->SpinBox3_2->value();
Prefs.GuideRad = dia->SpinBox2g->value() / UmReFaktor / 100;
Prefs.GuideRad = dia->SpinBox2g->value() / UmReFaktor;
Prefs.DefFont = dia->FontComb->currentText();
Prefs.DefSize = dia->SizeCombo->currentText().left(2).toInt() * 10;
Prefs.DminGrid = dia->SpinBox1->value() / UmReFaktor / 100;
Prefs.DmajGrid = dia->SpinBox2->value() / UmReFaktor / 100;
Prefs.DminGrid = dia->SpinBox1->value() / UmReFaktor;
Prefs.DmajGrid = dia->SpinBox2->value() / UmReFaktor;
Prefs.DminColor = dia->Cmin;
Prefs.DmajColor = dia->Cmax;
Prefs.DpapColor = dia->Cpaper;
5289,7 → 5318,7
if (Prefs.DpenText == tr("None"))
Prefs.DpenText = "None";
Prefs.DCols = dia->TextColVal->value();
Prefs.DGap = dia->TextGapVal->value() / UmReFaktor / 10;
Prefs.DGap = dia->TextGapVal->value() / UmReFaktor;
Prefs.Dbrush = dia->Background->currentText();
if (Prefs.Dbrush == tr("None"))
Prefs.Dbrush = "None";
5313,7 → 5342,7
Prefs.DLineArt = DashDotDotLine;
break;
}
Prefs.Dwidth = dia->LineW->value()/10;
Prefs.Dwidth = dia->LineW->value();
Prefs.DpenLine = dia->Foreground2->currentText();
if (Prefs.DpenLine == tr("None"))
Prefs.DpenLine = "None";
5336,7 → 5365,7
Prefs.DLstyleLine = DashDotDotLine;
break;
}
Prefs.DwidthLine = dia->LineW2->value()/10;
Prefs.DwidthLine = dia->LineW2->value();
Prefs.MagMin = dia->MinMag->value();
Prefs.MagMax = dia->MaxMag->value();
Prefs.MagStep = dia->StepMag->value();
5344,8 → 5373,8
if (Prefs.DbrushPict == tr("None"))
Prefs.DbrushPict = "None";
Prefs.ShadePict = dia->ShadeP->value();
Prefs.ScaleX = static_cast<double>(dia->XScale->value()) / 100;
Prefs.ScaleY = static_cast<double>(dia->YScale->value()) / 100;
Prefs.ScaleX = dia->XScale->value();
Prefs.ScaleY = dia->YScale->value();
Prefs.ScaleType = dia->FreeScale->isChecked();
Prefs.AspectRatio = dia->Aspect->isChecked();
Prefs.Before = dia->RadioButton6->isChecked();
5678,10 → 5707,10
Components = 3;
cmsCloseProfile(hIn);
doc->PDF_Optionen.Info = dia->InfoString->text();
doc->PDF_Optionen.BleedTop = static_cast<double>(dia->BleedTop->value())/UmReFaktor/100.0;
doc->PDF_Optionen.BleedLeft = static_cast<double>(dia->BleedLeft->value())/UmReFaktor/100.0;
doc->PDF_Optionen.BleedRight = static_cast<double>(dia->BleedRight->value())/UmReFaktor/100.0;
doc->PDF_Optionen.BleedBottom = static_cast<double>(dia->BleedBottom->value())/UmReFaktor/100.0;
doc->PDF_Optionen.BleedTop = dia->BleedTop->value()/UmReFaktor;
doc->PDF_Optionen.BleedLeft = dia->BleedLeft->value()/UmReFaktor;
doc->PDF_Optionen.BleedRight = dia->BleedRight->value()/UmReFaktor;
doc->PDF_Optionen.BleedBottom = dia->BleedBottom->value()/UmReFaktor;
doc->PDF_Optionen.Encrypt = false;
doc->PDF_Optionen.PresentMode = false;
doc->PDF_Optionen.Encrypt = false;
/trunk/Scribus/scribus/libprefs/prefs.cpp
306,7 → 306,7
Breite = new MSpinBox( GroupSize, 2 );
Breite->setEnabled( false );
Breite->setMinimumSize( QSize( 70, 20 ) );
Breite->setMaxValue( 1000000 );
Breite->setMaxValue( 10000 );
Breite->setMinValue( 1 );
Layout5_2->addWidget( Breite );
 
317,14 → 317,12
Hoehe = new MSpinBox( GroupSize, 2 );
Hoehe->setEnabled( false );
Hoehe->setMinimumSize( QSize( 70, 20 ) );
Hoehe->setMaxValue( 1000000 );
Hoehe->setMaxValue( 10000 );
Hoehe->setMinValue( 1 );
Layout5_2->addWidget( Hoehe );
GroupSizeLayout->addLayout( Layout5_2 );
Breite->setValue(qRound(Vor->PageBreite * Umrech) * 100);
Hoehe->setValue(qRound(Vor->PageHoehe * Umrech) * 100);
Breite->setLineStep(100);
Hoehe->setLineStep(100);
Breite->setValue(Vor->PageBreite * Umrech);
Hoehe->setValue(Vor->PageHoehe * Umrech);
 
Layout8 = new QHBoxLayout( 0, 0, 6, "Layout8");
 
352,38 → 350,32
 
TopR = new MSpinBox( GroupRand, 2 );
TopR->setMinimumSize( QSize( 70, 20 ) );
TopR->setMaxValue( 100000 );
TopR->setMaxValue( 1000 );
TopR->setMinValue( 0 );
TopR->setValue( qRound(Vor->RandOben * Umrech * 100));
TopR->setValue(Vor->RandOben * Umrech);
RandT = Vor->RandOben;
GroupRandLayout->addWidget( TopR, 0, 1 );
BottomR = new MSpinBox( GroupRand, 2 );
BottomR->setMinimumSize( QSize( 70, 20 ) );
BottomR->setMaxValue( 100000 );
BottomR->setMaxValue( 1000 );
BottomR->setMinValue( 0 );
BottomR->setValue( qRound(Vor->RandUnten * Umrech * 100));
BottomR->setValue(Vor->RandUnten * Umrech);
RandB = Vor->RandUnten;
GroupRandLayout->addWidget( BottomR, 1, 1 );
RightR = new MSpinBox( GroupRand, 2 );
RightR->setMinimumSize( QSize( 70, 20 ) );
RightR->setMaxValue( 100000 );
RightR->setMaxValue( 1000 );
RightR->setMinValue( 0 );
RightR->setValue( qRound(Vor->RandRechts * Umrech * 100));
RightR->setValue(Vor->RandRechts * Umrech);
RandR = Vor->RandRechts;
GroupRandLayout->addWidget( RightR, 1, 3 );
LeftR = new MSpinBox( GroupRand, 2 );
LeftR->setMinimumSize( QSize( 70, 20 ) );
LeftR->setMaxValue( 100000 );
LeftR->setMaxValue( 1000 );
LeftR->setMinValue( 0 );
LeftR->setValue( qRound(Vor->RandLinks * Umrech * 100));
LeftR->setValue(Vor->RandLinks * Umrech);
RandL = Vor->RandLinks;
GroupRandLayout->addWidget( LeftR, 0, 3 );
Breite->setLineStep(100);
Hoehe->setLineStep(100);
TopR->setLineStep(100);
LeftR->setLineStep(100);
RightR->setLineStep(100);
BottomR->setLineStep(100);
 
GRText2 = new QLabel( GroupRand, "GRText2" );
GRText2->setText( tr( "Bottom:" ) );
453,14 → 445,12
TextLabel2->setText( tr( "Major Grid Spacing:" ) );
Layout10->addWidget( TextLabel2, 1, 0 );
SpinBox1 = new MSpinBox( GroupBox1, 2 );
SpinBox1->setMaxValue( 100000 );
SpinBox1->setMaxValue( 1000 );
SpinBox1->setMinValue( 1 );
Layout10->addWidget( SpinBox1, 0, 1 );
SpinBox2 = new MSpinBox( GroupBox1, 2 );
SpinBox2->setMaxValue( 100000 );
SpinBox2->setMaxValue( 1000 );
SpinBox2->setMinValue( 10 );
SpinBox1->setLineStep(100);
SpinBox2->setLineStep(100);
Layout10->addWidget( SpinBox2, 1, 1 );
TextLabel2g = new QLabel( GroupBox1, "TextLabel2" );
TextLabel2g->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1, TextLabel2->sizePolicy().hasHeightForWidth() ) );
467,21 → 457,20
TextLabel2g->setText( tr( "Guide Snap Distance:" ) );
Layout10->addWidget( TextLabel2g, 2, 0 );
SpinBox2g = new MSpinBox( GroupBox1, 2 );
SpinBox2g->setMaxValue( 100000 );
SpinBox2g->setMaxValue( 1000 );
SpinBox2g->setMinValue( 1 );
SpinBox2g->setLineStep(100);
Layout10->addWidget( SpinBox2g, 2, 1 );
if (ap->HaveDoc)
{
SpinBox2->setValue( qRound(ap->doc->majorGrid * Umrech * 100));
SpinBox1->setValue( qRound(ap->doc->minorGrid * Umrech * 100));
SpinBox2g->setValue( qRound(ap->doc->GuideRad * Umrech * 100));
SpinBox2->setValue(ap->doc->majorGrid * Umrech);
SpinBox1->setValue(ap->doc->minorGrid * Umrech);
SpinBox2g->setValue(ap->doc->GuideRad * Umrech);
}
else
{
SpinBox2->setValue( qRound(Vor->DmajGrid * Umrech * 100));
SpinBox1->setValue( qRound(Vor->DminGrid * Umrech * 100));
SpinBox2g->setValue( qRound(Vor->GuideRad * Umrech * 100));
SpinBox2->setValue(Vor->DmajGrid * Umrech);
SpinBox1->setValue(Vor->DminGrid * Umrech);
SpinBox2g->setValue(Vor->GuideRad * Umrech);
}
GroupBox1Layout->addLayout( Layout10 );
tabLayout_2->addWidget( GroupBox1, 0, 0 );
881,7 → 870,7
TextGapVal->setSuffix( tr( " pt" ) );
TextGapVal->setMaxValue( 200 );
TextGapVal->setMinValue( 0 );
TextGapVal->setValue(ap->HaveDoc ? static_cast<int>(ap->doc->DGap*10) : static_cast<int>(Vor->DGap*10));
TextGapVal->setValue(ap->HaveDoc ? ap->doc->DGap : Vor->DGap);
Layout15a->addWidget( TextGapVal, 4, 1 );
TextLabel1_4 = new QLabel( ToolFrame, "TextLabel1_4" );
TextLabel1_4->setMinimumSize(QSize(260, 70));
1001,10 → 990,9
Layout15b->addWidget(Linestyle, 4, 1);
LineW = new MSpinBox( ToolFrame2, 1 );
LineW->setSuffix( tr( " pt" ) );
LineW->setMaxValue( 200 );
LineW->setMaxValue( 36 );
LineW->setMinValue( 0 );
LineW->setLineStep(10);
LineW->setValue(ap->HaveDoc ? static_cast<int>(ap->doc->Dwidth*10) : static_cast<int>(Vor->Dwidth*10));
LineW->setValue(ap->HaveDoc ? ap->doc->Dwidth : Vor->Dwidth);
Layout15b->addWidget(LineW, 5, 1);
QSpacerItem* sp07 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
ToolFrame2Layout->addItem( sp07 );
1086,10 → 1074,9
Layout15c->addWidget(Linestyle2, 2, 1);
LineW2 = new MSpinBox( ToolFrame3, 1 );
LineW2->setSuffix( tr( " pts" ) );
LineW2->setMaxValue( 200 );
LineW2->setMaxValue( 36 );
LineW2->setMinValue( 1 );
LineW2->setLineStep(10);
LineW2->setValue(ap->HaveDoc ? static_cast<int>(ap->doc->DwidthLine*10) : static_cast<int>(Vor->DwidthLine*10) );
LineW2->setValue(ap->HaveDoc ? ap->doc->DwidthLine : Vor->DwidthLine);
Layout15c->addWidget(LineW2, 3, 1);
QSpacerItem* sp05 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
ToolFrame3Layout->addItem( sp05 );
1702,9 → 1689,9
\param v Width value
\retval None
*/
void Preferences::setBreite(int v)
void Preferences::setBreite(int)
{
Pagebr = v / Umrech / 100.0;
Pagebr = Breite->value() / Umrech;
RightR->setMaxValue(Breite->value() - LeftR->value());
LeftR->setMaxValue(Breite->value() - RightR->value());
TopR->setMaxValue(Hoehe->value() - BottomR->value());
1719,9 → 1706,9
\param v Height value
\retval None
*/
void Preferences::setHoehe(int v)
void Preferences::setHoehe(int)
{
Pageho = v / Umrech / 100.0;
Pageho = Hoehe->value() / Umrech;
RightR->setMaxValue(Breite->value() - LeftR->value());
LeftR->setMaxValue(Breite->value() - RightR->value());
TopR->setMaxValue(Hoehe->value() - BottomR->value());
1736,9 → 1723,9
\param v Top value
\retval None
*/
void Preferences::setTop(int v)
void Preferences::setTop(int)
{
RandT = v / Umrech / 100.0;
RandT = TopR->value() / Umrech;
BottomR->setMaxValue(Hoehe->value() - TopR->value());
}
 
1750,9 → 1737,9
\param v Bottom value
\retval None
*/
void Preferences::setBottom(int v)
void Preferences::setBottom(int)
{
RandB = v / Umrech / 100.0;
RandB = BottomR->value() / Umrech;
TopR->setMaxValue(Hoehe->value() - BottomR->value());
}
 
1764,9 → 1751,9
\param v Top value
\retval None
*/
void Preferences::setLeft(int v)
void Preferences::setLeft(int)
{
RandL = v / Umrech / 100.0;
RandL = LeftR->value() / Umrech;
RightR->setMaxValue(Breite->value() - LeftR->value());
}
 
1778,9 → 1765,9
\param v Right value
\retval None
*/
void Preferences::setRight(int v)
void Preferences::setRight(int)
{
RandR = v / Umrech / 100.0;
RandR = RightR->value() / Umrech;
LeftR->setMaxValue(Breite->value() - RightR->value());
}
 
1794,8 → 1781,8
*/
void Preferences::setSize(int gr)
{
Pagebr = Breite->value() / 100.0;
Pageho = Hoehe->value() / 100.0;
Pagebr = Breite->value();
Pageho = Hoehe->value();
Breite->setEnabled(false);
Hoehe->setEnabled(false);
switch (gr)
1927,8 → 1914,8
}
disconnect(Breite, SIGNAL(valueChanged(int)), this, SLOT(setBreite(int)));
disconnect(Hoehe, SIGNAL(valueChanged(int)), this, SLOT(setHoehe(int)));
Breite->setValue(qRound(Pagebr * Umrech * 100));
Hoehe->setValue(qRound(Pageho * Umrech * 100));
Breite->setValue(Pagebr * Umrech);
Hoehe->setValue(Pageho * Umrech);
RightR->setMaxValue(Breite->value() - LeftR->value());
LeftR->setMaxValue(Breite->value() - RightR->value());
TopR->setMaxValue(Hoehe->value() - BottomR->value());
1947,7 → 1934,7
*/
void Preferences::setOrien(int ori)
{
int br;
double br;
setSize(GZComboF->currentItem());
disconnect(Breite, SIGNAL(valueChanged(int)), this, SLOT(setBreite(int)));
disconnect(Hoehe, SIGNAL(valueChanged(int)), this, SLOT(setHoehe(int)));
2228,18 → 2215,18
SpinBox2->setValue(qRound(SpinBox2->value() / AltUmrech * Umrech));
SpinBox2g->setValue(qRound(SpinBox2g->value() / AltUmrech * Umrech));
TextGapVal->setValue(qRound(TextGapVal->value() / AltUmrech * Umrech));
Breite->setValue(qRound(Pagebr * Umrech * 100));
Hoehe->setValue(qRound(Pageho * Umrech * 100));
Breite->setValue(Pagebr * Umrech);
Hoehe->setValue(Pageho * Umrech);
 
RightR->setMaxValue(Breite->value() - qRound(RandL * Umrech * 100));
LeftR->setMaxValue(Breite->value() - qRound(RandR * Umrech * 100));
TopR->setMaxValue(Hoehe->value() - qRound(RandB * Umrech * 100));
BottomR->setMaxValue(Hoehe->value() - qRound(RandT * Umrech * 100));
RightR->setMaxValue(Breite->value() - RandL * Umrech);
LeftR->setMaxValue(Breite->value() - RandR * Umrech);
TopR->setMaxValue(Hoehe->value() - RandB * Umrech);
BottomR->setMaxValue(Hoehe->value() - RandT * Umrech);
 
TopR->setValue(qRound(RandT * Umrech * 100));
BottomR->setValue(qRound(RandB * Umrech * 100));
LeftR->setValue(qRound(RandL * Umrech * 100));
RightR->setValue(qRound(RandR * Umrech * 100));
TopR->setValue(RandT * Umrech);
BottomR->setValue(RandB * Umrech);
LeftR->setValue(RandL * Umrech);
RightR->setValue(RandR * Umrech);
DrawRuler();
connect(Breite, SIGNAL(valueChanged(int)), this, SLOT(setBreite(int)));
connect(Hoehe, SIGNAL(valueChanged(int)), this, SLOT(setHoehe(int)));
/trunk/Scribus/scribus/pageback.cpp
19,10 → 19,27
#include <qpainter.h>
#include <qcolor.h>
 
/*!
\fn PageBack::PageBack(QWidget *pa)
\author Franz Schmid
\date
\brief Constructor
\param pa Parent Window
\retval None
*/
 
PageBack::PageBack(QWidget *pa) : QWidget(pa, "s", WRepaintNoErase)
{
}
 
/*!
\fn void PageBack::paintEvent(QPaintEvent *)
\author Franz Schmid
\date
\brief Receives QPaintEvents for PageBack and draws background.
\param QPaintEvent QPaintEvent pointer
\retval None
*/
void PageBack::paintEvent(QPaintEvent *)
{
QPainter p;
/trunk/Scribus/scribus/mspinbox.cpp
19,6 → 19,16
#include <qapplication.h>
#include "fparser.h"
 
/*!
\fn MSpinBox(QWidget *pa, int s)
\author Franz Schmid
\date
\brief Constructor
\param pa Parent Widget
\param s Number of Decimals
\retval None
*/
 
MSpinBox::MSpinBox(QWidget *pa, int s):QSpinBox(pa)
{
switch (s)
50,6 → 60,7
}
setValidator(0);
ed = editor();
QSpinBox::setLineStep(Decimals);
}
 
bool MSpinBox::eventFilter( QObject* ob, QEvent* ev )
82,13 → 93,20
 
QString MSpinBox::mapValueToText(int value)
{
// double dez = Width == 1 ? 10.0 : 100.0;
return QString::number(static_cast<double>(value) / Decimals, 'f', Width);
}
 
/*!
\fn MSpinBox::mapTextToValue(bool *)
\author Franz Schmid
\date
\brief Maps the Text fo the Spinbox to the Value, does Unit Conversion and Calculations
\param None
\retval The Value
*/
 
int MSpinBox::mapTextToValue(bool *)
{
// double dez = Width == 1 ? 10.0 : 100.0;
FunctionParser fp;
QString ts = text();
QString su = suffix();
135,7 → 153,7
void MSpinBox::setDecimals(int deci)
{
Decimals = deci;
setLineStep(Decimals);
QSpinBox::setLineStep(Decimals);
if (deci < 10)
Width = 0;
if (deci > 9 && deci < 100)
147,3 → 165,59
if (deci > 9999)
Width = 4;
}
 
/*!
\fn MSpinBox::setMaxValue()
\author Franz Schmid
\date
\brief Sets the Maximum Value of the Spinbox
\param val new Value
\retval None
*/
 
void MSpinBox::setMaxValue(double val)
{
QSpinBox::setMaxValue(qRound(val*Decimals));
}
 
/*!
\fn MSpinBox::setMinValue()
\author Franz Schmid
\date
\brief Sets the Minimum Value of the Spinbox
\param val new Value
\retval None
*/
 
void MSpinBox::setMinValue(double val)
{
QSpinBox::setMinValue(qRound(val*Decimals));
}
 
/*!
\fn MSpinBox::setValue()
\author Franz Schmid
\date
\brief Sets the Value of the Spinbox
\param val new Value
\retval None
*/
 
void MSpinBox::setValue(double val)
{
QSpinBox::setValue(qRound(val*Decimals));
}
 
/*!
\fn MSpinBox::value()
\author Franz Schmid
\date
\brief Returns the current Value of the SpinBox
\param None
\retval The Value
*/
 
double MSpinBox::value()
{
return static_cast<double>(QSpinBox::value()) / Decimals;
}
/trunk/Scribus/scribus/multiline.cpp
94,8 → 94,7
 
LWidth = new MSpinBox( Properties, 1 );
LWidth->setSuffix( tr( " pt" ) );
LWidth->setDecimals(10);
LWidth->setMaxValue( 360 );
LWidth->setMaxValue( 36 );
LWidth->setMinValue( 1 );
layout1->addWidget( LWidth );
PropertiesLayout->addLayout( layout1 );
446,7 → 445,7
 
void MultiLine::NewLWidth()
{
TempVorl[CurLin].Width = static_cast<double>(LWidth->value()) / 10.0;
TempVorl[CurLin].Width = LWidth->value();
reSort();
updatePreview();
}
469,7 → 468,7
disconnect(Shade, SIGNAL(valueChanged(int)), this, SLOT(NewLShade()));
Styles->setSelected(i, true);
CurLin = i;
LWidth->setValue(qRound(TempVorl[i].Width*10));
LWidth->setValue(TempVorl[i].Width);
Color->setCurrentText(TempVorl[i].Color);
Shade->setValue(TempVorl[i].Shade);
switch (static_cast<PenStyle>(TempVorl[i].Dash))
/trunk/Scribus/scribus/mdup.cpp
27,16 → 27,14
Ncopies->setValue(1);
Layout4->addWidget( Ncopies, 0, 1 );
ShiftV = new MSpinBox( this, 2 );
ShiftV->setMaxValue( 100000 );
ShiftV->setMinValue( -100000 );
ShiftV->setValue(qRound(Dy * 100));
ShiftV->setLineStep(100);
ShiftV->setMaxValue( 1000 );
ShiftV->setMinValue( -1000 );
ShiftV->setValue(Dy);
Layout4->addWidget( ShiftV, 2, 1 );
ShiftH = new MSpinBox( this, 2 );
ShiftH->setMaxValue( 100000 );
ShiftH->setMinValue( -100000 );
ShiftH->setValue(qRound(Dx * 100));
ShiftH->setLineStep(100);
ShiftH->setMaxValue( 1000 );
ShiftH->setMinValue( -1000 );
ShiftH->setValue(Dx);
Layout4->addWidget( ShiftH, 1, 1 );
switch (Ein)
{
/trunk/Scribus/scribus/reformdoc.cpp
23,8 → 23,8
ein = " p";
break;
}
Breite = qRound(Pagebr * UmReFaktor * 100);
Hoehe = qRound(Pageho * UmReFaktor * 100);
Breite = Pagebr * UmReFaktor;
Hoehe = Pageho * UmReFaktor;
setCaption( tr( "Document Setup" ) );
setIcon(loadIcon("AppIcon.png"));
ReformDocLayout = new QVBoxLayout( this );
48,7 → 48,7
TopR = new MSpinBox( GroupBox7, 2 );
TopR->setSuffix( ein );
TopR->setMaxValue(Hoehe);
TopR->setValue( qRound(t * UmReFaktor * 100) );
TopR->setValue(t * UmReFaktor);
Layout4->addWidget( TopR, 0, 1 );
Links = new QLabel( GroupBox7, "Links" );
Links->setText( tr( "Left:" ) );
56,7 → 56,7
LeftR = new MSpinBox( GroupBox7, 2 );
LeftR->setSuffix( ein );
LeftR->setMaxValue(Breite);
LeftR->setValue( qRound(l * UmReFaktor * 100) );
LeftR->setValue(l * UmReFaktor);
Layout4->addWidget( LeftR, 0, 3 );
TextLabel7 = new QLabel( GroupBox7, "TextLabel7" );
TextLabel7->setText( tr( "Bottom:" ) );
64,7 → 64,7
BottomR = new MSpinBox( GroupBox7, 2 );
BottomR->setSuffix( ein );
BottomR->setMaxValue(Hoehe);
BottomR->setValue( qRound(b * UmReFaktor * 100) );
BottomR->setValue(b * UmReFaktor);
Layout4->addWidget( BottomR, 1, 1 );
Rechts = new QLabel( GroupBox7, "Rechts" );
Rechts->setText( tr( "Right:" ) );
72,7 → 72,7
RightR = new MSpinBox( GroupBox7, 2 );
RightR->setSuffix( ein );
RightR->setMaxValue(Breite);
RightR->setValue( qRound(r * UmReFaktor * 100) );
RightR->setValue(r * UmReFaktor);
Layout4->addWidget( RightR, 1, 3 );
Doppelseiten = new QCheckBox( GroupBox7, "Doppelseiten" );
Doppelseiten->setText( tr( "Facing Pages" ) );
101,10 → 101,6
CancelB->setAutoDefault( false );
Layout3->addWidget( CancelB );
ReformDocLayout->addLayout( Layout3 );
TopR->setDecimals(100);
LeftR->setDecimals(100);
RightR->setDecimals(100);
BottomR->setDecimals(100);
RightR->setMaxValue(Breite - LeftR->value());
LeftR->setMaxValue(Breite - RightR->value());
TopR->setMaxValue(Hoehe - BottomR->value());
/trunk/Scribus/scribus/frameedit.cpp
152,17 → 152,15
TextLabel1->setText( tr( "X-Pos:" ) );
Layout2->addWidget( TextLabel1, 0, 0 );
YSpin = new MSpinBox( this, 2 );
YSpin->setMaxValue(300000);
YSpin->setMaxValue(3000);
YSpin->setEnabled(false);
YSpin->setLineStep(100);
Layout2->addWidget( YSpin, 1, 1 );
TextLabel2 = new QLabel( this, "TextLabel2" );
TextLabel2->setText( tr( "Y-Pos:" ) );
Layout2->addWidget( TextLabel2, 1, 0 );
XSpin = new MSpinBox( this, 2 );
XSpin->setMaxValue(300000);
XSpin->setMaxValue(3000);
XSpin->setEnabled(false);
XSpin->setLineStep(100);
Layout2->addWidget( XSpin, 0, 1 );
NodePaletteLayout->addLayout( Layout2 );
 
365,7 → 363,7
{
if (doc->EditClipMode == 0)
{
FPoint np = FPoint(XSpin->value()/UmReFaktor/100.0, YSpin->value()/UmReFaktor/100.0);
FPoint np = FPoint(XSpin->value()/UmReFaktor, YSpin->value()/UmReFaktor);
FPoint zp = FPoint(doc->ActPage->SelItem.at(0)->Xpos, doc->ActPage->SelItem.at(0)->Ypos);
if (AbsMode->isChecked())
np -= zp;
390,8 → 388,8
disconnect(YSpin, SIGNAL(valueChanged(int)), this, SLOT(MovePoint()));
if (AbsMode->isChecked())
zp = FPoint(doc->ActPage->SelItem.at(0)->Xpos, doc->ActPage->SelItem.at(0)->Ypos);
XSpin->setValue(qRound((x + zp.x())*UmReFaktor*100));
YSpin->setValue(qRound((y + zp.y())*UmReFaktor*100));
XSpin->setValue((x + zp.x())*UmReFaktor);
YSpin->setValue((y + zp.y())*UmReFaktor);
connect(XSpin, SIGNAL(valueChanged(int)), this, SLOT(MovePoint()));
connect(YSpin, SIGNAL(valueChanged(int)), this, SLOT(MovePoint()));
}
401,13 → 399,13
FPoint zp = FPoint(doc->ActPage->SelItem.at(0)->Xpos, doc->ActPage->SelItem.at(0)->Ypos);
disconnect(XSpin, SIGNAL(valueChanged(int)), this, SLOT(MovePoint()));
disconnect(YSpin, SIGNAL(valueChanged(int)), this, SLOT(MovePoint()));
FPoint np = FPoint(XSpin->value()/UmReFaktor/100.0, YSpin->value()/UmReFaktor/100.0);
FPoint np = FPoint(XSpin->value()/UmReFaktor, YSpin->value()/UmReFaktor);
if (AbsMode->isChecked())
np += zp;
else
np -= zp;
XSpin->setValue(qRound(np.x()*UmReFaktor*100));
YSpin->setValue(qRound(np.y()*UmReFaktor*100));
XSpin->setValue(np.x()*UmReFaktor);
YSpin->setValue(np.y()*UmReFaktor);
connect(XSpin, SIGNAL(valueChanged(int)), this, SLOT(MovePoint()));
connect(YSpin, SIGNAL(valueChanged(int)), this, SLOT(MovePoint()));
}
/trunk/Scribus/scribus/tabmanager.cpp
55,7 → 55,7
 
Position = new MSpinBox( this, 1 );
Position->setSuffix( tr( " pt" ) );
Position->setMaxValue( 3000000 );
Position->setMaxValue( 30000 );
Position->setMinValue( 0 );
Position->setValue(0);
Position->setEnabled(false);
132,7 → 132,7
DelButton->setEnabled(true);
Position->setEnabled(true);
Align->setEnabled(true);
Position->setValue(qRound(tmpTab[selTab+1] * UmReFaktor * Position->Decimals));
Position->setValue(tmpTab[selTab+1] * UmReFaktor);
Align->setCurrentItem(static_cast<int>(tmpTab[selTab]));
connect(Position, SIGNAL(valueChanged(int)), this, SLOT(PValChange()));
connect(Align, SIGNAL(activated(int)), this, SLOT(ChangeType()));
140,7 → 140,7
 
void TabManager::PValChange()
{
double CurX = static_cast<double>(Position->value() / UmReFaktor / Position->Decimals);
double CurX = Position->value() / UmReFaktor;
int gg = static_cast<int>(tmpTab.count()-1);
int g = gg;
double type = tmpTab[selTab];
192,7 → 192,7
}
Position->setSuffix(ein);
if (!tmpTab.isEmpty() || (selTab != -1))
Position->setValue(qRound(tmpTab[selTab+1] * UmReFaktor * Position->Decimals));
Position->setValue(tmpTab[selTab+1] * UmReFaktor);
else
Position->setValue(0);
}
229,7 → 229,7
{
Position->setEnabled(true);
Align->setEnabled(true);
Position->setValue(qRound(tmpTab[selTab+1] * UmReFaktor * Position->Decimals));
Position->setValue(tmpTab[selTab+1] * UmReFaktor);
Align->setCurrentItem(static_cast<int>(tmpTab[selTab]));
TabList->setCurrentItem(selTab / 2);
}