38class ColCurve :
public QObject,
public QGraphicsPathItem
44 : QObject(parent), QGraphicsPathItem(),
45 m_parentWidget(parentWidget), m_colChannel(colChannel),
50 int getColChannel()
const {
return m_colChannel; }
52 void setEditable(
bool editable) { m_editable = editable; }
53 bool editable()
const {
return m_editable; }
55 void setActiveSceneSize(
const QSizeF size) { m_activeSceneSize = size; }
63 QSizeF m_activeSceneSize;
66 void mousePressEvent(QGraphicsSceneMouseEvent*);
67 void mouseMoveEvent(QGraphicsSceneMouseEvent*);
68 void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
71 void removeDataPoint();
86 const ItomPaletteBase* getCurPalette()
const {
return &m_currentPalette; }
87 void drawPalCurves(
int selPt = -1);
88 void updateOptionPalette();
90 void removeColorStop(
int index);
91 void addColorStop(
int index_before,
float percent_to_next = 0.5);
92 void changeSelectedColorStop(
int new_index);
93 int getSelectedColorStop()
const {
return m_selectedColorStop; }
101 Ui::WidgetPropPalettes ui;
102 QImage m_imgGVCurPalette;
103 int m_selectedColorStop;
107 float m_gvSceneMarginLeftRight;
108 float m_gvPaletteSceneMarginTopBottom;
109 float m_gvCurveSceneMarginTopBottom;
111 void updatePaletteList();
113 void updateViewOnResize();
115 QList<ito::ItomPaletteBase> m_palettes;
116 int m_curPaletteIndex;
119 QGraphicsScene *m_pSceneCurPalette;
120 QGraphicsScene *m_pScenePalCurves;
123 void lwCurrentRowChanged(
int row);
124 void colorComponentChanged(
int value);
125 void colorComponentVisibilityChanged(
bool);
127 void palSpecialColorChanged(QColor color);
130 void on_sbIndex_valueChanged(
double value);
131 void on_pbAdd_clicked();
132 void on_pbDuplicate_clicked();
133 void on_pbRemove_clicked();
134 void on_pbPalSave_clicked();
135 void on_pbEquidistantColorStop_clicked();
136 void on_pbRemoveColorStop_clicked();
137 void on_pbAddColorStop_clicked();
138 void on_lePalName_textChanged(
const QString & text);
139 void on_pbImportPalette_clicked();
140 void on_pbExportPalette_clicked();
141 void on_btnColor_colorChanged(QColor color);
144 bool eventFilter(QObject *obj, QEvent *event);