VAPOR3 3.9.4
Plot.h
Go to the documentation of this file.
1//************************************************************************
2// *
3// Copyright (C) 2016 *
4// University Corporation for Atmospheric Research *
5// All Rights Reserved *
6// *
7//************************************************************************/
8//
9// Author: Samuel Li
10// National Center for Atmospheric Research
11// PO 3000, Boulder, Colorado
12//
13// Date: January 2018
14//
15
16#ifndef PLOT_H
17#define PLOT_H
18
19#include <vector>
20#include <QWidget>
21#include "ui_plotWindow.h"
22#include <vapor/ParamsMgr.h>
23#include <vapor/DataStatus.h>
24#include "PlotParams.h"
25
26class Plot : public QDialog, public Ui_PlotWindow {
27 Q_OBJECT
28
29public:
30 Plot(VAPoR::DataStatus *status, VAPoR::ParamsMgr *manager, QWidget *parent = 0);
32
34 void Update();
35
36private slots:
38 void _newVarChanged(int);
39 void _removeVarChanged(int);
40
42 void _dataSourceChanged(int);
43
45 void _spaceModeP1Changed();
46 void _spaceModeP2Changed();
47 void _spaceModeTimeChanged(int);
48 void _timeModePointChanged();
49 void _timeModeT1T2Changed();
50 void _numberOfSamplesChanged();
51 void _axisLocksChanged(int);
52
54 void _spaceTabPlotClicked();
55 void _timeTabPlotClicked();
56
57private:
58 VAPoR::DataStatus *_dataStatus;
59 VAPoR::ParamsMgr * _paramsMgr;
60 QDialog * _plotDialog;
61 QLabel * _plotLabel;
62 QLineEdit * _plotPathEdit;
63 QLabel * _plotImageLabel;
64 QVBoxLayout * _plotLayout;
65 QIntValidator * _validator;
66
68 VAPoR::PlotParams *_getCurrentPlotParams() const;
69 VAPoR::DataMgr * _getCurrentDataMgr() const;
70
71 void _setInitialExtents();
72
74 void _invokePython(const QString &, const std::vector<std::string> &, const std::vector<std::vector<float>> &, const std::vector<float> &, const std::string &, const std::string &);
75
76 // Returns a string with the proper X label if all variables share the same coordinate unit.
77 // Otherwise returns an empty string.
78 //
79 std::string _getXLabel();
80
81 // Returns a string with the proper Y label if all variables share the same unit.
82 // Otherwise returns an empty string.
83 //
84 std::string _getYLabel();
85
86 // Update the min and max extents based on all enabled variables.
87 //
88 void _updateExtents();
89};
90
91#endif // PLOT_H
Definition: Plot.h:26
void Update()
This is called whenever there's a change to the parameters.
Plot(VAPoR::DataStatus *status, VAPoR::ParamsMgr *manager, QWidget *parent=0)
A cache based data reader.
Definition: DataMgr.h:110
A class for describing the currently loaded dataset.
Definition: DataStatus.h:50
A singleton class for managing Params instances.
Definition: ParamsMgr.h:53
PlotParams inherits RenderParams.
Definition: PlotParams.h:28