20#ifndef LIBREPCB_EDITOR_SHORTCUTSREFERENCEGENERATOR_H
21#define LIBREPCB_EDITOR_SHORTCUTSREFERENCEGENERATOR_H
39class EditorCommandCategory;
40class EditorCommandSet;
60 AlignCenter = (1 << 8),
61 AlignRight = (1 << 9),
63 Q_DECLARE_FLAGS(Flags,
Flag)
91 qreal x2, qreal y, const QString& text) const noexcept;
94 void drawRow(QPdfWriter& writer, QPainter& painter, qreal x, qreal y,
95 qreal totalWidth, qreal shortcutsWidth, const QString& text,
96 const QString& shortcuts,
bool gray) const noexcept;
97 int drawText(QPdfWriter& writer, QPainter& painter, qreal x, qreal y,
98 qreal size, qreal maxLength, const QString& text,
99 Flags flags = Flags()) const noexcept;
100 int mmToPx(QPdfWriter& writer, qreal mm) const noexcept;
119Q_DECLARE_OPERATORS_FOR_FLAGS(
This class represents absolute, well-formatted paths to files or directories.
Definition: filepath.h:129
Category for librepcb::editor::EditorCommand.
Definition: editorcommandcategory.h:42
Collection of all commands across all editors.
Definition: editorcommandset.h:49
Helper to generate a keyboard shortcuts reference PDF.
Definition: shortcutsreferencegenerator.h:55
int drawText(QPdfWriter &writer, QPainter &painter, qreal x, qreal y, qreal size, qreal maxLength, const QString &text, Flags flags=Flags()) const noexcept
Definition: shortcutsreferencegenerator.cpp:215
static constexpr qreal sCategorySpacing
Definition: shortcutsreferencegenerator.h:110
EditorCommandSet & mCommands
Definition: shortcutsreferencegenerator.h:103
Flag
Definition: shortcutsreferencegenerator.h:57
void drawCommandCategory(QPdfWriter &writer, QPainter &painter, qreal x, qreal y, EditorCommandCategory &cat) const noexcept
Definition: shortcutsreferencegenerator.cpp:174
static constexpr qreal sShortcutsWidth
Definition: shortcutsreferencegenerator.h:113
static constexpr qreal sRowHeight
Definition: shortcutsreferencegenerator.h:109
static constexpr qreal sColumnSpacing
Definition: shortcutsreferencegenerator.h:111
static constexpr qreal sPageHeight
Definition: shortcutsreferencegenerator.h:106
void drawRow(QPdfWriter &writer, QPainter &painter, qreal x, qreal y, qreal totalWidth, qreal shortcutsWidth, const QString &text, const QString &shortcuts, bool gray) const noexcept
Definition: shortcutsreferencegenerator.cpp:199
static constexpr qreal sCategoryTextSize
Definition: shortcutsreferencegenerator.h:107
static constexpr qreal sColumnWidth
Definition: shortcutsreferencegenerator.h:112
static constexpr qreal sPageWidth
Definition: shortcutsreferencegenerator.h:105
int mmToPx(QPdfWriter &writer, qreal mm) const noexcept
Definition: shortcutsreferencegenerator.cpp:243
bool generatePdf(const FilePath &fp)
Generate the PDF.
Definition: shortcutsreferencegenerator.cpp:60
static constexpr qreal sRowTextSize
Definition: shortcutsreferencegenerator.h:108
void drawSectionTitle(QPdfWriter &writer, QPainter &painter, qreal x1, qreal x2, qreal y, const QString &text) const noexcept
Definition: shortcutsreferencegenerator.cpp:160
Definition: occmodel.cpp:77