KiCad PCB EDA Suite
PRINTOUT_SETTINGS Struct Reference

Class PRINT_PARAMETERS handles the parameters used to print a board drawing. More...

#include <printout.h>

Inheritance diagram for PRINTOUT_SETTINGS:
BOARD_PRINTOUT_SETTINGS PCBNEW_PRINTOUT_SETTINGS

Public Member Functions

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

Public Attributes

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

Class PRINT_PARAMETERS handles the parameters used to print a board drawing.

Definition at line 30 of file printout.h.

Constructor & Destructor Documentation

PRINTOUT_SETTINGS::PRINTOUT_SETTINGS ( const PAGE_INFO aPageInfo)
inline

Definition at line 32 of file printout.h.

References Load(), m_blackWhite, m_pageCount, m_scale, m_titleBlock, and Save().

33  : m_pageInfo( aPageInfo )
34  {
35  m_scale = 1.0;
36  m_titleBlock = false;
37  m_blackWhite = true;
38  m_pageCount = 0;
39  }
const PAGE_INFO & m_pageInfo
Definition: printout.h:48
double m_scale
Printing scale.
Definition: printout.h:44
bool m_titleBlock
Print frame and title block.
Definition: printout.h:45
bool m_blackWhite
Print in B&W or Color.
Definition: printout.h:46
int m_pageCount
Number of pages to print.
Definition: printout.h:47

Member Function Documentation

void PRINTOUT_SETTINGS::Load ( wxConfigBase *  aConfig)
virtual

Reimplemented in BOARD_PRINTOUT_SETTINGS, and PCBNEW_PRINTOUT_SETTINGS.

Definition at line 31 of file printout.cpp.

References m_blackWhite, m_scale, m_titleBlock, OPTKEY_PRINT_MONOCHROME_MODE, OPTKEY_PRINT_PAGE_FRAME, and OPTKEY_PRINT_SCALE.

Referenced by DIALOG_PRINT_GENERIC::ForcePrintBorder(), BOARD_PRINTOUT_SETTINGS::Load(), PRINTOUT_SETTINGS(), and DIALOG_PRINT_GENERIC::TransferDataToWindow().

32 {
33  aConfig->Read( OPTKEY_PRINT_SCALE, &m_scale, 1.0 );
34  aConfig->Read( OPTKEY_PRINT_PAGE_FRAME, &m_titleBlock, false );
35  aConfig->Read( OPTKEY_PRINT_MONOCHROME_MODE, &m_blackWhite, 1 );
36 }
#define OPTKEY_PRINT_MONOCHROME_MODE
Definition: pcbplot.h:57
#define OPTKEY_PRINT_SCALE
Definition: pcbplot.h:55
#define OPTKEY_PRINT_PAGE_FRAME
Definition: pcbplot.h:56
double m_scale
Printing scale.
Definition: printout.h:44
bool m_titleBlock
Print frame and title block.
Definition: printout.h:45
bool m_blackWhite
Print in B&W or Color.
Definition: printout.h:46
bool PRINTOUT_SETTINGS::PrintBorderAndTitleBlock ( ) const
inline

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 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 PRINTOUT_SETTINGS::Save ( wxConfigBase *  aConfig)
virtual

Reimplemented in BOARD_PRINTOUT_SETTINGS, and PCBNEW_PRINTOUT_SETTINGS.

Definition at line 23 of file printout.cpp.

References m_blackWhite, m_scale, m_titleBlock, OPTKEY_PRINT_MONOCHROME_MODE, OPTKEY_PRINT_PAGE_FRAME, and OPTKEY_PRINT_SCALE.

Referenced by DIALOG_PRINT_GENERIC::ForcePrintBorder(), PRINTOUT_SETTINGS(), BOARD_PRINTOUT_SETTINGS::Save(), and DIALOG_PRINT_GENERIC::saveSettings().

24 {
25  aConfig->Write( OPTKEY_PRINT_SCALE, m_scale );
26  aConfig->Write( OPTKEY_PRINT_PAGE_FRAME, m_titleBlock );
27  aConfig->Write( OPTKEY_PRINT_MONOCHROME_MODE, m_blackWhite );
28 }
#define OPTKEY_PRINT_MONOCHROME_MODE
Definition: pcbplot.h:57
#define OPTKEY_PRINT_SCALE
Definition: pcbplot.h:55
#define OPTKEY_PRINT_PAGE_FRAME
Definition: pcbplot.h:56
double m_scale
Printing scale.
Definition: printout.h:44
bool m_titleBlock
Print frame and title block.
Definition: printout.h:45
bool m_blackWhite
Print in B&W or Color.
Definition: printout.h:46

Member Data Documentation

bool PRINTOUT_SETTINGS::m_blackWhite
const PAGE_INFO& PRINTOUT_SETTINGS::m_pageInfo

Definition at line 48 of file printout.h.

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

double PRINTOUT_SETTINGS::m_scale
bool PRINTOUT_SETTINGS::m_titleBlock

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