KiCad PCB EDA Suite
BOARD_PRINTOUT_SETTINGS Struct Reference

#include <board_printout.h>

Inheritance diagram for BOARD_PRINTOUT_SETTINGS:
PRINTOUT_SETTINGS PCBNEW_PRINTOUT_SETTINGS

Public Member Functions

 BOARD_PRINTOUT_SETTINGS (const PAGE_INFO &aPageInfo)
 
void Load (wxConfigBase *aConfig) override
 
void Save (wxConfigBase *aConfig) override
 
bool PrintBorderAndTitleBlock () const
 Returns true if the drawing border and title block should be printed. More...
 

Public Attributes

LSET m_layerSet
 Layers to print. More...
 
bool m_mirror
 Print mirrored. More...
 
double m_scale
 Printing scale. More...
 
bool m_titleBlock
 Print frame and title block. More...
 
bool m_blackWhite
 Print in B&W or Color. More...
 
int m_pageCount
 Number of pages to print. More...
 
const PAGE_INFOm_pageInfo
 

Detailed Description

Definition at line 48 of file board_printout.h.

Constructor & Destructor Documentation

BOARD_PRINTOUT_SETTINGS::BOARD_PRINTOUT_SETTINGS ( const PAGE_INFO aPageInfo)

Definition at line 35 of file board_printout.cpp.

References m_layerSet, and m_mirror.

36  : PRINTOUT_SETTINGS( aPageInfo )
37 {
38  m_layerSet.set();
39  m_mirror = false;
40 }
bool m_mirror
Print mirrored.
PRINTOUT_SETTINGS(const PAGE_INFO &aPageInfo)
Definition: printout.h:32
LSET m_layerSet
Layers to print.

Member Function Documentation

void BOARD_PRINTOUT_SETTINGS::Load ( wxConfigBase *  aConfig)
overridevirtual

Reimplemented from PRINTOUT_SETTINGS.

Definition at line 43 of file board_printout.cpp.

References Format(), PRINTOUT_SETTINGS::Load(), m_layerSet, and OPTKEY_LAYERBASE.

Referenced by PCBNEW_PRINTOUT_SETTINGS::Load().

44 {
45  PRINTOUT_SETTINGS::Load( aConfig );
46 
47  for( unsigned layer = 0; layer < m_layerSet.size(); ++layer )
48  {
49  int tmp;
50  wxString key = wxString::Format( OPTKEY_LAYERBASE, layer );
51  aConfig->Read( key, &tmp, 1 );
52  m_layerSet.set( layer, tmp );
53  }
54 }
#define OPTKEY_LAYERBASE
Definition: pcbplot.h:53
virtual void Load(wxConfigBase *aConfig)
Definition: printout.cpp:31
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, CPTREE &aTree)
Function Format outputs a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:205
LSET m_layerSet
Layers to print.
bool PRINTOUT_SETTINGS::PrintBorderAndTitleBlock ( ) const
inlineinherited

Returns true if the drawing border and title block should be printed.

For scale factors greater than one, the border is not printed because it will end up scaling off of the page.

Definition at line 56 of file printout.h.

References PRINTOUT_SETTINGS::m_titleBlock.

Referenced by BOARD_PRINTOUT::DrawPage().

57  {
58  return m_scale <= 1.0 && m_titleBlock;
59  }
double m_scale
Printing scale.
Definition: printout.h:44
bool m_titleBlock
Print frame and title block.
Definition: printout.h:45
void BOARD_PRINTOUT_SETTINGS::Save ( wxConfigBase *  aConfig)
overridevirtual

Reimplemented from PRINTOUT_SETTINGS.

Definition at line 57 of file board_printout.cpp.

References Format(), m_layerSet, OPTKEY_LAYERBASE, and PRINTOUT_SETTINGS::Save().

Referenced by PCBNEW_PRINTOUT_SETTINGS::Save().

58 {
59  PRINTOUT_SETTINGS::Save( aConfig );
60 
61  for( unsigned layer = 0; layer < m_layerSet.size(); ++layer )
62  {
63  wxString key = wxString::Format( OPTKEY_LAYERBASE, layer );
64  aConfig->Write( key, m_layerSet.test( layer ) );
65  }
66 }
#define OPTKEY_LAYERBASE
Definition: pcbplot.h:53
virtual void Save(wxConfigBase *aConfig)
Definition: printout.cpp:23
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, CPTREE &aTree)
Function Format outputs a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:205
LSET m_layerSet
Layers to print.

Member Data Documentation

bool BOARD_PRINTOUT_SETTINGS::m_mirror
const PAGE_INFO& PRINTOUT_SETTINGS::m_pageInfo
inherited

Definition at line 48 of file printout.h.

Referenced by BOARD_PRINTOUT::DrawPage(), and DIALOG_PRINT_GENERIC::initPrintData().


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