Changeset 2169 in ntrip
- Timestamp:
- Jan 3, 2010, 11:26:46 PM (15 years ago)
- Location:
- trunk/BNC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncfigureppp.cpp
r2167 r2169 121 121 // ----------------------------------------------------- 122 122 if (_pos.size() > 1) { 123 124 123 // _tRange = _pos[_pos.size()-1]->time - _pos[0]->time; 125 _tRange = MAXNUMPOS; // GW124 _tRange = MAXNUMPOS; 126 125 _tMin = _pos[0]->time.gpssec(); 127 126 … … 182 181 painter.setPen(QColor(Qt::red)); 183 182 painter.drawText(0,int( ww * 1.0),int(pntP.x() + ww * 3.00), 184 185 painter.setPen(QColor( Qt::green));183 int(pntP.x()),Qt::AlignRight,"N"); 184 painter.setPen(QColor(0,210,0,127)); 186 185 painter.drawText(0,int( ww * 1.0),int(pntP.x() + ww * 4.00), 187 186 int(pntP.x()),Qt::AlignRight,"E"); 188 187 painter.setPen(QColor(Qt::blue)); 189 188 painter.drawText(0,int( ww * 1.0),int(pntP.x() + ww * 5.00), 190 189 int(pntP.x()),Qt::AlignRight,"U"); 191 190 painter.setPen(QColor(Qt::black)); 192 191 … … 206 205 double t1 = _tMin + (_pos[ii-1]->time - _pos[0]->time); 207 206 double t2 = _tMin + (_pos[ii]->time - _pos[0]->time); 207 208 // start time 209 // ---------- 210 if (ii == 1) { 211 _daySec = int(fmod(t1,86400.)); 212 _hours = int(_daySec / 3600); 213 _minutes = int((_daySec - _hours * 3600)/ 60.); 214 _seconds = int(fmod(t1,60.)); 215 _strTic = QString("Start %1:%2:%3").arg(_hours, 2, 10, QChar('0')) 216 .arg(_minutes, 2, 10, QChar('0')) 217 .arg(_seconds, 2, 10, QChar('0')); 218 painter.setPen(QColor(Qt::black)); 219 painter.drawText(0,int( ww * 1.0),int(pntP.x() + ww * 13.50), 220 int(pntP.x()),Qt::AlignRight,_strTic); 221 } 208 222 209 223 // time-tics … … 211 225 if (fmod(t1,60.) == 0) { 212 226 QPoint pntTic = pltPoint(t1, 0.0); 213 intdaySec = int(fmod(t1,86400.));214 int hours = int(daySec / 3600);215 int minutes = int((daySec -hours * 3600)/ 60.);216 QString strTic = QString("%1:%2").arg(hours,2, 10, QChar('0'))217 .arg(minutes, 2, 10, QChar('0'));227 _daySec = int(fmod(t1,86400.)); 228 _hours = int(_daySec / 3600); 229 _minutes = int((_daySec - _hours * 3600)/ 60.); 230 _strTic = QString("%1:%2").arg(_hours, 2, 10, QChar('0')) 231 .arg(_minutes, 2, 10, QChar('0')); 218 232 painter.setPen(QColor(Qt::black)); 219 233 double xFirstCharTic = pntTic.x() - ww * 1.2; 220 234 if ( xFirstCharTic > pntZ.x()) { 221 painter.drawText(int(xFirstCharTic),int(pntTic.y() + ww * 1.7), strTic);235 painter.drawText(int(xFirstCharTic),int(pntTic.y() + ww * 1.7),_strTic); 222 236 painter.drawLine(int(pntTic.x()),int(pntTic.y()), 223 237 int(pntTic.x()),int(pntTic.y() + ww * 0.5)); … … 226 240 painter.setPen(QColor(Qt::red)); 227 241 painter.drawLine(pltPoint(t1, neu[ii-1][0]), pltPoint(t2, neu[ii][0])); 228 painter.setPen(QColor( Qt::green));242 painter.setPen(QColor(0,210,0,127)); 229 243 painter.drawLine(pltPoint(t1, neu[ii-1][1]), pltPoint(t2, neu[ii][1])); 230 244 painter.setPen(QColor(Qt::blue)); -
trunk/BNC/bncfigureppp.h
r2166 r2169 58 58 int _height; 59 59 double _xyzRef[3]; 60 int _daySec; 61 int _hours; 62 int _minutes; 63 int _seconds; 64 QString _strTic; 60 65 const static int MAXNUMPOS = 300; 61 66 };
Note:
See TracChangeset
for help on using the changeset viewer.