24 #include <QtCore/QObject>
26 #include <tulip/View.h>
27 #include <tulip/CaptionGraphicsItem.h>
28 #include <tulip/DoubleProperty.h>
29 #include <tulip/ColorProperty.h>
30 #include <tulip/SizeProperty.h>
34 class CaptionItem :
public QObject,
public Observable {
47 CaptionItem(View *view);
50 void create(CaptionType captionType);
54 void generateColorCaption(CaptionType captionType);
56 void generateSizeCaption(CaptionType captionType);
58 CaptionGraphicsBackgroundItem *captionGraphicsItem();
60 void treatEvents(
const std::vector<Event> &ev);
68 void removeObservation(
bool);
70 void applyNewFilter(
float begin,
float end);
71 void selectedPropertyChanged(std::string propertyName);
75 void clearObservers();
77 void generateGradients(
const std::vector<std::pair <double,Color> > &metricToColorFiltered, QGradient &activeGradient, QGradient &hideGradient);
81 CaptionType _captionType;
82 CaptionGraphicsItem *_captionGraphicsItem;
85 DoubleProperty *_metricProperty;
86 ColorProperty *_colorProperty;
87 SizeProperty *_sizeProperty;
88 ColorProperty *_backupColorProperty;
89 ColorProperty *_backupBorderColorProperty;
94 #endif // CAPTIONITEM_H