Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 519 → Rev 518

/branches/Version13x/Scribus/scribus/scribusXml.cpp
1036,7 → 1036,6
doc->PageM.Top=QStodouble(dc.attribute("BORDERTOP"));
doc->PageM.Bottom=QStodouble(dc.attribute("BORDERBOTTOM"));
doc->PageOri = QStoInt(dc.attribute("ORIENTATION","0"));
doc->PageSize = dc.attribute("PAGESIZE");
doc->FirstPnum = QStoInt(dc.attribute("FIRSTNUM","1"));
doc->PageFP=QStoInt(dc.attribute("BOOK", "0"));
doc->FirstPageLeft=QStoInt(dc.attribute("FIRSTLEFT","0"));
2361,7 → 2360,6
QDomElement dc=docu.createElement("DOCUMENT");
dc.setAttribute("ANZPAGES",doc->DocPages.count());
dc.setAttribute("ORIENTATION",doc->PageOri);
dc.setAttribute("PAGESIZE",doc->PageSize);
dc.setAttribute("FIRSTNUM",doc->FirstPnum);
if(doc->PageFP)
dc.setAttribute("BOOK",1);
/branches/Version13x/Scribus/scribus/scribus.cpp
2047,8 → 2047,6
{
double b, h, tpr, lr, rr, br, sp, ab;
bool fp, atf, ret;
int ori;
QString pagesize;
NewDoc* dia = new NewDoc(this, &Prefs);
if (dia->exec())
{
2062,10 → 2060,8
sp = dia->SpinBox10->value();
atf = dia->AutoFrame->isChecked();
fp = dia->Doppelseiten->isChecked();
ori = dia->Orient;
pagesize = dia->ComboBox1->currentText();
ret = doFileNew(b, h, tpr, lr, rr, br, ab, sp, atf, fp, dia->ComboBox3->currentItem(),
dia->ErsteSeite->isChecked(), ori, dia->PgNr->value(), pagesize);
dia->ErsteSeite->isChecked(), dia->Orient, dia->PgNr->value());
FMess->setText( tr("Ready"));
}
else
2075,7 → 2071,7
}
 
bool ScribusApp::doFileNew(double b, double h, double tpr, double lr, double rr, double br, double ab, double sp,
bool atf, bool fp, int einh, bool firstleft, int Ori, int SNr, QString PageSize)
bool atf, bool fp, int einh, bool firstleft, int Ori, int SNr)
{
QString cc;
if (HaveDoc)
2085,7 → 2081,6
if (fp)
doc->FirstPageLeft = firstleft;
doc->PageOri = Ori;
doc->PageSize = PageSize;
doc->FirstPnum = SNr;
doc->AllFonts = &Prefs.AvailFonts;
doc->AddFont(Prefs.DefFont, Prefs.AvailFonts[Prefs.DefFont]->Font);
2362,7 → 2357,7
bool fpe = doc->FirstPageLeft;
double tpr2, lr2, rr2, br2;
bool ret = false;
ReformDoc* dia = new ReformDoc(this, tpr, lr, rr, br, doc->PageB, doc->PageH, fp, fpe, doc->Einheit, doc->PageOri, doc->PageSize);
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;
/branches/Version13x/Scribus/scribus/scribus.h
111,7 → 111,7
void SetShortCut();
void SetKeyEntry(int Nr, QString text, int Men, int KeyC);
bool doFileNew(double b, double h, double tpr, double lr, double rr, double br, double ab, double sp,
bool atf, bool fp, int einh, bool firstleft, int Ori, int SNr, QString pagesize);
bool atf, bool fp, int einh, bool firstleft, int Ori, int SNr);
bool DoFileSave(QString fn);
void closeEvent(QCloseEvent *ce);
void keyPressEvent(QKeyEvent *k);
/branches/Version13x/Scribus/scribus/plugins/scriptplugin/cmddoc.cpp
27,7 → 27,7
lr = ValToPts(lr, unit);
rr = ValToPts(rr, unit);
btr = ValToPts(btr, unit);
bool ret = Carrier->doFileNew(b, h, tpr, lr, rr, btr, 0, 1, false, ds, unit, fsl, ori, fNr, "Custom");
bool ret = Carrier->doFileNew(b, h, tpr, lr, rr, btr, 0, 1, false, ds, unit, fsl, ori, fNr);
// qApp->processEvents();
return PyInt_FromLong(static_cast<long>(ret));
}
/branches/Version13x/Scribus/scribus/plugins/svgimplugin/svgplugin.cpp
163,7 → 163,7
{
if (!Prog->HaveDoc)
{
Prog->doFileNew(width, height, 0, 0, 0, 0, 0, 0, false, false, 0, false, 0, 1, "Custom");
Prog->doFileNew(width, height, 0, 0, 0, 0, 0, 0, false, false, 0, false, 0, 1);
ret = true;
}
}
/branches/Version13x/Scribus/scribus/plugins/psimport/importps.cpp
198,7 → 198,7
{
if (!Prog->HaveDoc)
{
Prog->doFileNew(b-x, h-y, 0, 0, 0, 0, 0, 0, false, false, 0, false, 0, 1, "Custom");
Prog->doFileNew(b-x, h-y, 0, 0, 0, 0, 0, 0, false, false, 0, false, 0, 1);
ret = true;
}
}
/branches/Version13x/Scribus/scribus/scribusdoc.h
561,8 → 561,7
/** Flag for facing Pages */
bool PageFP;
/** Flag fuer Hoch- oder Querformat 0 = Hochformat */
int PageOri;
QString PageSize;
int PageOri;
/** Erste Seitennummer im Dokument */
int FirstPnum;
/** Flag fuer Rasterbenutzung */
/branches/Version13x/Scribus/scribus/reformdoc.cpp
4,7 → 4,7
extern QPixmap loadIcon(QString nam);
extern double UmReFaktor;
 
ReformDoc::ReformDoc( QWidget* parent, double t, double l, double r, double b, double Pagebr, double Pageho, bool fp, bool fpe, int Einh, int ori, QString pageSize)
ReformDoc::ReformDoc( QWidget* parent, double t, double l, double r, double b, double Pagebr, double Pageho, bool fp, bool fpe, int Einh)
: QDialog( parent, "r", true, 0 )
{
einheit = Einh;
12,7 → 12,6
QString ein = units[Einh];
int dp[] = {100, 1000, 10000, 100};
int decimals = dp[Einh];
int i=-1;
Breite = Pagebr * UmReFaktor;
Hoehe = Pageho * UmReFaktor;
setCaption( tr( "Document Setup" ) );
20,73 → 19,6
ReformDocLayout = new QVBoxLayout( this );
ReformDocLayout->setSpacing( 6 );
ReformDocLayout->setMargin( 10 );
 
dsGroupBox7 = new QGroupBox( this, "GroupBox7" );
dsGroupBox7->setTitle( tr( "Page Size" ) );
dsGroupBox7->setColumnLayout(0, Qt::Vertical );
dsGroupBox7->layout()->setSpacing( 0 );
dsGroupBox7->layout()->setMargin( 0 );
dsGroupBox7Layout = new QHBoxLayout( dsGroupBox7->layout() );
dsGroupBox7Layout->setAlignment( Qt::AlignTop );
dsGroupBox7Layout->setSpacing( 0 );
dsGroupBox7Layout->setMargin( 10 );
dsLayout4 = new QGridLayout;
dsLayout4->setSpacing( 6 );
dsLayout4->setMargin( 0 );
 
sizeQComboBox = new QComboBox( true, dsGroupBox7, "sizeQComboBox" );
sizeQLabel = new QLabel( sizeQComboBox, tr( "&Size:" ), dsGroupBox7, "sizeQLabel" );
QString sizelist[] = {"A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "A8", "A9", "B0", "B1", "B2", "B3", "B4",
"B5", "B6", "B7", "B8", "B9", "B10", "C5E", "Comm10E", "DLE", "Executive", "Folio",
"Ledger", tr("Legal"), tr("Letter"), tr("Tabloid"), tr("Custom")};
size_t const num_mappings = (sizeof sizelist)/(sizeof *sizelist);
for (uint m = 0; m < num_mappings; ++m) {
sizeQComboBox->insertItem(sizelist[m]);
if (sizelist[m]==pageSize)
i=m;
}
//set Custom if we dont have one already as old docs wont have this attribute
if (i==-1)
i=num_mappings-1;
sizeQComboBox->setEnabled(false);
sizeQComboBox->setCurrentItem(i);
dsLayout4->addWidget( sizeQLabel, 0, 0 );
dsLayout4->addWidget( sizeQComboBox, 0, 1 );
 
 
orientationQComboBox = new QComboBox( true, dsGroupBox7, "orientationQComboBox" );
orientationQLabel = new QLabel( orientationQComboBox, tr( "Orie&ntation:" ), dsGroupBox7, "orientationQLabel" );
orientationQComboBox->insertItem( tr( "Portrait" ) );
orientationQComboBox->insertItem( tr( "Landscape" ) );
orientationQComboBox->setEnabled(false);
orientationQComboBox->setCurrentItem(ori);
 
dsLayout4->addWidget( orientationQLabel, 0, 2 );
dsLayout4->addWidget( orientationQComboBox, 0, 3 );
 
widthMSpinBox = new MSpinBox( 1, 10000, dsGroupBox7, 2 );
widthQLabel = new QLabel( tr( "&Width:" ), dsGroupBox7, "widthLabel" );
widthMSpinBox->setEnabled( false );
widthMSpinBox->setSuffix(ein);
widthMSpinBox->setValue(Breite);
widthQLabel->setBuddy(widthMSpinBox);
dsLayout4->addWidget( widthQLabel, 1, 0 );
dsLayout4->addWidget( widthMSpinBox, 1, 1 );
 
heightMSpinBox = new MSpinBox( 1, 10000, dsGroupBox7, 2 );
heightQLabel = new QLabel( tr( "&Height:" ), dsGroupBox7, "heightLabel" );
heightMSpinBox->setEnabled( false );
heightMSpinBox->setSuffix(ein);
heightMSpinBox->setValue(Hoehe);
heightQLabel->setBuddy(heightMSpinBox);
dsLayout4->addWidget( heightQLabel, 1, 2 );
dsLayout4->addWidget( heightMSpinBox, 1, 3 );
 
dsGroupBox7Layout->addLayout( dsLayout4 );
ReformDocLayout->addWidget( dsGroupBox7 );
 
 
 
GroupBox7 = new QGroupBox( this, "GroupBox7" );
GroupBox7->setTitle( tr( "Margin Guides" ) );
GroupBox7->setColumnLayout(0, Qt::Vertical );
/branches/Version13x/Scribus/scribus/reformdoc.h
12,10 → 12,8
#include <qdialog.h>
#include <qlayout.h>
#include <qcheckbox.h>
#include <qcombobox.h>
#include <qgroupbox.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include "mspinbox.h"
 
25,11 → 23,10
 
public:
ReformDoc( QWidget* parent, double t, double l, double r, double b, double Pagebr, double Pageho,
bool fp, bool fpe, int Einh, int ori, QString pageSize );
bool fp, bool fpe, int Einh );
~ReformDoc() {};
 
QGroupBox* GroupBox7;
QGroupBox* dsGroupBox7;
QLabel* TextLabel5;
QLabel* TextLabel7;
MSpinBox* TopR;
36,18 → 33,10
MSpinBox* BottomR;
MSpinBox* LeftR;
MSpinBox* RightR;
MSpinBox* widthMSpinBox;
MSpinBox* heightMSpinBox;
QCheckBox* Doppelseiten;
QCheckBox* ErsteSeite;
QLabel* Links;
QLabel* Rechts;
QLabel* widthQLabel;
QLabel* heightQLabel;
QLabel* sizeQLabel;
QLabel* orientationQLabel;
QComboBox* sizeQComboBox;
QComboBox* orientationQComboBox;
QPushButton* OKButton;
QPushButton* CancelB;
int einheit;
56,9 → 45,7
 
protected:
QVBoxLayout* ReformDocLayout;
QHBoxLayout* dsGroupBox7Layout;
QHBoxLayout* GroupBox7Layout;
QGridLayout* dsLayout4;
QGridLayout* Layout4;
QHBoxLayout* Layout3;