You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

146 lines
3.5 KiB

  1. /*
  2. * This program source code file is part of KiCad, a free EDA CAD application.
  3. *
  4. * Copyright (C) 2022 Mark Roszko <mark.roszko@gmail.com>
  5. * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
  6. *
  7. * This program is free software: you can redistribute it and/or modify it
  8. * under the terms of the GNU General Public License as published by the
  9. * Free Software Foundation, either version 3 of the License, or (at your
  10. * option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License along
  18. * with this program. If not, see <http://www.gnu.org/licenses/>.
  19. */
  20. #ifndef JOB_EXPORT_SCH_PLOT_H
  21. #define JOB_EXPORT_SCH_PLOT_H
  22. #include <vector>
  23. #include <kicommon.h>
  24. #include <wx/string.h>
  25. #include "job.h"
  26. enum class JOB_HPGL_PLOT_ORIGIN_AND_UNITS
  27. {
  28. PLOTTER_BOT_LEFT,
  29. PLOTTER_CENTER,
  30. USER_FIT_PAGE,
  31. USER_FIT_CONTENT,
  32. };
  33. enum class JOB_HPGL_PAGE_SIZE
  34. {
  35. DEFAULT = 0,
  36. SIZE_A5,
  37. SIZE_A4,
  38. SIZE_A3,
  39. SIZE_A2,
  40. SIZE_A1,
  41. SIZE_A0,
  42. SIZE_A,
  43. SIZE_B,
  44. SIZE_C,
  45. SIZE_D,
  46. SIZE_E,
  47. };
  48. enum class JOB_PAGE_SIZE
  49. {
  50. PAGE_SIZE_AUTO,
  51. PAGE_SIZE_A4,
  52. PAGE_SIZE_A
  53. };
  54. enum class SCH_PLOT_FORMAT
  55. {
  56. HPGL,
  57. POST,
  58. DXF,
  59. PDF,
  60. SVG
  61. };
  62. class KICOMMON_API JOB_EXPORT_SCH_PLOT : public JOB
  63. {
  64. public:
  65. JOB_EXPORT_SCH_PLOT( bool aOutputIsDirectory );
  66. SCH_PLOT_FORMAT m_plotFormat;
  67. wxString m_filename;
  68. wxString m_drawingSheet;
  69. wxString m_defaultFont;
  70. bool m_plotAll;
  71. bool m_plotDrawingSheet;
  72. std::vector<wxString> m_plotPages;
  73. bool m_blackAndWhite;
  74. JOB_PAGE_SIZE m_pageSizeSelect;
  75. bool m_useBackgroundColor;
  76. int m_minPenWidth;
  77. double m_HPGLPenSize; // for HPGL format only: pen size
  78. JOB_HPGL_PAGE_SIZE m_HPGLPaperSizeSelect;
  79. bool m_PDFPropertyPopups;
  80. bool m_PDFHierarchicalLinks;
  81. bool m_PDFMetadata;
  82. wxString m_theme;
  83. JOB_HPGL_PLOT_ORIGIN_AND_UNITS m_HPGLPlotOrigin;
  84. };
  85. class KICOMMON_API JOB_EXPORT_SCH_PLOT_PDF : public JOB_EXPORT_SCH_PLOT
  86. {
  87. public:
  88. JOB_EXPORT_SCH_PLOT_PDF();
  89. wxString GetDefaultDescription() const override;
  90. wxString GetSettingsDialogTitle() const override;
  91. };
  92. class KICOMMON_API JOB_EXPORT_SCH_PLOT_DXF : public JOB_EXPORT_SCH_PLOT
  93. {
  94. public:
  95. JOB_EXPORT_SCH_PLOT_DXF();
  96. wxString GetDefaultDescription() const override;
  97. wxString GetSettingsDialogTitle() const override;
  98. };
  99. class KICOMMON_API JOB_EXPORT_SCH_PLOT_SVG : public JOB_EXPORT_SCH_PLOT
  100. {
  101. public:
  102. JOB_EXPORT_SCH_PLOT_SVG();
  103. wxString GetDefaultDescription() const override;
  104. wxString GetSettingsDialogTitle() const override;
  105. };
  106. class KICOMMON_API JOB_EXPORT_SCH_PLOT_PS : public JOB_EXPORT_SCH_PLOT
  107. {
  108. public:
  109. JOB_EXPORT_SCH_PLOT_PS();
  110. wxString GetDefaultDescription() const override;
  111. wxString GetSettingsDialogTitle() const override;
  112. };
  113. class KICOMMON_API JOB_EXPORT_SCH_PLOT_HPGL : public JOB_EXPORT_SCH_PLOT
  114. {
  115. public:
  116. JOB_EXPORT_SCH_PLOT_HPGL();
  117. wxString GetDefaultDescription() const override;
  118. wxString GetSettingsDialogTitle() const override;
  119. };
  120. #endif