1 | // Part of BNC, a utility for retrieving decoding and
|
---|
2 | // converting GNSS data streams from NTRIP broadcasters.
|
---|
3 | //
|
---|
4 | // Copyright (C) 2007
|
---|
5 | // German Federal Agency for Cartography and Geodesy (BKG)
|
---|
6 | // http://www.bkg.bund.de
|
---|
7 | // Czech Technical University Prague, Department of Geodesy
|
---|
8 | // http://www.fsv.cvut.cz
|
---|
9 | //
|
---|
10 | // Email: euref-ip@bkg.bund.de
|
---|
11 | //
|
---|
12 | // This program is free software; you can redistribute it and/or
|
---|
13 | // modify it under the terms of the GNU General Public License
|
---|
14 | // as published by the Free Software Foundation, version 2.
|
---|
15 | //
|
---|
16 | // This program is distributed in the hope that it will be useful,
|
---|
17 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
18 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
19 | // GNU General Public License for more details.
|
---|
20 | //
|
---|
21 | // You should have received a copy of the GNU General Public License
|
---|
22 | // along with this program; if not, write to the Free Software
|
---|
23 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
---|
24 |
|
---|
25 | #ifndef GRAPHWIN_H
|
---|
26 | #define GRAPHWIN_H
|
---|
27 |
|
---|
28 | #include <QByteArray>
|
---|
29 | #include <QDialog>
|
---|
30 | #include <QPrinter>
|
---|
31 | #include <QPrintDialog>
|
---|
32 | #include <qwt_color_map.h>
|
---|
33 | #include <qwt_plot.h>
|
---|
34 |
|
---|
35 | class QwtScaleWidget;
|
---|
36 |
|
---|
37 | //
|
---|
38 | //////////////////////////////////////////////////////////////////////////////
|
---|
39 | class t_colorMap: public QwtLinearColorMap {
|
---|
40 | public:
|
---|
41 | t_colorMap() : QwtLinearColorMap(Qt::darkBlue, Qt::yellow) {
|
---|
42 | addColorStop(0.00, Qt::blue);
|
---|
43 | addColorStop(0.25, Qt::cyan);
|
---|
44 | addColorStop(0.50, Qt::green);
|
---|
45 | addColorStop(0.75, Qt::red);
|
---|
46 | addColorStop(1.00, Qt::yellow);
|
---|
47 | }
|
---|
48 | };
|
---|
49 |
|
---|
50 | //
|
---|
51 | //////////////////////////////////////////////////////////////////////////////
|
---|
52 | class t_graphWin : public QDialog {
|
---|
53 |
|
---|
54 | Q_OBJECT
|
---|
55 |
|
---|
56 | public:
|
---|
57 | t_graphWin(QWidget* parent, const QString& fileName,
|
---|
58 | const QVector<QWidget*>& plots, const QByteArray* scaleTitle,
|
---|
59 | const QwtInterval* scaleInterval);
|
---|
60 | ~t_graphWin();
|
---|
61 |
|
---|
62 | void savePNG(const QString& dirName, QByteArray ext);
|
---|
63 |
|
---|
64 | signals:
|
---|
65 |
|
---|
66 | private slots:
|
---|
67 | void slotClose();
|
---|
68 | void slotPrint();
|
---|
69 |
|
---|
70 | protected:
|
---|
71 | virtual void closeEvent(QCloseEvent *);
|
---|
72 |
|
---|
73 | private:
|
---|
74 | QString _fileName;
|
---|
75 | QWidget* _canvas;
|
---|
76 | QPushButton* _buttonClose;
|
---|
77 | QPushButton* _buttonPrint;
|
---|
78 | QwtScaleWidget* _colorScale;
|
---|
79 | };
|
---|
80 |
|
---|
81 | #endif
|
---|