Scribus
Open source desktop publishing at your fingertips
MarginWidget Class Reference

Widget for Margins setting. Used e.g. in "New Doc Dialog" or "Preferences". More...

#include <marginwidget.h>

Inheritance diagram for MarginWidget:
Collaboration diagram for MarginWidget:

Public Slots

void setTop ()
 Recompute the values after spinbox change.
 
void setBottom ()
 
void setLeft ()
 
void setRight ()
 
void setPreset ()
 Recompute margins in PresetLayout combobox and disable/enable widgets.
 
void slotLinkBleeds ()
 
void slotLinkMargins ()
 
void changeBleeds ()
 

Public Member Functions

 MarginWidget (QWidget *parent, QString title, const MarginStruct *margs, int unitIndex, bool showChangeAll=false, bool showBleeds=true)
 It creates an user interface for base margin settings for the document. More...
 
void setFacingPages (bool facing, int pagetype=0)
 Setup the labels by facing pages option.
 
void setPageWidthHeight (double width, double height)
 Setup the spinboxes properties (min/max value etc.) by width and height.
 
void setPageWidth (double width)
 Setup the spinboxes properties (min/max value etc.) by width.
 
void setPageHeight (double heigth)
 Setup the spinboxes properties (min/max value etc.) by height.
 
void setNewUnit (int newUnitIndex)
 Setup the widgets by new options.
 
void setPageSize (const QString &pageSize)
 Set the page size for margin getting from cups.
 
const MarginStructmargins () const
 Margins. More...
 
double top () const
 Top Margin. More...
 
double bottom () const
 Bottom Margin. More...
 
double left () const
 Left Margin. More...
 
double right () const
 Right Margin. More...
 
void setNewMargins (MarginStruct &m)
 set new margin values for the dialog It calls overridden setTop(), setBottom() etc. slots itself via signals emitted from spinboxes. More...
 
void setMarginPreset (int p)
 Setup the presetCombo without changing the margin values, only used by tabdocument.
 
int getMarginPreset ()
 
double topBleed () const
 Top Bleed. More...
 
double bottomBleed () const
 Bottom Bleed. More...
 
double leftBleed () const
 Left Bleed. More...
 
double rightBleed () const
 Right Bleed. More...
 
void setNewBleeds (MarginStruct &b)
 set new bleed values for the dialog More...
 
bool getMarginsForAllPages () const
 Return marginsForAllPages property. More...
 
bool getMarginsForAllMasterPages () const
 

Protected Slots

virtual void setMarginsToPrinterMargins ()
 

Protected Member Functions

void updateMarginSpinValues ()
 

Protected Attributes

QGridLayout * GroupLayout
 
QHBoxLayout * marginsForPagesLayout
 
QGridLayout * BleedGroupLayout
 
QString m_pageSize
 
int m_unitIndex
 
double m_unitRatio
 
bool facingPages
 if the outer facing palette points to the facing pages item
 
bool useBleeds
 
int pageType
 
MarginStruct savedMargins
 
int savedPresetItem
 

Detailed Description

Widget for Margins setting. Used e.g. in "New Doc Dialog" or "Preferences".

Constructor & Destructor Documentation

MarginWidget::MarginWidget ( QWidget *  parent,
QString  title,
const MarginStruct margs,
int  unitIndex,
bool  showChangeAll = false,
bool  showBleeds = true 
)

It creates an user interface for base margin settings for the document.

Parameters
parentParent widget (used as standard in Qt)
titleTitle of the Group box
margsA reference to the margins in the preferences.
unitIndexand index of the unit combobox
showChangeAllshow "apply to all pages" related items

Fix Me to move this to the prefsmanager.cpp someday

Member Function Documentation

double MarginWidget::bottom ( void  ) const

Bottom Margin.

Return values
doublemargin size
double MarginWidget::bottomBleed ( ) const

Bottom Bleed.

Return values
doublebleed size
bool MarginWidget::getMarginsForAllPages ( ) const

Return marginsForAllPages property.

Return values
booltrue to apply for all pages
double MarginWidget::left ( ) const

Left Margin.

Return values
doublemargin size
double MarginWidget::leftBleed ( ) const

Left Bleed.

Return values
doublebleed size
const MarginStruct & MarginWidget::margins ( ) const

Margins.

Return values
MarginStructdata
double MarginWidget::right ( ) const

Right Margin.

Return values
doublemargin size
double MarginWidget::rightBleed ( ) const

Right Bleed.

Return values
doublebleed size
void MarginWidget::setNewBleeds ( MarginStruct b)

set new bleed values for the dialog

Parameters
bMarginStruct
void MarginWidget::setNewMargins ( MarginStruct m)

set new margin values for the dialog It calls overridden setTop(), setBottom() etc. slots itself via signals emitted from spinboxes.

Parameters
mMarginStruct
double MarginWidget::top ( void  ) const

Top Margin.

Return values
doublemargin size
double MarginWidget::topBleed ( ) const

Top Bleed.

Return values
doublebleed size

The documentation for this class was generated from the following files: