Changeset View
Changeset View
Standalone View
Standalone View
src/part/simpleprintingcommand.h
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Line(s) | |||||
44 | - a single printing engine per part item regardless of a way how user started | 44 | - a single printing engine per part item regardless of a way how user started | ||
45 | (using 'File->Print' command or 'Print' button of the 'Page Setup' dialog) | 45 | (using 'File->Print' command or 'Print' button of the 'Page Setup' dialog) | ||
46 | */ | 46 | */ | ||
47 | class KGVSimplePrintingCommand : public QObject | 47 | class KGVSimplePrintingCommand : public QObject | ||
48 | { | 48 | { | ||
49 | Q_OBJECT | 49 | Q_OBJECT | ||
50 | 50 | | |||
51 | public: | 51 | public: | ||
52 | KGVSimplePrintingCommand(DotGraphView* mainWin, int objectId, | 52 | KGVSimplePrintingCommand(DotGraphView *mainWin, int objectId, QObject *parent = nullptr); | ||
53 | QObject* parent = nullptr); | | |||
54 | ~KGVSimplePrintingCommand(); | 53 | ~KGVSimplePrintingCommand(); | ||
55 | 54 | | |||
56 | inline KGVSimplePrintingEngine* engine() {return m_previewEngine;} | 55 | inline KGVSimplePrintingEngine *engine() | ||
56 | { | ||||
57 | return m_previewEngine; | ||||
58 | } | ||||
57 | 59 | | |||
58 | void hidePageSetup(); | 60 | void hidePageSetup(); | ||
59 | void hidePrintPreview(); | 61 | void hidePrintPreview(); | ||
60 | 62 | | |||
61 | public Q_SLOTS: | 63 | public Q_SLOTS: | ||
62 | bool print(const QString& aTitleText = QString()); | 64 | bool print(const QString &aTitleText = QString()); | ||
63 | bool showPrintPreview(const QString& aTitleText = QString(), bool reload = false); | 65 | bool showPrintPreview(const QString &aTitleText = QString(), bool reload = false); | ||
64 | void showPageSetup(const QString& aTitleText = QString()); | 66 | void showPageSetup(const QString &aTitleText = QString()); | ||
65 | 67 | | |||
66 | Q_SIGNALS: | 68 | Q_SIGNALS: | ||
67 | //! connected to KGV Main Window | 69 | //! connected to KGV Main Window | ||
68 | void showPageSetupRequested(); | 70 | void showPageSetupRequested(); | ||
69 | 71 | | |||
70 | protected Q_SLOTS: | 72 | protected Q_SLOTS: | ||
71 | void slotShowPageSetupRequested(); | 73 | void slotShowPageSetupRequested(); | ||
72 | 74 | | |||
73 | protected: | 75 | protected: | ||
74 | bool init(const QString& aTitleText = QString()); | 76 | bool init(const QString &aTitleText = QString()); | ||
75 | 77 | | |||
76 | KGVSimplePrintingEngine* m_previewEngine; | 78 | KGVSimplePrintingEngine *m_previewEngine; | ||
77 | DotGraphView* m_graphView; | 79 | DotGraphView *m_graphView; | ||
78 | int m_objectId; | 80 | int m_objectId; | ||
79 | KGVSimplePrintingSettings* m_settings; | 81 | KGVSimplePrintingSettings *m_settings; | ||
80 | KGVSimplePrintPreviewWindow *m_previewWindow; | 82 | KGVSimplePrintPreviewWindow *m_previewWindow; | ||
81 | bool m_printPreviewNeedsReloading : 1; | 83 | bool m_printPreviewNeedsReloading : 1; | ||
82 | QDialog* m_pageSetupDialog; | 84 | QDialog *m_pageSetupDialog; | ||
83 | }; | 85 | }; | ||
84 | 86 | | |||
85 | } | 87 | } | ||
86 | 88 | | |||
87 | #endif | 89 | #endif |