comparison layer/RegionLayer.h @ 427:1304dbe4542e

* Support importing features from RDF whose times are intervals rather than only instants; import them into region or note models. Sadly this makes RDF import much, much slower, because we need to work around Rasqal's single-OPTIONAL limitation by repeatedly querying each feature for time and range. * Add segmentation view to region layer, and display label texts
author Chris Cannam
date Tue, 07 Oct 2008 12:42:17 +0000
parents d332ad1ca66b
children ac349afdb23f
comparison
equal deleted inserted replaced
426:6bf3c906b7a5 427:1304dbe4542e
73 int *min, int *max, int *deflt) const; 73 int *min, int *max, int *deflt) const;
74 virtual QString getPropertyValueLabel(const PropertyName &, 74 virtual QString getPropertyValueLabel(const PropertyName &,
75 int value) const; 75 int value) const;
76 virtual void setProperty(const PropertyName &, int value); 76 virtual void setProperty(const PropertyName &, int value);
77 77
78 void setFillColourMap(int);
79 int getFillColourMap() const { return m_colourMap; }
80
78 enum VerticalScale { 81 enum VerticalScale {
79 AutoAlignScale, 82 AutoAlignScale,
80 LinearScale, 83 LinearScale,
81 LogScale, 84 LogScale,
82 }; 85 };
110 113
111 protected: 114 protected:
112 void getScaleExtents(View *, float &min, float &max, bool &log) const; 115 void getScaleExtents(View *, float &min, float &max, bool &log) const;
113 int getYForValue(View *v, float value) const; 116 int getYForValue(View *v, float value) const;
114 float getValueForY(View *v, int y) const; 117 float getValueForY(View *v, int y) const;
118 QColor getColourForValue(View *v, float value) const;
115 119
116 virtual int getDefaultColourHint(bool dark, bool &impose); 120 virtual int getDefaultColourHint(bool dark, bool &impose);
117 121
118 RegionModel::PointList getLocalPoints(View *v, int) const; 122 RegionModel::PointList getLocalPoints(View *v, int) const;
119 123
121 bool m_editing; 125 bool m_editing;
122 RegionModel::Point m_originalPoint; 126 RegionModel::Point m_originalPoint;
123 RegionModel::Point m_editingPoint; 127 RegionModel::Point m_editingPoint;
124 RegionModel::EditCommand *m_editingCommand; 128 RegionModel::EditCommand *m_editingCommand;
125 VerticalScale m_verticalScale; 129 VerticalScale m_verticalScale;
130 int m_colourMap;
126 PlotStyle m_plotStyle; 131 PlotStyle m_plotStyle;
127 132
128 void finish(RegionModel::EditCommand *command) { 133 void finish(RegionModel::EditCommand *command) {
129 Command *c = command->finish(); 134 Command *c = command->finish();
130 if (c) CommandHistory::getInstance()->addCommand(c, false); 135 if (c) CommandHistory::getInstance()->addCommand(c, false);