Rev 24148 | Rev 24611 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4430 | cbradney | 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 | */ |
||
3 | paul | 7 | #ifndef NODEPALETTE_H |
8 | #define NODEPALETTE_H |
||
9 | |||
10223 | cbradney | 10 | #include <QToolTip> |
9041 | fschmid | 11 | #include <QCheckBox> |
12 | #include <QLabel> |
||
13 | #include <QPushButton> |
||
14 | #include <QSpinBox> |
||
15 | #include <QToolButton> |
||
11145 | fschmid | 16 | #include <QGroupBox> |
17 | #include <QRadioButton> |
||
9041 | fschmid | 18 | #include <QGridLayout> |
19 | #include <QVBoxLayout> |
||
24607 | craig | 20 | #include <QHBoxLayout> |
8501 | cbradney | 21 | #include <QCloseEvent> |
1525 | cbradney | 22 | |
10859 | cbradney | 23 | class QEvent; |
24 | |||
2969 | craig | 25 | #include "scribusapi.h" |
18040 | fschmid | 26 | #include "fpointarray.h" |
1525 | cbradney | 27 | #include "scrpalettebase.h" |
8602 | cbradney | 28 | #include "scrspinbox.h" |
1525 | cbradney | 29 | |
838 | cbradney | 30 | class ScribusDoc; |
31 | class ScribusView; |
||
18040 | fschmid | 32 | class PageItem; |
3 | paul | 33 | |
2969 | craig | 34 | class SCRIBUS_API NodePalette : public ScrPaletteBase |
340 | Franz | 35 | { |
36 | Q_OBJECT |
||
3 | paul | 37 | |
38 | public: |
||
340 | Franz | 39 | NodePalette( QWidget* parent); |
40 | ~NodePalette() {}; |
||
23474 | jghali | 41 | |
18040 | fschmid | 42 | void setDefaults(PageItem* currItem); |
3 | paul | 43 | |
340 | Franz | 44 | QToolButton* MoveNode; |
45 | QToolButton* MoveControl; |
||
46 | QToolButton* AddNode; |
||
47 | QToolButton* DeleteNode; |
||
48 | QToolButton* AsymMove; |
||
49 | QToolButton* SymMove; |
||
168 | Franz | 50 | QToolButton* ResNode; |
51 | QToolButton* Res1Node; |
||
340 | Franz | 52 | QToolButton* PolySplit; |
53 | QToolButton* BezierClose; |
||
54 | QToolButton* PolyMirrorH; |
||
55 | QToolButton* PolyMirrorV; |
||
56 | QToolButton* PolyShearL; |
||
57 | QToolButton* PolyShearR; |
||
58 | QToolButton* PolyShearU; |
||
59 | QToolButton* PolyShearD; |
||
60 | QToolButton* RotateCCW; |
||
61 | QToolButton* RotateCW; |
||
62 | QToolButton* Expand; |
||
4619 | cbradney | 63 | QToolButton* Shrink; |
64 | QToolButton* Enlarge; |
||
65 | QToolButton* Reduce; |
||
21262 | fschmid | 66 | QCheckBox* PreviewMode; |
11145 | fschmid | 67 | QGroupBox* AbsMode; |
68 | QRadioButton* absToCanvas; |
||
69 | QRadioButton* absToPage; |
||
340 | Franz | 70 | QCheckBox* EditCont; |
71 | QLabel* TextLabel1; |
||
8602 | cbradney | 72 | ScrSpinBox* YSpin; |
340 | Franz | 73 | QLabel* TextLabel2; |
8602 | cbradney | 74 | ScrSpinBox* XSpin; |
343 | Franz | 75 | QSpinBox *RotVal; |
4619 | cbradney | 76 | QSpinBox *scalePercentage; |
8602 | cbradney | 77 | ScrSpinBox *scaleDistance; |
343 | Franz | 78 | QPushButton* ResetCont; |
8445 | fschmid | 79 | QPushButton* ResetContClip; |
12681 | fschmid | 80 | QPushButton* ResetShape2Clip; |
4866 | cbradney | 81 | QPushButton* editEditButton; |
18040 | fschmid | 82 | QPushButton* cancelEditButton; |
83 | QPushButton* resetDefaultButton; |
||
456 | fschmid | 84 | void setDoc(ScribusDoc *dc, ScribusView *vi); |
6531 | cbradney | 85 | ScribusDoc* currentDocument() const; |
3 | paul | 86 | |
87 | private slots: |
||
168 | Franz | 88 | void MoveK(); |
89 | void AddN(); |
||
90 | void DelN(); |
||
91 | void MovePoint(); |
||
92 | void SetSym(); |
||
93 | void SetAsym(); |
||
94 | void ResetControl(); |
||
95 | void Reset1Control(); |
||
343 | Franz | 96 | void ResetContour(); |
8445 | fschmid | 97 | void ResetContourToImageClip(); |
12681 | fschmid | 98 | void ResetShapeToImageClip(); |
168 | Franz | 99 | void CloseBezier(); |
100 | void SplitPoly(); |
||
101 | void MirrorH(); |
||
102 | void MirrorV(); |
||
103 | void doRotCCW(); |
||
104 | void doRotCW(); |
||
4619 | cbradney | 105 | void doShrink(); |
168 | Franz | 106 | void doExpand(); |
4619 | cbradney | 107 | void doReduce(); |
108 | void doEnlarge(); |
||
168 | Franz | 109 | void ShearR(); |
110 | void ShearL(); |
||
111 | void ShearU(); |
||
112 | void ShearD(); |
||
113 | void ToggleAbsMode(); |
||
340 | Franz | 114 | void ToggleConMode(); |
21262 | fschmid | 115 | void TogglePreview(); |
3 | paul | 116 | |
117 | public slots: |
||
168 | Franz | 118 | void MoveN(); |
119 | void SetXY(double x, double y); |
||
120 | void HaveNode(bool have, bool mov); |
||
121 | void IsOpen(); |
||
122 | void PolyStatus(int typ, uint size); |
||
23474 | jghali | 123 | void iconSetChange(); |
2210 | cbradney | 124 | void languageChange(); |
4619 | cbradney | 125 | void unitChange(); |
6153 | tsoots | 126 | void EndEdit(); // allow remote close |
18040 | fschmid | 127 | void CancelEdit(); |
128 | void ResetToEditDefaults(); |
||
3 | paul | 129 | |
19388 | jghali | 130 | protected slots: |
24148 | craig | 131 | void reject() override; |
19388 | jghali | 132 | |
3 | paul | 133 | protected: |
6531 | cbradney | 134 | void connectSignals(); |
135 | void disconnectSignals(); |
||
19388 | jghali | 136 | |
24048 | jghali | 137 | void changeEvent(QEvent *e) override; |
138 | void closeEvent(QCloseEvent *) override; |
||
19388 | jghali | 139 | |
24048 | jghali | 140 | QVBoxLayout *vboxLayout { nullptr }; |
141 | QVBoxLayout *vboxLayout1 { nullptr }; |
||
24607 | craig | 142 | QHBoxLayout *hboxLayout { nullptr }; |
24048 | jghali | 143 | QGridLayout *gridLayout { nullptr }; |
144 | QGridLayout *gridLayout2 { nullptr }; |
||
18330 | jghali | 145 | |
24048 | jghali | 146 | ScribusDoc *m_doc { nullptr }; |
147 | ScribusView *m_view { nullptr }; |
||
1843 | cbradney | 148 | |
4619 | cbradney | 149 | double unitRatio; |
18040 | fschmid | 150 | double xPos; |
151 | double yPos; |
||
152 | FPointArray itemPath; |
||
153 | FPointArray itemContourPath; |
||
4619 | cbradney | 154 | |
3 | paul | 155 | signals: |
4078 | fschmid | 156 | void DocChanged(); |
16546 | jghali | 157 | void paletteClosed(); |
3 | paul | 158 | }; |
159 | |||
160 | #endif // NODEPALETTE_H |