Debian Codegraph @

src/libs/widgets/KoPageLayoutWidget.h

raw
1 /* This file is part of the KDE project
2 * SPDX-FileCopyrightText: 2007, 2010 Thomas Zander <[email protected]>
3 *
4 * SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6
7 #ifndef KO_PAGE_LAYOUT_WIDGET
8 #define KO_PAGE_LAYOUT_WIDGET
9
10 #include "kowidgets_export.h"
11
12 //#include <KoText.h>
13 #include <KoPageLayout.h>
14 #include <QWidget>
15
16 class KoUnit;
17
18 /// the widget that shows the size/margins and other page settings.
19 class KOWIDGETS_EXPORT KoPageLayoutWidget : public QWidget
20 {
21 Q_OBJECT
22
23 public:
24 KoPageLayoutWidget(QWidget *parent, const KoPageLayout &layout);
25 ~KoPageLayoutWidget() override;
26
27 KoPageLayout pageLayout() const;
28
29 void setUnit(const KoUnit &unit);
30 void showUnitchooser(bool on);
31 void showPageSpread(bool on);
32 void showPageStyles(bool on);
33 void setPageStyles(const QStringList &styles);
34 QString currentPageStyle() const;
35 void setPageSpread(bool pageSpread);
36 void showTextDirection(bool on);
37 // void setTextDirection(KoText::Direction direction);
38 // KoText::Direction textDirection() const;
39
40 Q_SIGNALS:
41 void layoutChanged(const KoPageLayout &layout);
42 void unitChanged(const KoUnit &unit);
43
44 public Q_SLOTS:
45 void setPageLayout(const KoPageLayout &layout);
46 void setTextAreaAvailable(bool available);
47 void setApplyToDocument(bool apply);
48
49 private Q_SLOTS:
50 void sizeChanged(int row);
51 void slotUnitChanged(int row);
52 void facingPagesChanged();
53 void optionsChanged();
54 void marginsChanged();
55 void orientationChanged();
56
57 private:
58 class Private;
59 Private * const d;
60 };
61
62 #endif