Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

qwt_marker.h

00001 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- ***************************** 00002 * Qwt Widget Library 00003 * Copyright (C) 1997 Josef Wilgen 00004 * Copyright (C) 2002 Uwe Rathmann 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the Qwt License, Version 1.0 00008 *****************************************************************************/ 00009 00010 // vim: expandtab 00011 00012 #ifndef QWT_MARKER_H 00013 #define QWT_MARKER_H 00014 00015 #include <qpen.h> 00016 #include <qfont.h> 00017 #include <qstring.h> 00018 #include "qwt_global.h" 00019 #include "qwt_symbol.h" 00020 #include "qwt_text.h" 00021 00022 class QRect; 00023 00043 class QWT_EXPORT QwtMarker 00044 { 00045 public: 00046 00051 enum LineStyle {NoLine, HLine, VLine, Cross}; 00052 00053 QwtMarker(); 00054 virtual ~QwtMarker(); 00055 00056 QwtMarker(const QwtMarker&); 00057 QwtMarker &operator=(const QwtMarker&); 00058 00059 void setLineStyle(LineStyle st); 00060 LineStyle lineStyle() const; 00061 00062 void setSymbol(const QwtSymbol &s); 00063 const QwtSymbol &symbol() const; 00064 00065 void setLabel(const QString &text, const QFont &font = QFont(), 00066 const QColor &color = QColor(), const QPen &pen = QPen(Qt::NoPen), 00067 const QBrush &brush = QBrush(Qt::NoBrush)); 00068 00069 void setLabelText(const QString &text); 00070 const QString label() const; 00071 00072 void setLabelAlignment(int align); 00073 int labelAlignment() const; 00074 00075 void setLabelColor(const QColor &c); 00076 const QColor labelColor() const; 00077 00078 void setLabelPen(const QPen &p); 00079 const QPen labelPen() const; 00080 00081 void setLinePen(const QPen &p); 00082 const QPen &linePen() const; 00083 00084 void setFont(const QFont &f); 00085 const QFont font() const; 00086 00087 virtual void draw(QPainter *p, int x, int y, const QRect &r); 00088 00089 protected: 00090 virtual void markerChanged(); 00091 00092 private: 00093 QwtText *d_label; 00094 int d_align; 00095 QPen d_pen; 00096 QwtSymbol d_sym; 00097 LineStyle d_style; 00098 }; 00099 00100 #endif 00101 00102 // Local Variables: 00103 // mode: C++ 00104 // c-file-style: "stroustrup" 00105 // indent-tabs-mode: nil 00106 // End:

Generated on Tue Nov 16 21:12:20 2004 for Qwt User's Guide by doxygen 1.3.8