mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-08 13:04:13 +02:00
ff25a77159
- Add DPI selection (150/300/600) to the page selection dialog - Add live page preview in the selection dialog - Conditionally compile PDF import only for Qt6 (#if QT_VERSION) - Add custom pdf-import icon (PDF document with + symbol) - Register new icon in qelectrotech.qrc - Qt5 builds: PDF import action is hidden, everything else works as before
55 lines
1.5 KiB
C++
55 lines
1.5 KiB
C++
/*
|
|
Copyright 2006-2026 The QElectroTech Team
|
|
This file is part of QElectroTech.
|
|
|
|
QElectroTech is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation, either version 2 of the License, or
|
|
(at your option) any later version.
|
|
|
|
QElectroTech is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
#ifndef PDFPAGESDIALOG_H
|
|
#define PDFPAGESDIALOG_H
|
|
|
|
#include <QDialog>
|
|
|
|
class QSpinBox;
|
|
class QComboBox;
|
|
class QLabel;
|
|
class QPdfDocument;
|
|
|
|
/**
|
|
@brief The PdfPagesDialog class
|
|
Dialog for selecting a page from a PDF document.
|
|
Displays the total page count, a live preview of the selected page,
|
|
DPI options (150/300/600), and allows the user to choose which page to import.
|
|
*/
|
|
class PdfPagesDialog : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit PdfPagesDialog(QPdfDocument &document, QWidget *parent = nullptr);
|
|
int selectedPage() const;
|
|
int selectedDpi() const;
|
|
|
|
private slots:
|
|
void updatePreview();
|
|
|
|
private:
|
|
QPdfDocument &m_document;
|
|
QLabel *m_info_label;
|
|
QLabel *m_preview_label;
|
|
QSpinBox *m_page_spinbox;
|
|
QComboBox *m_dpi_combo;
|
|
};
|
|
|
|
#endif // PDFPAGESDIALOG_H
|