Seamly2D
Code documentation
VCommandLine Class Reference

#include <vcmdexport.h>

Collaboration diagram for VCommandLine:

Public Member Functions

virtual ~VCommandLine ()
 
bool IsTestModeEnabled () const
 
bool IsNoScalingEnabled () const
 
bool IsExportEnabled () const
 
QString OptMeasurePath () const
 
QString OptBaseName () const
 
QString OptDestinationPath () const
 
int OptExportType () const
 
int IsBinaryDXF () const
 
int isTextAsPaths () const
 
int exportOnlyPieces () const
 
VLayoutGeneratorPtr DefaultGenerator () const
 
QStringList OptInputFileNames () const
 
bool IsGuiEnabled () const
 
bool IsSetGradationSize () const
 
bool IsSetGradationHeight () const
 
QString OptGradationSize () const
 
QString OptGradationHeight () const
 

Protected Member Functions

 VCommandLine ()
 
DialogLayoutSettings::PaperSizeTemplate OptPaperSize () const
 
int OptRotation () const
 
Cases OptGroup () const
 

Static Protected Member Functions

static void Reset ()
 
static VCommandLinePtr Get (const QCoreApplication &app)
 

Static Private Member Functions

static qreal Lo2Px (const QString &src, const DialogLayoutSettings &converter)
 
static qreal Pg2Px (const QString &src, const DialogLayoutSettings &converter)
 
static void InitOptions (VCommandLineOptions &options, QMap< QString, int > &optionsIndex)
 

Private Attributes

QCommandLineParser parser
 
VCommandLineOptions optionsUsed
 
QMap< QString, int > optionsIndex
 
bool isGuiEnabled
 

Static Private Attributes

static VCommandLinePtr instance = nullptr
 

Friends

class VApplication
 

Detailed Description

Definition at line 48 of file vcmdexport.h.

Constructor & Destructor Documentation

◆ ~VCommandLine()

VCommandLine::~VCommandLine ( )
virtual

Definition at line 502 of file vcmdexport.cpp.

References optionsUsed.

◆ VCommandLine()

VCommandLine::VCommandLine ( )
protected

Definition at line 44 of file vcmdexport.cpp.

References InitOptions(), optionsIndex, optionsUsed, parser, and translate.

Referenced by Get().

Member Function Documentation

◆ DefaultGenerator()

◆ exportOnlyPieces()

int VCommandLine::exportOnlyPieces ( ) const

Definition at line 647 of file vcmdexport.cpp.

References LONG_OPTION_EXPORTONLYDETAILS, optionsIndex, optionsUsed, and parser.

◆ Get()

VCommandLinePtr VCommandLine::Get ( const QCoreApplication &  app)
staticprotected

Definition at line 487 of file vcmdexport.cpp.

References instance, and VCommandLine().

Referenced by VApplication::VApplication().

◆ InitOptions()

void VCommandLine::InitOptions ( VCommandLineOptions options,
QMap< QString, int > &  optionsIndex 
)
staticprivate

Definition at line 74 of file vcmdexport.cpp.

References Cm, LONG_OPTION_BASENAME, LONG_OPTION_BINARYDXF, LONG_OPTION_BOTTOM_MARGIN, LONG_OPTION_CROP, LONG_OPTION_DESTINATION, LONG_OPTION_EXP2FORMAT, LONG_OPTION_EXPORTONLYDETAILS, LONG_OPTION_GAPWIDTH, LONG_OPTION_GRADATIONHEIGHT, LONG_OPTION_GRADATIONSIZE, LONG_OPTION_GROUPPING, LONG_OPTION_IGNORE_MARGINS, LONG_OPTION_LEFT_MARGIN, LONG_OPTION_MEASUREFILE, LONG_OPTION_NO_HDPI_SCALING, LONG_OPTION_PAGEH, LONG_OPTION_PAGETEMPLATE, LONG_OPTION_PAGEUNITS, LONG_OPTION_PAGEW, LONG_OPTION_RIGHT_MARGIN, LONG_OPTION_ROTATE, LONG_OPTION_SAVELENGTH, LONG_OPTION_SHIFTLENGTH, LONG_OPTION_SHIFTUNITS, LONG_OPTION_TEST, LONG_OPTION_TEXT2PATHS, LONG_OPTION_TOP_MARGIN, LONG_OPTION_UNITE, DialogLayoutSettings::MakeGroupsHelp(), ExportFormatCombobox::makeHelpFormatList(), DialogLayoutSettings::MakeHelpTemplateList(), optionsIndex, SINGLE_OPTION_BASENAME, SINGLE_OPTION_BOTTOM_MARGIN, SINGLE_OPTION_CROP, SINGLE_OPTION_DESTINATION, SINGLE_OPTION_EXP2FORMAT, SINGLE_OPTION_GAPWIDTH, SINGLE_OPTION_GRADATIONHEIGHT, SINGLE_OPTION_GRADATIONSIZE, SINGLE_OPTION_GROUPPING, SINGLE_OPTION_IGNORE_MARGINS, SINGLE_OPTION_LEFT_MARGIN, SINGLE_OPTION_MEASUREFILE, SINGLE_OPTION_PAGEH, SINGLE_OPTION_PAGETEMPLATE, SINGLE_OPTION_PAGEUNITS, SINGLE_OPTION_PAGEW, SINGLE_OPTION_RIGHT_MARGIN, SINGLE_OPTION_ROTATE, SINGLE_OPTION_SAVELENGTH, SINGLE_OPTION_SHIFTLENGTH, SINGLE_OPTION_SHIFTUNITS, SINGLE_OPTION_TEST, SINGLE_OPTION_TOP_MARGIN, SINGLE_OPTION_UNITE, translate, VDomDocument::UnitsHelpString(), VMeasurement::WholeListHeights(), and VMeasurement::WholeListSizes().

Referenced by VCommandLine().

◆ IsBinaryDXF()

int VCommandLine::IsBinaryDXF ( ) const

Definition at line 635 of file vcmdexport.cpp.

References LONG_OPTION_BINARYDXF, optionsIndex, optionsUsed, and parser.

◆ IsExportEnabled()

bool VCommandLine::IsExportEnabled ( ) const

◆ IsGuiEnabled()

bool VCommandLine::IsGuiEnabled ( ) const

Definition at line 659 of file vcmdexport.cpp.

References isGuiEnabled.

◆ IsNoScalingEnabled()

bool VCommandLine::IsNoScalingEnabled ( ) const

Definition at line 527 of file vcmdexport.cpp.

References LONG_OPTION_NO_HDPI_SCALING, optionsIndex, optionsUsed, and parser.

◆ IsSetGradationHeight()

bool VCommandLine::IsSetGradationHeight ( ) const

Definition at line 671 of file vcmdexport.cpp.

References LONG_OPTION_GRADATIONHEIGHT, optionsIndex, optionsUsed, and parser.

◆ IsSetGradationSize()

bool VCommandLine::IsSetGradationSize ( ) const

Definition at line 665 of file vcmdexport.cpp.

References LONG_OPTION_GRADATIONSIZE, optionsIndex, optionsUsed, and parser.

◆ IsTestModeEnabled()

bool VCommandLine::IsTestModeEnabled ( ) const

Definition at line 515 of file vcmdexport.cpp.

References LONG_OPTION_TEST, optionsIndex, optionsUsed, parser, translate, and V_EX_USAGE.

Referenced by OptMeasurePath().

◆ isTextAsPaths()

int VCommandLine::isTextAsPaths ( ) const

Definition at line 641 of file vcmdexport.cpp.

References LONG_OPTION_TEXT2PATHS, optionsIndex, optionsUsed, and parser.

◆ Lo2Px()

qreal VCommandLine::Lo2Px ( const QString &  src,
const DialogLayoutSettings converter 
)
staticprivate

Definition at line 62 of file vcmdexport.cpp.

References DialogLayoutSettings::LayoutToPixels().

Referenced by DefaultGenerator().

◆ OptBaseName()

QString VCommandLine::OptBaseName ( ) const

Definition at line 600 of file vcmdexport.cpp.

References IsExportEnabled(), LONG_OPTION_BASENAME, optionsIndex, optionsUsed, and parser.

◆ OptDestinationPath()

QString VCommandLine::OptDestinationPath ( ) const

◆ OptExportType()

int VCommandLine::OptExportType ( ) const

Definition at line 624 of file vcmdexport.cpp.

References LONG_OPTION_EXP2FORMAT, optionsIndex, optionsUsed, and parser.

◆ OptGradationHeight()

QString VCommandLine::OptGradationHeight ( ) const

◆ OptGradationSize()

QString VCommandLine::OptGradationSize ( ) const

◆ OptGroup()

Cases VCommandLine::OptGroup ( ) const
protected

Definition at line 574 of file vcmdexport.cpp.

References LONG_OPTION_GROUPPING, optionsIndex, optionsUsed, parser, and UnknownCase.

Referenced by DefaultGenerator().

◆ OptInputFileNames()

QStringList VCommandLine::OptInputFileNames ( ) const

Definition at line 653 of file vcmdexport.cpp.

References parser.

◆ OptMeasurePath()

QString VCommandLine::OptMeasurePath ( ) const

◆ OptPaperSize()

DialogLayoutSettings::PaperSizeTemplate VCommandLine::OptPaperSize ( ) const
protected

Definition at line 545 of file vcmdexport.cpp.

References LONG_OPTION_PAGETEMPLATE, optionsIndex, optionsUsed, and parser.

Referenced by DefaultGenerator().

◆ OptRotation()

int VCommandLine::OptRotation ( ) const
protected

◆ Pg2Px()

qreal VCommandLine::Pg2Px ( const QString &  src,
const DialogLayoutSettings converter 
)
staticprivate

Definition at line 68 of file vcmdexport.cpp.

References DialogLayoutSettings::PageToPixels().

Referenced by DefaultGenerator().

◆ Reset()

void VCommandLine::Reset ( )
staticprotected

Definition at line 509 of file vcmdexport.cpp.

References instance.

Referenced by VApplication::VApplication(), and VApplication::~VApplication().

Friends And Related Function Documentation

◆ VApplication

friend class VApplication
friend

Definition at line 121 of file vcmdexport.h.

Member Data Documentation

◆ instance

VCommandLinePtr VCommandLine::instance = nullptr
staticprivate

Definition at line 116 of file vcmdexport.h.

Referenced by VApplication::CommandLine(), Get(), VApplication::IsGUIMode(), and Reset().

◆ isGuiEnabled

bool VCommandLine::isGuiEnabled
private

Definition at line 120 of file vcmdexport.h.

Referenced by IsGuiEnabled().

◆ optionsIndex

◆ optionsUsed

◆ parser


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