KD Reports API Documentation 2.2
Loading...
Searching...
No Matches
KDReportsPreviewDialog.h
Go to the documentation of this file.
1/****************************************************************************
2**
3** This file is part of the KD Reports library.
4**
5** SPDX-FileCopyrightText: 2007 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6**
7** SPDX-License-Identifier: MIT
8**
9****************************************************************************/
10
11#ifndef KDREPORTSPREVIEWDIALOG_H
12#define KDREPORTSPREVIEWDIALOG_H
13
14#include "KDReportsGlobal.h"
15#include <QDialog>
16#include <QPrinter>
17#include <memory>
18
19namespace KDReports {
20class Report;
21class PreviewWidget;
22class PreviewDialogPrivate;
23
29{
30 Q_OBJECT
31
32public:
36 explicit PreviewDialog(KDReports::Report *report, QWidget *parent = nullptr);
37
38 ~PreviewDialog() override;
39
47 void setQuickPrinterName(const QString &printerName);
48
55 void setDefaultSaveDirectory(const QString &path);
56
65 void setDirectoryBrowsingEnabled(bool allowed);
66
70 bool isSelected(int pageNumber) const;
71
79 void setPageSizeChangeAllowed(bool b);
80
86 void setShowTableSettingsDialog(bool b);
87
92 void setWidthForEndlessPrinter(qreal widthMM);
93
94 // maybe setZoomFactor() to set the initial value?
95
103 virtual bool showTableSettingsDialog(KDReports::Report *report);
104
110 KDReports::PreviewWidget *previewWidget();
111
116 {
117 Printed = 10,
119 SaveError
120 };
121
126 QString savedFileName() const;
127
128Q_SIGNALS:
129#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
131 void pageSizeChanged(QPrinter::PageSize pageSize);
133 void orientationChanged(QPrinter::Orientation orientation);
134#else
136 void pageSizeChanged(const QPageSize &pageSize);
139#endif
144 void linkActivated(const QUrl &url);
145
146public Q_SLOTS:
148 void accept() override;
150 void reject() override;
151
152private:
153 std::unique_ptr<PreviewDialogPrivate> d;
154};
155
156}
157
158#endif
#define KDREPORTS_EXPORT
void orientationChanged(QPageLayout::Orientation orientation)
Emitted when the user changes the page orientation.
void pageSizeChanged(const QPageSize &pageSize)
Emitted when the user changes the page size.
void linkActivated(const QUrl &url)

© Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
https://www.kdab.com/development-resources/qt-tools/kd-reports/
Generated on Fri May 17 2024 00:04:15 for KD Reports API Documentation by doxygen 1.9.8