Seamly2D
Code documentation
ExportLayoutDialog Class Reference

#include <export_layout_dialog.h>

Inheritance diagram for ExportLayoutDialog:
Collaboration diagram for ExportLayoutDialog:

Public Member Functions

 ExportLayoutDialog (int count, Draw mode=Draw::Layout, const QString &fileName=QString(), QWidget *parent=nullptr)
 
virtual ~ExportLayoutDialog ()
 
QString path () const
 
QString fileName () const
 
QString modeString () const
 modeString() More...
 
LayoutExportFormat format () const
 
QString formatText () const
 
void selectFormat (LayoutExportFormat format)
 
void setBinaryDXFFormat (bool binary)
 
bool isBinaryDXFFormat () const
 
void setDestinationPath (const QString &cmdDestinationPath)
 
Draw mode () const
 
bool isTextAsPaths () const
 
void setTextAsPaths (bool textAsPaths)
 
- Public Member Functions inherited from VAbstractLayoutDialog
 VAbstractLayoutDialog (QWidget *parent=nullptr)
 

Static Public Member Functions

static QString exportFormatSuffix (LayoutExportFormat format)
 

Protected Member Functions

virtual void showEvent (QShowEvent *event) Q_DECL_OVERRIDE
 
void initTemplates (QComboBox *templates)
 
- 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 Slots

void save ()
 
void pathChanged (const QString &text)
 
void showExportFiles ()
 

Private Member Functions

void removeFormatFromList (LayoutExportFormat format)
 
void readSettings ()
 ExportLayoutDialog::readSettings. More...
 
void writeSettings () const
 ExportLayoutDialog::writeSettings. More...
 

Private Attributes

Ui::ExportLayoutDialog * ui
 
int m_count
 
bool m_isInitialized
 
Draw m_mode
 
QPushButton * m_SaveButton
 

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 48 of file export_layout_dialog.h.

Constructor & Destructor Documentation

◆ ExportLayoutDialog()

◆ ~ExportLayoutDialog()

ExportLayoutDialog::~ExportLayoutDialog ( )
virtual

Definition at line 408 of file export_layout_dialog.cpp.

References ui.

Member Function Documentation

◆ exportFormatSuffix()

◆ fileName()

◆ format()

◆ formatText()

QString ExportLayoutDialog::formatText ( ) const

Definition at line 432 of file export_layout_dialog.cpp.

References ui.

Referenced by writeSettings().

◆ initTemplates()

void ExportLayoutDialog::initTemplates ( QComboBox *  templates)
protected

Definition at line 186 of file export_layout_dialog.cpp.

References VAbstractLayoutDialog::initTemplates().

◆ isBinaryDXFFormat()

◆ isTextAsPaths()

bool ExportLayoutDialog::isTextAsPaths ( ) const

◆ mode()

◆ modeString()

QString ExportLayoutDialog::modeString ( ) const

modeString()

Returns
Returns a string that is the mode type

Definition at line 764 of file export_layout_dialog.cpp.

References Calculation, Layout, m_mode, Modeling, and qApp.

Referenced by ExportLayoutDialog().

◆ path()

◆ pathChanged

void ExportLayoutDialog::pathChanged ( const QString &  text)
privateslot

Definition at line 493 of file export_layout_dialog.cpp.

References m_SaveButton, and ui.

◆ readSettings()

void ExportLayoutDialog::readSettings ( )
private

ExportLayoutDialog::readSettings.

Reads the values of the variables needed for the save layout dialog, for instance the margins, teamplte and orientation of tiled pdf. Then sets the corresponding elements of the dialog to these values.

Definition at line 671 of file export_layout_dialog.cpp.

References VAbstractLayoutDialog::Custom, VCommonSettings::getExportQuality(), VAbstractLayoutDialog::getTemplateSize(), VSettings::GetTiledPDFMargins(), VSettings::getTiledPDFOrientation(), VSettings::getTiledPDFPaperHeight(), VSettings::getTiledPDFPaperWidth(), Mm, Portrait, qApp, and ui.

◆ removeFormatFromList()

void ExportLayoutDialog::removeFormatFromList ( LayoutExportFormat  format)
private

Definition at line 653 of file export_layout_dialog.cpp.

References format(), and ui.

Referenced by ExportLayoutDialog().

◆ save

void ExportLayoutDialog::save ( )
privateslot

◆ selectFormat()

void ExportLayoutDialog::selectFormat ( LayoutExportFormat  format)

Definition at line 198 of file export_layout_dialog.cpp.

References COUNT, format(), and ui.

Referenced by MainWindow::DoExport().

◆ setBinaryDXFFormat()

◆ setDestinationPath()

void ExportLayoutDialog::setDestinationPath ( const QString &  cmdDestinationPath)

Definition at line 316 of file export_layout_dialog.cpp.

References path(), and ui.

Referenced by MainWindow::DoExport().

◆ setTextAsPaths()

void ExportLayoutDialog::setTextAsPaths ( bool  textAsPaths)

Definition at line 621 of file export_layout_dialog.cpp.

References Layout, m_mode, and ui.

Referenced by MainWindow::DoExport().

◆ showEvent()

void ExportLayoutDialog::showEvent ( QShowEvent *  event)
protectedvirtual

Definition at line 634 of file export_layout_dialog.cpp.

References m_isInitialized.

◆ showExportFiles

◆ writeSettings()

void ExportLayoutDialog::writeSettings ( ) const
private

ExportLayoutDialog::writeSettings.

Writes the values of some variables (like the margins, template and orientation of tiled pdf). of the save layout dialog into the settings.

Definition at line 720 of file export_layout_dialog.cpp.

References formatText(), VAbstractLayoutDialog::getTemplateSize(), Landscape, Mm, Portrait, qApp, VCommonSettings::setExportQuality(), VSettings::setTiledPDFMargins(), VSettings::setTiledPDFOrientation(), VSettings::setTiledPDFPaperHeight(), VSettings::setTiledPDFPaperWidth(), and ui.

Referenced by save().

Member Data Documentation

◆ m_count

int ExportLayoutDialog::m_count
private

Definition at line 90 of file export_layout_dialog.h.

Referenced by save(), and showExportFiles().

◆ m_isInitialized

bool ExportLayoutDialog::m_isInitialized
private

Definition at line 91 of file export_layout_dialog.h.

Referenced by showEvent().

◆ m_mode

Draw ExportLayoutDialog::m_mode
private

◆ m_SaveButton

QPushButton* ExportLayoutDialog::m_SaveButton
private

Definition at line 93 of file export_layout_dialog.h.

Referenced by ExportLayoutDialog(), and pathChanged().

◆ ui


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