Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 692 → Rev 693

/branches/Version13x/Scribus/scribus/fileloader.cpp
312,6 → 312,12
doc->BaseOffs = QStodouble(dc.attribute("BASEO", "0"));
doc->minorGrid = QStodouble(dc.attribute("MINGRID", tmp.setNum(view->Prefs->DminGrid)));
doc->majorGrid = QStodouble(dc.attribute("MAJGRID", tmp.setNum(view->Prefs->DmajGrid)));
doc->GridShown = static_cast<bool>(QStoInt(dc.attribute("SHOWGRID", "0")));
doc->GuidesShown = static_cast<bool>(QStoInt(dc.attribute("SHOWGUIDES", "1")));
doc->FramesShown = static_cast<bool>(QStoInt(dc.attribute("SHOWFRAME", "1")));
doc->MarginsShown = static_cast<bool>(QStoInt(dc.attribute("SHOWMARGIN", "1")));
doc->BaseShown = static_cast<bool>(QStoInt(dc.attribute("SHOWBASE", "0")));
doc->ShowPic = static_cast<bool>(QStoInt(dc.attribute("SHOWPICT", "1")));
QDomNode PAGE=DOC.firstChild();
counter = 0;
while(!PAGE.isNull())
/branches/Version13x/Scribus/scribus/vruler.cpp
157,7 → 157,7
pc = doku->PageC;
for (xx = 0; xx < pc; ++xx)
{
of = xx * (doku->PageH+30.0);
of = xx * (doku->PageH+doku->ScratchBottom+doku->ScratchTop);
for (xl = 0; xl < doku->PageH; xl += iter)
{
if ((qRound((xl+of)*sc) > offs) && (qRound((xl+of)*sc) < offs+height()))
/branches/Version13x/Scribus/scribus/Makefile.am
1,13 → 1,13
bin_PROGRAMS = scribus
 
scribus_SOURCES = art_kmisc.c art_render_misc.c art_render_pattern.c art_rgb.c art_rgb_affine_private.c art_rgb_svp.c art_rgba_affine.c gdk-pixbuf-xlib-drawable.c gdk-pixbuf-xlib-render.c gdk-pixbuf-xlib.c gdk-pixbuf-xlibrgb.c fileloader.cpp gradienteditor.cpp gtgettext.cpp gtdialogs.cpp gtstyle.cpp gtframestyle.cpp gtparagraphstyle.cpp gtfont.cpp gtwriter.cpp gtaction.cpp gtmeasure.cpp prefsfile.cpp prefscontext.cpp prefsreader.cpp prefstable.cpp measurements.cpp langmgr.cpp tabruler.cpp insertTable.cpp pageselector.cpp shadebutton.cpp alignselect.cpp styleselect.cpp search.cpp tabmanager.cpp fparser.cpp autoform.cpp story.cpp vgradient.cpp scpainter.cpp fontcombo.cpp scpreview.cpp lineformats.cpp multiline.cpp splash.cpp mergedoc.cpp bookpalette.cpp rc4.c md5.c cupsoptions.cpp guidemanager.cpp scribuswin.cpp hyphenator.cpp hyphen.c hyask.cpp hnjalloc.c hysettings.cpp seiten.cpp fpointarray.cpp fpoint.cpp annota.cpp buttonicon.cpp javadocs.cpp selfield.cpp editor.cpp page.cpp layers.cpp polyprops.cpp mpalette.cpp werktoolb.cpp keymanager.cpp navigator.cpp annot.cpp bookmwin.cpp cmsprefs.cpp customfdialog.cpp picsearch.cpp picstatus.cpp newtemp.cpp applytemplate.cpp muster.cpp scfonts_ttf.cpp scrap.cpp scfonts.cpp frameedit.cpp spalette.cpp edit1format.cpp editformats.cpp druck.cpp colorchart.cpp util.cpp cmykcolor.cpp cmykfw.cpp scribusXml.cpp linecombo.cpp linkbutton.cpp helpbrowser.cpp mspinbox.cpp movepage.cpp delpages.cpp inspage.cpp pdfopts.cpp tree.cpp missing.cpp fontprefs.cpp fmitem.cpp align.cpp serializer.cpp reformdoc.cpp docinfo.cpp mdup.cpp cpalette.cpp dcolor.cpp query.cpp colorm.cpp vruler.cpp hruler.cpp pageitem.cpp newfile.cpp scribusview.cpp scribusdoc.cpp scribus.cpp main.cpp
SOURCES = art_kmisc.c art_render_misc.c art_render_pattern.c art_rgb.c art_rgb_affine_private.c art_rgb_svp.c art_rgba_affine.c gdk-pixbuf-xlib-drawable.c gdk-pixbuf-xlib-render.c gdk-pixbuf-xlib.c gdk-pixbuf-xlibrgb.c fileloader.cpp gradienteditor.cpp gtgettext.cpp gtdialogs.cpp gtstyle.cpp gtframestyle.cpp gtparagraphstyle.cpp gtfont.cpp gtwriter.cpp gtaction.cpp gtmeasure.cpp measurements.cpp langmgr.cpp tabruler.cpp insertTable.cpp pageselector.cpp shadebutton.cpp alignselect.cpp styleselect.cpp search.cpp tabmanager.cpp fparser.cpp autoform.cpp story.cpp vgradient.cpp scpainter.cpp libpdf/pdflib.cpp libpostscript/pslib.cpp plugins/libchar/charselect.cpp libprefs/prefs.cpp libabout/about.cpp fontcombo.cpp scpreview.cpp lineformats.cpp multiline.cpp splash.cpp mergedoc.cpp bookpalette.cpp rc4.c md5.c cupsoptions.cpp guidemanager.cpp scribuswin.cpp hyphenator.cpp hyphen.c hyask.cpp hnjalloc.c hysettings.cpp seiten.cpp fpointarray.cpp fpoint.cpp annota.cpp buttonicon.cpp javadocs.cpp selfield.cpp editor.cpp page.cpp layers.cpp polyprops.cpp mpalette.cpp werktoolb.cpp keymanager.cpp navigator.cpp annot.cpp bookmwin.cpp cmsprefs.cpp customfdialog.cpp picsearch.cpp picstatus.cpp newtemp.cpp applytemplate.cpp muster.cpp scfonts_ttf.cpp scrap.cpp scfonts.cpp frameedit.cpp spalette.cpp edit1format.cpp editformats.cpp druck.cpp colorchart.cpp util.cpp cmykcolor.cpp cmykfw.cpp scribusXml.cpp linecombo.cpp linkbutton.cpp helpbrowser.cpp mspinbox.cpp movepage.cpp delpages.cpp inspage.cpp pdfopts.cpp tree.cpp missing.cpp fontprefs.cpp fmitem.cpp align.cpp serializer.cpp reformdoc.cpp docinfo.cpp mdup.cpp cpalette.cpp dcolor.cpp query.cpp colorm.cpp vruler.cpp hruler.cpp pageback.cpp pageitem.cpp newfile.cpp scribusview.cpp scribusdoc.cpp scribus.cpp main.cpp
scribus_SOURCES = art_kmisc.c art_render_misc.c art_render_pattern.c art_rgb.c art_rgb_affine_private.c art_rgb_svp.c art_rgba_affine.c gdk-pixbuf-xlib-drawable.c gdk-pixbuf-xlib-render.c gdk-pixbuf-xlib.c gdk-pixbuf-xlibrgb.c prefsdialogbase.cpp fileloader.cpp gradienteditor.cpp gtgettext.cpp gtdialogs.cpp gtstyle.cpp gtframestyle.cpp gtparagraphstyle.cpp gtfont.cpp gtwriter.cpp gtaction.cpp gtmeasure.cpp prefsfile.cpp prefscontext.cpp prefsreader.cpp prefstable.cpp measurements.cpp langmgr.cpp tabruler.cpp insertTable.cpp pageselector.cpp shadebutton.cpp alignselect.cpp styleselect.cpp search.cpp tabmanager.cpp fparser.cpp autoform.cpp story.cpp vgradient.cpp scpainter.cpp fontcombo.cpp scpreview.cpp lineformats.cpp multiline.cpp splash.cpp mergedoc.cpp bookpalette.cpp rc4.c md5.c cupsoptions.cpp guidemanager.cpp scribuswin.cpp hyphenator.cpp hyphen.c hyask.cpp hnjalloc.c hysettings.cpp seiten.cpp fpointarray.cpp fpoint.cpp annota.cpp buttonicon.cpp javadocs.cpp selfield.cpp editor.cpp page.cpp layers.cpp polyprops.cpp mpalette.cpp werktoolb.cpp keymanager.cpp navigator.cpp annot.cpp bookmwin.cpp cmsprefs.cpp customfdialog.cpp picsearch.cpp picstatus.cpp newtemp.cpp applytemplate.cpp muster.cpp scfonts_ttf.cpp scrap.cpp scfonts.cpp frameedit.cpp spalette.cpp edit1format.cpp editformats.cpp druck.cpp colorchart.cpp util.cpp cmykcolor.cpp cmykfw.cpp scribusXml.cpp linecombo.cpp linkbutton.cpp helpbrowser.cpp mspinbox.cpp movepage.cpp delpages.cpp inspage.cpp pdfopts.cpp tree.cpp missing.cpp fontprefs.cpp fmitem.cpp align.cpp serializer.cpp reformdoc.cpp docinfo.cpp mdup.cpp cpalette.cpp dcolor.cpp query.cpp colorm.cpp vruler.cpp hruler.cpp pageitem.cpp newfile.cpp scribusview.cpp scribusdoc.cpp scribus.cpp main.cpp
SOURCES = art_kmisc.c art_render_misc.c art_render_pattern.c art_rgb.c art_rgb_affine_private.c art_rgb_svp.c art_rgba_affine.c gdk-pixbuf-xlib-drawable.c gdk-pixbuf-xlib-render.c gdk-pixbuf-xlib.c gdk-pixbuf-xlibrgb.c prefsdialogbase.cpp fileloader.cpp gradienteditor.cpp gtgettext.cpp gtdialogs.cpp gtstyle.cpp gtframestyle.cpp gtparagraphstyle.cpp gtfont.cpp gtwriter.cpp gtaction.cpp gtmeasure.cpp measurements.cpp langmgr.cpp tabruler.cpp insertTable.cpp pageselector.cpp shadebutton.cpp alignselect.cpp styleselect.cpp search.cpp tabmanager.cpp fparser.cpp autoform.cpp story.cpp vgradient.cpp scpainter.cpp libpdf/pdflib.cpp libpostscript/pslib.cpp plugins/libchar/charselect.cpp libprefs/prefs.cpp libabout/about.cpp fontcombo.cpp scpreview.cpp lineformats.cpp multiline.cpp splash.cpp mergedoc.cpp bookpalette.cpp rc4.c md5.c cupsoptions.cpp guidemanager.cpp scribuswin.cpp hyphenator.cpp hyphen.c hyask.cpp hnjalloc.c hysettings.cpp seiten.cpp fpointarray.cpp fpoint.cpp annota.cpp buttonicon.cpp javadocs.cpp selfield.cpp editor.cpp page.cpp layers.cpp polyprops.cpp mpalette.cpp werktoolb.cpp keymanager.cpp navigator.cpp annot.cpp bookmwin.cpp cmsprefs.cpp customfdialog.cpp picsearch.cpp picstatus.cpp newtemp.cpp applytemplate.cpp muster.cpp scfonts_ttf.cpp scrap.cpp scfonts.cpp frameedit.cpp spalette.cpp edit1format.cpp editformats.cpp druck.cpp colorchart.cpp util.cpp cmykcolor.cpp cmykfw.cpp scribusXml.cpp linecombo.cpp linkbutton.cpp helpbrowser.cpp mspinbox.cpp movepage.cpp delpages.cpp inspage.cpp pdfopts.cpp tree.cpp missing.cpp fontprefs.cpp fmitem.cpp align.cpp serializer.cpp reformdoc.cpp docinfo.cpp mdup.cpp cpalette.cpp dcolor.cpp query.cpp colorm.cpp vruler.cpp hruler.cpp pageback.cpp pageitem.cpp newfile.cpp scribusview.cpp scribusdoc.cpp scribus.cpp main.cpp
INTERFACES =
TRANSLATIONS =
 
SUBDIRS = icons libabout libprefs plugins libpostscript libpdf profiles dicts templates qm doc
 
EXTRA_DIST = main.cpp scribus.cpp scribus.h scribusdoc.cpp scribusdoc.h scribusview.cpp scribusview.h newfile.h newfile.cpp pageitem.cpp pageitem.h hruler.cpp hruler.h vruler.cpp vruler.h colorm.cpp colorm.h query.cpp query.h dcolor.cpp dcolor.h cpalette.cpp cpalette.h mdup.cpp mdup.h docinfo.cpp docinfo.h reformdoc.cpp reformdoc.h serializer.cpp serializer.h align.cpp align.h fmitem.cpp fmitem.h fontprefs.cpp fontprefs.h missing.cpp missing.h tree.cpp tree.h pdfopts.cpp pdfopts.h inspage.cpp inspage.h delpages.cpp delpages.h movepage.cpp movepage.h mspinbox.cpp mspinbox.h helpbrowser.cpp helpbrowser.h icons5.h linkbutton.cpp linkbutton.h icons6.h linecombo.cpp linecombo.h scribusXml.cpp scribusXml.h cmykfw.cpp cmykfw.h cmykcolor.cpp cmykcolor.h util.cpp colorchart.cpp colorchart.h druck.cpp druck.h editformats.cpp editformats.h edit1format.cpp edit1format.h spalette.cpp spalette.h frameedit.cpp frameedit.h scfonts.cpp scfonts.h scrap.cpp scrap.h scfonts_ttf.cpp scfonts_ttf.h muster.cpp muster.h applytemplate.cpp applytemplate.h newtemp.cpp newtemp.h picstatus.cpp picstatus.h picsearch.cpp picsearch.h customfdialog.cpp customfdialog.h cmsprefs.cpp cmsprefs.h bookmwin.cpp bookmwin.h annot.cpp annot.h navigator.cpp navigator.h keymanager.cpp keymanager.h werktoolb.cpp werktoolb.h mpalette.h mpalette.cpp polyprops.cpp polyprops.h layers.cpp layers.h page.cpp page.h editor.cpp editor.h selfield.cpp selfield.h javadocs.cpp javadocs.h buttonicon.cpp buttonicon.h annota.cpp annota.h fpoint.cpp fpoint.h fpointarray.cpp fpointarray.h seiten.cpp seiten.h hysettings.cpp hysettings.h hnjalloc.c hnjalloc.h hyask.cpp hyask.h hyphen.c hyphen.h hyphenator.cpp hyphenator.h scribuswin.cpp scribuswin.h guidemanager.cpp guidemanager.h cupsoptions.cpp cupsoptions.h md5.c md5.h rc4.c rc4.h mergedoc.cpp mergedoc.h bookpalette.cpp bookpalette.h splash.h fontcombo.h scpainter.cpp scpainter.h vgradient.cpp vgradient.h story.cpp story.h autoform.cpp autoform.h fparser.cpp fparser.h tabmanager.cpp tabmanager.h search.cpp search.h styleselect.cpp styleselect.h alignselect.cpp alignselect.h shadebutton.cpp shadebutton.h pageselector.cpp gtaction.cpp gtaction.h gtwriter.cpp gtwriter.h gtfont.cpp gtfont.h gtdialogs.cpp gtdialogs.h gtstyle.cpp gtstyle.h gtframestyle.cpp gtframestyle.h gtparagraphstyle.cpp gtparagraphstyle.h gtmeasure.cpp gtmeasure.h prefsfile.cpp prefsfile.h prefscontext.cpp prefscontext.h prefsreader.cpp prefsreader.h prefstable.cpp prefstable.h langmgr.h langmgr.cpp fileloader.cpp fileloader.h gradienteditor.cpp gradienteditor.h pageselector.h insertTable.cpp insertTable.h art_kmisc.c art_kmisc.h art_render_misc.c art_render_misc.h art_render_pattern.c art_render_pattern.h art_rgb.c art_rgb.h art_rgb_affine_private.c art_rgb_affine_private.h art_rgb_svp.c art_rgb_svp.h art_rgba_affine.c art_rgba_affine.h gdk-pixbuf-xlib-drawable.c gdk-pixbuf-xlib-private.h gdk-pixbuf-xlib-render.c gdk-pixbuf-xlib.c gdk-pixbuf-xlib.h gdk-pixbuf-xlibrgb.c gdk-pixbuf-xlibrgb.h LoremIpsum.txt rgbscribus.txt rgbscribusgreys.txt rgbscribusgnome.txt rgbsvg.txt
EXTRA_DIST = main.cpp scribus.cpp scribus.h scribusdoc.cpp scribusdoc.h scribusview.cpp scribusview.h newfile.h newfile.cpp pageitem.cpp pageitem.h hruler.cpp hruler.h vruler.cpp vruler.h colorm.cpp colorm.h query.cpp query.h dcolor.cpp dcolor.h cpalette.cpp cpalette.h mdup.cpp mdup.h docinfo.cpp docinfo.h reformdoc.cpp reformdoc.h serializer.cpp serializer.h align.cpp align.h fmitem.cpp fmitem.h fontprefs.cpp fontprefs.h missing.cpp missing.h tree.cpp tree.h pdfopts.cpp pdfopts.h inspage.cpp inspage.h delpages.cpp delpages.h movepage.cpp movepage.h mspinbox.cpp mspinbox.h helpbrowser.cpp helpbrowser.h icons5.h linkbutton.cpp linkbutton.h icons6.h linecombo.cpp linecombo.h scribusXml.cpp scribusXml.h cmykfw.cpp cmykfw.h cmykcolor.cpp cmykcolor.h util.cpp colorchart.cpp colorchart.h druck.cpp druck.h editformats.cpp editformats.h edit1format.cpp edit1format.h spalette.cpp spalette.h frameedit.cpp frameedit.h scfonts.cpp scfonts.h scrap.cpp scrap.h scfonts_ttf.cpp scfonts_ttf.h muster.cpp muster.h applytemplate.cpp applytemplate.h newtemp.cpp newtemp.h picstatus.cpp picstatus.h picsearch.cpp picsearch.h customfdialog.cpp customfdialog.h cmsprefs.cpp cmsprefs.h bookmwin.cpp bookmwin.h annot.cpp annot.h navigator.cpp navigator.h keymanager.cpp keymanager.h werktoolb.cpp werktoolb.h mpalette.h mpalette.cpp polyprops.cpp polyprops.h layers.cpp layers.h page.cpp page.h editor.cpp editor.h selfield.cpp selfield.h javadocs.cpp javadocs.h buttonicon.cpp buttonicon.h annota.cpp annota.h fpoint.cpp fpoint.h fpointarray.cpp fpointarray.h seiten.cpp seiten.h hysettings.cpp hysettings.h hnjalloc.c hnjalloc.h hyask.cpp hyask.h hyphen.c hyphen.h hyphenator.cpp hyphenator.h scribuswin.cpp scribuswin.h guidemanager.cpp guidemanager.h cupsoptions.cpp cupsoptions.h md5.c md5.h rc4.c rc4.h mergedoc.cpp mergedoc.h bookpalette.cpp bookpalette.h splash.h fontcombo.h scpainter.cpp scpainter.h vgradient.cpp vgradient.h story.cpp story.h autoform.cpp autoform.h fparser.cpp fparser.h tabmanager.cpp tabmanager.h search.cpp search.h styleselect.cpp styleselect.h alignselect.cpp alignselect.h shadebutton.cpp shadebutton.h pageselector.cpp gtaction.cpp gtaction.h gtwriter.cpp gtwriter.h gtfont.cpp gtfont.h gtdialogs.cpp gtdialogs.h gtstyle.cpp gtstyle.h gtframestyle.cpp gtframestyle.h gtparagraphstyle.cpp gtparagraphstyle.h gtmeasure.cpp gtmeasure.h prefsfile.cpp prefsfile.h prefscontext.cpp prefscontext.h prefsreader.cpp prefsreader.h prefstable.cpp prefstable.h langmgr.h langmgr.cpp fileloader.cpp fileloader.h prefsdialogbase.cpp prefsdialogbase.h gradienteditor.cpp gradienteditor.h pageselector.h insertTable.cpp insertTable.h art_kmisc.c art_kmisc.h art_render_misc.c art_render_misc.h art_render_pattern.c art_render_pattern.h art_rgb.c art_rgb.h art_rgb_affine_private.c art_rgb_affine_private.h art_rgb_svp.c art_rgb_svp.h art_rgba_affine.c art_rgba_affine.h gdk-pixbuf-xlib-drawable.c gdk-pixbuf-xlib-private.h gdk-pixbuf-xlib-render.c gdk-pixbuf-xlib.c gdk-pixbuf-xlib.h gdk-pixbuf-xlibrgb.c gdk-pixbuf-xlibrgb.h LoremIpsum.txt rgbscribus.txt rgbscribusgreys.txt rgbscribusgnome.txt rgbsvg.txt
 
install-data-local:
$(mkinstalldirs) $(prefix)/share/scribus/samples/
/branches/Version13x/Scribus/scribus/newfile.cpp
329,7 → 329,7
code_repeat(4);
}
 
void NewDoc::setDist(int v)
void NewDoc::setDist(int)
{
Dist = Distance->value() / Umrech;
}
/branches/Version13x/Scribus/scribus/reformdoc.cpp
1,27 → 1,27
#include "reformdoc.h"
#include "reformdoc.moc"
#include <qtooltip.h>
#include "scribusdoc.h"
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, int PageNr)
: QDialog( parent, "r", true, 0 )
ReformDoc::ReformDoc( QWidget* parent, ScribusDoc* doc ) : PrefsDialogBase( parent )
{
einheit = Einh;
einheit = doc->Einheit;
QString units[] = { tr(" pt"), tr(" mm"), tr(" in"), tr(" p")};
QString ein = units[Einh];
QString ein = units[doc->Einheit];
int dp[] = {100, 1000, 10000, 100};
int decimals = dp[Einh];
int decimals = dp[doc->Einheit];
int i=-1;
Breite = Pagebr * UmReFaktor;
Hoehe = Pageho * UmReFaktor;
Breite = doc->PageB * UmReFaktor;
Hoehe = doc->PageH * UmReFaktor;
setCaption( tr( "Document Setup" ) );
setIcon(loadIcon("AppIcon.png"));
ReformDocLayout = new QVBoxLayout( this );
prefsSelection->insertItem( tr("Page"));
tabPage = new QWidget( prefsWidgets, "tab" );
ReformDocLayout = new QVBoxLayout( tabPage );
ReformDocLayout->setSpacing( 6 );
ReformDocLayout->setMargin( 10 );
 
dsGroupBox7 = new QGroupBox( this, "GroupBox7" );
dsGroupBox7 = new QGroupBox( tabPage, "GroupBox7" );
dsGroupBox7->setTitle( tr( "Page Size" ) );
dsGroupBox7->setColumnLayout(0, Qt::Vertical );
dsGroupBox7->layout()->setSpacing( 0 );
33,61 → 33,52
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)
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]==doc->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 );
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(doc->PageOri);
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 = 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);
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 );
 
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 = new QGroupBox( tabPage, "GroupBox7" );
GroupBox7->setTitle( tr( "Margin Guides" ) );
GroupBox7->setColumnLayout(0, Qt::Vertical );
GroupBox7->layout()->setSpacing( 0 );
99,54 → 90,49
Layout4 = new QGridLayout;
Layout4->setSpacing( 6 );
Layout4->setMargin( 0 );
TopR = new MSpinBox( GroupBox7, 4 );
TopR->setSuffix( ein );
TopR->setDecimals( decimals );
TopR->setMaxValue(Hoehe);
TopR->setValue(t * UmReFaktor);
TopR->setValue(doc->PageM.Top * UmReFaktor);
Layout4->addWidget( TopR, 0, 1 );
TextLabel5 = new QLabel( tr( "&Top:" ), GroupBox7, "TextLabel5" );
TextLabel5->setBuddy(TopR);
Layout4->addWidget( TextLabel5, 0, 0 );
LeftR = new MSpinBox( GroupBox7, 4 );
LeftR->setSuffix( ein );
LeftR->setDecimals( decimals );
LeftR->setMaxValue(Breite);
LeftR->setValue(l * UmReFaktor);
LeftR->setValue(doc->PageM.Left * UmReFaktor);
Layout4->addWidget( LeftR, 0, 3 );
Links = new QLabel( tr( "&Left:" ), GroupBox7, "Links" );
Links->setBuddy(LeftR);
Layout4->addWidget( Links, 0, 2 );
BottomR = new MSpinBox( GroupBox7, 4 );
BottomR->setSuffix( ein );
BottomR->setDecimals( decimals );
BottomR->setMaxValue(Hoehe);
BottomR->setValue(b * UmReFaktor);
BottomR->setValue(doc->PageM.Bottom * UmReFaktor);
Layout4->addWidget( BottomR, 1, 1 );
TextLabel7 = new QLabel( tr( "&Bottom:" ), GroupBox7, "TextLabel7" );
TextLabel7->setBuddy(BottomR);
Layout4->addWidget( TextLabel7, 1, 0 );
RightR = new MSpinBox( GroupBox7, 4 );
RightR->setSuffix( ein );
RightR->setDecimals( decimals );
RightR->setMaxValue(Breite);
RightR->setValue(r * UmReFaktor);
RightR->setValue(doc->PageM.Right * UmReFaktor);
Layout4->addWidget( RightR, 1, 3 );
Rechts = new QLabel( tr( "&Right:" ), GroupBox7, "Rechts" );
Rechts->setBuddy(RightR);
Layout4->addWidget( Rechts, 1, 2 );
Doppelseiten = new QCheckBox( tr( "&Facing Pages" ),GroupBox7, "Doppelseiten" );
Doppelseiten->setChecked( fp );
Doppelseiten->setChecked( doc->PageFP );
Layout4->addMultiCellWidget( Doppelseiten, 2, 2, 0, 1 );
ErsteSeite = new QCheckBox( tr( "Left &Page First" ), GroupBox7, "n" );
ErsteSeite->setChecked( fpe );
ErsteSeite->setChecked( doc->FirstPageLeft );
Layout4->addMultiCellWidget( ErsteSeite, 2, 2, 2, 3 );
if (!fp)
if (!doc->PageFP)
ErsteSeite->setEnabled(false);
setDS();
TextLabel1_3 = new QLabel( tr( "F&irst Page Number:" ), GroupBox7, "TextLabel1_3" );
154,23 → 140,42
PgNr = new QSpinBox( GroupBox7, "PgNr" );
PgNr->setMaxValue( 1000 );
PgNr->setMinValue( 1 );
PgNr->setValue(PageNr);
PgNr->setValue(doc->FirstPnum);
Layout4->addWidget( PgNr, 3, 2, Qt::AlignRight );
TextLabel1_3->setBuddy(PgNr);
GroupBox7Layout->addLayout( Layout4 );
ReformDocLayout->addWidget( GroupBox7 );
Layout3 = new QHBoxLayout;
Layout3->setSpacing( 6 );
Layout3->setMargin( 0 );
QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
Layout3->addItem( spacer );
OKButton = new QPushButton(tr( "&OK" ), this, "OKButton" );
OKButton->setDefault( true );
Layout3->addWidget( OKButton );
CancelB = new QPushButton( tr( "&Cancel" ), this, "CancelB" );
CancelB->setAutoDefault( false );
Layout3->addWidget( CancelB );
ReformDocLayout->addLayout( Layout3 );
prefsWidgets->addWidget( tabPage, 0 );
 
prefsSelection->insertItem( tr("View"));
tabView = new QWidget( prefsWidgets, "tabView" );
tabViewLayout = new QVBoxLayout( tabView, 11, 6, "tabViewLayout");
checkMargin = new QCheckBox( tabView, "checkMargin" );
checkMargin->setText( tr( "Show Margins" ) );
checkMargin->setChecked(doc->MarginsShown);
tabViewLayout->addWidget( checkMargin );
checkFrame = new QCheckBox( tabView, "checkFrame" );
checkFrame->setText( tr( "Show Frames" ) );
checkFrame->setChecked(doc->FramesShown);
tabViewLayout->addWidget( checkFrame );
checkPictures = new QCheckBox( tabView, "checkPictures" );
checkPictures->setText( tr( "Show Pictures" ) );
checkPictures->setChecked(doc->ShowPic);
tabViewLayout->addWidget( checkPictures );
checkGrid = new QCheckBox( tabView, "checkGrid" );
checkGrid->setText( tr( "Show Grid" ) );
checkGrid->setChecked(doc->GridShown);
tabViewLayout->addWidget( checkGrid );
checkGuides = new QCheckBox( tabView, "checkGuides" );
checkGuides->setText( tr( "Show Guides" ) );
checkGuides->setChecked(doc->GuidesShown);
tabViewLayout->addWidget( checkGuides );
checkBaseline = new QCheckBox( tabView, "checkBaseline" );
checkBaseline->setText( tr( "Show Baseline Grid" ) );
checkBaseline->setChecked(doc->BaseShown);
tabViewLayout->addWidget( checkBaseline );
prefsWidgets->addWidget( tabView, 1 );
 
RightR->setMaxValue(Breite - LeftR->value());
LeftR->setMaxValue(Breite - RightR->value());
TopR->setMaxValue(Hoehe - BottomR->value());
185,30 → 190,33
 
// signals and slots connections
connect( Doppelseiten, SIGNAL( clicked() ), this, SLOT( setDS() ) );
connect( OKButton, SIGNAL( clicked() ), this, SLOT( accept() ) );
connect( CancelB, SIGNAL( clicked() ), this, SLOT( reject() ) );
connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );
connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
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)));
connect(RightR, SIGNAL(valueChanged(int)), this, SLOT(setRight(int)));
prefsWidgets->raiseWidget(0);
resize( minimumSizeHint() );
clearWState( WState_Polished );
}
 
void ReformDoc::setTop(int v)
void ReformDoc::setTop(int )
{
BottomR->setMaxValue(Hoehe - TopR->value());
}
 
void ReformDoc::setBottom(int v)
void ReformDoc::setBottom(int )
{
TopR->setMaxValue(Hoehe - BottomR->value());
}
 
void ReformDoc::setLeft(int v)
void ReformDoc::setLeft(int )
{
RightR->setMaxValue(Breite - LeftR->value());
}
 
void ReformDoc::setRight(int v)
void ReformDoc::setRight(int )
{
LeftR->setMaxValue(Breite - RightR->value());
}
/branches/Version13x/Scribus/scribus/scribusXml.cpp
1048,6 → 1048,12
doc->PageSp=QStoInt(dc.attribute("AUTOSPALTEN"));
doc->PageSpa=QStodouble(dc.attribute("ABSTSPALTEN"));
doc->Einheit = QStoInt(dc.attribute("UNITS","0"));
doc->GridShown = view->Prefs->GridShown;
doc->GuidesShown = view->Prefs->GuidesShown;
doc->FramesShown = view->Prefs->FramesShown;
doc->MarginsShown = view->Prefs->MarginsShown;
doc->BaseShown = view->Prefs->BaseShown;
doc->ShowPic = true;
DoFonts.clear();
doc->Dsize=qRound(QStodouble(dc.attribute("DSIZE")) * 10);
Defont=dc.attribute("DFONT");
2421,6 → 2427,12
dc.setAttribute("BASEO", doc->BaseOffs);
dc.setAttribute("MINGRID", doc->minorGrid);
dc.setAttribute("MAJGRID", doc->majorGrid);
dc.setAttribute("SHOWGRID", static_cast<int>(doc->GridShown));
dc.setAttribute("SHOWGUIDES", static_cast<int>(doc->GuidesShown));
dc.setAttribute("SHOWFRAME", static_cast<int>(doc->FramesShown));
dc.setAttribute("SHOWMARGIN", static_cast<int>(doc->MarginsShown));
dc.setAttribute("SHOWBASE", static_cast<int>(doc->BaseShown));
dc.setAttribute("SHOWPICT", static_cast<int>(doc->ShowPic));
QMap<QString,multiLine>::Iterator itMU;
for (itMU = doc->MLineStyles.begin(); itMU != doc->MLineStyles.end(); ++itMU)
{
/branches/Version13x/Scribus/scribus/reformdoc.h
1,7 → 1,6
#ifndef REFORMDOC_H
#define REFORMDOC_H
 
#include <qdialog.h>
#include <qlayout.h>
#include <qcheckbox.h>
#include <qcombobox.h>
9,33 → 8,35
#include <qlabel.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qcheckbox.h>
#include "mspinbox.h"
#include "prefsdialogbase.h"
class ScribusDoc;
 
class ReformDoc : public QDialog
{
Q_OBJECT
class ReformDoc : public PrefsDialogBase
{
Q_OBJECT
 
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, int PageNr );
~ReformDoc() {};
 
QGroupBox* GroupBox7;
QGroupBox* dsGroupBox7;
QLabel* TextLabel5;
QLabel* TextLabel7;
QLabel* TextLabel1_3;
QSpinBox* PgNr;
MSpinBox* TopR;
MSpinBox* BottomR;
MSpinBox* LeftR;
MSpinBox* RightR;
MSpinBox* widthMSpinBox;
MSpinBox* heightMSpinBox;
QCheckBox* Doppelseiten;
QCheckBox* ErsteSeite;
QLabel* Links;
QLabel* Rechts;
ReformDoc( QWidget* parent, ScribusDoc* doc );
~ReformDoc() {};
QWidget* tabPage;
QGroupBox* GroupBox7;
QGroupBox* dsGroupBox7;
QLabel* TextLabel5;
QLabel* TextLabel7;
QLabel* TextLabel1_3;
QSpinBox* PgNr;
MSpinBox* TopR;
MSpinBox* BottomR;
MSpinBox* LeftR;
MSpinBox* RightR;
MSpinBox* widthMSpinBox;
MSpinBox* heightMSpinBox;
QCheckBox* Doppelseiten;
QCheckBox* ErsteSeite;
QLabel* Links;
QLabel* Rechts;
QLabel* widthQLabel;
QLabel* heightQLabel;
QLabel* sizeQLabel;
42,22 → 43,30
QLabel* orientationQLabel;
QComboBox* sizeQComboBox;
QComboBox* orientationQComboBox;
QPushButton* OKButton;
QPushButton* CancelB;
 
QWidget* tabView;
QCheckBox* checkMargin;
QCheckBox* checkFrame;
QCheckBox* checkPictures;
QCheckBox* checkGrid;
QCheckBox* checkGuides;
QCheckBox* checkBaseline;
 
int einheit;
double Breite;
double Hoehe;
 
protected:
QVBoxLayout* ReformDocLayout;
QHBoxLayout* dsGroupBox7Layout;
QHBoxLayout* GroupBox7Layout;
QGridLayout* dsLayout4;
QGridLayout* Layout4;
QHBoxLayout* Layout3;
QVBoxLayout* ReformDocLayout;
QHBoxLayout* dsGroupBox7Layout;
QHBoxLayout* GroupBox7Layout;
QGridLayout* dsLayout4;
QGridLayout* Layout4;
QHBoxLayout* Layout3;
QVBoxLayout* tabViewLayout;
 
protected slots:
virtual void setDS();
virtual void setDS();
virtual void setTop(int v);
virtual void setBottom(int v);
virtual void setLeft(int v);
/branches/Version13x/Scribus/scribus/pageitem.cpp
404,7 → 404,7
}
if (Pfile == "")
{
if ((Frame) && (ScApp->Prefs.FramesShown))
if ((Frame) && (Doc->FramesShown))
{
p->setPen(black, 1, SolidLine, FlatCap, MiterJoin);
p->drawLine(FPoint(0, 0), FPoint(Width, Height));
415,7 → 415,7
{
if ((!PicArt) || (!PicAvail))
{
if ((Frame) && (ScApp->Prefs.FramesShown))
if ((Frame) && (Doc->FramesShown))
{
p->setPen(red, 1, SolidLine, FlatCap, MiterJoin);
p->drawLine(FPoint(0, 0), FPoint(Width, Height));
1737,7 → 1737,7
if ((!Tinput) && (!Doc->RePos))
{
double scp = QMAX(ScApp->view->Scale, 1);
if ((Frame) && (ScApp->Prefs.FramesShown) && ((PType == 2) || (PType == 4)))
if ((Frame) && (Doc->FramesShown) && ((PType == 2) || (PType == 4)))
{
p->setPen(black, 1 / scp, DotLine, FlatCap, MiterJoin);
if ((isBookmark) || (isAnnotation))
1750,7 → 1750,7
p->setupPolygon(&PoLine);
p->drawPolyLine();
}
if ((ScApp->Prefs.FramesShown) && (UseContour) && (ContourLine.size() != 0))
if ((Doc->FramesShown) && (UseContour) && (ContourLine.size() != 0))
{
p->setPen(lightGray, 1 / scp, DotLine, FlatCap, MiterJoin);
p->setupPolygon(&ContourLine);
1807,7 → 1807,7
}
if ((!Tinput) && (!Doc->RePos))
{
if ((Frame) && (ScApp->Prefs.FramesShown))
if ((Frame) && (Doc->FramesShown))
{
p.setPen(QPen(black, 1, DotLine, FlatCap, MiterJoin));
if ((isBookmark) || (isAnnotation))
/branches/Version13x/Scribus/scribus/scribusview.cpp
192,7 → 192,7
connect(this, SIGNAL(contentsMoving(int, int)), this, SLOT(setRulerPos(int, int)));
}
 
void ScribusView::drawContents(QPainter *p, int clipx, int clipy, int clipw, int cliph)
void ScribusView::drawContents(QPainter *, int clipx, int clipy, int clipw, int cliph)
{
if (Doc->loading)
return;
538,7 → 538,7
painter->setZoomFactor(z);
}
 
void ScribusView::DrawPageMarks(ScPainter *p, Page *page, QRect clip)
void ScribusView::DrawPageMarks(ScPainter *p, Page *page, QRect)
{
double lw = 1.0 / Scale;
double z = p->zoomFactor();
546,7 → 546,7
p->setZoomFactor(Scale);
p->translate(page->Xoffset * Scale, page->Yoffset * Scale);
p->setLineWidth(lw);
if (Prefs->MarginsShown)
if (Doc->MarginsShown)
{
p->setPen(Doc->margColor);
if (Doc->RandFarbig)
563,13 → 563,13
p->drawLine(FPoint(page->Margins.Left, 0), FPoint(page->Margins.Left, page->Height));
p->drawLine(FPoint(page->Width - page->Margins.Right, 0), FPoint(page->Width - page->Margins.Right, page->Height));
}
if (Prefs->BaseShown)
if (Doc->BaseShown)
{
p->setPen(Doc->baseColor, lw, SolidLine, FlatCap, MiterJoin);
for (double yg = Doc->BaseOffs; yg < page->Height; yg += Doc->BaseGrid)
p->drawLine(FPoint(0, yg), FPoint(page->Width, yg));
}
if (Prefs->GridShown)
if (Doc->GridShown)
{
double stx = 0;
double endx = page->Width;
612,7 → 612,7
}
}
}
if (Prefs->GuidesShown)
if (Doc->GuidesShown)
{
p->setPen(Doc->guideColor, lw, DotLine, FlatCap, MiterJoin);
if (page->XGuides.count() != 0)
772,7 → 772,7
bool img = false;
// struct Pti *hg;
// uint a;
int re;
int re = 0;
e->accept(QTextDrag::canDecode(e));
DraggedGroupFirst = false;
if (QTextDrag::decode(e, text))
1315,17 → 1315,17
pmen->insertSeparator();
}
menid = pmen->insertItem(tr("Show &Margins"), ScApp, SLOT(ToggleMarks()));
pmen->setItemChecked(menid, Prefs->MarginsShown);
pmen->setItemChecked(menid, Doc->MarginsShown);
menid = pmen->insertItem(tr("Show &Frames"), ScApp, SLOT(ToggleFrames()));
pmen->setItemChecked(menid, Prefs->FramesShown);
pmen->setItemChecked(menid, Doc->FramesShown);
menid = pmen->insertItem(tr("Show &Images"), ScApp, SLOT(TogglePics()));
pmen->setItemChecked(menid, Doc->ShowPic);
menid = pmen->insertItem(tr("Show &Grid"), ScApp, SLOT(ToggleRaster()));
pmen->setItemChecked(menid, Prefs->GridShown);
pmen->setItemChecked(menid, Doc->GridShown);
menid = pmen->insertItem(tr("Show G&uides"), ScApp, SLOT(ToggleGuides()));
pmen->setItemChecked(menid, Prefs->GuidesShown);
pmen->setItemChecked(menid, Doc->GuidesShown);
menid = pmen->insertItem(tr("Show &Baseline Grid"), ScApp, SLOT(ToggleBase()));
pmen->setItemChecked(menid, Prefs->BaseShown);
pmen->setItemChecked(menid, Doc->BaseShown);
pmen->insertSeparator();
int uRas = pmen->insertItem( tr("Sn&ap to Grid"), ScApp, SLOT(ToggleURaster()));
pmen->setItemChecked(uRas, Doc->useRaster);
1650,6 → 1650,8
double gx, gy, gh, gw, nx, ny, scx, scy;
getGroupRect(&gx, &gy, &gw, &gh);
double sc = Scale;
scx = sc;
scy = sc;
QPoint np2 = QPoint(static_cast<int>(m->x()/sc), static_cast<int>(m->y()/sc));
nx = np2.x();
ny = np2.y();
2481,7 → 2483,7
HR->Draw(m->x());
VR->Draw(m->y());
emit MousePos(m->x()/Scale-Doc->ActPage->Xoffset, m->y()/Scale-Doc->ActPage->Yoffset);
if (Prefs->GuidesShown)
if (Doc->GuidesShown)
{
if (MoveGY)
{
3271,7 → 3273,7
SeRy = newY;
HaveSelRect = true;
}
if ((Prefs->GuidesShown) && (Doc->AppMode == 1) && (!Doc->GuideLock) && (OnPage(m->x()/sc, m->y()/sc) != -1))
if ((Doc->GuidesShown) && (Doc->AppMode == 1) && (!Doc->GuideLock) && (OnPage(m->x()/sc, m->y()/sc) != -1))
{
if (Doc->ActPage->YGuides.count() != 0)
{
3838,7 → 3840,10
Serializer *ss = new Serializer("");
ss->Objekt = cc;
int st = Doc->CurrentABStil;
ss->GetText(b, st, Doc->Vorlagen[st].Font, Doc->Vorlagen[st].FontSize, true);
if (st > 5)
ss->GetText(b, st, Doc->Vorlagen[st].Font, Doc->Vorlagen[st].FontSize);
else
ss->GetText(b, st, b->IFont, b->ISize);
delete ss;
if (Doc->Trenner->AutoCheck)
Doc->Trenner->slotHyphenate(b);
6691,7 → 6696,7
}
b = Doc->Items.prev();
}
if ((Prefs->GuidesShown) && (Doc->AppMode == 1) && (!Doc->GuideLock) && (OnPage(Mxp, Myp) != -1))
if ((Doc->GuidesShown) && (Doc->AppMode == 1) && (!Doc->GuideLock) && (OnPage(Mxp, Myp) != -1))
{
GxM = -1;
GyM = -1;
7035,7 → 7040,7
/* do the rest of the job */
void ScribusView::GimpExited()
{
int ex;
int ex = 0;
if ( proc != 0 )
ex = proc->exitStatus();
if ( filter != 0 )
7698,10 → 7703,10
{
if (ScApp->ScriptRunning)
return;
HR->offs = x-static_cast<int>(Doc->ScratchLeft*Scale)-2;
HR->offs = x-static_cast<int>(Doc->ScratchLeft*Scale)-1;
HR->repX = false;
HR->repaint();
VR->offs = y-static_cast<int>(Doc->ScratchTop*Scale)-2;
VR->offs = y-static_cast<int>(Doc->ScratchTop*Scale)-1;
VR->repaint();
}
 
8139,7 → 8144,8
{
for (a=0; a < Doc->Layers.count(); a++)
{
int curr,n=0;
int curr=0;
int n=0;
for (it = Doc->Layers.begin(); it != Doc->Layers.end(); ++it,n++)
{
if (Doc->Layers.count()-(*it).Level-1 == a)
8288,7 → 8294,7
if ((clipw > 0) && (cliph > 0))
{
double sca = Scale;
bool frs = Prefs->FramesShown;
bool frs = Doc->FramesShown;
bool mas = Doc->MasterP;
Doc->MasterP = true;
Page* act = Doc->ActPage;
8298,7 → 8304,7
Doc->DocItems = Doc->Items;
Doc->Items = Doc->MasterItems;
}
Prefs->FramesShown = false;
Doc->FramesShown = false;
Scale = 1;
pm = QPixmap(clipw, cliph);
ScPainter *painter = new ScPainter(&pm, pm.width(), pm.height());
8308,7 → 8314,7
painter->setBrush(Doc->papColor);
painter->drawRect(clipx, clipy, clipw, cliph);
DrawPageItems(painter, QRect(clipx, clipy, clipw, cliph));
Prefs->FramesShown = frs;
Doc->FramesShown = frs;
Scale = sca;
Doc->ActPage = act;
if (!mas)
8342,8 → 8348,8
if ((clipw > 0) && (cliph > 0))
{
double sca = Scale;
bool frs = Prefs->FramesShown;
Prefs->FramesShown = false;
bool frs = Doc->FramesShown;
Doc->FramesShown = false;
Scale = 1;
Page* act = Doc->ActPage;
Doc->ActPage = Doc->Pages.at(Nr);
8359,7 → 8365,7
DrawMasterItems(painter, Doc->Pages.at(Nr), QRect(clipx, clipy, clipw, cliph));
DrawPageItems(painter, QRect(clipx, clipy, clipw, cliph));
painter->end();
Prefs->FramesShown = frs;
Doc->FramesShown = frs;
Scale = sca;
Doc->ActPage = act;
QImage im2;
8379,7 → 8385,7
 
void ScribusView::FromHRuler(QMouseEvent *m)
{
if (Prefs->GuidesShown)
if (Doc->GuidesShown)
{
QPoint py = viewport()->mapFromGlobal(m->globalPos());
int newY = py.y();
8399,7 → 8405,7
 
void ScribusView::FromVRuler(QMouseEvent *m)
{
if (Prefs->GuidesShown)
if (Doc->GuidesShown)
{
QPoint py = viewport()->mapFromGlobal(m->globalPos());
int newY = py.x();
10369,7 → 10375,7
 
void ScribusView::doAlign(QValueList<uint> &Object, int moveCode, double xp, double xdisp, double ydisp, double minx)
{
double xd;
double xd = 0;
uint start, end;
if ((moveCode == 3) || (moveCode == 13))
{
10786,7 → 10792,8
{
PageItem *b;
PageItem *bb;
uint StartInd, z;
uint StartInd = 0;
uint z;
b = SelItem.at(0);
uint EndInd = b->PoLine.size();
for (uint a = b->PoLine.size()-1; a > 0; a--)
/branches/Version13x/Scribus/scribus/scribusdoc.h
569,6 → 569,11
bool useRaster;
/** Flag fuer Bilder */
bool ShowPic;
bool FramesShown;
bool GuidesShown;
bool MarginsShown;
bool GridShown;
bool BaseShown;
/** Im Dokument benutzte Farben */
CListe PageColors;
Page* ActPage;
/branches/Version13x/Scribus/scribus/libabout/about.cpp
66,7 → 66,7
tabLayout1->addWidget( PixmapLabel1 );
BuildID = new QLabel( tab, "BB" );
BuildID->setAlignment(Qt::AlignCenter);
QString bu = tr("%1. %2 %3 ").arg("17").arg("November").arg("2004");
QString bu = tr("%1. %2 %3 ").arg("20").arg("November").arg("2004");
#ifdef HAVE_CMS
bu += "C";
#else
/branches/Version13x/Scribus/scribus/prefsdialogbase.cpp
0,0 → 1,50
#include "prefsdialogbase.h"
#include "prefsdialogbase.moc"
#include <qvariant.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
extern QPixmap loadIcon(QString nam);
 
PrefsDialogBase::PrefsDialogBase( QWidget* parent ) : QDialog( parent, "PrefsDialogBase", true, 0 )
{
setName( "PrefsDialogBase" );
setIcon(loadIcon("AppIcon.png"));
setSizeGripEnabled( TRUE );
prefsLayout = new QVBoxLayout( this, 11, 6, "prefsLayout");
layout3 = new QHBoxLayout( 0, 0, 6, "layout3");
prefsSelection = new QListBox( this, "prefsSelection" );
prefsSelection->setFocusPolicy(QWidget::NoFocus);
prefsSelection->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)7, 0, 0, prefsSelection->sizePolicy().hasHeightForWidth() ) );
layout3->addWidget( prefsSelection );
prefsWidgets = new QWidgetStack( this, "prefsWidgets" );
layout3->addWidget( prefsWidgets );
prefsLayout->addLayout( layout3 );
layout4 = new QHBoxLayout( 0, 0, 6, "layout4");
QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
layout4->addItem( spacer );
buttonOk = new QPushButton( this, "buttonOk" );
buttonOk->setAutoDefault( TRUE );
buttonOk->setDefault( TRUE );
layout4->addWidget( buttonOk );
buttonCancel = new QPushButton( this, "buttonCancel" );
buttonCancel->setAutoDefault( TRUE );
layout4->addWidget( buttonCancel );
prefsLayout->addLayout( layout4 );
languageChange();
// resize( QSize(488, 320).expandedTo(minimumSizeHint()) );
// clearWState( WState_Polished );
connect(prefsSelection, SIGNAL(highlighted(int)), prefsWidgets, SLOT(raiseWidget(int)));
}
 
/*
* Sets the strings of the subwidgets using the current
* language.
*/
void PrefsDialogBase::languageChange()
{
buttonOk->setText( tr( "&OK" ) );
buttonCancel->setText( tr( "&Cancel" ) );
}
 
Property changes:
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
Index: Version13x/Scribus/scribus/scribus.cpp
===================================================================
--- Version13x/Scribus/scribus/scribus.cpp (revision 692)
+++ Version13x/Scribus/scribus/scribus.cpp (revision 693)
@@ -2201,6 +2201,11 @@
doc->PageColors = Prefs.DColors;
doc->BaseGrid = Prefs.BaseGrid;
doc->BaseOffs = Prefs.BaseOffs;
+ doc->MarginsShown = Prefs.MarginsShown;
+ doc->FramesShown = Prefs.FramesShown;
+ doc->GridShown = Prefs.GridShown;
+ doc->GuidesShown = Prefs.GuidesShown;
+ doc->BaseShown = Prefs.BaseShown;
doc->loading = true;
ScribusWin* w = new ScribusWin(wsp, doc);
view = new ScribusView(w, doc, &Prefs);
@@ -2350,6 +2355,12 @@
wsp->setScrollBarsEnabled(false);
else
wsp->setScrollBarsEnabled(true);
+ viewMenu->setItemChecked(Markers, doc->MarginsShown);
+ viewMenu->setItemChecked(FrameDr, doc->FramesShown);
+ viewMenu->setItemChecked(Ras, doc->GridShown);
+ viewMenu->setItemChecked(Guide, doc->GuidesShown);
+ viewMenu->setItemChecked(Base, doc->BaseShown);
+ viewMenu->setItemChecked(Bilder, doc->ShowPic);
// if (!doc->TemplateMode)
// Sepal->Rebuild();
// Tpal->BuildTree(view);
@@ -2382,15 +2393,10 @@
bool ScribusApp::SetupDoc()
{
- double tpr = doc->PageM.Top;
- double lr = doc->PageM.Left;
- double rr = doc->PageM.Right;
- double br = doc->PageM.Bottom;
bool fp = doc->PageFP;
- 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, doc->FirstPnum);
+ ReformDoc* dia = new ReformDoc(this, doc);
if (dia->exec())
{
tpr2 = dia->TopR->value() / UmReFaktor;
@@ -2403,6 +2409,23 @@
doc->FirstPnum = dia->PgNr->value();
doc->resetPage(tpr2, lr2, rr2, br2, fp);
view->reformPages();
+ doc->MarginsShown = dia->checkMargin->isChecked();
+ doc->FramesShown = dia->checkFrame->isChecked();
+ doc->GridShown = dia->checkGrid->isChecked();
+ doc->GuidesShown = dia->checkGuides->isChecked();
+ doc->BaseShown = dia->checkBaseline->isChecked();
+ doc->ShowPic = dia->checkPictures->isChecked();
+ viewMenu->setItemChecked(Markers, doc->MarginsShown);
+ viewMenu->setItemChecked(FrameDr, doc->FramesShown);
+ viewMenu->setItemChecked(Ras, doc->GridShown);
+ viewMenu->setItemChecked(Guide, doc->GuidesShown);
+ viewMenu->setItemChecked(Base, doc->BaseShown);
+ viewMenu->setItemChecked(Bilder, doc->ShowPic);
+ for (uint b=0; b<doc->Items.count(); ++b)
+ {
+ if (doc->Items.at(b)->PType == 2)
+ doc->Items.at(b)->PicArt = doc->ShowPic;
+ }
view->GotoPage(doc->ActPage->PageNr);
view->DrawNew();
// Sepal->RebuildPage();
@@ -2412,7 +2435,6 @@
doc->PDF_Optionen.BleedTop = doc->PageM.Top;
doc->PDF_Optionen.BleedLeft = doc->PageM.Left;
doc->PDF_Optionen.BleedRight = doc->PageM.Right;
-
}
delete dia;
return ret;
@@ -4296,7 +4318,10 @@
Serializer *ss = new Serializer("");
ss->Objekt = Buffer2;
int st = doc->CurrentABStil;
- ss->GetText(b, st, doc->Vorlagen[st].Font, doc->Vorlagen[st].FontSize, true);
+ if (st > 5)
+ ss->GetText(b, st, doc->Vorlagen[st].Font, doc->Vorlagen[st].FontSize);
+ else
+ ss->GetText(b, st, b->IFont, b->ISize);
delete ss;
if (doc->Trenner->AutoCheck)
doc->Trenner->slotHyphenate(b);
@@ -4960,11 +4985,11 @@
if (GuidesStat[0])
{
GuidesStat[0] = false;
- Prefs.MarginsShown = GuidesStat[1];
- Prefs.FramesShown = GuidesStat[2];
- Prefs.GridShown = GuidesStat[3];
- Prefs.GuidesShown = GuidesStat[4];
- Prefs.BaseShown = GuidesStat[5];
+ doc->MarginsShown = GuidesStat[1];
+ doc->FramesShown = GuidesStat[2];
+ doc->GridShown = GuidesStat[3];
+ doc->GuidesShown = GuidesStat[4];
+ doc->BaseShown = GuidesStat[5];
ToggleMarks();
ToggleFrames();
ToggleRaster();
@@ -4974,21 +4999,21 @@
else
{
GuidesStat[0] = true;
- GuidesStat[1] = !Prefs.MarginsShown;
- GuidesStat[2] = !Prefs.FramesShown;
- GuidesStat[3] = !Prefs.GridShown;
- GuidesStat[4] = !Prefs.GuidesShown;
- GuidesStat[5] = !Prefs.BaseShown;
- Prefs.MarginsShown = false;
- Prefs.FramesShown = false;
- Prefs.GridShown = false;
- Prefs.GuidesShown = false;
- Prefs.BaseShown = false;
- viewMenu->setItemChecked(Markers, Prefs.MarginsShown);
- viewMenu->setItemChecked(FrameDr, Prefs.FramesShown);
- viewMenu->setItemChecked(Ras, Prefs.GridShown);
- viewMenu->setItemChecked(Guide, Prefs.GuidesShown);
- viewMenu->setItemChecked(Base, Prefs.BaseShown);
+ GuidesStat[1] = !doc->MarginsShown;
+ GuidesStat[2] = !doc->FramesShown;
+ GuidesStat[3] = !doc->GridShown;
+ GuidesStat[4] = !doc->GuidesShown;
+ GuidesStat[5] = !doc->BaseShown;
+ doc->MarginsShown = false;
+ doc->FramesShown = false;
+ doc->GridShown = false;
+ doc->GuidesShown = false;
+ doc->BaseShown = false;
+ viewMenu->setItemChecked(Markers, doc->MarginsShown);
+ viewMenu->setItemChecked(FrameDr, doc->FramesShown);
+ viewMenu->setItemChecked(Ras, doc->GridShown);
+ viewMenu->setItemChecked(Guide, doc->GuidesShown);
+ viewMenu->setItemChecked(Base, doc->BaseShown);
}
view->DrawNew();
}
@@ -4996,8 +5021,8 @@
void ScribusApp::ToggleMarks()
{
GuidesStat[0] = false;
- Prefs.MarginsShown = !Prefs.MarginsShown;
- viewMenu->setItemChecked(Markers, Prefs.MarginsShown);
+ doc->MarginsShown = !doc->MarginsShown;
+ viewMenu->setItemChecked(Markers, doc->MarginsShown);
view->DrawNew();
}
@@ -5004,8 +5029,8 @@
void ScribusApp::ToggleFrames()
{
GuidesStat[0] = false;
- Prefs.FramesShown = !Prefs.FramesShown;
- viewMenu->setItemChecked(FrameDr, Prefs.FramesShown);
+ doc->FramesShown = !doc->FramesShown;
+ viewMenu->setItemChecked(FrameDr, doc->FramesShown);
view->DrawNew();
}
@@ -5012,8 +5037,8 @@
void ScribusApp::ToggleRaster()
{
GuidesStat[0] = false;
- Prefs.GridShown = !Prefs.GridShown;
- viewMenu->setItemChecked(Ras, Prefs.GridShown);
+ doc->GridShown = !doc->GridShown;
+ viewMenu->setItemChecked(Ras, doc->GridShown);
view->DrawNew();
}
@@ -5020,8 +5045,8 @@
void ScribusApp::ToggleGuides()
{
GuidesStat[0] = false;
- Prefs.GuidesShown = !Prefs.GuidesShown;
- viewMenu->setItemChecked(Guide, Prefs.GuidesShown);
+ doc->GuidesShown = !doc->GuidesShown;
+ viewMenu->setItemChecked(Guide, doc->GuidesShown);
view->DrawNew();
}
@@ -5028,8 +5053,8 @@
void ScribusApp::ToggleBase()
{
GuidesStat[0] = false;
- Prefs.BaseShown = !Prefs.BaseShown;
- viewMenu->setItemChecked(Base, Prefs.BaseShown);
+ doc->BaseShown = !doc->BaseShown;
+ viewMenu->setItemChecked(Base, doc->BaseShown);
view->DrawNew();
}
@@ -6685,7 +6710,7 @@
zChange = true;
}
Mpal->Cpal->UseTrans(Prefs.PDFTransparency);
- Prefs.BaseShown = dia->RadioButton8->isChecked();
+/* Prefs.BaseShown = dia->RadioButton8->isChecked();
if (Prefs.BaseShown)
viewMenu->changeItem(Base, tr("Hide Baseline Grid"));
else
@@ -6791,7 +6816,7 @@
view->DrawNew();
}
else
- {
+ { */
Prefs.Einheit = dia->UnitCombo->currentItem();
switch (Prefs.Einheit)
{
@@ -6896,7 +6921,7 @@
Prefs.AutoSaveTime = dia->ASTime->value() * 60 * 1000;
Prefs.BaseGrid = dia->BaseGrid->value();
Prefs.BaseOffs = dia->BaseOffs->value();
- }
+// }
SavePrefs();
QWidgetList windows = wsp->windowList();
for ( int i = 0; i < static_cast<int>(windows.count()); ++i )
@@ -7034,13 +7059,7 @@
Npal->move(Prefs.Npalx, Prefs.Npaly);
move(Prefs.MainX, Prefs.MainY);
resize(Prefs.MainW, Prefs.MainH);
- viewMenu->setItemChecked(Markers, Prefs.MarginsShown);
- viewMenu->setItemChecked(FrameDr, Prefs.FramesShown);
- viewMenu->setItemChecked(Ras, Prefs.GridShown);
- viewMenu->setItemChecked(Guide, Prefs.GuidesShown);
- viewMenu->setItemChecked(Base, Prefs.BaseShown);
-
- ReadPrefsXML();
+ ReadPrefsXML();
}
void ScribusApp::ReadPrefsXML()
/branches/Version13x/Scribus/scribus/prefsdialogbase.h
0,0 → 1,39
#ifndef PREFSDIALOGBASE_H
#define PREFSDIALOGBASE_H
 
#include <qvariant.h>
#include <qdialog.h>
#include <qlistbox.h>
#include <qwidgetstack.h>
#include <qwidget.h>
 
class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
class QSpacerItem;
class QPushButton;
 
class PrefsDialogBase : public QDialog
{
Q_OBJECT
 
public:
PrefsDialogBase( QWidget* parent = 0 );
~PrefsDialogBase() {};
 
QListBox* prefsSelection;
QWidgetStack* prefsWidgets;
QPushButton* buttonOk;
QPushButton* buttonCancel;
 
protected:
QVBoxLayout* prefsLayout;
QHBoxLayout* layout3;
QHBoxLayout* layout4;
 
protected slots:
virtual void languageChange();
 
};
 
#endif
Property changes:
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
Index: Version13x/Scribus/scribus/plugins/svgimplugin/svgplugin.cpp
===================================================================
--- Version13x/Scribus/scribus/plugins/svgimplugin/svgplugin.cpp (revision 692)
+++ Version13x/Scribus/scribus/plugins/svgimplugin/svgplugin.cpp (revision 693)
@@ -624,6 +624,7 @@
*/
double SVGPlug::parseUnit(const QString &unit)
{
+ bool noUnit = false;
QString unitval=unit;
if( unit.right( 2 ) == "pt" )
unitval.replace( "pt", "" );
@@ -635,6 +636,8 @@
unitval.replace( "in", "" );
else if( unit.right( 2 ) == "px" )
unitval.replace( "px", "" );
+ if (unitval == unit)
+ noUnit = true;
double value = unitval.toDouble();
if( unit.right( 2 ) == "pt" )
value = value;
@@ -645,7 +648,9 @@
else if( unit.right( 2 ) == "in" )
value = value * 72;
else if( unit.right( 2 ) == "px" )
- value = value;
+ value = value * 1.25;
+ else if(noUnit)
+ value = value * 1.25;
return value;
}