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

qwt_marker.h

Go to the documentation of this file.
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 #ifndef QWT_MARKER_H
00011 #define QWT_MARKER_H
00012 
00013 #include <qpen.h>
00014 #include <qfont.h>
00015 #include <qstring.h>
00016 #include "qwt_global.h"
00017 #include "qwt_symbol.h"
00018 
00019 class QRect;
00020 
00040 class QWT_EXPORT QwtMarker
00041 {
00042 public:
00043 
00048     enum LineStyle {NoLine, HLine, VLine, Cross};
00049    
00050     QwtMarker();
00051     virtual ~QwtMarker();
00052 
00053     const QwtMarker & operator=(const QwtMarker&);
00054     
00055     void setLineStyle(LineStyle st);
00056     LineStyle lineStyle() const;
00057 
00058     void setSymbol(const QwtSymbol &s);
00059     const QwtSymbol &symbol() const;
00060 
00061     void setLabel(const QString &txt);
00062     const QString& label() const;
00063 
00064     void setLabelAlignment(int align);
00065     int labelAlignment() const;
00066 
00067     void setLabelPen(const QPen &p);
00068     const QPen &labelPen() const;
00069     void setLinePen(const QPen &p);
00070     const QPen &linePen() const;
00071 
00072     void setFont(const QFont &f);
00073     const QFont &font() const;
00074     
00075     virtual void draw(QPainter *p, int x, int y, const QRect &r);
00076     
00077 protected:
00078     virtual void markerChanged();
00079  
00080 private:
00081     QString d_label;
00082     QPen d_pen;
00083     QPen d_tPen;
00084     QFont d_font;
00085     QwtSymbol d_sym;
00086     int d_align;
00087     LineStyle d_style;
00088 };
00089 
00090 #endif

Generated on Fri Nov 7 14:11:45 2003 for Qwt Developer's Guide by doxygen 1.3.2