Back to index

scribus-ng  1.3.4.dfsg+svn20071115
layers.h
Go to the documentation of this file.
00001 /*
00002 For general Scribus (>=1.3.2) copyright and licensing information please refer
00003 to the COPYING file provided with the program. Following this notice may exist
00004 a copyright and/or license notice that predates the release of Scribus 1.3.2
00005 for which a new license (GPL+exception) is in place.
00006 */
00007 #ifndef LAYERPALETTE_H
00008 #define LAYERPALETTE_H
00009 
00010 #include <qtable.h>
00011 #include <qptrlist.h>
00012 #include <qvaluelist.h>
00013 #include <qcheckbox.h>
00014 
00015 #include "scribusapi.h"
00016 #include "scrpalettebase.h"
00017 
00018 class QToolButton;
00019 class QPushButton;
00020 class QLayout;
00021 class QToolTip;
00022 class QPixmap;
00023 class QHeader;
00024 class QSpinBox;
00025 class QLabel;
00026 class ScComboBox;
00027 class ScribusDoc;
00028 class DynamicTip;
00029 
00030 class SCRIBUS_API LayerLabel : public QTableItem
00031 {
00032 public:
00033        LayerLabel(QTable* parent);
00034        ~LayerLabel() {};
00035        virtual void paint(QPainter * p, const QColorGroup &cg, const QRect &cr, bool selected);
00036 };
00037 
00038 class SCRIBUS_API LayerTable : public QTable
00039 {
00040        Q_OBJECT
00041 
00042 public:
00043        LayerTable(QWidget* parent);
00044        ~LayerTable() {};
00045 
00046 protected:
00047        virtual void endEdit ( int row, int col, bool accept, bool replace );
00048 
00049 signals:
00050        void updtName(int);
00051 };
00052 
00053 class SCRIBUS_API LayerPalette : public ScrPaletteBase
00054 {
00055        Q_OBJECT
00056 
00057 public:
00058        LayerPalette(QWidget* parent);
00059        ~LayerPalette() {};
00060 
00061        void setDoc(ScribusDoc* doc);
00062        void rebuildList();
00063        
00064        QTable* Table;       //public for the event filter in scribus.cpp.. TODO
00065 
00066 public slots:
00067        void updateName(int r);
00068        void addLayer();
00069        void dupLayer();
00070        void removeLayer();
00071        void upLayer();
00072        void downLayer();
00073        void changeName(int row, int col);
00074        void visibleLayer();
00075        void printLayer();
00076        void lockLayer();
00077        void flowToggleLayer();
00078        void outlineToggleLayer();
00079        void markLayer();
00080        void changeOpacity();
00081        void changeBlendMode(int blend);
00082        void setActiveLayer(int row);
00083        void ClearInhalt();
00084        void markActiveLayer(int layerNumber=-1);
00085        void languageChange();
00086 
00087 signals:
00088        void LayerChanged();
00089        void LayerActivated(int);
00090 
00091 protected:
00092        ScribusDoc* m_Doc;
00093        QVBoxLayout* LayerPaletteLayout;
00094        QHBoxLayout* Layout1;
00095        QHBoxLayout* layout1;
00096        QLabel* textLabel1;
00097        ScComboBox* blendMode;
00098        QLabel* textLabel2;
00099        QSpinBox* opacitySpinBox;
00100        QHeader* Header;
00101        QPushButton* newLayerButton;
00102        QPushButton* duplicateLayerButton;
00103        QPushButton* deleteLayerButton;
00104        QPushButton* raiseLayerButton;
00105        QPushButton* lowerLayerButton;
00106        QPtrList<QCheckBox> flagsPrintable;
00107        QPtrList<QCheckBox> flagsVisible;
00108        QPtrList<QCheckBox> flagsLocked;
00109        QPtrList<QCheckBox> flagsFlow;
00110        QPtrList<QCheckBox> flagsOutline;
00111        QPtrList<QToolButton> flagsMarker;
00112        QValueList<Layer> *layers;
00113        DynamicTip* dynTip;
00114 };
00115 
00116 #endif // LAYERPALETTE_H