28 #ifndef MIXERCURVEPOINT_H
29 #define MIXERCURVEPOINT_H
33 #include <QGraphicsItem>
41 class QGraphicsSceneMouseEvent;
44 class UAVOBJECTWIDGETUTILS_EXPORT
MixerNode :
public QObject,
public QGraphicsItem
47 Q_INTERFACES(QGraphicsItem)
50 void addEdge(
Edge *edge);
53 enum { Type = UserType + 10 };
54 int type()
const {
return Type; }
56 void setName(QString name) { cmdName = name; }
57 const QString &getName() {
return cmdName; }
59 void verticalMove(
bool flag);
60 void commandNode(
bool enable);
61 void commandText(QString text);
62 int getCommandIndex() {
return index; }
63 void setCommandIndex(
int idx) { index =
idx; }
65 bool getCommandActive() {
return cmdActive; }
66 void setCommandActive(
bool enable) { cmdActive = enable; }
67 void setToggle(
bool enable) { cmdToggle = enable; }
68 bool getToggle() {
return cmdToggle; }
70 void setPositiveColor(QString color0 =
"#00ff00", QString color1 =
"#00ff00")
75 void setNegativeColor(QString color0 =
"#ff0000", QString color1 =
"#ff0000")
80 void setImage(QImage img) { image = img; }
81 void setDrawNode(
bool draw) { drawNode = draw; }
82 void setDrawText(
bool draw) { drawText = draw; }
84 QRectF boundingRect()
const;
85 QPainterPath shape()
const;
86 void paint(QPainter *painter,
const QStyleOptionGraphicsItem *option, QWidget *widget);
91 void commandActivated(QString text);
94 QVariant itemChange(GraphicsItemChange change,
const QVariant &val);
96 void mousePressEvent(QGraphicsSceneMouseEvent *event);
97 void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
120 #endif // MIXERCURVEPOINT_H