27 #ifndef QPSCATTERPLOT_H_
28 #define QPSCATTERPLOT_H_
41 class QPScatterPlot :
public QPPlotItem,
public MaskedScatterPlot,
42 public ErrorPlot,
public ColoredPlot {
79 bool shouldDraw()
const;
82 QwtDoubleRect boundingRect()
const;
84 #if QWT_VERSION >= 0x060000
86 QwtGraphic legendIcon(
int index,
const QSizeF&
size)
const;
89 QWidget* legendItem()
const;
96 void dataChanged() { itemChanged(); }
99 bool linesShown()
const;
102 void setLinesShown(
bool linesShown =
true);
108 void setLine(
const PlotLine& line);
111 inline bool linesStep()
const {
return m_step; }
112 inline void setLinesStep(
bool linesStep =
true) { m_step = linesStep; }
117 PlotPointDataPtr pointData()
const;
120 bool symbolsShown()
const;
123 void setSymbolsShown(
bool symbolsShown =
true);
129 void setSymbol(
const PlotSymbol& symbol);
135 PlotMaskedPointDataPtr maskedData()
const;
141 bool maskedLinesShown()
const;
144 void setMaskedLinesShown(
bool linesShown =
true);
150 void setMaskedLine(
const PlotLine& line);
153 inline bool maskedLinesStep()
const {
return m_maskedStep; }
154 inline void setMaskedLinesStep(
bool linesStep =
true) { m_maskedStep = linesStep; }
157 bool maskedSymbolsShown()
const;
160 void setMaskedSymbolsShown(
bool symbolsShown =
true);
166 void setMaskedSymbol(
const PlotSymbol& symbol);
172 PlotErrorDataPtr errorData()
const;
175 bool errorLineShown()
const;
178 void setErrorLineShown(
bool show =
true);
184 void setErrorLine(
const PlotLine& line);
187 unsigned int errorCapSize()
const;
190 void setErrorCapSize(
unsigned int capSize);
196 PlotBinnedDataPtr binnedColorData()
const;
209 #if QWT_VERSION >= 0x060000
210 void draw_(QPainter* painter,
const QwtScaleMap& xMap,
211 const QwtScaleMap& yMap,
const QRectF& canvasRect,
212 unsigned int drawIndex,
unsigned int drawCount)
const;
214 void draw_(QPainter* painter,
const QwtScaleMap& xMap,
215 const QwtScaleMap& yMap,
const QRect& canvasRect,
216 unsigned int drawIndex,
unsigned int drawCount)
const;
222 PlotPointDataPtr m_data;
223 PlotMaskedPointDataPtr m_maskedData;
224 PlotErrorDataPtr m_errorData;
225 PlotBinnedDataPtr m_coloredData;
233 QPSymbol m_maskedSymbol;
236 unsigned int m_errorCap;
242 QList<QPColor*> m_colors;
243 QList<QBrush> m_coloredBrushes;
246 #if QWT_VERSION >= 0x060000
248 QPSymbol* coloredSymbol(
const QColor&
color)
const;
252 void updateBrushes();
casacore::CountedPtr< PlotColor > PlotColorPtr
StatsData< AccumType > copy(const StatsData< AccumType > &stats)
casacore::CountedPtr< PlotLine > PlotLinePtr
virtual void setSymbol(const PlotSymbolPtr symbol)
virtual void setMaskedSymbol(const PlotSymbol &symbol)=0
Sets the symbols for masked points to the given.
void show(const variant &v)
ABSTRACT CLASSES Deliberately vague to be general enough to allow for many different types of data
virtual void setSymbol(const PlotSymbol &symbol)=0
Sets the plot symbols to the given symbol.
casacore::CountedPtr< PlotSymbol > PlotSymbolPtr
virtual void setMaskedLine(const PlotLine &line)=0
Sets the lines for masked points to the given.
virtual void setErrorLine(const PlotLine &line)=0
Sets the line used to draw the error bars.
String: the storage and methods of handling collections of characters.
ABSTRACT CLASSES Abstract class for colors Any implementation of color should be able to provide a hexadecimal form of the color(i.e.,"000000"for black) and
virtual void setLine(const PlotLine &line)=0
Sets the plot lines to the given line.