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 LAYERPALETTE_H 8 #define LAYERPALETTE_H 9 10 #include <QList> 11 12 #include "scribusapi.h" 13 #include "ui/scdockpalette.h" 14 #include "scribusstructs.h" 15 16 class CheckBox; 17 class QComboBox; 18 class QEvent; 19 class QHBoxLayout; 20 class QHeaderView; 21 class QLabel; 22 class QTableWidget; 23 class QTableWidgetItem; 24 class QToolButton; 25 class QVBoxLayout; 26 class ScLayers; 27 class ScrSpinBox; 28 class ScribusDoc; 29 30 class SCRIBUS_API LayerPalette : public ScDockPalette 31 { 32 Q_OBJECT 33 34 public: 35 LayerPalette(QWidget* parent); ~LayerPalette()36 ~LayerPalette() {}; 37 38 void installEventFilter(QObject *); 39 40 void setDoc(ScribusDoc* doc); 41 void rebuildList(); 42 43 public slots: 44 void addLayer(); 45 void dupLayer(); 46 void removeLayer(); 47 void upLayer(); 48 void downLayer(); 49 void changeName(int row, int col); 50 void visibleLayer(); 51 void printLayer(); 52 void lockLayer(); 53 void flowToggleLayer(); 54 void outlineToggleLayer(); 55 void selectToggleLayer(); 56 void toggleAllfromHeader(int index); 57 void markLayer(); 58 void changeOpacity(); 59 void changeBlendMode(int blend); 60 void setActiveLayer(int row, int col); 61 void clearContent(); 62 void markActiveLayer(int layerID=-1); 63 void iconSetChange(); 64 void languageChange(); 65 66 signals: 67 void LayerChanged(); 68 69 protected: 70 QWidget* containerWidget { nullptr }; 71 ScribusDoc* m_Doc { nullptr }; 72 QTableWidget* Table { nullptr }; 73 QVBoxLayout* LayerPaletteLayout { nullptr }; 74 QHBoxLayout* Layout1 { nullptr }; 75 QHBoxLayout* layout1 { nullptr }; 76 QLabel* textLabel1 { nullptr }; 77 QComboBox* blendMode { nullptr }; 78 QLabel* textLabel2 { nullptr }; 79 ScrSpinBox* opacitySpinBox { nullptr }; 80 QHeaderView* Header { nullptr }; 81 QToolButton* newLayerButton { nullptr }; 82 QToolButton* duplicateLayerButton { nullptr }; 83 QToolButton* deleteLayerButton { nullptr }; 84 QToolButton* raiseLayerButton { nullptr }; 85 QToolButton* lowerLayerButton { nullptr }; 86 87 ScLayers *layers { nullptr }; 88 89 void changeEvent(QEvent *e) override; 90 }; 91 92 #endif // LAYERPALETTE_H 93