source: ntrip/trunk/BNC/bnctableitem.cpp@ 231

Last change on this file since 231 was 188, checked in by mervart, 18 years ago

* empty log message *

File size: 1.2 KB
Line 
1
2/* -------------------------------------------------------------------------
3 * BKG NTRIP Client
4 * -------------------------------------------------------------------------
5 *
6 * Class: bncTableItem
7 *
8 * Purpose: Re-Implements QTableWidgetItem
9 *
10 * Author: L. Mervart
11 *
12 * Created: 24-Sep-2006
13 *
14 * Changes:
15 *
16 * -----------------------------------------------------------------------*/
17
18#include "bnctableitem.h"
19#include "RTCM/GPSDecoder.h"
20
21// Constructor
22////////////////////////////////////////////////////////////////////////////
23bncTableItem::bncTableItem() : QTableWidgetItem() {
24 _bytesRead = 0.0;
25 setText(QString("%1 byte(s)").arg(0));
26}
27
28// Destructor
29////////////////////////////////////////////////////////////////////////////
30bncTableItem::~bncTableItem() {
31}
32
33//
34////////////////////////////////////////////////////////////////////////////
35void bncTableItem::slotNewObs(const QByteArray&, Observation* obs) {
36
37 _bytesRead += sizeof(*obs);
38
39 if (_bytesRead < 1e3) {
40 setText(QString("%1 byte(s)").arg((int)_bytesRead));
41 }
42 else if (_bytesRead < 1e6) {
43 setText(QString("%1 kb").arg(_bytesRead/1.e3, 5));
44 }
45 else {
46 setText(QString("%1 Mb").arg(_bytesRead/1.e6, 5));
47 }
48}
Note: See TracBrowser for help on using the repository browser.