File indexing completed on 2024-04-28 04:32:45
0001 /* 0002 SPDX-FileCopyrightText: 2019 Michael Weghorn <m.weghorn@posteo.de> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef PRINTOPTIONSWIDGET_H 0008 #define PRINTOPTIONSWIDGET_H 0009 0010 #include <QWidget> 0011 0012 #include "okularcore_export.h" 0013 0014 class QComboBox; 0015 0016 namespace Okular 0017 { 0018 /** 0019 * @short Abstract base class for an extra print options widget in the print dialog. 0020 */ 0021 class OKULARCORE_EXPORT PrintOptionsWidget : public QWidget 0022 { 0023 Q_OBJECT 0024 public: 0025 explicit PrintOptionsWidget(QWidget *parent = nullptr) 0026 : QWidget(parent) 0027 { 0028 } 0029 virtual bool ignorePrintMargins() const = 0; 0030 }; 0031 0032 /** 0033 * @short The default okular extra print options widget. 0034 * 0035 * It just implements the required method 'ignorePrintMargins()' from 0036 * the base class 'PrintOptionsWidget'. 0037 */ 0038 class OKULARCORE_EXPORT DefaultPrintOptionsWidget : public PrintOptionsWidget 0039 { 0040 Q_OBJECT 0041 0042 public: 0043 explicit DefaultPrintOptionsWidget(QWidget *parent = nullptr); 0044 0045 bool ignorePrintMargins() const override; 0046 0047 private: 0048 QComboBox *m_ignorePrintMargins; 0049 }; 0050 0051 } 0052 0053 #endif