- Timestamp:
- Aug 28, 2012, 11:39:00 AM (12 years ago)
- Location:
- trunk/BNC/src/rinex
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/rinex/reqcanalyze.cpp
r4544 r4556 68 68 _currEpo = 0; 69 69 70 connect(this, SIGNAL(displayGraph(const QString&, QVector<t_polarPoint*>*, QVector<t_polarPoint*>*)), 71 this, SLOT(slotDisplayGraph(const QString&, QVector<t_polarPoint*>*, QVector<t_polarPoint*>*))); 70 connect(this, SIGNAL(displayGraph(const QString&, 71 const QByteArray&, 72 QVector<t_polarPoint*>*, 73 const QByteArray&, 74 QVector<t_polarPoint*>*, 75 double)), 76 this, SLOT(slotDisplayGraph(const QString&, 77 const QByteArray&, 78 QVector<t_polarPoint*>*, 79 const QByteArray&, 80 QVector<t_polarPoint*>*, 81 double))); 72 82 } 73 83 … … 92 102 //////////////////////////////////////////////////////////////////////////// 93 103 void t_reqcAnalyze::slotDisplayGraph(const QString& fileName, 94 QVector<t_polarPoint*>* dataMP1, 95 QVector<t_polarPoint*>* dataMP2) { 104 const QByteArray& title1, 105 QVector<t_polarPoint*>* data1, 106 const QByteArray& title2, 107 QVector<t_polarPoint*>* data2, 108 double maxValue) { 96 109 97 110 bncApp* app = dynamic_cast<bncApp*>(qApp); 98 111 if (app->GUIenabled()) { 99 112 100 double maxMP = 0.0; 101 for (int ii = 0; ii < dataMP1->size(); ii++) { 102 double mp = dataMP1->at(ii)->_value; 103 if (maxMP < mp) { 104 maxMP = mp; 105 } 106 } 107 for (int ii = 0; ii < dataMP2->size(); ii++) { 108 double mp = dataMP2->at(ii)->_value; 109 if (maxMP < mp) { 110 maxMP = mp; 111 } 112 } 113 if (maxMP > SLIPTRESH) { 114 maxMP = SLIPTRESH; 113 if (maxValue == 0.0) { 114 if (data1) { 115 for (int ii = 0; ii < data1->size(); ii++) { 116 double mp = data1->at(ii)->_value; 117 if (maxValue < mp) { 118 maxValue = mp; 119 } 120 } 121 } 122 if (data1) { 123 for (int ii = 0; ii < data2->size(); ii++) { 124 double mp = data2->at(ii)->_value; 125 if (maxValue < mp) { 126 maxValue = mp; 127 } 128 } 129 } 115 130 } 116 131 117 //// beg test 118 maxMP = 2.0; 119 //// end test 120 121 QwtInterval scaleInterval(0.0, maxMP); 122 123 t_polarPlot* plotMP1 = new t_polarPlot(QwtText("MP1"), scaleInterval, 132 QwtInterval scaleInterval(0.0, maxValue); 133 134 QVector<QWidget*> plots; 135 if (data1) { 136 t_polarPlot* plot1 = new t_polarPlot(QwtText(title1), scaleInterval, 137 app->mainWindow()); 138 plot1->addCurve(data1); 139 plots << plot1; 140 } 141 if (data1) { 142 t_polarPlot* plot2 = new t_polarPlot(QwtText(title2), scaleInterval, 124 143 app->mainWindow()); 125 plotMP1->addCurve(dataMP1); 126 127 t_polarPlot* plotMP2 = new t_polarPlot(QwtText("MP2"), scaleInterval, 128 app->mainWindow()); 129 plotMP2->addCurve(dataMP2); 130 131 QVector<QWidget*> plots; 132 plots << plotMP1; 133 plots << plotMP2; 144 plot2->addCurve(data2); 145 plots << plot2; 146 } 134 147 135 148 t_graphWin* graphWin = new t_graphWin(0, fileName, plots, scaleInterval); … … 242 255 } 243 256 244 emit displayGraph(obsFile->fileName(), dataMP1, dataMP2);257 emit displayGraph(obsFile->fileName(), "MP1", dataMP1, "MP2", dataMP2, 2.0); 245 258 246 259 if (_log) { -
trunk/BNC/src/rinex/reqcanalyze.h
r4450 r4556 45 45 signals: 46 46 void finished(); 47 void displayGraph(const QString& fileName, QVector<t_polarPoint*>*, 48 QVector<t_polarPoint*>*); 47 void displayGraph(const QString& fileName, 48 const QByteArray&, 49 QVector<t_polarPoint*>*, 50 const QByteArray&, 51 QVector<t_polarPoint*>*, 52 double); 49 53 50 54 private slots: 51 void slotDisplayGraph(const QString& fileName, QVector<t_polarPoint*>*, 52 QVector<t_polarPoint*>*); 55 void slotDisplayGraph(const QString& fileName, 56 const QByteArray& title1, 57 QVector<t_polarPoint*>* data1, 58 const QByteArray& title2, 59 QVector<t_polarPoint*>* data2, 60 double maxValue); 53 61 54 62 public:
Note:
See TracChangeset
for help on using the changeset viewer.