Debian Codegraph @

src/libs/widgets/KoPagePreviewWidget.h

raw
1 /* This file is part of the KDE project
2 * SPDX-FileCopyrightText: 2007 Thomas Zander <[email protected]>
3 * SPDX-FileCopyrightText: 2006 Gary Cramblitt <[email protected]>
4 *
5 * SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7
8 #ifndef KO_PAGE_PREVIEW_WIDGET
9 #define KO_PAGE_PREVIEW_WIDGET
10
11 #include "kowidgets_export.h"
12
13 #include <QWidget>
14
15 // Needed for building on Windows (cannot use forward declarations)
16 #include <KoPageLayout.h>
17 #include <KoColumns.h>
18
19 /// A widget to preview the KoPageLayout and KoColumns data structures.
20 class KOWIDGETS_EXPORT KoPagePreviewWidget : public QWidget {
21 Q_OBJECT
22 public:
23 explicit KoPagePreviewWidget(QWidget *parent = nullptr);
24 ~KoPagePreviewWidget() override;
25
26 protected:
27 void paintEvent(QPaintEvent *event) override;
28
29 public Q_SLOTS:
30 void setPageLayout(const KoPageLayout &layout);
31 void setColumns(const KoColumns &columns);
32
33 private:
34 void drawPage(QPainter &painter, qreal zoom, const QRect &dimensions, bool left);
35
36 private:
37 class Private;
38 Private * const d;
39 };
40
41 #endif