KiCad PCB EDA Suite
PRINTOUT_SETTINGS Struct Reference

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 ~PRINTOUT_SETTINGS ()
 
virtual void Save (APP_SETTINGS_BASE *aConfig)
 
virtual void Load (APP_SETTINGS_BASE *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...
 
bool m_background
 Print background color. More...
 
const PAGE_INFOm_pageInfo
 
COLOR_SETTINGSm_colorSettings
 The color settings to be used for printing. More...
 

Detailed Description

PRINT_PARAMETERS handles the parameters used to print a board drawing.

Definition at line 31 of file printout.h.

Constructor & Destructor Documentation

◆ PRINTOUT_SETTINGS()

PRINTOUT_SETTINGS::PRINTOUT_SETTINGS ( const PAGE_INFO aPageInfo)
inline

Definition at line 33 of file printout.h.

34  : m_pageInfo( aPageInfo )
35  {
36  m_scale = 1.0;
37  m_titleBlock = false;
38  m_blackWhite = true;
39  m_pageCount = 0;
40  m_background = false;
41  m_colorSettings = nullptr;
42  }
bool m_background
Print background color.
Definition: printout.h:55
const PAGE_INFO & m_pageInfo
Definition: printout.h:56
double m_scale
Printing scale.
Definition: printout.h:51
COLOR_SETTINGS * m_colorSettings
The color settings to be used for printing.
Definition: printout.h:59
bool m_titleBlock
Print frame and title block.
Definition: printout.h:52
bool m_blackWhite
Print in B&W or Color.
Definition: printout.h:53
int m_pageCount
Number of pages to print.
Definition: printout.h:54

References m_background, m_blackWhite, m_colorSettings, m_pageCount, m_scale, and m_titleBlock.

◆ ~PRINTOUT_SETTINGS()

virtual PRINTOUT_SETTINGS::~PRINTOUT_SETTINGS ( )
inlinevirtual

Definition at line 44 of file printout.h.

45  {
46  }

Member Function Documentation

◆ Load()

void PRINTOUT_SETTINGS::Load ( APP_SETTINGS_BASE aConfig)
virtual

Reimplemented in BOARD_PRINTOUT_SETTINGS, and PCBNEW_PRINTOUT_SETTINGS.

Definition at line 32 of file printout.cpp.

33 {
36  m_scale = aConfig->m_Printing.scale;
37 }
bool title_block
Whether or not to print title block.
Definition: app_settings.h:123
bool monochrome
Whether or not to print in monochrome.
Definition: app_settings.h:119
double m_scale
Printing scale.
Definition: printout.h:51
bool m_titleBlock
Print frame and title block.
Definition: printout.h:52
bool m_blackWhite
Print in B&W or Color.
Definition: printout.h:53
double scale
Printout scale.
Definition: app_settings.h:120

References m_blackWhite, APP_SETTINGS_BASE::m_Printing, m_scale, m_titleBlock, APP_SETTINGS_BASE::PRINTING::monochrome, APP_SETTINGS_BASE::PRINTING::scale, and APP_SETTINGS_BASE::PRINTING::title_block.

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 64 of file printout.h.

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

References m_titleBlock.

Referenced by BOARD_PRINTOUT::DrawPage().

◆ Save()

void PRINTOUT_SETTINGS::Save ( APP_SETTINGS_BASE aConfig)
virtual

Reimplemented in BOARD_PRINTOUT_SETTINGS, and PCBNEW_PRINTOUT_SETTINGS.

Definition at line 24 of file printout.cpp.

25 {
28  aConfig->m_Printing.scale = m_scale;
29 }
bool title_block
Whether or not to print title block.
Definition: app_settings.h:123
bool monochrome
Whether or not to print in monochrome.
Definition: app_settings.h:119
double m_scale
Printing scale.
Definition: printout.h:51
bool m_titleBlock
Print frame and title block.
Definition: printout.h:52
bool m_blackWhite
Print in B&W or Color.
Definition: printout.h:53
double scale
Printout scale.
Definition: app_settings.h:120

References m_blackWhite, APP_SETTINGS_BASE::m_Printing, m_scale, m_titleBlock, APP_SETTINGS_BASE::PRINTING::monochrome, APP_SETTINGS_BASE::PRINTING::scale, and APP_SETTINGS_BASE::PRINTING::title_block.

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

Member Data Documentation

◆ m_background

bool PRINTOUT_SETTINGS::m_background

Print background color.

Definition at line 55 of file printout.h.

Referenced by PRINTOUT_SETTINGS(), DIALOG_PRINT_PCBNEW::saveSettings(), and BOARD_PRINTOUT::setupPainter().

◆ m_blackWhite

◆ m_colorSettings

COLOR_SETTINGS* PRINTOUT_SETTINGS::m_colorSettings

The color settings to be used for printing.

Definition at line 59 of file printout.h.

Referenced by BOARD_PRINTOUT::DrawPage(), PRINTOUT_SETTINGS(), and DIALOG_PRINT_PCBNEW::saveSettings().

◆ m_pageCount

◆ m_pageInfo

const PAGE_INFO& PRINTOUT_SETTINGS::m_pageInfo

Definition at line 56 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: