KiCad PCB EDA Suite
printout.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2018 CERN
3  * Author: Maciej Suminski <maciej.suminski@cern.ch>
4  *
5  * This program is free software: you can redistribute it and/or modify it
6  * under the terms of the GNU General Public License as published by the
7  * Free Software Foundation, either version 3 of the License, or (at your
8  * option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License along
16  * with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 #include <printout.h>
20 #include <pcbplot.h>
21 #include <wx/config.h>
22 
23 void PRINTOUT_SETTINGS::Save( wxConfigBase* aConfig )
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 }
29 
30 
31 void PRINTOUT_SETTINGS::Load( wxConfigBase* aConfig )
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
virtual void Save(wxConfigBase *aConfig)
Definition: printout.cpp:23
#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
Board plot function definition file.
bool m_titleBlock
Print frame and title block.
Definition: printout.h:45
virtual void Load(wxConfigBase *aConfig)
Definition: printout.cpp:31
bool m_blackWhite
Print in B&W or Color.
Definition: printout.h:46