27 #ifndef QPANNOTATION_H_
28 #define QPANNOTATION_H_
43 class QPAnnotation :
public QPPlotItem,
public PlotAnnotation {
59 const PlotFont& font,
int orientation = 0);
62 QPAnnotation(
const PlotAnnotation&
copy);
77 bool isValid()
const {
return true; }
83 QwtDoubleRect boundingRect()
const;
86 QWidget* legendItem()
const;
101 void setFont(
const PlotFont& font);
104 int orientation()
const;
107 void setOrientation(
int orientation);
110 PlotCoordinate coordinate()
const;
113 void setCoordinate(
const PlotCoordinate& coord);
116 bool outlineShown()
const;
119 void setOutlineShown(
bool show =
true);
125 void setOutline(
const PlotLine& line);
131 void setBackground(
const PlotAreaFill& area);
138 QwtText& asQwtText();
139 const QwtText& asQwtText()
const;
147 #if QWT_VERSION >= 0x060000
148 void draw_(QPainter* painter,
const QwtScaleMap& xMap,
149 const QwtScaleMap& yMap,
const QRectF& canvasRect,
150 unsigned int drawIndex,
unsigned int drawCount)
const;
152 void draw_(QPainter* painter,
const QwtScaleMap& xMap,
153 const QwtScaleMap& yMap,
const QRect& canvasRect,
154 unsigned int drawIndex,
unsigned int drawCount)
const;
159 QPen getLabelPen()
const;
160 void setPen(QwtText text, QPen pen)
const;
163 PlotCoordinate m_coord;
casacore::CountedPtr< PlotAreaFill > PlotAreaFillPtr
virtual void setFont(const PlotFont &font)=0
Sets the annotation font to the given.
StatsData< AccumType > copy(const StatsData< AccumType > &stats)
virtual void setOutline(const PlotLine &line)=0
Sets the outline to the given line.
casacore::CountedPtr< PlotLine > PlotLinePtr
void show(const variant &v)
virtual void setBackground(const PlotAreaFill &area)=0
Sets the annotation's background to the given.
casacore::CountedPtr< PlotFont > PlotFontPtr
String: the storage and methods of handling collections of characters.