- Timestamp:
- Feb 25, 2011, 2:17:45 PM (14 years ago)
- Location:
- trunk/BNS
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNS/bns.cpp
r2855 r3041 113 113 // Log File 114 114 // -------- 115 _append = Qt::CheckState(settings.value("fileAppend").toInt()) == Qt::Checked; 116 115 117 QIODevice::OpenMode oMode; 116 if ( Qt::CheckState(settings.value("fileAppend").toInt()) == Qt::Checked) {118 if (_append) { 117 119 oMode = QIODevice::WriteOnly | QIODevice::Unbuffered | QIODevice::Append; 118 120 } … … 652 654 } 653 655 if (_sp3) { 654 _sp3->write(GPSweek, GPSweeks, prn, xx );656 _sp3->write(GPSweek, GPSweeks, prn, xx, _append); 655 657 } 656 658 } -
trunk/BNS/bns.h
r2767 r3041 91 91 bnsSP3* _sp3; 92 92 QByteArray _clkLine; 93 bool _append; 93 94 94 95 int _GPSweek; -
trunk/BNS/bnsoutf.cpp
r2461 r3041 137 137 //////////////////////////////////////////////////////////////////////////// 138 138 t_irc bnsoutf::write(int GPSweek, double GPSweeks, const QString&, 139 const ColumnVector& ) {139 const ColumnVector&, bool append) { 140 140 141 141 if (_sampl != 0 && fmod(GPSweeks, _sampl) != 0.0) { … … 158 158 _out.setf(ios::showpoint | ios::fixed); 159 159 bnsSettings settings; 160 if (QFile::exists(_fName) && 161 Qt::CheckState(settings.value("fileAppend").toInt()) == Qt::Checked) { 160 if (append && QFile::exists(_fName)) { 162 161 _out.open(_fName.data(), ios::out | ios::app); 163 162 } -
trunk/BNS/bnsoutf.h
r860 r3041 15 15 16 16 virtual t_irc write(int GPSweek, double GPSweeks, const QString& prn, 17 const ColumnVector& xx );17 const ColumnVector& xx, bool append); 18 18 19 19 protected: -
trunk/BNS/bnsrinex.cpp
r859 r3041 20 20 21 21 #include "bnsrinex.h" 22 #include "bnssettings.h" 22 23 23 24 using namespace std; … … 28 29 const QString& intr, int sampl) 29 30 : bnsoutf(prep, ext, path, intr, sampl) { 31 bnsSettings settings; 32 _append = Qt::CheckState(settings.value("fileAppend").toInt()) == Qt::Checked; 30 33 } 31 34 … … 40 43 const ColumnVector& xx) { 41 44 42 if (bnsoutf::write(GPSweek, GPSweeks, prn, xx ) == success) {45 if (bnsoutf::write(GPSweek, GPSweeks, prn, xx, _append) == success) { 43 46 44 47 QDateTime datTim = dateAndTimeFromGPSweek(GPSweek, GPSweeks); -
trunk/BNS/bnsrinex.h
r854 r3041 18 18 private: 19 19 virtual void writeHeader(const QDateTime& datTim); 20 bool _append; 20 21 }; 21 22 -
trunk/BNS/bnssp3.cpp
r860 r3041 42 42 //////////////////////////////////////////////////////////////////////////// 43 43 t_irc bnsSP3::write(int GPSweek, double GPSweeks, const QString& prn, 44 const ColumnVector& xx) {44 const ColumnVector& xx, bool append) { 45 45 46 if ( bnsoutf::write(GPSweek, GPSweeks, prn, xx ) == success) {46 if ( bnsoutf::write(GPSweek, GPSweeks, prn, xx, append) == success) { 47 47 48 48 if (_lastGPSweek != GPSweek || _lastGPSweeks != GPSweeks) { -
trunk/BNS/bnssp3.h
r859 r3041 14 14 virtual ~bnsSP3(); 15 15 virtual t_irc write(int GPSweek, double GPSweeks, const QString& prn, 16 const ColumnVector& xx );16 const ColumnVector& xx, bool append); 17 17 18 18 private:
Note:
See TracChangeset
for help on using the changeset viewer.