Scribus
Open source desktop publishing at your fingertips
dasheditor.h
1 /*
2 For general Scribus (>=1.3.2) copyright and licensing information please refer
3 to the COPYING file provided with the program. Following this notice may exist
4 a copyright and/or license notice that predates the release of Scribus 1.3.2
5 for which a new license (GPL+exception) is in place.
6 */
7 /***************************************************************************
8  gradienteditor - description
9  -------------------
10  begin : Mit Mai 26 2004
11  copyright : (C) 2004 by Franz Schmid
12  email : Franz.Schmid@altmuehlnet.de
13  ***************************************************************************/
14 
15 /***************************************************************************
16  * *
17  * This program is free software; you can redistribute it and/or modify *
18  * it under the terms of the GNU General Public License as published by *
19  * the Free Software Foundation; either version 2 of the License, or *
20  * (at your option) any later version. *
21  * *
22  ***************************************************************************/
23 
24 #ifndef DASHEDITOR_H
25 #define DASHEDITOR_H
26 
27 #include <QLabel>
28 #include <QFrame>
29 #include <QDoubleSpinBox>
30 #include <QLayout>
31 #include <QList>
32 #include <QPaintEvent>
33 #include <QMouseEvent>
34 #include <QVBoxLayout>
35 #include <QHBoxLayout>
36 #include <QTime>
37 
38 class QEvent;
39 
40 #include "scribusapi.h"
41 #include "vgradient.h"
42 
43 class SCRIBUS_API DashPreview : public QFrame
44 {
45  Q_OBJECT
46 
47 public:
48  DashPreview(QWidget *pa);
49  ~DashPreview() {};
50  void paintEvent(QPaintEvent *e);
51  void mousePressEvent(QMouseEvent *m);
52  void mouseReleaseEvent(QMouseEvent *);
53  void mouseMoveEvent(QMouseEvent *m);
54  void leaveEvent(QEvent*);
55  void enterEvent(QEvent*);
56  void setDashValues(QVector<double> vals);
57  QVector<double> DashValues;
58  QList<double> StopM;
59  bool Mpressed;
60  bool outside;
61  bool onlyselect;
62  int ActStop;
63  QTime m_moveTimer;
64 
65 public slots:
66  void setActStep(double t);
67 
68 signals:
69  void currStep(double);
70  void dashChanged();
71 };
72 
73 class SCRIBUS_API DashEditor : public QFrame
74 {
75  Q_OBJECT
76 
77 public:
78  DashEditor(QWidget *pa);
79  ~DashEditor() {};
80 
81  virtual void changeEvent(QEvent *e);
82  void setDashValues(QVector<double> vals, double linewidth, double offset);
83  QVector<double> getDashValues(double linewidth);
84 
85  DashPreview *Preview;
86  QLabel *Desc;
87  QDoubleSpinBox *Position;
88  QLabel *Desc2;
89  QDoubleSpinBox *Offset;
90 
91 public slots:
92  void setPos(double);
93  void languageChange();
94 
95 signals:
96  void dashChanged();
97 };
98 
99 #endif
100 
Definition: dasheditor.h:43
Definition: dasheditor.h:73