Rev 213 | Rev 243 | 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" |
199 | Franz | 39 | #include "pageselector.h" |
40 | |||
3 | paul | 41 | extern QPixmap loadIcon(QString nam); |
42 | |||
43 | /** |
||
44 | * This class provides an incomplete base for your application view. |
||
45 | */ |
||
46 | |||
47 | class ScribusView : public QScrollView |
||
48 | { |
||
168 | Franz | 49 | Q_OBJECT |
50 | |||
51 | public: |
||
3 | paul | 52 | ScribusView(QWidget *parent=0, ScribusDoc *doc=0, preV *prefs=0); |
53 | ~ScribusView() {}; |
||
54 | /** Vergroesserungseingabefeld */ |
||
68 | Franz | 55 | MSpinBox* LE; |
199 | Franz | 56 | PageSelector* PGS; |
168 | Franz | 57 | QToolButton *UN; |
58 | Hruler *HR; |
||
59 | Vruler *VR; |
||
3 | paul | 60 | /** Liste der Seiten */ |
168 | Franz | 61 | QPtrList<Page> Pages; |
3 | paul | 62 | /** Liste der Musterseiten */ |
168 | Franz | 63 | QPtrList<Page> MasterPages; |
3 | paul | 64 | /** Liste der Dokumentseiten */ |
168 | Franz | 65 | QPtrList<Page> DocPages; |
3 | paul | 66 | /** Mapping Namen zu Musterseiten */ |
168 | Franz | 67 | QMap<QString,int> MasterNames; |
68 | /** Fgt eine Seite hinzu */ |
||
69 | Page* addPage(int nr); |
||
70 | /** L�cht eine Seite */ |
||
71 | void delPage(int Nr); |
||
3 | paul | 72 | /** verschiebt Seiten */ |
168 | Franz | 73 | void movePage(int from, int to, int ziel, int art); |
74 | void reformPages(); |
||
3 | paul | 75 | void LaMenu(); |
168 | Franz | 76 | void ShowTemplate(int nr); |
77 | void HideTemplate(); |
||
78 | int CountElements(); |
||
79 | QPixmap PageToPixmap(int Nr, int maxGr); |
||
3 | paul | 80 | QPixmap MPageToPixmap(QString name, int maxGr); |
168 | Franz | 81 | void RecalcPictures(ProfilesL *Pr, QProgressBar *dia = 0); |
82 | void CreatePS(PSLib *p, uint von, uint bis, int step, bool sep, QString SepNam, bool farb, |
||
83 | bool Hm, bool Vm, bool Ic); |
||
84 | void ProcessPage(PSLib *p, Page* a, uint PNr, bool sep = false, bool farb = true, bool ic = false); |
||
68 | Franz | 85 | void SetClipPath(PSLib *p, FPointArray *c); |
3 | paul | 86 | void SetFarbe(QString farb, int shade, int *h, int *s, int *v, int *k); |
238 | Franz | 87 | void rememberPreviousSettings(int mx=0, int my=0); |
168 | Franz | 88 | /** Dokument zu dem die Seite geh�t */ |
89 | ScribusDoc *Doc; |
||
90 | preV *Prefs; |
||
3 | paul | 91 | |
92 | public slots: // Public slots |
||
168 | Franz | 93 | /** Fhrt die Vergr�erung/Verkleinerung aus; */ |
94 | void slotDoZoom(); |
||
95 | /** Vergr�ert die Ansicht */ |
||
238 | Franz | 96 | void slotZoomIn(int mx=0,int my=0); |
3 | paul | 97 | /** Verkleinert die Ansicht */ |
238 | Franz | 98 | void slotZoomOut(int mx=0,int my=0); |
168 | Franz | 99 | /** Vergr�ert die Ansicht */ |
238 | Franz | 100 | void slotZoomIn2(int mx=0,int my=0); |
3 | paul | 101 | /** Verkleinert die Ansicht */ |
238 | Franz | 102 | void slotZoomOut2(int mx=0,int my=0); |
3 | paul | 103 | /** Zeichnet alle Seiten neu */ |
168 | Franz | 104 | void DrawNew(); |
105 | void setMenTxt(int Seite); |
||
3 | paul | 106 | void setLayMenTxt(int l); |
168 | Franz | 107 | void GotoPa(int Seite); |
3 | paul | 108 | void GotoLa(int l); |
168 | Franz | 109 | void GotoPage(int Seite); |
110 | void ChgUnit(int art); |
||
111 | void SetCPo(int x, int y); |
||
3 | paul | 112 | void SetCCPo(int x, int y); |
168 | Franz | 113 | |
3 | paul | 114 | private: // Private attributes |
168 | Franz | 115 | QPushButton *SB1; |
116 | QPushButton *SB2; |
||
117 | QPushButton *LY; |
||
118 | QPopupMenu *Unitmen; |
||
3 | paul | 119 | QPopupMenu *Laymen; |
168 | Franz | 120 | bool Ready; |
238 | Franz | 121 | int oldX; |
122 | int oldY; |
||
123 | int oldSbx; |
||
124 | int oldSby; |
||
125 | double oldScale; |
||
126 | bool doZooming; |
||
168 | Franz | 127 | |
3 | paul | 128 | private slots: |
168 | Franz | 129 | void Zval(); |
130 | void setRulerPos(int x, int y); |
||
131 | |||
3 | paul | 132 | protected: // Protected methods |
133 | /** Waagrechter Scrollbalken */ |
||
134 | virtual void contentsWheelEvent ( QWheelEvent *ev ); |
||
135 | virtual void setHBarGeometry(QScrollBar &bar, int x, int y, int w, int h); |
||
136 | virtual void setVBarGeometry(QScrollBar &bar, int x, int y, int w, int h); |
||
168 | Franz | 137 | |
3 | paul | 138 | signals: |
139 | void changeUN(int); |
||
140 | void changeLA(int); |
||
141 | }; |
||
142 | #endif |