20#ifndef LIBREPCB_EDITOR_GRAPHICSEXPORTDIALOG_H
21#define LIBREPCB_EDITOR_GRAPHICSEXPORTDIALOG_H
29#include <optional/tl/optional.hpp>
32#include <QtPrintSupport>
43class GraphicsExportSettings;
44class GraphicsPagePainter;
51class GraphicsExportDialog;
88 typedef std::function<QString(QWidget*,
const QString&,
const QString&,
89 const QString&, QString*, QFileDialog::Options)>
91 typedef std::pair<std::shared_ptr<GraphicsPagePainter>,
92 std::shared_ptr<GraphicsExportSettings>>
100 const QList<std::shared_ptr<GraphicsPagePainter>>& pages,
int currentPage,
101 const QString& documentName,
int innerLayerCount,
103 const Theme& theme,
const QString& settingsPrefix,
104 QWidget* parent =
nullptr) noexcept;
128 bool eventFilter(QObject*
object, QEvent* event) noexcept override;
131 void setPageSize(const
tl::optional<QPageSize::PageSizeId>& size) noexcept;
153 void setDpi(
int dpi) noexcept;
154 int getDpi() const noexcept;
163 void setDuplex(QPrinter::DuplexMode duplex) noexcept;
164 QPrinter::DuplexMode
getDuplex() const noexcept;
The Board class represents a PCB of a project and is always part of a circuit.
Definition: board.h:73
This class represents absolute, well-formatted paths to files or directories.
Definition: filepath.h:129
Asynchronously exports graphics to a QPainter.
Definition: graphicsexport.h:90
Settings for librepcb::GraphicsExport.
Definition: graphicsexportsettings.h:51
Base class for printing a page for librepcb::GraphicsExport.
Definition: graphicsexport.h:57
The LengthUnit class represents a length unit (millimeters, inches,...) and provides some useful meth...
Definition: lengthunit.h:60
The Schematic class represents one schematic page of a project and is always part of a circuit.
Definition: schematic.h:74
Theme class as used by librepcb::WorkspaceSettingsItem_Themes.
Definition: theme.h:44
This class provides a Dialog (GUI) to choose DXF import settings.
Definition: graphicsexportdialog.h:61
QPrinter::DuplexMode mSettingsDuplexMode
Definition: graphicsexportdialog.h:186
int getDpi() const noexcept
Definition: graphicsexportdialog.cpp:1332
FilePath mPathToOpenAfterExport
Definition: graphicsexportdialog.h:200
void setOpenExportedFiles(bool open) noexcept
Definition: graphicsexportdialog.cpp:1439
const QList< ContentItem > & getPageContent() const noexcept
Definition: graphicsexportdialog.cpp:1435
GraphicsExportDialog(const GraphicsExportDialog &other)=delete
const QList< Page > & getPages() const noexcept
Definition: graphicsexportdialog.h:109
void startExport(bool toClipboard) noexcept
Definition: graphicsexportdialog.cpp:1125
void setOrientation(GraphicsExportSettings::Orientation orientation) noexcept
Definition: graphicsexportdialog.cpp:1230
const Output mOutput
Definition: graphicsexportdialog.h:173
void printerChanged(int index) noexcept
Definition: graphicsexportdialog.cpp:921
QScopedPointer< GraphicsExport > mPreview
Definition: graphicsexportdialog.h:198
void setMinLineWidth(const UnsignedLength &width) noexcept
Definition: graphicsexportdialog.cpp:1364
bool getBlackWhite() const noexcept
Definition: graphicsexportdialog.cpp:1340
const Theme & mTheme
Definition: graphicsexportdialog.h:177
bool getRotate() const noexcept
Definition: graphicsexportdialog.cpp:1299
void setMirror(bool mirror) noexcept
Definition: graphicsexportdialog.cpp:1303
void setMarginLeft(const UnsignedLength &margin) noexcept
Definition: graphicsexportdialog.cpp:1252
QScopedPointer< QProgressDialog > mProgressDialog
Definition: graphicsexportdialog.h:190
void setDuplex(QPrinter::DuplexMode duplex) noexcept
Definition: graphicsexportdialog.cpp:1387
GraphicsExportDialog()=delete
void setBackgroundColor(const QColor &color) noexcept
Definition: graphicsexportdialog.cpp:1344
QList< QPrinterInfo > mAvailablePrinters
Definition: graphicsexportdialog.h:193
const int mCurrentPage
Definition: graphicsexportdialog.h:175
QString getPrinterName() const noexcept
Definition: graphicsexportdialog.cpp:1382
tl::optional< QPageSize::PageSizeId > mSettingsPageSize
Definition: graphicsexportdialog.h:185
void setSaveAsCallback(SaveAsCallback callback) noexcept
Definition: graphicsexportdialog.cpp:457
Mode
Definition: graphicsexportdialog.h:79
void setShowPinNumbers(bool show) noexcept
Definition: graphicsexportdialog.cpp:1287
void setPrinterName(const QString &name) noexcept
Definition: graphicsexportdialog.cpp:1373
QScopedPointer< GraphicsExport > mExport
Definition: graphicsexportdialog.h:199
bool getMirror() const noexcept
Definition: graphicsexportdialog.cpp:1307
const FilePath mDefaultFilePath
Definition: graphicsexportdialog.h:176
void setScaleFactor(const UnsignedRatio &factor) noexcept
Definition: graphicsexportdialog.cpp:1319
Output
Definition: graphicsexportdialog.h:83
UnsignedRatio getScaleFactor() const noexcept
Definition: graphicsexportdialog.cpp:1324
void setPageContent(const QList< ContentItem > &items) noexcept
Definition: graphicsexportdialog.cpp:1410
void printersAvailable() noexcept
Definition: graphicsexportdialog.cpp:886
void applySettings() noexcept
Definition: graphicsexportdialog.cpp:995
bool getShowPinNumbers() const noexcept
Definition: graphicsexportdialog.cpp:1291
void layerListItemDoubleClicked(QListWidgetItem *item) noexcept
Definition: graphicsexportdialog.cpp:984
UnsignedLength getMarginBottom() const noexcept
Definition: graphicsexportdialog.cpp:1283
bool getOpenExportedFiles() const noexcept
Definition: graphicsexportdialog.cpp:1443
void syncClientSettings(ClientSettingsAction action) noexcept
Definition: graphicsexportdialog.cpp:584
const QString mSettingsPrefix
Definition: graphicsexportdialog.h:178
std::pair< std::shared_ptr< GraphicsPagePainter >, std::shared_ptr< GraphicsExportSettings > > Page
Definition: graphicsexportdialog.h:93
void loadDefaultSettings() noexcept
Definition: graphicsexportdialog.cpp:466
void setMarginTop(const UnsignedLength &margin) noexcept
Definition: graphicsexportdialog.cpp:1261
void openProgressDialog() noexcept
Definition: graphicsexportdialog.cpp:1190
GraphicsExportDialog & operator=(const GraphicsExportDialog &rhs)=delete
void setRotate(bool rotate) noexcept
Definition: graphicsexportdialog.cpp:1295
const QList< std::shared_ptr< GraphicsPagePainter > > mInputPages
Definition: graphicsexportdialog.h:174
QList< Page > mPages
Definition: graphicsexportdialog.h:196
void setFitToPage(bool fit) noexcept
Definition: graphicsexportdialog.cpp:1311
QList< tl::optional< QPageSize > > mAvailablePageSizes
Definition: graphicsexportdialog.h:194
QList< std::pair< QString, QColor > > mColors
Definition: graphicsexportdialog.h:182
void setAvailablePageSizes(QList< tl::optional< QPageSize > > sizes) noexcept
Definition: graphicsexportdialog.cpp:958
QPrinter::DuplexMode getDuplex() const noexcept
Definition: graphicsexportdialog.cpp:1396
void setPageSize(const tl::optional< QPageSize::PageSizeId > &size) noexcept
Definition: graphicsexportdialog.cpp:1215
UnsignedLength getMarginLeft() const noexcept
Definition: graphicsexportdialog.cpp:1257
bool getFitToPage() const noexcept
Definition: graphicsexportdialog.cpp:1315
tl::optional< QPageSize > getPageSize() const noexcept
Definition: graphicsexportdialog.cpp:1226
QScopedPointer< GraphicsExportSettings > mDefaultSettings
Definition: graphicsexportdialog.h:181
void setMarginBottom(const UnsignedLength &margin) noexcept
Definition: graphicsexportdialog.cpp:1278
GraphicsExportSettings::Orientation getOrientation() const noexcept
Definition: graphicsexportdialog.cpp:1241
std::function< QString(QWidget *, const QString &, const QString &, const QString &, QString *, QFileDialog::Options)> SaveAsCallback
Definition: graphicsexportdialog.h:90
void setBlackWhite(bool blackWhite) noexcept
Definition: graphicsexportdialog.cpp:1336
SaveAsCallback mSaveAsCallback
Definition: graphicsexportdialog.h:179
ClientSettingsAction
Definition: graphicsexportdialog.h:65
UnsignedLength getMarginRight() const noexcept
Definition: graphicsexportdialog.cpp:1274
const Mode mMode
Definition: graphicsexportdialog.h:172
void updateColorsListWidget() noexcept
Definition: graphicsexportdialog.cpp:1447
void setDpi(int dpi) noexcept
Definition: graphicsexportdialog.cpp:1328
void requestOpenFile(const librepcb::FilePath &filePath)
QScopedPointer< QFutureWatcher< QList< QPrinterInfo > > > mPrinterWatcher
Definition: graphicsexportdialog.h:192
QList< ContentItem > mPageContentItems
Definition: graphicsexportdialog.h:195
bool mDisableApplySettings
Definition: graphicsexportdialog.h:188
void setMarginRight(const UnsignedLength &margin) noexcept
Definition: graphicsexportdialog.cpp:1269
UnsignedLength getMinLineWidth() const noexcept
Definition: graphicsexportdialog.cpp:1369
QColor getBackgroundColor() const noexcept
Definition: graphicsexportdialog.cpp:1354
UnsignedLength getMarginTop() const noexcept
Definition: graphicsexportdialog.cpp:1265
QScopedPointer< Ui::GraphicsExportDialog > mUi
Definition: graphicsexportdialog.h:189
QString mSettingsPrinterName
Definition: graphicsexportdialog.h:184
void buttonBoxClicked(QDialogButtonBox::StandardButton btn) noexcept
Definition: graphicsexportdialog.cpp:858
bool eventFilter(QObject *object, QEvent *event) noexcept override
Definition: graphicsexportdialog.cpp:1194
Definition: occmodel.cpp:77
type_safe::constrained_type< Length, UnsignedLengthConstraint, UnsignedLengthVerifier > UnsignedLength
Definition: length.h:696
type_safe::constrained_type< Ratio, UnsignedRatioConstraint, UnsignedRatioVerifier > UnsignedRatio
Definition: ratio.h:330
Definition: graphicsexportdialog.h:70
bool mirror
Definition: graphicsexportdialog.h:73
QSet< QString > colors
Definition: graphicsexportdialog.h:74
bool enabled
Definition: graphicsexportdialog.h:72
QString name
Definition: graphicsexportdialog.h:71