Changeset 436 in flair-src for trunk/tools/FlairGCS/src
- Timestamp:
- Aug 24, 2021, 11:58:44 AM (3 years ago)
- Location:
- trunk/tools/FlairGCS/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/FlairGCS/src/ConnectionLayout.cpp
r269 r436 9 9 #include "communication.h" 10 10 11 ConnectionLayout::ConnectionLayout(UdtSocket *socket, QString name )11 ConnectionLayout::ConnectionLayout(UdtSocket *socket, QString name, QTime startTime) 12 12 : Layout(NULL, name, "root") { 13 13 this->socket = socket; 14 14 this->name = name; 15 this->startTime = startTime; 15 16 } 16 17 17 18 ConnectionLayout::~ConnectionLayout() { 19 } 20 21 QTime ConnectionLayout::GetStartTime(void) { 22 return startTime; 18 23 } 19 24 -
trunk/tools/FlairGCS/src/ConnectionLayout.h
r399 r436 7 7 8 8 #include "Layout.h" 9 #include <QTime> 9 10 10 11 class UdtSocket; … … 15 16 16 17 public: 17 ConnectionLayout(UdtSocket *socket, QString name );18 ConnectionLayout(UdtSocket *socket, QString name, QTime startTime); 18 19 ~ConnectionLayout(); 19 20 void XmlToSend(QDomDocument doc); … … 23 24 QString getName(); 24 25 static QString getDocRootName(char* buf, int size); 25 26 QTime GetStartTime(void); 27 26 28 private: 27 29 void drawDatas(char *buf, int buf_size, uint16_t period, … … 30 32 UdtSocket *socket; 31 33 QList<DataRemote *> dataremotes; 34 QTime startTime; 32 35 33 36 private slots: -
trunk/tools/FlairGCS/src/DataPlot1D.cpp
r269 r436 4 4 // %flair:license} 5 5 #include "DataPlot1D.h" 6 #include "ConnectionLayout.h" 6 7 #include "Layout.h" 7 8 #include <QMouseEvent> 8 9 #include <QMenu> 9 10 #include <QGridLayout> 11 #include <QTime> 10 12 #include <qendian.h> 11 13 … … 16 18 17 19 setEnabled(enabled); 20 ResetElapsedTime((float)connectionLayout()->GetStartTime().msecsTo(QTime::currentTime())/1000.); 18 21 parent->addWidget(this, row, col); 19 22 visible_widget = this; … … 25 28 26 29 void DataPlot1D::XmlEvent(QDomElement *dom) { 30 bool previouslyEnabled=IsEnabled(); 31 27 32 if (dom->attribute("curve") != "") { 28 33 QString type = dom->attribute("type"); … … 46 51 XmlSetup(dom); 47 52 } 53 54 if(previouslyEnabled!=IsEnabled() && IsEnabled()) 55 ResetElapsedTime((float)connectionLayout()->GetStartTime().msecsTo(QTime::currentTime())/1000.); 48 56 } 49 57 … … 132 140 if (action == clear) 133 141 clearCurves(); 134 142 135 143 return true; 136 144 } -
trunk/tools/FlairGCS/src/DataRemote.cpp
r269 r436 7 7 #include <QInputDialog> 8 8 #include <QtXml> 9 #include "Manager.h"10 9 #include "ConnectionLayout.h" 11 10 … … 48 47 49 48 action = menu->exec(point); 50 51 // auto_refresh=b->isChecked();52 49 53 50 if (action == autoRefresh) { -
trunk/tools/FlairGCS/src/Manager.cpp
r399 r436 104 104 connect(timer, SIGNAL(timeout()), this, SLOT(acceptConnections())); 105 105 timer->start(500); 106 107 startTime=QTime::currentTime(); 106 108 } 107 109 … … 147 149 UdtSocket* udtSocket=(UdtSocket *)sender(); 148 150 149 ConnectionLayout *newLayout = new ConnectionLayout(udtSocket, name );151 ConnectionLayout *newLayout = new ConnectionLayout(udtSocket, name, startTime); 150 152 connect(udtSocket, SIGNAL(UDTStats(QString,QString,bool)), newLayout, SIGNAL(UDTStats(QString,QString,bool)));//connection in 2 steps to get udtsocket as sender 151 153 connect(newLayout, SIGNAL(UDTStats(QString,QString,bool)), this, SLOT(printUDTStats(QString,QString,bool))); -
trunk/tools/FlairGCS/src/Manager.h
r399 r436 8 8 #include <QWidget> 9 9 #include <QIcon> 10 #include <QTime> 10 11 #include <udt.h> 11 12 #include <qdom.h> … … 48 49 QStatusBar *status; 49 50 QIcon icon_red,icon_green,icon_orange; 51 QTime startTime; 50 52 51 53 private slots:
Note:
See TracChangeset
for help on using the changeset viewer.