Rev 199 | Rev 238 | 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); |
168 | Franz | 87 | /** Dokument zu dem die Seite geh�t */ |
88 | ScribusDoc *Doc; |
||
89 | preV *Prefs; |
||
3 | paul | 90 | |
91 | public slots: // Public slots |
||
168 | Franz | 92 | /** Fhrt die Vergr�erung/Verkleinerung aus; */ |
93 | void slotDoZoom(); |
||
94 | /** Vergr�ert die Ansicht */ |
||
95 | void slotZoomIn(); |
||
3 | paul | 96 | /** Verkleinert die Ansicht */ |
168 | Franz | 97 | void slotZoomOut(); |
98 | /** Vergr�ert die Ansicht */ |
||
99 | void slotZoomIn2(); |
||
3 | paul | 100 | /** Verkleinert die Ansicht */ |
168 | Franz | 101 | void slotZoomOut2(); |
3 | paul | 102 | /** Zeichnet alle Seiten neu */ |
168 | Franz | 103 | void DrawNew(); |
104 | void setMenTxt(int Seite); |
||
3 | paul | 105 | void setLayMenTxt(int l); |
168 | Franz | 106 | void GotoPa(int Seite); |
3 | paul | 107 | void GotoLa(int l); |
168 | Franz | 108 | void GotoPage(int Seite); |
109 | void ChgUnit(int art); |
||
110 | void SetCPo(int x, int y); |
||
3 | paul | 111 | void SetCCPo(int x, int y); |
168 | Franz | 112 | |
3 | paul | 113 | private: // Private attributes |
168 | Franz | 114 | QPushButton *SB1; |
115 | QPushButton *SB2; |
||
116 | QPushButton *LY; |
||
117 | QPopupMenu *Unitmen; |
||
3 | paul | 118 | QPopupMenu *Laymen; |
168 | Franz | 119 | bool Ready; |
120 | |||
3 | paul | 121 | private slots: |
168 | Franz | 122 | void Zval(); |
123 | void setRulerPos(int x, int y); |
||
124 | |||
3 | paul | 125 | protected: // Protected methods |
126 | /** Waagrechter Scrollbalken */ |
||
127 | virtual void contentsWheelEvent ( QWheelEvent *ev ); |
||
128 | virtual void setHBarGeometry(QScrollBar &bar, int x, int y, int w, int h); |
||
129 | virtual void setVBarGeometry(QScrollBar &bar, int x, int y, int w, int h); |
||
168 | Franz | 130 | |
3 | paul | 131 | signals: |
132 | void changeUN(int); |
||
133 | void changeLA(int); |
||
134 | }; |
||
135 | #endif |