20#ifndef LIBREPCB_EDITOR_GRAPHICSEXPORTDIALOG_H
21#define LIBREPCB_EDITOR_GRAPHICSEXPORTDIALOG_H
31#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
std::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;
This class represents absolute, well-formatted paths to files or directories.
Definition filepath.h:127
Asynchronously exports graphics to a QPainter.
Definition graphicsexport.h:89
Settings for librepcb::GraphicsExport.
Definition graphicsexportsettings.h:51
Base class for printing a page for librepcb::GraphicsExport.
Definition graphicsexport.h:56
The LengthUnit class represents a length unit (millimeters, inches,...) and provides some useful meth...
Definition lengthunit.h:60
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:1329
FilePath mPathToOpenAfterExport
Definition graphicsexportdialog.h:200
void setOpenExportedFiles(bool open) noexcept
Definition graphicsexportdialog.cpp:1436
const QList< ContentItem > & getPageContent() const noexcept
Definition graphicsexportdialog.cpp:1432
void setPageSize(const std::optional< QPageSize::PageSizeId > &size) noexcept
Definition graphicsexportdialog.cpp:1212
GraphicsExportDialog(const GraphicsExportDialog &other)=delete
const QList< Page > & getPages() const noexcept
Definition graphicsexportdialog.h:109
void startExport(bool toClipboard) noexcept
Definition graphicsexportdialog.cpp:1122
void setOrientation(GraphicsExportSettings::Orientation orientation) noexcept
Definition graphicsexportdialog.cpp:1227
const Output mOutput
Definition graphicsexportdialog.h:173
void printerChanged(int index) noexcept
Definition graphicsexportdialog.cpp:918
QScopedPointer< GraphicsExport > mPreview
Definition graphicsexportdialog.h:198
void setMinLineWidth(const UnsignedLength &width) noexcept
Definition graphicsexportdialog.cpp:1361
bool getBlackWhite() const noexcept
Definition graphicsexportdialog.cpp:1337
std::optional< QPageSize > getPageSize() const noexcept
Definition graphicsexportdialog.cpp:1223
const Theme & mTheme
Definition graphicsexportdialog.h:177
bool getRotate() const noexcept
Definition graphicsexportdialog.cpp:1296
void setMirror(bool mirror) noexcept
Definition graphicsexportdialog.cpp:1300
void setMarginLeft(const UnsignedLength &margin) noexcept
Definition graphicsexportdialog.cpp:1249
QScopedPointer< QProgressDialog > mProgressDialog
Definition graphicsexportdialog.h:190
void setDuplex(QPrinter::DuplexMode duplex) noexcept
Definition graphicsexportdialog.cpp:1384
GraphicsExportDialog()=delete
void setBackgroundColor(const QColor &color) noexcept
Definition graphicsexportdialog.cpp:1341
QList< QPrinterInfo > mAvailablePrinters
Definition graphicsexportdialog.h:193
const int mCurrentPage
Definition graphicsexportdialog.h:175
QString getPrinterName() const noexcept
Definition graphicsexportdialog.cpp:1379
void setSaveAsCallback(SaveAsCallback callback) noexcept
Definition graphicsexportdialog.cpp:454
Mode
Definition graphicsexportdialog.h:79
@ Board
Initialize settings suitable for footprints/boards.
@ Schematic
Initialize settings suitable for symbols/schematics.
void setShowPinNumbers(bool show) noexcept
Definition graphicsexportdialog.cpp:1284
std::optional< QPageSize::PageSizeId > mSettingsPageSize
Definition graphicsexportdialog.h:185
void setPrinterName(const QString &name) noexcept
Definition graphicsexportdialog.cpp:1370
QScopedPointer< GraphicsExport > mExport
Definition graphicsexportdialog.h:199
bool getMirror() const noexcept
Definition graphicsexportdialog.cpp:1304
const FilePath mDefaultFilePath
Definition graphicsexportdialog.h:176
void setScaleFactor(const UnsignedRatio &factor) noexcept
Definition graphicsexportdialog.cpp:1316
Output
Definition graphicsexportdialog.h:83
UnsignedRatio getScaleFactor() const noexcept
Definition graphicsexportdialog.cpp:1321
void setPageContent(const QList< ContentItem > &items) noexcept
Definition graphicsexportdialog.cpp:1407
void printersAvailable() noexcept
Definition graphicsexportdialog.cpp:883
void applySettings() noexcept
Definition graphicsexportdialog.cpp:992
bool getShowPinNumbers() const noexcept
Definition graphicsexportdialog.cpp:1288
void layerListItemDoubleClicked(QListWidgetItem *item) noexcept
Definition graphicsexportdialog.cpp:981
UnsignedLength getMarginBottom() const noexcept
Definition graphicsexportdialog.cpp:1280
bool getOpenExportedFiles() const noexcept
Definition graphicsexportdialog.cpp:1440
void syncClientSettings(ClientSettingsAction action) noexcept
Definition graphicsexportdialog.cpp:581
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:463
void setMarginTop(const UnsignedLength &margin) noexcept
Definition graphicsexportdialog.cpp:1258
void openProgressDialog() noexcept
Definition graphicsexportdialog.cpp:1187
GraphicsExportDialog & operator=(const GraphicsExportDialog &rhs)=delete
void setRotate(bool rotate) noexcept
Definition graphicsexportdialog.cpp:1292
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:1308
QList< std::pair< QString, QColor > > mColors
Definition graphicsexportdialog.h:182
QPrinter::DuplexMode getDuplex() const noexcept
Definition graphicsexportdialog.cpp:1393
UnsignedLength getMarginLeft() const noexcept
Definition graphicsexportdialog.cpp:1254
bool getFitToPage() const noexcept
Definition graphicsexportdialog.cpp:1312
QScopedPointer< GraphicsExportSettings > mDefaultSettings
Definition graphicsexportdialog.h:181
void setMarginBottom(const UnsignedLength &margin) noexcept
Definition graphicsexportdialog.cpp:1275
GraphicsExportSettings::Orientation getOrientation() const noexcept
Definition graphicsexportdialog.cpp:1238
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:1333
SaveAsCallback mSaveAsCallback
Definition graphicsexportdialog.h:179
ClientSettingsAction
Definition graphicsexportdialog.h:65
UnsignedLength getMarginRight() const noexcept
Definition graphicsexportdialog.cpp:1271
QList< std::optional< QPageSize > > mAvailablePageSizes
Definition graphicsexportdialog.h:194
const Mode mMode
Definition graphicsexportdialog.h:172
void updateColorsListWidget() noexcept
Definition graphicsexportdialog.cpp:1444
void setDpi(int dpi) noexcept
Definition graphicsexportdialog.cpp:1325
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:1266
UnsignedLength getMinLineWidth() const noexcept
Definition graphicsexportdialog.cpp:1366
void setAvailablePageSizes(QList< std::optional< QPageSize > > sizes) noexcept
Definition graphicsexportdialog.cpp:955
QColor getBackgroundColor() const noexcept
Definition graphicsexportdialog.cpp:1351
UnsignedLength getMarginTop() const noexcept
Definition graphicsexportdialog.cpp:1262
QScopedPointer< Ui::GraphicsExportDialog > mUi
Definition graphicsexportdialog.h:189
QString mSettingsPrinterName
Definition graphicsexportdialog.h:184
void buttonBoxClicked(QDialogButtonBox::StandardButton btn) noexcept
Definition graphicsexportdialog.cpp:855
bool eventFilter(QObject *object, QEvent *event) noexcept override
Definition graphicsexportdialog.cpp:1191
Definition occmodel.cpp:76
type_safe::constrained_type< Length, UnsignedLengthConstraint, UnsignedLengthVerifier > UnsignedLength
Definition length.h:694
type_safe::constrained_type< Ratio, UnsignedRatioConstraint, UnsignedRatioVerifier > UnsignedRatio
Definition ratio.h:328
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