1 /* 2 For general Scribus (>=1.3.2) copyright and licensing information please refer 3 to the COPYING file provided with the program. Following this notice may exist 4 a copyright and/or license notice that predates the release of Scribus 1.3.2 5 for which a new license (GPL+exception) is in place. 6 */ 7 #ifndef PDFVERSIONMODEL_H 8 #define PDFVERSIONMODEL_H 9 10 #include <QAbstractItemModel> 11 #include <QVector> 12 13 #include "scribusapi.h" 14 15 class ScribusDoc; 16 17 class SCRIBUS_API PdfVersionModel : public QAbstractItemModel 18 { 19 Q_OBJECT 20 21 public: 22 //! Constructor 23 PdfVersionModel(QObject* parent = nullptr); 24 25 enum PdfVersionItem 26 { 27 ItemPDF_13 = 0, 28 ItemPDF_14 = 1, 29 ItemPDF_15 = 2, 30 ItemPDF_16 = 3, 31 ItemPDFX_1a = 4, 32 ItemPDFX_3 = 5, 33 ItemPDFX_4 = 6 34 }; 35 36 //! Remove all colors from list; 37 void clear(); 38 39 //! Reimplement QAbstractItemModel columnCount() 40 int columnCount(const QModelIndex &parent = QModelIndex()) const; 41 42 //! Reimplement QAbstractItemModel data() 43 QVariant data(const QModelIndex &index, int role) const; 44 45 //! Reimplement QAbstractItemModel flags() 46 Qt::ItemFlags flags(const QModelIndex &index) const; 47 48 //! Reimplement QAbstractItemModel index() 49 QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const; 50 51 //! Reimplement QAbstractItemModel parent() 52 QModelIndex parent(const QModelIndex &child) const; 53 54 //! Reimplement QAbstractItemModel removeRow() 55 bool removeRow(int row, const QModelIndex& parent = QModelIndex()); 56 57 //! Reimplement QAbstractItemModel removeRowz() 58 bool removeRows(int row, int count, const QModelIndex& parent = QModelIndex()); 59 60 //! Reimplement QAbstractItemModel rowCount() 61 int rowCount(const QModelIndex &parent = QModelIndex()) const; 62 63 //! Allow or disallow no font embedding mode 64 void setPdfXEnabled(bool enabled); 65 66 protected: 67 //! The color list 68 QVector<bool> m_enabledVec; 69 }; 70 71 #endif // PDFVERSIONMODEL_H 72