KiCad PCB EDA Suite
printout.h
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 #ifndef PRINTOUT_H
20 #define PRINTOUT_H
21 
22 #include <page_info.h>
23 
24 class APP_SETTINGS_BASE;
25 class COLOR_SETTINGS;
26 
32 {
33  PRINTOUT_SETTINGS( const PAGE_INFO& aPageInfo )
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  }
43 
45  {
46  }
47 
48  virtual void Save( APP_SETTINGS_BASE* aConfig );
49  virtual void Load( APP_SETTINGS_BASE* aConfig );
50 
51  double m_scale;
52  bool m_titleBlock;
53  bool m_blackWhite;
55  bool m_background;
57 
60 
64  bool PrintBorderAndTitleBlock() const { return m_titleBlock; }
65 };
66 
67 #endif /* PRINTOUT_H */
bool m_background
Print background color.
Definition: printout.h:55
const PAGE_INFO & m_pageInfo
Definition: printout.h:56
virtual void Save(APP_SETTINGS_BASE *aConfig)
Definition: printout.cpp:24
PRINT_PARAMETERS handles the parameters used to print a board drawing.
Definition: printout.h:31
virtual void Load(APP_SETTINGS_BASE *aConfig)
Definition: printout.cpp:32
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
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
Definition: app_settings.h:73
PAGE_INFO describes the page size and margins of a paper page on which to eventually print or plot.
Definition: page_info.h:54
virtual ~PRINTOUT_SETTINGS()
Definition: printout.h:44
PRINTOUT_SETTINGS(const PAGE_INFO &aPageInfo)
Definition: printout.h:33
bool PrintBorderAndTitleBlock() const
Returns true if the drawing border and title block should be printed.
Definition: printout.h:64
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
Color settings are a bit different than most of the settings objects in that there can be more than o...