PDF4QT/Pdf4QtLib/sources/pdfselectpagesdialog.h

63 lines
1.8 KiB
C
Raw Normal View History

2021-04-30 20:12:10 +02:00
// Copyright (C) 2020-2021 Jakub Melka
2020-12-27 17:44:53 +01:00
//
// This file is part of Pdf4Qt.
//
// Pdf4Qt is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
2021-04-30 20:12:10 +02:00
// with the written consent of the copyright owner, any later version.
2020-12-27 17:44:53 +01:00
//
// Pdf4Qt 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 Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with Pdf4Qt. If not, see <https://www.gnu.org/licenses/>.
2020-12-30 17:06:13 +01:00
#ifndef PDFSELECTPAGESDIALOG_H
#define PDFSELECTPAGESDIALOG_H
2020-12-27 17:44:53 +01:00
#include "pdfutils.h"
#include <QDialog>
namespace Ui
{
2020-12-30 17:06:13 +01:00
class PDFSelectPagesDialog;
2020-12-27 17:44:53 +01:00
}
2020-12-30 17:06:13 +01:00
namespace pdf
2020-12-27 17:44:53 +01:00
{
2020-12-30 17:06:13 +01:00
class Pdf4QtLIBSHARED_EXPORT PDFSelectPagesDialog : public QDialog
2020-12-27 17:44:53 +01:00
{
Q_OBJECT
public:
2020-12-30 17:06:13 +01:00
explicit PDFSelectPagesDialog(QString windowTitle,
QString groupBoxTitle,
pdf::PDFInteger pageCount,
const std::vector<pdf::PDFInteger>& visiblePages,
QWidget* parent);
virtual ~PDFSelectPagesDialog() override;
2020-12-27 17:44:53 +01:00
virtual void accept() override;
std::vector<pdf::PDFInteger> getSelectedPages() const;
private:
void updateUi();
2020-12-30 17:06:13 +01:00
Ui::PDFSelectPagesDialog* ui;
2020-12-27 17:44:53 +01:00
pdf::PDFInteger m_pageCount;
std::vector<pdf::PDFInteger> m_visiblePages;
std::vector<pdf::PDFInteger> m_evenPages;
std::vector<pdf::PDFInteger> m_oddPages;
};
2020-12-30 17:06:13 +01:00
} // namespace pdf
2020-12-27 17:44:53 +01:00
2020-12-30 17:06:13 +01:00
#endif // PDFSELECTPAGESDIALOG_H