Seamly2D
Code documentation
ExportFormatCombobox Class Reference

#include <export_format_combobox.h>

Inheritance diagram for ExportFormatCombobox:
Collaboration diagram for ExportFormatCombobox:

Signals

void exportFormatChanged (const LayoutExportFormat &format)
 

Public Member Functions

 ExportFormatCombobox (QWidget *parent=nullptr, const char *name=nullptr)
 
virtual ~ExportFormatCombobox ()
 
void init ()
 
LayoutExportFormat getExportFormat () const
 
void setExportFormat (LayoutExportFormat &format)
 
void setCurrentToDefault ()
 

Static Public Member Functions

static QString exportFormatDescription (LayoutExportFormat format)
 
static QString makeHelpFormatList ()
 

Private Slots

void updateExportFormat (int index)
 

Static Private Member Functions

static QVector< std::pair< QString, LayoutExportFormat > > initFormats ()
 
static bool supportPSTest ()
 
static bool testPdf ()
 

Private Attributes

LayoutExportFormat m_currentFormat
 

Static Private Attributes

static bool havePdf = false
 
static bool tested = false
 

Detailed Description

A comboBox for choosing an export format type.

Definition at line 37 of file export_format_combobox.h.

Constructor & Destructor Documentation

◆ ExportFormatCombobox()

ExportFormatCombobox::ExportFormatCombobox ( QWidget *  parent = nullptr,
const char *  name = nullptr 
)

Constructor with name.

Definition at line 49 of file export_format_combobox.cpp.

References init().

◆ ~ExportFormatCombobox()

ExportFormatCombobox::~ExportFormatCombobox ( )
virtual

Destructor

Definition at line 61 of file export_format_combobox.cpp.

Member Function Documentation

◆ exportFormatChanged

void ExportFormatCombobox::exportFormatChanged ( const LayoutExportFormat format)
signal

Referenced by updateExportFormat().

◆ exportFormatDescription()

◆ getExportFormat()

LayoutExportFormat ExportFormatCombobox::getExportFormat ( ) const

Definition at line 87 of file export_format_combobox.cpp.

References m_currentFormat.

◆ init()

void ExportFormatCombobox::init ( )

Initialisation called from constructor or manually but only once.

Definition at line 66 of file export_format_combobox.cpp.

References initFormats(), setCurrentToDefault(), and updateExportFormat().

Referenced by ExportFormatCombobox().

◆ initFormats()

◆ makeHelpFormatList()

QString ExportFormatCombobox::makeHelpFormatList ( )
static

Definition at line 291 of file export_format_combobox.cpp.

References initFormats().

Referenced by VCommandLine::InitOptions().

◆ setCurrentToDefault()

void ExportFormatCombobox::setCurrentToDefault ( )

Definition at line 317 of file export_format_combobox.cpp.

References qApp.

Referenced by init().

◆ setExportFormat()

void ExportFormatCombobox::setExportFormat ( LayoutExportFormat format)

Sets the currently selected format item to the given format.

Definition at line 95 of file export_format_combobox.cpp.

References m_currentFormat, and updateExportFormat().

◆ supportPSTest()

bool ExportFormatCombobox::supportPSTest ( )
staticprivate

Definition at line 164 of file export_format_combobox.cpp.

References havePdf, tested, and testPdf().

Referenced by initFormats().

◆ testPdf()

bool ExportFormatCombobox::testPdf ( )
staticprivate

Definition at line 175 of file export_format_combobox.cpp.

References PDFTOPS, and qApp.

Referenced by supportPSTest().

◆ updateExportFormat

void ExportFormatCombobox::updateExportFormat ( int  index)
privateslot

Called when the width has changed. This method sets the current width to the value chosen or even offers a dialog to the user that allows him/ her to choose an individual width.

Definition at line 306 of file export_format_combobox.cpp.

References exportFormatChanged(), and m_currentFormat.

Referenced by init(), and setExportFormat().

Member Data Documentation

◆ havePdf

bool ExportFormatCombobox::havePdf = false
staticprivate

Definition at line 63 of file export_format_combobox.h.

Referenced by supportPSTest().

◆ m_currentFormat

LayoutExportFormat ExportFormatCombobox::m_currentFormat
private

Definition at line 65 of file export_format_combobox.h.

Referenced by getExportFormat(), setExportFormat(), and updateExportFormat().

◆ tested

bool ExportFormatCombobox::tested = false
staticprivate

Definition at line 64 of file export_format_combobox.h.

Referenced by supportPSTest().


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