27 #ifndef QPOPTIONS_QO_H_
28 #define QPOPTIONS_QO_H_
39 #include <qwt_color_map.h>
41 #include <qwt_symbol.h>
46 class QPColor :
public PlotColor {
55 QPColor(
const QColor&
color);
59 QPColor(
const PlotColor&
color);
64 QPColor(
const QPColor&
color);
71 using PlotColor::operator=;
89 void setAlpha(
double a);
96 const QColor& asQColor()
const;
97 void setAsQColor(
const QColor&
color);
106 class QPFont :
public PlotFont {
112 QPFont(
const QFont& font,
const QColor&
color);
116 QPFont(
const PlotFont& font);
121 QPFont(
const QPFont& font);
128 using PlotFont::operator=;
135 double pointSize()
const;
138 void setPointSize(
double size);
141 int pixelSize()
const;
144 void setPixelSize(
int size);
156 void setColor(
const PlotColor&
color);
159 bool italics()
const;
162 void setItalics(
bool i =
true);
168 void setBold(
bool b =
true);
171 bool underline()
const;
174 void setUnderline(
bool u =
true);
181 const QFont& asQFont()
const;
182 void setAsQFont(
const QFont& font);
187 const QColor& asQColor()
const;
188 void setAsQColor(
const QColor&
color);
198 class QPLine :
public PlotLine {
204 QPLine(
const QPen& pen);
208 QPLine(
const PlotLine&
copy);
217 using PlotLine::operator=;
224 double width()
const;
227 void setWidth(
double width);
233 void setStyle(Style style);
239 void setColor(
const PlotColor&
color);
246 const QPen& asQPen()
const;
247 void setAsQPen(
const QPen& pen);
257 class QPAreaFill :
public PlotAreaFill {
263 QPAreaFill(
const QBrush& brush);
267 QPAreaFill(
const PlotAreaFill&
copy);
276 using PlotAreaFill::operator=;
286 void setColor(
const PlotColor&
color);
292 void setPattern(Pattern
pattern);
299 const QBrush& asQBrush()
const;
300 void setAsQBrush(
const QBrush& brush);
310 class QPSymbol :
public PlotSymbol,
public QwtSymbol {
315 #if QWT_VERSION >= 0x060000
317 QPSymbol(QwtSymbol::Style style,
const QBrush & brush,
318 const QPen & pen,
const QSize & sz);
321 QPSymbol(
const QwtSymbol& s);
326 QPSymbol(
const PlotSymbol&
copy);
335 using PlotSymbol::operator=;
348 void setSize(
double width,
double height,
bool heightIsPixel =
true);
351 bool heightIsPixel()
const;
354 void setHeightIsPixel(
bool pixel =
true);
357 Symbol symbol()
const;
360 char symbolChar()
const;
363 unsigned short symbolUChar()
const;
372 void setUSymbol(
unsigned short unicode);
378 void setLine(
const PlotLine& line);
384 void setAreaFill(
const PlotAreaFill& fill);
391 void draw(QPainter* p,
const QRect& r)
const;
393 #if QWT_VERSION >= 0x060000
394 inline void drawSymbols(QPainter* p,
const QPointF* points,
int numPoints)
const
395 { QwtSymbol::drawSymbols(p, points, numPoints); };
409 const QPen& drawPen()
const;
410 const QBrush& drawBrush()
const;
417 bool m_heightIsPixel;
423 const QPen* m_drawPen;
426 const QBrush* m_drawBrush;
432 class QPMutex :
public PlotMutex {
462 static QwtPlot::Axis axis(
PlotAxis a);
463 static PlotAxis axis(QwtPlot::Axis a);
473 case HAND_OPEN:
return Qt::OpenHandCursor;
476 case WAIT:
return Qt::WaitCursor;
477 case TEXT:
return Qt::IBeamCursor;
479 default:
return Qt::ArrowCursor;
485 case Qt::OpenHandCursor:
return HAND_OPEN;
488 case Qt::WaitCursor:
case Qt::BusyCursor:
return WAIT;
489 case Qt::IBeamCursor:
return TEXT;
506 default:
return Qt::NoPen;
533 default:
return Qt::NoBrush;
540 case Qt::Dense1Pattern:
case Qt::Dense2Pattern:
542 case Qt::Dense3Pattern:
case Qt::Dense4Pattern:
544 case Qt::Dense5Pattern:
case Qt::Dense6Pattern:
case Qt::Dense7Pattern:
564 default:
return QwtSymbol::NoSymbol;
592 static int round(
double d) {
593 if(d >= 0)
return (
int)(d + 0.5);
594 else return (
int)(d - 0.5);
599 static QwtLinearColorMap* standardSpectrogramMap();
600 static QwtLinearColorMap* standardRasterMap();
601 static QwtLinearColorMap* rasterMap(
const std::vector<double>& values);
casacore::CountedPtr< PlotAreaFill > PlotAreaFillPtr
casacore::CountedPtr< PlotColor > PlotColorPtr
virtual void setColor(const PlotColor &color)=0
Sets the area fill color to the given.
StatsData< AccumType > copy(const StatsData< AccumType > &stats)
casacore::CountedPtr< PlotLine > PlotLinePtr
virtual void setSize(double width, double height, bool heightIsPixel=true)=0
Sets the size of the symbol in pixels.
virtual void setAreaFill(const PlotAreaFill &fill)=0
Sets the area fill of this symbol to the given.
virtual void setLine(const PlotLine &color)=0
Sets the outline of this symbol to the given.
virtual void setSymbol(const PlotSymbolPtr symbol)
ABSTRACT CLASSES Abstract class for colors Any implementation of color should be able to provide a hexadecimal form of the if a human readable name(i.e."black").In many places throughout the plotter
Pattern
Pattern enum, similar in spirit to http://doc.trolltech.com/4.3/qt.html#BrushStyle-enum.
TableExprNode pattern(const TableExprNode &node)
casacore::CountedPtr< PlotSymbol > PlotSymbolPtr
PlotCursor
Enum for cursors.
virtual void setColor(const PlotColor &color)=0
Sets the color of this font to the given.
PlotAxis
Enum for the four plot axes.
casacore::CountedPtr< PlotFont > PlotFontPtr
std::pair< double, double > psize_t
Typedef for size, which is two doubles (width and height).
const Double c
Fundamental physical constants (SI units):
String: the storage and methods of handling collections of characters.
virtual void setColor(const PlotColor &color)=0
Sets this line's color to the given.
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