2018-10-05 14:41:17 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2018 CERN
|
2020-12-21 15:17:52 +00:00
|
|
|
* Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors.
|
2018-10-05 14:41:17 +00:00
|
|
|
* Author: Maciej Suminski <maciej.suminski@cern.ch>
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify it
|
|
|
|
* under the terms of the GNU General Public License as published by the
|
|
|
|
* Free Software Foundation, either version 3 of the License, or (at your
|
|
|
|
* option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef PRINTOUT_H
|
|
|
|
#define PRINTOUT_H
|
|
|
|
|
|
|
|
#include <page_info.h>
|
|
|
|
|
2020-01-13 01:44:19 +00:00
|
|
|
class APP_SETTINGS_BASE;
|
2020-05-16 17:15:43 +00:00
|
|
|
class COLOR_SETTINGS;
|
2018-10-05 14:41:17 +00:00
|
|
|
|
|
|
|
/**
|
2020-12-21 15:17:52 +00:00
|
|
|
* Handle the parameters used to print a board drawing.
|
2018-10-05 14:41:17 +00:00
|
|
|
*/
|
|
|
|
struct PRINTOUT_SETTINGS
|
|
|
|
{
|
|
|
|
PRINTOUT_SETTINGS( const PAGE_INFO& aPageInfo )
|
|
|
|
: m_pageInfo( aPageInfo )
|
|
|
|
{
|
2020-05-19 02:58:28 +00:00
|
|
|
m_scale = 1.0;
|
|
|
|
m_titleBlock = false;
|
|
|
|
m_blackWhite = true;
|
|
|
|
m_pageCount = 0;
|
|
|
|
m_background = false;
|
|
|
|
m_colorSettings = nullptr;
|
2018-10-05 14:41:17 +00:00
|
|
|
}
|
|
|
|
|
2020-02-05 22:19:14 +00:00
|
|
|
virtual ~PRINTOUT_SETTINGS()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2020-01-13 01:44:19 +00:00
|
|
|
virtual void Save( APP_SETTINGS_BASE* aConfig );
|
2020-12-21 15:17:52 +00:00
|
|
|
|
2020-01-13 01:44:19 +00:00
|
|
|
virtual void Load( APP_SETTINGS_BASE* aConfig );
|
2018-10-05 14:41:17 +00:00
|
|
|
|
2020-12-21 15:17:52 +00:00
|
|
|
/**
|
|
|
|
* Returns true if the drawing border and title block should be printed.
|
|
|
|
*/
|
|
|
|
bool PrintBorderAndTitleBlock() const { return m_titleBlock; }
|
|
|
|
|
|
|
|
|
2018-10-05 14:41:17 +00:00
|
|
|
double m_scale; ///< Printing scale
|
|
|
|
bool m_titleBlock; ///< Print frame and title block
|
|
|
|
bool m_blackWhite; ///< Print in B&W or Color
|
|
|
|
int m_pageCount; ///< Number of pages to print
|
2020-05-16 17:15:43 +00:00
|
|
|
bool m_background; ///< Print background color
|
2018-10-05 14:41:17 +00:00
|
|
|
const PAGE_INFO& m_pageInfo;
|
|
|
|
|
2020-05-16 17:15:43 +00:00
|
|
|
/// The color settings to be used for printing
|
|
|
|
COLOR_SETTINGS* m_colorSettings;
|
2018-10-05 14:41:17 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* PRINTOUT_H */
|