Scribus
Open source desktop publishing at your fingertips
nodeeditpalette.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 #ifndef NODEPALETTE_H
8 #define NODEPALETTE_H
9 
10 #include <QToolTip>
11 #include <QCheckBox>
12 #include <QLabel>
13 #include <QPushButton>
14 #include <QSpinBox>
15 #include <QToolButton>
16 #include <QGroupBox>
17 #include <QRadioButton>
18 #include <QGridLayout>
19 #include <QVBoxLayout>
20 #include <QCloseEvent>
21 
22 class QEvent;
23 
24 #include "scribusapi.h"
25 #include "fpointarray.h"
26 #include "scrpalettebase.h"
27 #include "scrspinbox.h"
28 
29 class ScribusDoc;
30 class ScribusView;
31 class PageItem;
32 
33 class SCRIBUS_API NodePalette : public ScrPaletteBase
34 {
35  Q_OBJECT
36 
37 public:
38  NodePalette( QWidget* parent);
39  ~NodePalette() {};
40  void setDefaults(PageItem* currItem);
41 
42  QToolButton* MoveNode;
43  QToolButton* MoveControl;
44  QToolButton* AddNode;
45  QToolButton* DeleteNode;
46  QToolButton* AsymMove;
47  QToolButton* SymMove;
48  QToolButton* ResNode;
49  QToolButton* Res1Node;
50  QToolButton* PolySplit;
51  QToolButton* BezierClose;
52  QToolButton* PolyMirrorH;
53  QToolButton* PolyMirrorV;
54  QToolButton* PolyShearL;
55  QToolButton* PolyShearR;
56  QToolButton* PolyShearU;
57  QToolButton* PolyShearD;
58  QToolButton* RotateCCW;
59  QToolButton* RotateCW;
60  QToolButton* Expand;
61  QToolButton* Shrink;
62  QToolButton* Enlarge;
63  QToolButton* Reduce;
64  QGroupBox* AbsMode;
65  QRadioButton* absToCanvas;
66  QRadioButton* absToPage;
67  QCheckBox* EditCont;
68  QLabel* TextLabel1;
69  ScrSpinBox* YSpin;
70  QLabel* TextLabel2;
71  ScrSpinBox* XSpin;
72  QSpinBox *RotVal;
73  QSpinBox *scalePercentage;
74  ScrSpinBox *scaleDistance;
75  QPushButton* ResetCont;
76  QPushButton* ResetContClip;
77  QPushButton* ResetShape2Clip;
78  QPushButton* editEditButton;
79  QPushButton* cancelEditButton;
80  QPushButton* resetDefaultButton;
81  void setDoc(ScribusDoc *dc, ScribusView *vi);
82  ScribusDoc* currentDocument() const;
83 
84 private slots:
85  void MoveK();
86  void AddN();
87  void DelN();
88  void MovePoint();
89  void SetSym();
90  void SetAsym();
91  void ResetControl();
92  void Reset1Control();
93  void ResetContour();
94  void ResetContourToImageClip();
95  void ResetShapeToImageClip();
96  void CloseBezier();
97  void SplitPoly();
98  void MirrorH();
99  void MirrorV();
100  void doRotCCW();
101  void doRotCW();
102  void doShrink();
103  void doExpand();
104  void doReduce();
105  void doEnlarge();
106  void ShearR();
107  void ShearL();
108  void ShearU();
109  void ShearD();
110  void ToggleAbsMode();
111  void ToggleConMode();
112 
113 public slots:
114  void MoveN();
115  void SetXY(double x, double y);
116  void HaveNode(bool have, bool mov);
117  void IsOpen();
118  void PolyStatus(int typ, uint size);
119  void languageChange();
120  void unitChange();
121  void EndEdit(); // allow remote close
122  void CancelEdit();
123  void ResetToEditDefaults();
124 
125 protected slots:
126  virtual void reject();
127 
128 protected:
129  void connectSignals();
130  void disconnectSignals();
131 
132  virtual void changeEvent(QEvent *e);
133  virtual void closeEvent(QCloseEvent *);
134 
135  QVBoxLayout *vboxLayout;
136  QVBoxLayout *vboxLayout1;
137  QGridLayout *gridLayout;
138  QGridLayout *gridLayout1;
139  QGridLayout *gridLayout2;
140 
141  ScribusDoc *m_doc;
142  ScribusView *m_view;
143 
144  double unitRatio;
145  double xPos;
146  double yPos;
147  FPointArray itemPath;
148  FPointArray itemContourPath;
149 
150 signals:
151  void DocChanged();
152  void paletteClosed();
153 };
154 
155 #endif // NODEPALETTE_H
the Document Class
Definition: scribusdoc.h:90
ScrSpinBox is a Qt4 replacement for our old ScrSpinBox using Qt3.
Definition: scrspinbox.h:21
virtual void closeEvent(QCloseEvent *closeEvent)
Captures the close event and changes it to hide.
Definition: scrpalettebase.cpp:143
Definition: nodeeditpalette.h:33
Definition: pageitem.h:92
Definition: fpointarray.h:42
Definition: scrpalettebase.h:38
Definition: scribusview.h:87