1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Qwt User's Guide: qwt_marker.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.8 -->
<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a> | <a class="qindex" href="pages.html">Related Pages</a></div>
<h1>qwt_marker.h</h1><pre class="fragment"><div>00001 <span class="comment">/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************</span>
00002 <span class="comment"> * Qwt Widget Library</span>
00003 <span class="comment"> * Copyright (C) 1997 Josef Wilgen</span>
00004 <span class="comment"> * Copyright (C) 2002 Uwe Rathmann</span>
00005 <span class="comment"> * </span>
00006 <span class="comment"> * This library is free software; you can redistribute it and/or</span>
00007 <span class="comment"> * modify it under the terms of the Qwt License, Version 1.0</span>
00008 <span class="comment"> *****************************************************************************/</span>
00009
00010 <span class="comment">// vim: expandtab</span>
00011
00012 <span class="preprocessor">#ifndef QWT_MARKER_H</span>
00013 <span class="preprocessor"></span><span class="preprocessor">#define QWT_MARKER_H</span>
00014 <span class="preprocessor"></span>
00015 <span class="preprocessor">#include <qpen.h></span>
00016 <span class="preprocessor">#include <qfont.h></span>
00017 <span class="preprocessor">#include <qstring.h></span>
00018 <span class="preprocessor">#include "qwt_global.h"</span>
00019 <span class="preprocessor">#include "qwt_symbol.h"</span>
00020 <span class="preprocessor">#include "qwt_text.h"</span>
00021
00022 <span class="keyword">class </span>QRect;
00023
<a name="l00043"></a><a class="code" href="class_qwt_marker.html">00043</a> <span class="keyword">class </span>QWT_EXPORT QwtMarker
00044 {
00045 <span class="keyword">public</span>:
00046
<a name="l00051"></a><a class="code" href="class_qwt_marker.html#w4">00051</a> <span class="keyword">enum</span> LineStyle {NoLine, HLine, VLine, Cross};
00052
00053 QwtMarker();
00054 <span class="keyword">virtual</span> ~QwtMarker();
00055
00056 QwtMarker(<span class="keyword">const</span> QwtMarker&);
00057 QwtMarker &operator=(<span class="keyword">const</span> QwtMarker&);
00058
00059 <span class="keywordtype">void</span> setLineStyle(LineStyle st);
00060 LineStyle lineStyle() const;
00061
00062 <span class="keywordtype">void</span> setSymbol(const <a class="code" href="class_qwt_symbol.html">QwtSymbol</a> &s);
00063 const <a class="code" href="class_qwt_symbol.html">QwtSymbol</a> &symbol() const;
00064
00065 <span class="keywordtype">void</span> 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 <span class="keywordtype">void</span> setLabelText(const QString &text);
00070 const QString label() const;
00071
00072 <span class="keywordtype">void</span> setLabelAlignment(<span class="keywordtype">int</span> align);
00073 <span class="keywordtype">int</span> labelAlignment() const;
00074
00075 <span class="keywordtype">void</span> setLabelColor(const QColor &c);
00076 const QColor labelColor() const;
00077
00078 <span class="keywordtype">void</span> setLabelPen(const QPen &p);
00079 const QPen labelPen() const;
00080
00081 <span class="keywordtype">void</span> setLinePen(const QPen &p);
00082 const QPen &linePen() const;
00083
00084 <span class="keywordtype">void</span> setFont(const QFont &f);
00085 const QFont font() const;
00086
00087 virtual <span class="keywordtype">void</span> draw(QPainter *p, <span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, const QRect &r);
00088
00089 protected:
00090 virtual <span class="keywordtype">void</span> markerChanged();
00091
00092 private:
00093 <a class="code" href="class_qwt_text.html">QwtText</a> *d_label;
00094 <span class="keywordtype">int</span> d_align;
00095 QPen d_pen;
00096 <a class="code" href="class_qwt_symbol.html">QwtSymbol</a> d_sym;
00097 LineStyle d_style;
00098 };
00099
00100 #endif
00101
00102 <span class="comment">// Local Variables:</span>
00103 <span class="comment">// mode: C++</span>
00104 <span class="comment">// c-file-style: "stroustrup"</span>
00105 <span class="comment">// indent-tabs-mode: nil</span>
00106 <span class="comment">// End:</span>
</div></pre><hr size="1"><address style="align: right;"><small>Generated on Tue Nov 16 21:12:20 2004 for Qwt User's Guide by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>
</body>
</html>
|