Subversion Repositories Scribus

Rev

Rev 3 | Rev 108 | 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>
31
// application specific includes
32
#include "scribusdoc.h"
33
#include "page.h"
34
#include "hruler.h"
35
#include "vruler.h"
36
#include "libpostscript/pslib.h"
68 Franz 37
#include "mspinbox.h"
3 paul 38
extern QPixmap loadIcon(QString nam);
39
 
40
/**
41
 * This class provides an incomplete base for your application view.
42
 */
43
 
44
class ScribusView : public QScrollView
45
{
46
  Q_OBJECT
47
  public:
48
    ScribusView(QWidget *parent=0, ScribusDoc *doc=0, preV *prefs=0);
49
    ~ScribusView() {};
50
  /** Vergroesserungseingabefeld */
68 Franz 51
        MSpinBox* LE;
3 paul 52
  QToolButton *UN;
53
  Hruler *HR;
54
  Vruler *VR;
55
  /** Liste der Seiten */
56
  QPtrList<Page> Pages;
57
  /** Liste der Musterseiten */
58
  QPtrList<Page> MasterPages;
59
  /** Liste der Dokumentseiten */
60
  QPtrList<Page> DocPages;
61
  /** Mapping Namen zu Musterseiten */
62
  QMap<QString,int> MasterNames;
63
  /** Fügt eine Seite hinzu */
64
  Page* addPage(int nr);
65
  /** Löscht eine Seite */
66
  void delPage(int Nr);
67
  /** verschiebt Seiten */
68
  void movePage(int from, int to, int ziel, int art);
69
  void reformPages();
70
  void PaMenu();
71
        void LaMenu();
72
  void ShowTemplate(int nr);
73
  void HideTemplate();
74
  int CountElements();
75
  QPixmap PageToPixmap(int Nr, int maxGr);
76
        QPixmap MPageToPixmap(QString name, int maxGr);
77
  void RecalcPictures(ProfilesL *Pr, QProgressBar *dia = 0);
78
  void CreatePS(PSLib *p, uint von, uint bis, int step, bool sep, QString SepNam, bool farb, bool Hm, bool Vm, bool Ic);
79
  void ProcessPage(PSLib *p, Page* a, uint PNr, bool sep = false, bool farb = true, bool ic = false);
68 Franz 80
        void SetClipPath(PSLib *p, FPointArray *c);
3 paul 81
        void SetFarbe(QString farb, int shade, int *h, int *s, int *v, int *k);
82
  /** Dokument zu dem die Seite gehört */
83
  ScribusDoc *Doc;
84
  preV *Prefs;
85
 
86
public slots: // Public slots
87
  /** Führt die Vergrößerung/Verkleinerung aus; */
88
  void slotDoZoom();
89
  /** Vergrößert die Ansicht */
90
  void slotZoomIn();
91
  /** Verkleinert die Ansicht */
92
  void slotZoomOut();
93
  /** Vergrößert die Ansicht */
94
  void slotZoomIn2();
95
  /** Verkleinert die Ansicht */
96
  void slotZoomOut2();
97
  /** Zeichnet alle Seiten neu */
98
  void DrawNew();
99
  void setMenTxt(int Seite);
100
        void setLayMenTxt(int l);
101
  void GotoPa(int Seite);
102
        void GotoLa(int l);
103
  void GotoPage(int Seite);
104
  void ChgUnit(int art);
105
  void SetCPo(int x, int y);
106
        void SetCCPo(int x, int y);
107
private: // Private attributes
108
  QPushButton *SB1;
109
  QPushButton *SB2;
110
  QPushButton *LA;
111
  QPushButton *LY;
112
  QPopupMenu *Seitmen;
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