r17493 by craig - Add some help functions for margins. At some point we can protect Margins
scribus-commit
scribus-commit at lists.scribus.net
Fri May 4 13:59:31 UTC 2012
Author: craig
Date: Fri May 4 13:59:30 2012
New Revision: 17493
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17493
Log:
Add some help functions for margins. At some point we can protect Margins
Modified:
trunk/Scribus/scribus/scpage.h
trunk/Scribus/scribus/scribusstructs.h
Modified: trunk/Scribus/scribus/scpage.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17493&path=/trunk/Scribus/scribus/scpage.h
==============================================================================
--- trunk/Scribus/scribus/scpage.h (original)
+++ trunk/Scribus/scribus/scpage.h Fri May 4 13:59:30 2012
@@ -63,6 +63,12 @@
void setInitialHeight(const double);
void setOrientation(int);
void copySizingProperties(ScPage *sourcePage, const MarginStruct& pageMargins);
+ MarginStruct margins() const { return Margins; }
+ double leftMargin() const { return Margins.Left; }
+ double topMargin() const { return Margins.Top; }
+ double bottomMargin() const { return Margins.Bottom; }
+ double rightMargin() const { return Margins.Right; }
+
MarginStruct Margins;
MarginStruct initialMargins;
/** Nummer der Seite */
Modified: trunk/Scribus/scribus/scribusstructs.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17493&path=/trunk/Scribus/scribus/scribusstructs.h
==============================================================================
--- trunk/Scribus/scribus/scribusstructs.h (original)
+++ trunk/Scribus/scribus/scribusstructs.h Fri May 4 13:59:30 2012
@@ -81,8 +81,12 @@
MarginStruct(const MarginStruct& rhs) {Top=rhs.Top;Bottom=rhs.Bottom;Left=rhs.Left;Right=rhs.Right;}
void set(double top, double left, double bottom, double right) {Top=top;Bottom=bottom;Left=left;Right=right;}
void resetToZero() {Top=0.0;Bottom=0.0;Left=0.0;Right=0.0;}
- bool hasNonZeroValue() { return Top!=0.0 || Bottom!=0.0 || Left!=0.0 || Right!=0.0;}
- void print() {qDebug() << Top << Left << Bottom << Right;}
+ bool hasNonZeroValue() const { return Top!=0.0 || Bottom!=0.0 || Left!=0.0 || Right!=0.0;}
+ void print() const {qDebug() << Top << Left << Bottom << Right;}
+ double leftMargin() const { return Left; }
+ double topMargin() const { return Top; }
+ double bottomMargin() const { return Bottom; }
+ double rightMargin() const { return Right; }
double Top;
double Left;
double Bottom;
More information about the scribus-commit
mailing list