30 #include <QPushButton>
31 #include <QToolButton>
32 #include "scribusapi.h"
33 #include "gradienteditor.h"
34 #include "scribusdoc.h"
35 #include "ui/scrpalettebase.h"
36 #include "ui_colorpalette.h"
37 #include "ui/gradientvectordialog.h"
38 #include "ui/patternpropsdialog.h"
51 class SCRIBUS_API
Cpalette :
public QWidget, Ui::colorPalette
63 void updateColorList();
66 void setGradients(QHash<QString, VGradient> *docGradients);
67 void setPatterns(QHash<QString, ScPattern> *docPatterns);
71 PageItem* currentItemFromSelection();
76 void handleSelectionChanged();
77 void handleUpdateRequest(
int);
81 void fillStrokeSelector(
int );
82 void handleFillShade(
double);
83 void handleStrokeShade(
double);
84 void handleOverprint(
int);
85 void handleFillGradient();
86 void handleStrokeGradient();
87 void handleStrokeGradientExtend(
int val);
88 void handleGradientExtend(
int val);
89 void showColorValues(QString stroke, QString fille,
int sShade,
int fShade);
90 void showGradient(
int nr);
91 void showGradientStroke(
int nr);
92 void showOverprint(
int);
93 void toggleColorDisplay();
94 void setNamedGradient(
const QString &name);
95 void setNamedGradientStroke(
const QString &name);
96 void selectPattern(QListWidgetItem *c);
97 void selectPatternS(QListWidgetItem *c);
98 void hideEditedPatterns(QStringList names);
99 void setActPattern(QString pattern,
double scaleX,
double scaleY,
double offsetX,
double offsetY,
double rotation,
double skewX,
double skewY,
bool mirrorX,
bool mirrorY);
100 void setActPatternStroke(QString pattern,
double scaleX,
double scaleY,
double offsetX,
double offsetY,
double rotation,
double skewX,
double skewY,
bool mirrorX,
bool mirrorY,
double space,
bool pathF);
101 void selectColorS(QListWidgetItem *c);
102 void selectColorF(QListWidgetItem *c);
103 void slotGradStroke(
int number);
104 void slotGrad(
int nr);
105 void slotGradType(
int type);
106 void slotGradTypeStroke(
int type);
107 void setGradientColors();
108 void editMeshPointColor();
109 void createNewMeshGradient();
110 void resetMeshGradient();
111 void meshGradientToShape();
112 void resetOneControlPoint();
113 void resetAllControlPoints();
114 void editGradientVector();
115 void editGradientVectorStroke();
116 void setActiveGradDia(
bool active);
117 void setSpecialGradient(
double x1,
double y1,
double x2,
double y2,
double fx,
double fy,
double sg,
double sk,
double cx,
double cy);
120 void snapToPatchGrid(
bool val);
121 void handleRemovePatch();
123 void setMeshPatchPoint();
124 void updateMeshPoint();
125 void changePatternProps();
126 void changePatternPropsStroke();
127 void toggleStrokePattern();
128 void changeHatchProps();
129 void unitChange(
double,
double,
int unitIndex);
131 void NewPen(QString);
132 void NewBrush(QString);
133 void NewPenShade(
double);
134 void NewBrushShade(
double);
135 void NewGradient(
int);
136 void NewGradientS(
int);
137 void NewPattern(QString);
138 void NewPatternProps(
double,
double,
double,
double,
double,
double,
double,
bool,
bool);
139 void NewPatternS(QString);
140 void NewPatternTypeS(
bool);
141 void NewPatternPropsS(
double,
double,
double,
double,
double,
double,
double,
double,
bool,
bool);
142 void NewSpecial(
double,
double,
double,
double,
double,
double,
double,
double,
double,
double);
143 void NewOverprint(
int);
144 void editGradient(
int);
148 QPointer<ScribusDoc> currentDoc;
151 QHash<QString, ScPattern> *patternList;
152 QHash<QString, VGradient> *gradientList;
153 double m_Pattern_scaleX;
154 double m_Pattern_scaleY;
155 double m_Pattern_offsetX;
156 double m_Pattern_offsetY;
157 double m_Pattern_rotation;
158 double m_Pattern_skewX;
159 double m_Pattern_skewY;
160 bool m_Pattern_mirrorX;
161 bool m_Pattern_mirrorY;
162 double m_Pattern_scaleXS;
163 double m_Pattern_scaleYS;
164 double m_Pattern_offsetXS;
165 double m_Pattern_offsetYS;
166 double m_Pattern_rotationS;
167 double m_Pattern_skewXS;
168 double m_Pattern_skewYS;
169 double m_Pattern_spaceS;
170 bool m_Pattern_mirrorXS;
171 bool m_Pattern_mirrorYS;
173 int editStrokeGradient;
175 void connectSignals();
176 void disconnectSignals();
178 void setCurrentItem(
PageItem* item);
179 void updateFromItem();
181 void setGradientVectorValues();
182 void setGradientVectorStrokeValues();
185 void blockUpdates(
bool block) {
if (block) ++m_blockUpdates;
else --m_blockUpdates; }
186 bool updatesBlocked() {
return (m_blockUpdates > 0); }
188 void enablePatterns(
bool enable);
191 void updateGradientList();
192 void updatePatternList();
Definition: cpalette.h:51
Very nice list box with color names and samples. It's inherited from QListBox with all its methods an...
Definition: colorlistbox.h:67
Definition: scpattern.h:36
Definition: sccolor.h:155
The ScComboBox widget always uses a listbox instead of a popup, independent of any QStyle...
Definition: sccombobox.h:26
the Document Class
Definition: scribusdoc.h:90
ScrSpinBox is a Qt4 replacement for our old ScrSpinBox using Qt3.
Definition: scrspinbox.h:21
Definition: propertiespalette.h:51
Definition: gradientvectordialog.h:40
Definition: pageitem.h:92
UndoManager handles the undo stack.
Definition: undomanager.h:81