Subversion Repositories Scribus

Rev

Rev 1525 | Rev 1698 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
3 paul 1
#ifndef LAYERPALETTE_H
2
#define LAYERPALETTE_H
3
 
4
#include <qtable.h>
5
#include <qptrlist.h>
6
#include <qvaluelist.h>
7
 
1525 cbradney 8
#include "scrpalettebase.h"
1697 tsoots 9
#include "undoobject.h"
1525 cbradney 10
 
766 cbradney 11
class QPushButton;
12
class QLayout;
13
class QToolTip;
14
class QPixmap;
15
class QCheckBox;
16
class QHeader;
1697 tsoots 17
class UndoManager;
18
class UndoState;
766 cbradney 19
 
356 Franz 20
class LayerTable : public QTable
21
{
22
        Q_OBJECT
23
 
24
public:
25
        LayerTable(QWidget* parent);
26
        ~LayerTable() {};
1525 cbradney 27
        //void keyPressEvent(QKeyEvent *k);
356 Franz 28
 
359 Franz 29
protected:
30
        virtual void endEdit ( int row, int col, bool accept, bool replace );
31
 
356 Franz 32
signals:
1525 cbradney 33
        //void ToggleAllPalettes();
34
        //void Schliessen();
359 Franz 35
        void updtName(int);
356 Franz 36
};
37
 
1697 tsoots 38
class LayerPalette : public ScrPaletteBase, public UndoObject
358 Franz 39
{
40
        Q_OBJECT
3 paul 41
 
42
public:
358 Franz 43
        LayerPalette(QWidget* parent);
44
        ~LayerPalette() {};
3 paul 45
 
358 Franz 46
        QTable* Table;
168 Franz 47
        QHeader* Header;
358 Franz 48
        QPushButton* NewLayer;
49
        QPushButton* DeleteLayer;
50
        QPushButton* RaiseLayer;
51
        QPushButton* LowerLayer;
168 Franz 52
        QValueList<Layer> *layers;
1525 cbradney 53
        //void closeEvent(QCloseEvent *ce);
358 Franz 54
        void setLayers(QValueList<Layer> *layin, int *act);
168 Franz 55
        void rebuildList();
358 Franz 56
        QPtrList<QCheckBox> FlagsPrint;
57
        QPtrList<QCheckBox> FlagsSicht;
168 Franz 58
        int *Activ;
3 paul 59
 
60
public slots:
359 Franz 61
        void updateName(int r);
168 Franz 62
        void addLayer();
63
        void removeLayer();
64
        void upLayer();
65
        void downLayer();
66
        void changeName(int row, int col);
67
        void visibleLayer();
68
        void printLayer();
1697 tsoots 69
        void printLayer(int layerNr, bool isPrintable);
168 Franz 70
        void setActiveLayer(int row);
71
        void ClearInhalt();
72
        void MarkActiveLayer(int l);
1697 tsoots 73
        void restore(UndoState *state, bool isUndo);
3 paul 74
 
75
signals:
216 Franz 76
        void LayerRemoved(int, bool);
168 Franz 77
        void LayerChanged();
78
        void LayerActivated(int);
1525 cbradney 79
        //void Schliessen();
3 paul 80
 
81
protected:
358 Franz 82
        QVBoxLayout* LayerPaletteLayout;
83
        QHBoxLayout* Layout1;
1697 tsoots 84
        UndoManager *undoManager;
1448 cbradney 85
 
86
protected slots:
1525 cbradney 87
        //virtual void reject();
3 paul 88
};
89
 
90
#endif // LAYERPALETTE_H