26 #include <tulip/Color.h> 27 #include <tulip/Observable.h> 34 class CaptionGraphicsBackgroundItem;
35 class CaptionGraphicsItem;
41 class CaptionItem :
public QObject,
public Observable {
47 NodesColorCaption = 1,
49 EdgesColorCaption = 3,
53 CaptionItem(View *view);
54 ~CaptionItem()
override;
56 void create(CaptionType captionType);
60 void generateColorCaption(CaptionType captionType);
62 void generateSizeCaption(CaptionType captionType);
64 CaptionGraphicsBackgroundItem *captionGraphicsItem();
66 void treatEvents(
const std::vector<Event> &ev)
override;
74 void removeObservation(
bool);
76 void applyNewFilter(
float begin,
float end);
77 void selectedPropertyChanged(std::string propertyName);
80 void clearObservers();
82 void generateGradients(
const std::vector<std::pair<double, Color>> &metricToColorFiltered,
83 QGradient &activeGradient, QGradient &hideGradient);
87 CaptionType _captionType;
88 CaptionGraphicsItem *_captionGraphicsItem;
91 DoubleProperty *_metricProperty;
92 ColorProperty *_colorProperty;
93 SizeProperty *_sizeProperty;
94 ColorProperty *_backupColorProperty;
95 ColorProperty *_backupBorderColorProperty;
99 #endif // CAPTIONITEM_H