Rev 108 | Rev 168 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
3 | paul | 1 | /*************************************************************************** |
2 | scribusview.h - description |
||
3 | ------------------- |
||
4 | begin : Fre Apr 6 21:47:55 CEST 2001 |
||
5 | copyright : (C) 2001 by Franz Schmid |
||
6 | email : Franz.Schmid@altmuehlnet.de |
||
7 | ***************************************************************************/ |
||
8 | |||
9 | /*************************************************************************** |
||
10 | * * |
||
11 | * This program is free software; you can redistribute it and/or modify * |
||
12 | * it under the terms of the GNU General Public License as published by * |
||
13 | * the Free Software Foundation; either version 2 of the License, or * |
||
14 | * (at your option) any later version. * |
||
15 | * * |
||
16 | ***************************************************************************/ |
||
17 | |||
18 | #ifndef SCRIBUSVIEW_H |
||
19 | #define SCRIBUSVIEW_H |
||
20 | |||
21 | // include files for QT |
||
22 | #include <qscrollview.h> |
||
23 | #include <qptrlist.h> |
||
24 | #include <qlineedit.h> |
||
25 | #include <qscrollbar.h> |
||
26 | #include <qpushbutton.h> |
||
27 | #include <qpopupmenu.h> |
||
28 | #include <qlabel.h> |
||
29 | #include <qtoolbutton.h> |
||
30 | #include <qprogressdialog.h> |
||
160 | Franz | 31 | #include <qspinbox.h> |
3 | paul | 32 | // application specific includes |
33 | #include "scribusdoc.h" |
||
34 | #include "page.h" |
||
35 | #include "hruler.h" |
||
36 | #include "vruler.h" |
||
37 | #include "libpostscript/pslib.h" |
||
68 | Franz | 38 | #include "mspinbox.h" |
3 | paul | 39 | extern QPixmap loadIcon(QString nam); |
40 | |||
41 | /** |
||
42 | * This class provides an incomplete base for your application view. |
||
43 | */ |
||
44 | |||
45 | class ScribusView : public QScrollView |
||
46 | { |
||
47 | Q_OBJECT |
||
48 | public: |
||
49 | ScribusView(QWidget *parent=0, ScribusDoc *doc=0, preV *prefs=0); |
||
50 | ~ScribusView() {}; |
||
51 | /** Vergroesserungseingabefeld */ |
||
68 | Franz | 52 | MSpinBox* LE; |
160 | Franz | 53 | QSpinBox* PGS; |
3 | paul | 54 | QToolButton *UN; |
55 | Hruler *HR; |
||
56 | Vruler *VR; |
||
57 | /** Liste der Seiten */ |
||
58 | QPtrList<Page> Pages; |
||
59 | /** Liste der Musterseiten */ |
||
60 | QPtrList<Page> MasterPages; |
||
61 | /** Liste der Dokumentseiten */ |
||
62 | QPtrList<Page> DocPages; |
||
63 | /** Mapping Namen zu Musterseiten */ |
||
64 | QMap<QString,int> MasterNames; |
||
65 | /** Fügt eine Seite hinzu */ |
||
66 | Page* addPage(int nr); |
||
67 | /** Löscht eine Seite */ |
||
68 | void delPage(int Nr); |
||
69 | /** verschiebt Seiten */ |
||
70 | void movePage(int from, int to, int ziel, int art); |
||
71 | void reformPages(); |
||
72 | void LaMenu(); |
||
73 | void ShowTemplate(int nr); |
||
74 | void HideTemplate(); |
||
75 | int CountElements(); |
||
76 | QPixmap PageToPixmap(int Nr, int maxGr); |
||
77 | QPixmap MPageToPixmap(QString name, int maxGr); |
||
108 | Franz | 78 | void RecalcTextPos(); |
3 | paul | 79 | void RecalcPictures(ProfilesL *Pr, QProgressBar *dia = 0); |
80 | void CreatePS(PSLib *p, uint von, uint bis, int step, bool sep, QString SepNam, bool farb, bool Hm, bool Vm, bool Ic); |
||
81 | void ProcessPage(PSLib *p, Page* a, uint PNr, bool sep = false, bool farb = true, bool ic = false); |
||
68 | Franz | 82 | void SetClipPath(PSLib *p, FPointArray *c); |
3 | paul | 83 | void SetFarbe(QString farb, int shade, int *h, int *s, int *v, int *k); |
84 | /** Dokument zu dem die Seite gehört */ |
||
85 | ScribusDoc *Doc; |
||
86 | preV *Prefs; |
||
87 | |||
88 | public slots: // Public slots |
||
89 | /** Führt die Vergrößerung/Verkleinerung aus; */ |
||
90 | void slotDoZoom(); |
||
91 | /** Vergrößert die Ansicht */ |
||
92 | void slotZoomIn(); |
||
93 | /** Verkleinert die Ansicht */ |
||
94 | void slotZoomOut(); |
||
95 | /** Vergrößert die Ansicht */ |
||
96 | void slotZoomIn2(); |
||
97 | /** Verkleinert die Ansicht */ |
||
98 | void slotZoomOut2(); |
||
99 | /** Zeichnet alle Seiten neu */ |
||
100 | void DrawNew(); |
||
101 | void setMenTxt(int Seite); |
||
102 | void setLayMenTxt(int l); |
||
103 | void GotoPa(int Seite); |
||
104 | void GotoLa(int l); |
||
105 | void GotoPage(int Seite); |
||
106 | void ChgUnit(int art); |
||
107 | void SetCPo(int x, int y); |
||
108 | void SetCCPo(int x, int y); |
||
109 | private: // Private attributes |
||
110 | QPushButton *SB1; |
||
111 | QPushButton *SB2; |
||
112 | QPushButton *LY; |
||
113 | QPopupMenu *Unitmen; |
||
114 | QPopupMenu *Laymen; |
||
115 | bool Ready; |
||
116 | private slots: |
||
117 | void Zval(); |
||
118 | void setRulerPos(int x, int y); |
||
119 | protected: // Protected methods |
||
120 | /** Waagrechter Scrollbalken */ |
||
121 | virtual void contentsWheelEvent ( QWheelEvent *ev ); |
||
122 | virtual void setHBarGeometry(QScrollBar &bar, int x, int y, int w, int h); |
||
123 | virtual void setVBarGeometry(QScrollBar &bar, int x, int y, int w, int h); |
||
124 | signals: |
||
125 | void changeUN(int); |
||
126 | void changeLA(int); |
||
127 | }; |
||
128 | #endif |