dust3d/src/skeletoneditnodeitem.h

44 lines
1.1 KiB
C
Raw Normal View History

2018-03-11 16:02:15 +00:00
#ifndef SKELETON_EDIT_NODE_ITEM_H
#define SKELETON_EDIT_NODE_ITEM_H
#include <QGraphicsEllipseItem>
#include <map>
#include <QString>
#include <QColor>
2018-03-11 16:02:15 +00:00
class SkeletonEditEdgeItem;
2018-03-11 16:02:15 +00:00
class SkeletonEditNodeItem : public QGraphicsEllipseItem
{
public:
SkeletonEditNodeItem(const QRectF &rect, QGraphicsItem *parent = 0);
QPointF origin();
void setOrigin(QPointF point);
float radius();
2018-03-14 02:55:59 +00:00
void setRadius(float radius);
bool hovered();
void setHovered(bool hovered);
bool checked();
void setChecked(bool checked);
2018-03-29 01:46:43 +00:00
void markAsBranch(bool isBranch);
bool isBranch();
SkeletonEditNodeItem *nextSidePair();
void setNextSidePair(SkeletonEditNodeItem *nodeItem);
const QColor &sideColor();
QColor nextSideColor();
const QString &sideColorName();
QString nextSideColorName();
void setSideColorName(const QString &name);
2018-03-11 16:02:15 +00:00
private:
bool m_hovered;
bool m_checked;
SkeletonEditNodeItem *m_nextSidePair;
QColor m_sideColor;
QString m_sideColorName;
2018-03-29 01:46:43 +00:00
bool m_isBranch;
2018-03-16 03:06:51 +00:00
private:
void updateAppearance();
2018-03-11 16:02:15 +00:00
};
#endif