- Timestamp:
- Jun 23, 2012, 1:35:17 PM (12 years ago)
- Location:
- trunk/BNC/src/rinex
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/rinex/graphwin.cpp
r4304 r4307 39 39 * -----------------------------------------------------------------------*/ 40 40 41 #include <iostream>42 43 41 #include "graphwin.h" 44 42 #include "polarplot.h" … … 46 44 using namespace std; 47 45 48 49 46 // Constructor 50 47 //////////////////////////////////////////////////////////////////////////// 51 t_graphWin::t_graphWin(QWidget* parent) : QDialog(parent) { 48 t_graphWin::t_graphWin(QWidget* parent, const QVector<t_polarPlot*>& plots) : 49 QDialog(parent) { 52 50 53 setWindowTitle(tr(" Plot"));51 setWindowTitle(tr("BNC Plot")); 54 52 55 53 int ww = QFontMetrics(font()).width('w'); 56 setMinimumSize(80*ww, 40*ww); 57 58 // Multipath Plots 59 // --------------- 60 _plotMP1 = new t_polarPlot(this); 61 _plotMP2 = new t_polarPlot(this); 54 setMinimumSize(plots.size()*40*ww, 40*ww); 62 55 63 56 // Buttons … … 70 63 // ------ 71 64 QHBoxLayout* plotLayout = new QHBoxLayout; 72 plotLayout->addWidget(_plotMP1); 73 plotLayout->addWidget(_plotMP2); 65 for (int ip = 0; ip < plots.size(); ip++) { 66 plotLayout->addWidget(plots[ip]); 67 } 74 68 75 69 QHBoxLayout* buttonLayout = new QHBoxLayout; -
trunk/BNC/src/rinex/graphwin.h
r4304 r4307 33 33 class t_graphWin : public QDialog { 34 34 35 35 Q_OBJECT 36 36 37 38 t_graphWin(QWidget* parent);39 37 public: 38 t_graphWin(QWidget* parent, const QVector<t_polarPlot*>& plots); 39 ~t_graphWin(); 40 40 41 41 signals: 42 42 43 44 43 private slots: 44 void slotOK(); 45 45 46 47 46 protected: 47 virtual void closeEvent(QCloseEvent *); 48 48 49 private: 50 QPushButton* _buttonOK; 51 t_polarPlot* _plotMP1; 52 t_polarPlot* _plotMP2; 49 private: 50 QPushButton* _buttonOK; 53 51 }; 54 52 -
trunk/BNC/src/rinex/reqcanalyze.cpp
r4300 r4307 47 47 #include "bncpostprocess.h" 48 48 #include "graphwin.h" 49 #include "polarplot.h" 49 50 50 51 using namespace std; … … 83 84 //////////////////////////////////////////////////////////////////////////// 84 85 void t_reqcAnalyze::slotDisplayGraph() { 85 t_graphWin* graphWin = new t_graphWin(0); 86 QVector<t_polarPlot*> plots; 87 t_polarPlot* plotMP1 = new t_polarPlot(0); plots << plotMP1; 88 t_polarPlot* plotMP2 = new t_polarPlot(0); plots << plotMP2; 89 90 t_graphWin* graphWin = new t_graphWin(0, plots); 86 91 graphWin->show(); 87 92 }
Note:
See TracChangeset
for help on using the changeset viewer.