Subversion Repositories Scribus

Rev

Rev 1700 | Rev 2937 | 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();
1698 tsoots 64
        void removeLayer(bool deleteItems);
168 Franz 65
        void upLayer();
66
        void downLayer();
67
        void changeName(int row, int col);
1700 tsoots 68
        void changeName(int row, int col, const QString &name);
168 Franz 69
        void visibleLayer();
70
        void printLayer();
1697 tsoots 71
        void printLayer(int layerNr, bool isPrintable);
168 Franz 72
        void setActiveLayer(int row);
73
        void ClearInhalt();
74
        void MarkActiveLayer(int l);
1697 tsoots 75
        void restore(UndoState *state, bool isUndo);
2190 cbradney 76
        void languageChange();
3 paul 77
 
78
signals:
216 Franz 79
        void LayerRemoved(int, bool);
168 Franz 80
        void LayerChanged();
81
        void LayerActivated(int);
1525 cbradney 82
        //void Schliessen();
3 paul 83
 
84
protected:
358 Franz 85
        QVBoxLayout* LayerPaletteLayout;
86
        QHBoxLayout* Layout1;
1697 tsoots 87
        UndoManager *undoManager;
1448 cbradney 88
 
89
protected slots:
1525 cbradney 90
        //virtual void reject();
3 paul 91
};
92
 
93
#endif // LAYERPALETTE_H