Seamly2D
Code documentation
DialogLayoutSettings Class Reference

#include <dialoglayoutsettings.h>

Inheritance diagram for DialogLayoutSettings:
Collaboration diagram for DialogLayoutSettings:

Public Slots

void DialogAccepted ()
 

Public Member Functions

 DialogLayoutSettings (VLayoutGenerator *generator, QWidget *parent=nullptr, bool disableSettings=false)
 
virtual ~DialogLayoutSettings ()
 
qreal GetPaperHeight () const
 
void SetPaperHeight (qreal value)
 
qreal GetPaperWidth () const
 
void SetPaperWidth (qreal value)
 
qreal GetShift () const
 
void SetShift (qreal value)
 
qreal GetLayoutWidth () const
 
void SetLayoutWidth (qreal value)
 
QMarginsF GetFields () const
 
void SetFields (const QMarginsF &value)
 
Cases GetGroup () const
 
void SetGroup (const Cases &value)
 
bool GetRotate () const
 
void SetRotate (bool state)
 
int GetIncrease () const
 
bool SetIncrease (int increase)
 
bool GetAutoCrop () const
 
void SetAutoCrop (bool autoCrop)
 
bool IsSaveLength () const
 
void SetSaveLength (bool save)
 
bool IsUnitePages () const
 
void SetUnitePages (bool save)
 
bool IsStripOptimization () const
 
void SetStripOptimization (bool save)
 
quint8 GetMultiplier () const
 
void SetMultiplier (const quint8 &value)
 
bool IsIgnoreAllFields () const
 
void SetIgnoreAllFields (bool value)
 
bool isTextAsPaths () const
 
void setTextAsPaths (bool value)
 
QString SelectedPrinter () const
 
bool SelectTemplate (const PaperSizeTemplate &id)
 
bool SelectPaperUnit (const QString &units)
 
bool SelectLayoutUnit (const QString &units)
 
qreal LayoutToPixels (qreal value) const
 
qreal PageToPixels (qreal value) const
 
- Public Member Functions inherited from VAbstractLayoutDialog
 VAbstractLayoutDialog (QWidget *parent=nullptr)
 

Static Public Member Functions

static QString MakeHelpTemplateList ()
 
static QString MakeGroupsHelp ()
 

Protected Member Functions

virtual void showEvent (QShowEvent *event) Q_DECL_OVERRIDE
 
QSizeF getTemplateSize (const PaperSizeTemplate &tmpl, const Unit &unit) const
 DialogLayoutSettings::TemplateSize. More...
 
- Protected Member Functions inherited from VAbstractLayoutDialog
QSizeF getTemplateSize (const PaperSizeTemplate &tmpl, const Unit &unit) const
 DialogLayoutSettings::TemplateSize. More...
 
QSizeF RoundTemplateSize (qreal width, qreal height, Unit unit) const
 
void initTemplates (QComboBox *comboBoxTemplates)
 

Private Types

typedef QStringList FormatsVector
 
typedef int VIndexType
 

Private Slots

void ConvertPaperSize ()
 
void ConvertLayoutSize ()
 
void TemplateSelected ()
 
void FindTemplate ()
 
void PaperSizeChanged ()
 
void Swap (bool checked)
 
void RestoreDefaults ()
 
void PrinterMargins ()
 
void CorrectMaxFileds ()
 
void IgnoreAllFields (int state)
 

Private Member Functions

void InitPaperUnits ()
 
void InitLayoutUnits ()
 
void InitPrinter ()
 
QSizeF Template ()
 
QMarginsF MinPrinterFields () const
 
QMarginsF GetDefPrinterFields () const
 
Unit PaperUnit () const
 
Unit LayoutUnit () const
 
void CorrectPaperDecimals ()
 
void CorrectLayoutDecimals ()
 
void MinimumPaperSize ()
 
void MinimumLayoutSize ()
 
void ReadSettings ()
 
void WriteSettings () const
 
void SheetSize (const QSizeF &size)
 
void SetAdditionalOptions (bool value)
 

Private Attributes

bool disableSettings
 
Ui::DialogLayoutSettings * ui
 
Unit oldPaperUnit
 
Unit oldLayoutUnit
 
VLayoutGeneratorgenerator
 
bool isInitialized
 

Static Private Attributes

static const FormatsVector pageFormatNames
 

Additional Inherited Members

- Public Types inherited from VAbstractLayoutDialog
enum class  PaperSizeTemplate : char {
  A0 = 0 , A1 , A2 , A3 ,
  A4 , Letter , Legal , Roll24in = 7 ,
  Roll30in , Roll36in , Roll42in , Roll44in = 11 ,
  Custom = 12
}
 
- Protected Types inherited from VAbstractLayoutDialog
typedef QStringList FormatsVector
 
typedef int VIndexType
 
- Static Protected Attributes inherited from VAbstractLayoutDialog
static const FormatsVector pageFormatNames
 

Detailed Description

Definition at line 70 of file dialoglayoutsettings.h.

Member Typedef Documentation

◆ FormatsVector

typedef QStringList DialogLayoutSettings::FormatsVector
private

Definition at line 152 of file dialoglayoutsettings.h.

◆ VIndexType

typedef int DialogLayoutSettings::VIndexType
private

Definition at line 153 of file dialoglayoutsettings.h.

Constructor & Destructor Documentation

◆ DialogLayoutSettings()

◆ ~DialogLayoutSettings()

DialogLayoutSettings::~DialogLayoutSettings ( )
virtual

Definition at line 131 of file dialoglayoutsettings.cpp.

References ui.

Member Function Documentation

◆ ConvertLayoutSize

void DialogLayoutSettings::ConvertLayoutSize ( )
privateslot

◆ ConvertPaperSize

void DialogLayoutSettings::ConvertPaperSize ( )
privateslot

◆ CorrectLayoutDecimals()

void DialogLayoutSettings::CorrectLayoutDecimals ( )
private

Definition at line 935 of file dialoglayoutsettings.cpp.

References Cm, Inch, Mm, oldLayoutUnit, Px, and ui.

Referenced by ConvertLayoutSize().

◆ CorrectMaxFileds

void DialogLayoutSettings::CorrectMaxFileds ( )
privateslot

Definition at line 704 of file dialoglayoutsettings.cpp.

References ui.

Referenced by DialogLayoutSettings(), ReadSettings(), and RestoreDefaults().

◆ CorrectPaperDecimals()

void DialogLayoutSettings::CorrectPaperDecimals ( )
private

Definition at line 905 of file dialoglayoutsettings.cpp.

References Cm, Inch, Mm, oldPaperUnit, Px, and ui.

Referenced by ConvertPaperSize(), and SheetSize().

◆ DialogAccepted

◆ FindTemplate

void DialogLayoutSettings::FindTemplate ( )
privateslot

◆ GetAutoCrop()

bool DialogLayoutSettings::GetAutoCrop ( ) const

Definition at line 277 of file dialoglayoutsettings.cpp.

References ui.

Referenced by DialogAccepted(), and WriteSettings().

◆ GetDefPrinterFields()

QMarginsF DialogLayoutSettings::GetDefPrinterFields ( ) const
private

Definition at line 879 of file dialoglayoutsettings.cpp.

References GetPrinterFields(), and ui.

Referenced by ReadSettings(), and RestoreDefaults().

◆ GetFields()

QMarginsF DialogLayoutSettings::GetFields ( ) const

◆ GetGroup()

Cases DialogLayoutSettings::GetGroup ( ) const

Definition at line 207 of file dialoglayoutsettings.cpp.

References CaseDesc, CaseThreeGroup, CaseTwoGroup, and ui.

Referenced by DialogAccepted(), and WriteSettings().

◆ GetIncrease()

int DialogLayoutSettings::GetIncrease ( ) const

Definition at line 255 of file dialoglayoutsettings.cpp.

References ui.

Referenced by DialogAccepted(), and WriteSettings().

◆ GetLayoutWidth()

qreal DialogLayoutSettings::GetLayoutWidth ( ) const

Definition at line 175 of file dialoglayoutsettings.cpp.

References oldLayoutUnit, Px, ui, and UnitConvertor().

Referenced by DialogAccepted(), and WriteSettings().

◆ GetMultiplier()

quint8 DialogLayoutSettings::GetMultiplier ( ) const

Definition at line 325 of file dialoglayoutsettings.cpp.

References ui.

Referenced by DialogAccepted(), and WriteSettings().

◆ GetPaperHeight()

qreal DialogLayoutSettings::GetPaperHeight ( ) const

Definition at line 137 of file dialoglayoutsettings.cpp.

References oldPaperUnit, Px, ui, and UnitConvertor().

Referenced by DialogAccepted(), and WriteSettings().

◆ GetPaperWidth()

qreal DialogLayoutSettings::GetPaperWidth ( ) const

Definition at line 150 of file dialoglayoutsettings.cpp.

References oldPaperUnit, Px, ui, and UnitConvertor().

Referenced by DialogAccepted(), and WriteSettings().

◆ GetRotate()

bool DialogLayoutSettings::GetRotate ( ) const

Definition at line 243 of file dialoglayoutsettings.cpp.

References ui.

Referenced by DialogAccepted(), and WriteSettings().

◆ GetShift()

qreal DialogLayoutSettings::GetShift ( ) const

Definition at line 163 of file dialoglayoutsettings.cpp.

References oldLayoutUnit, Px, ui, and UnitConvertor().

Referenced by DialogAccepted(), and WriteSettings().

◆ getTemplateSize()

QSizeF DialogLayoutSettings::getTemplateSize ( const PaperSizeTemplate tmpl,
const Unit unit 
) const
protected

DialogLayoutSettings::TemplateSize.

Parameters
tmpl
unit
Returns

Definition at line 844 of file dialoglayoutsettings.cpp.

References VAbstractLayoutDialog::Custom, VAbstractLayoutDialog::getTemplateSize(), VAbstractLayoutDialog::RoundTemplateSize(), and ui.

Referenced by FindTemplate(), and Template().

◆ IgnoreAllFields

void DialogLayoutSettings::IgnoreAllFields ( int  state)
privateslot

Definition at line 720 of file dialoglayoutsettings.cpp.

References ui.

Referenced by DialogLayoutSettings(), ReadSettings(), and RestoreDefaults().

◆ InitLayoutUnits()

void DialogLayoutSettings::InitLayoutUnits ( )
private

Definition at line 746 of file dialoglayoutsettings.cpp.

References Cm, Inch, Mm, oldLayoutUnit, qApp, StrToUnits(), ui, and UnitsToStr().

Referenced by DialogLayoutSettings().

◆ InitPaperUnits()

void DialogLayoutSettings::InitPaperUnits ( )
private

Definition at line 729 of file dialoglayoutsettings.cpp.

References Cm, Inch, Mm, oldPaperUnit, Px, qApp, StrToUnits(), ui, and UnitsToStr().

Referenced by DialogLayoutSettings().

◆ InitPrinter()

void DialogLayoutSettings::InitPrinter ( )
private

Definition at line 763 of file dialoglayoutsettings.cpp.

References ui.

Referenced by DialogLayoutSettings(), and RestoreDefaults().

◆ IsIgnoreAllFields()

bool DialogLayoutSettings::IsIgnoreAllFields ( ) const

Definition at line 337 of file dialoglayoutsettings.cpp.

References ui.

Referenced by DialogAccepted(), and WriteSettings().

◆ IsSaveLength()

bool DialogLayoutSettings::IsSaveLength ( ) const

Definition at line 289 of file dialoglayoutsettings.cpp.

References ui.

Referenced by DialogAccepted(), and WriteSettings().

◆ IsStripOptimization()

bool DialogLayoutSettings::IsStripOptimization ( ) const

Definition at line 313 of file dialoglayoutsettings.cpp.

References ui.

Referenced by DialogAccepted(), and WriteSettings().

◆ isTextAsPaths()

bool DialogLayoutSettings::isTextAsPaths ( ) const

Definition at line 349 of file dialoglayoutsettings.cpp.

References ui.

Referenced by DialogAccepted(), and WriteSettings().

◆ IsUnitePages()

bool DialogLayoutSettings::IsUnitePages ( ) const

Definition at line 301 of file dialoglayoutsettings.cpp.

References ui.

Referenced by DialogAccepted(), and WriteSettings().

◆ LayoutToPixels()

qreal DialogLayoutSettings::LayoutToPixels ( qreal  value) const

Definition at line 470 of file dialoglayoutsettings.cpp.

References LayoutUnit(), Px, and UnitConvertor().

Referenced by VCommandLine::Lo2Px().

◆ LayoutUnit()

Unit DialogLayoutSettings::LayoutUnit ( ) const
private

◆ MakeGroupsHelp()

QString DialogLayoutSettings::MakeGroupsHelp ( )
static

Definition at line 482 of file dialoglayoutsettings.cpp.

Referenced by VCommandLine::InitOptions().

◆ MakeHelpTemplateList()

QString DialogLayoutSettings::MakeHelpTemplateList ( )
static

◆ MinimumLayoutSize()

void DialogLayoutSettings::MinimumLayoutSize ( )
private

Definition at line 963 of file dialoglayoutsettings.cpp.

References oldLayoutUnit, Px, ui, and UnitConvertor().

Referenced by ConvertLayoutSize(), and DialogLayoutSettings().

◆ MinimumPaperSize()

void DialogLayoutSettings::MinimumPaperSize ( )
private

Definition at line 955 of file dialoglayoutsettings.cpp.

References oldPaperUnit, Px, ui, and UnitConvertor().

Referenced by ConvertPaperSize(), and DialogLayoutSettings().

◆ MinPrinterFields()

QMarginsF DialogLayoutSettings::MinPrinterFields ( ) const
private

Definition at line 864 of file dialoglayoutsettings.cpp.

References GetMinPrinterFields(), and ui.

Referenced by DialogAccepted().

◆ PageToPixels()

qreal DialogLayoutSettings::PageToPixels ( qreal  value) const

Definition at line 476 of file dialoglayoutsettings.cpp.

References PaperUnit(), Px, and UnitConvertor().

Referenced by VCommandLine::Pg2Px().

◆ PaperSizeChanged

void DialogLayoutSettings::PaperSizeChanged ( )
privateslot

Definition at line 531 of file dialoglayoutsettings.cpp.

References ui.

Referenced by DialogLayoutSettings(), and SheetSize().

◆ PaperUnit()

Unit DialogLayoutSettings::PaperUnit ( ) const
private

◆ PrinterMargins

void DialogLayoutSettings::PrinterMargins ( )
privateslot

Definition at line 690 of file dialoglayoutsettings.cpp.

References GetPrinterFields(), SetFields(), and ui.

Referenced by DialogLayoutSettings().

◆ ReadSettings()

◆ RestoreDefaults

◆ SelectedPrinter()

QString DialogLayoutSettings::SelectedPrinter ( ) const

Definition at line 361 of file dialoglayoutsettings.cpp.

References ui.

Referenced by MainWindowsNoGUI::toolLayoutSettings().

◆ SelectLayoutUnit()

bool DialogLayoutSettings::SelectLayoutUnit ( const QString &  units)

Definition at line 459 of file dialoglayoutsettings.cpp.

References ui.

Referenced by VCommandLine::DefaultGenerator().

◆ SelectPaperUnit()

bool DialogLayoutSettings::SelectPaperUnit ( const QString &  units)

Definition at line 448 of file dialoglayoutsettings.cpp.

References ui.

Referenced by VCommandLine::DefaultGenerator().

◆ SelectTemplate()

bool DialogLayoutSettings::SelectTemplate ( const PaperSizeTemplate id)

Definition at line 548 of file dialoglayoutsettings.cpp.

References ui.

Referenced by VCommandLine::DefaultGenerator().

◆ SetAdditionalOptions()

void DialogLayoutSettings::SetAdditionalOptions ( bool  value)
private

Definition at line 1033 of file dialoglayoutsettings.cpp.

References SetAutoCrop(), SetSaveLength(), SetStripOptimization(), and SetUnitePages().

Referenced by Template().

◆ SetAutoCrop()

void DialogLayoutSettings::SetAutoCrop ( bool  autoCrop)

Definition at line 283 of file dialoglayoutsettings.cpp.

References ui.

Referenced by VCommandLine::DefaultGenerator(), ReadSettings(), and SetAdditionalOptions().

◆ SetFields()

void DialogLayoutSettings::SetFields ( const QMarginsF &  value)

◆ SetGroup()

void DialogLayoutSettings::SetGroup ( const Cases value)

◆ SetIgnoreAllFields()

void DialogLayoutSettings::SetIgnoreAllFields ( bool  value)

Definition at line 343 of file dialoglayoutsettings.cpp.

References ui.

Referenced by VCommandLine::DefaultGenerator(), ReadSettings(), and RestoreDefaults().

◆ SetIncrease()

bool DialogLayoutSettings::SetIncrease ( int  increase)

◆ SetLayoutWidth()

void DialogLayoutSettings::SetLayoutWidth ( qreal  value)

◆ SetMultiplier()

void DialogLayoutSettings::SetMultiplier ( const quint8 &  value)

Definition at line 331 of file dialoglayoutsettings.cpp.

References ui.

Referenced by ReadSettings(), and RestoreDefaults().

◆ SetPaperHeight()

void DialogLayoutSettings::SetPaperHeight ( qreal  value)

Definition at line 143 of file dialoglayoutsettings.cpp.

References FromPixel(), PaperUnit(), Px, QIMAGE_MAX, ui, and UnitConvertor().

Referenced by VCommandLine::DefaultGenerator().

◆ SetPaperWidth()

void DialogLayoutSettings::SetPaperWidth ( qreal  value)

Definition at line 156 of file dialoglayoutsettings.cpp.

References FromPixel(), PaperUnit(), Px, QIMAGE_MAX, ui, and UnitConvertor().

Referenced by VCommandLine::DefaultGenerator().

◆ SetRotate()

void DialogLayoutSettings::SetRotate ( bool  state)

Definition at line 249 of file dialoglayoutsettings.cpp.

References ui.

Referenced by VCommandLine::DefaultGenerator(), ReadSettings(), and RestoreDefaults().

◆ SetSaveLength()

void DialogLayoutSettings::SetSaveLength ( bool  save)

Definition at line 295 of file dialoglayoutsettings.cpp.

References ui.

Referenced by VCommandLine::DefaultGenerator(), ReadSettings(), and SetAdditionalOptions().

◆ SetShift()

void DialogLayoutSettings::SetShift ( qreal  value)

◆ SetStripOptimization()

void DialogLayoutSettings::SetStripOptimization ( bool  save)

Definition at line 319 of file dialoglayoutsettings.cpp.

References ui.

Referenced by ReadSettings(), and SetAdditionalOptions().

◆ setTextAsPaths()

void DialogLayoutSettings::setTextAsPaths ( bool  value)

Definition at line 355 of file dialoglayoutsettings.cpp.

References ui.

Referenced by ReadSettings().

◆ SetUnitePages()

void DialogLayoutSettings::SetUnitePages ( bool  save)

Definition at line 307 of file dialoglayoutsettings.cpp.

References ui.

Referenced by VCommandLine::DefaultGenerator(), ReadSettings(), and SetAdditionalOptions().

◆ SheetSize()

void DialogLayoutSettings::SheetSize ( const QSizeF &  size)
private

◆ showEvent()

void DialogLayoutSettings::showEvent ( QShowEvent *  event)
protectedvirtual

Definition at line 489 of file dialoglayoutsettings.cpp.

References isInitialized.

◆ Swap

void DialogLayoutSettings::Swap ( bool  checked)
privateslot

Definition at line 560 of file dialoglayoutsettings.cpp.

References ui.

Referenced by DialogLayoutSettings().

◆ Template()

◆ TemplateSelected

void DialogLayoutSettings::TemplateSelected ( )
privateslot

Definition at line 367 of file dialoglayoutsettings.cpp.

References SheetSize(), and Template().

Referenced by DialogLayoutSettings(), and RestoreDefaults().

◆ WriteSettings()

Member Data Documentation

◆ disableSettings

bool DialogLayoutSettings::disableSettings
private

Definition at line 156 of file dialoglayoutsettings.h.

Referenced by DialogAccepted(), and DialogLayoutSettings().

◆ generator

VLayoutGenerator* DialogLayoutSettings::generator
private

Definition at line 161 of file dialoglayoutsettings.h.

Referenced by DialogAccepted().

◆ isInitialized

bool DialogLayoutSettings::isInitialized
private

Definition at line 162 of file dialoglayoutsettings.h.

Referenced by showEvent().

◆ oldLayoutUnit

Unit DialogLayoutSettings::oldLayoutUnit
private

◆ oldPaperUnit

Unit DialogLayoutSettings::oldPaperUnit
private

◆ pageFormatNames

const FormatsVector DialogLayoutSettings::pageFormatNames
staticprivate

Definition at line 154 of file dialoglayoutsettings.h.

◆ ui


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