Source
xxxxxxxxxx
26
26
//# $Id: $
27
27
#ifndef QPCANVASHELPERS_QO_H_
28
28
#define QPCANVASHELPERS_QO_H_
29
29
30
30
#ifdef AIPS_HAS_QWT
31
31
32
32
#include <casaqt/QwtPlotter/QPOptions.h>
33
33
#include <casaqt/QwtPlotter/QPPlotItem.qo.h>
34
34
#include <graphics/GenericPlotter/PlotCanvas.h>
35
35
36
+
#include <casacore/casa/Quanta/MVAngle.h>
37
+
36
38
#include <qwt_legend.h>
37
39
#if QWT_VERSION >= 0x060000
38
40
#include <qwt_plot_legenditem.h>
39
41
#endif
40
42
#include <qwt_plot.h>
41
43
#include <qwt_plot_grid.h>
42
44
#include <qwt_scale_draw.h>
43
45
44
46
#include <QObject>
45
47
#include <QMouseEvent>
118
120
void setRelativeDateFormat(const casacore::String& newFormat);
119
121
// </group>
120
122
121
123
// Gets/Sets the reference value. See PlotCanvas::setAxisReferenceValue().
122
124
// <group>
123
125
bool referenceValueSet() const;
124
126
double referenceValue() const;
125
127
void setReferenceValue(bool on, double value = 0);
126
128
// </group>
127
129
130
+
// Gets/Sets the format used for angle values
131
+
AngleFormat angleFormat() const;
132
+
void setAngleFormat(AngleFormat newFormat);
133
+
128
134
// Overrides QwtScaleDraw::label().
129
135
QwtText label(double value) const;
130
136
131
137
virtual void draw(QPainter* painter, const QPalette& palette) const;
132
138
133
139
#if QWT_VERSION < 0x060000
134
140
virtual int extent( const QPen& pen, const QFont& font ) const;
135
141
#endif
136
142
137
143
private:
151
157
// <group>
152
158
casacore::String m_dateFormat;
153
159
casacore::String m_relativeDateFormat;
154
160
// </group>
155
161
156
162
// Reference value.
157
163
// <group>
158
164
bool m_referenceSet;
159
165
double m_referenceValue;
160
166
// </group>
161
-
};
162
167
168
+
// Angle Format
169
+
AngleFormat m_angleFormat;
170
+
casacore::MVAngle::Format m_mvAngleFormat;
171
+
static const casacore::uInt m_angleFormatDefaultPrecision = 6;
172
+
};
163
173
164
174
// Legend Classes //
165
175
166
176
// Subclass of QwtLegend to handle outline and background, and be able to draw
167
177
// itself using a QPainter.
168
178
class QPLegend : public QwtLegend {
169
179
public:
170
180
// Constructor which takes optional parent widget.
171
181
QPLegend(QWidget* parent = NULL);
172
182