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 /** 8 * "page > import" and, "import master pages" from the "master pages" window. 9 */ 10 #ifndef MERGEDOC_H 11 #define MERGEDOC_H 12 13 #include <QDialog> 14 #include "scribusapi.h" 15 16 class QCheckBox; 17 class QComboBox; 18 class QLabel; 19 class QLineEdit; 20 class QListWidget; 21 class QPushButton; 22 class QSpinBox; 23 class QString; 24 class QVBoxLayout; 25 class QHBoxLayout; 26 class QGridLayout; 27 28 29 class SCRIBUS_API MergeDoc : public QDialog 30 { 31 Q_OBJECT 32 33 public: 34 MergeDoc( QWidget* parent, bool importMasterPages, int targetDocPageCount = -1, int currentPage = 1 ); 35 ~MergeDoc(); 36 37 QString getFromDoc() const; 38 QStringList getMasterPageNames() const; 39 QList<int> getMasterPageIndexes() const; 40 int getImportWhere() const; 41 int getImportWherePage() const; 42 bool getCreatePageChecked() const; 43 QString getPageNumbers() const; 44 int getPageCounter() const; 45 46 private: 47 QLabel* fromDocLabel {nullptr}; 48 QLabel* importPageLabel {nullptr}; 49 QLabel* fromLabel {nullptr}; 50 QLineEdit* pageNumberData {nullptr}; 51 QLineEdit* fromDocData {nullptr}; 52 QPushButton* importButton {nullptr}; 53 QPushButton* cancelButton {nullptr}; 54 QPushButton* changeButton {nullptr}; 55 QCheckBox* createPageData {nullptr}; 56 QListWidget* masterPageNameData {nullptr}; 57 QComboBox* importWhereData {nullptr}; 58 QSpinBox* importWherePageData {nullptr}; 59 QVBoxLayout* dialogLayout {nullptr}; 60 QGridLayout* fromInfoLayout {nullptr}; 61 QHBoxLayout* importCancelLayout {nullptr}; 62 int count {0}; 63 bool masterPages {false}; 64 65 private slots: 66 void changeFile(); 67 void checkDestPageStatus( int positionComboSelection ); 68 void enableCreateWidgets(); 69 70 }; 71 72 #endif // MERGEDOC_H 73