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::PRINTOUT_SETTINGS ( const PAGE_INFO aPageInfo)
inline

Definition at line 32 of file printout.h.

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

References m_blackWhite, m_pageCount, m_scale, and m_titleBlock.

Member Function Documentation

◆ Load()

void PRINTOUT_SETTINGS::Load ( wxConfigBase *  aConfig)
virtual

Reimplemented in BOARD_PRINTOUT_SETTINGS, and PCBNEW_PRINTOUT_SETTINGS.

Definition at line 31 of file printout.cpp.

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

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(), and DIALOG_PRINT_GENERIC::TransferDataToWindow().

◆ PrintBorderAndTitleBlock()

bool PRINTOUT_SETTINGS::PrintBorderAndTitleBlock ( ) const
inline

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

Definition at line 53 of file printout.h.

53 { return m_titleBlock; }
bool m_titleBlock
Print frame and title block.
Definition: printout.h:45

References m_titleBlock.

Referenced by BOARD_PRINTOUT::DrawPage().

◆ Save()

void PRINTOUT_SETTINGS::Save ( wxConfigBase *  aConfig)
virtual

Reimplemented in BOARD_PRINTOUT_SETTINGS, and PCBNEW_PRINTOUT_SETTINGS.

Definition at line 23 of file printout.cpp.

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

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::Save(), and DIALOG_PRINT_GENERIC::saveSettings().

Member Data Documentation

◆ m_blackWhite

bool PRINTOUT_SETTINGS::m_blackWhite

◆ m_pageCount

◆ m_pageInfo

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().

◆ m_scale

double PRINTOUT_SETTINGS::m_scale

◆ m_titleBlock

bool PRINTOUT_SETTINGS::m_titleBlock

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