Permalink
Browse files

Rearranging source tree; Removing Deprecated code in ticks

  • Loading branch information...
1 parent f299873 commit 63452f99d2370ded1c00bf8fa186bf3261709b64 Clovis Scotti committed Jun 15, 2011
Showing with 34 additions and 180 deletions.
  1. +32 −29 PushBurton2/PushBurton2.pro
  2. 0 PushBurton2/{ → UI}/graphicpixmapbt.cpp
  3. 0 PushBurton2/{ → UI}/graphicpixmapbt.h
  4. 0 PushBurton2/{ → UI}/graphicsconnmenu.cpp
  5. 0 PushBurton2/{ → UI}/graphicsconnmenu.h
  6. 0 PushBurton2/{ → UI}/graphicsdeviceinfo.cpp
  7. 0 PushBurton2/{ → UI}/graphicsdeviceinfo.h
  8. 0 PushBurton2/{ → UI}/graphicslidingdownbts.cpp
  9. 0 PushBurton2/{ → UI}/graphicslidingdownbts.h
  10. 0 PushBurton2/{ → UI}/graphicsreportview.cpp
  11. 0 PushBurton2/{ → UI}/graphicsreportview.h
  12. 0 PushBurton2/{ → UI}/graphicssettings.cpp
  13. 0 PushBurton2/{ → UI}/graphicssettings.h
  14. 0 PushBurton2/{ → UI}/graphictextbt.cpp
  15. 0 PushBurton2/{ → UI}/graphictextbt.h
  16. 0 PushBurton2/{ → UI}/graphicvarplot.cpp
  17. 0 PushBurton2/{ → UI}/graphicvarplot.h
  18. 0 PushBurton2/{ → UI}/liveview.cpp
  19. 0 PushBurton2/{ → UI}/liveview.h
  20. 0 PushBurton2/{ → UI}/liveview.ui
  21. 0 PushBurton2/{ → UI}/mainwindow.cpp
  22. 0 PushBurton2/{ → UI}/mainwindow.h
  23. 0 PushBurton2/{ → UI}/mainwindow.ui
  24. 0 PushBurton2/{ → UI}/pushburtonanimation.cpp
  25. 0 PushBurton2/{ → UI}/pushburtonanimation.h
  26. 0 PushBurton2/{ → UI}/runcontroldialog.cpp
  27. 0 PushBurton2/{ → UI}/runcontroldialog.h
  28. +1 −1 PushBurton2/broadcasterdevice.cpp
  29. +1 −1 PushBurton2/main.cpp
  30. +0 −18 PushBurton2/npushacctick.cpp
  31. +0 −1 PushBurton2/npushacctick.h
  32. +0 −14 PushBurton2/npushairtimetick.cpp
  33. +0 −1 PushBurton2/npushairtimetick.h
  34. +0 −11 PushBurton2/npushfoottick.cpp
  35. +0 −1 PushBurton2/npushfoottick.h
  36. +0 −11 PushBurton2/npushgpstick.cpp
  37. +0 −1 PushBurton2/npushgpstick.h
  38. +0 −8 PushBurton2/npushgsrtick.cpp
  39. +0 −1 PushBurton2/npushgsrtick.h
  40. +0 −12 PushBurton2/npushhearttick.cpp
  41. +0 −1 PushBurton2/npushhearttick.h
  42. +0 −34 PushBurton2/npushimutick.cpp
  43. +0 −1 PushBurton2/npushimutick.h
  44. +0 −1 PushBurton2/npushlogtick.h
  45. +0 −14 PushBurton2/npushmagtick.cpp
  46. +0 −1 PushBurton2/npushmagtick.h
  47. +0 −9 PushBurton2/npushnormfeettick.cpp
  48. +0 −1 PushBurton2/npushnormfeettick.h
  49. +0 −7 PushBurton2/npushrotationstick.cpp
  50. +0 −1 PushBurton2/npushrotationstick.h
@@ -32,18 +32,14 @@ TARGET = PushBurton2
TEMPLATE = app
-SOURCES += main.cpp\
- mainwindow.cpp \
- graphicpixmapbt.cpp \
- graphicsdeviceinfo.cpp \
- pushburtonanimation.cpp \
- graphicsconnmenu.cpp \
+SOURCES += \
+ main.cpp\
devicesmanager.cpp \
pushdevicesholder.cpp \
pushburtongenericdevice.cpp \
npushtickdisposer.cpp \
- npushlogtick.cpp \
pushn8simulationdevice.cpp \
+ npushlogtick.cpp \
npushnormfeettick.cpp \
npushmagtick.cpp \
npushimutick.cpp \
@@ -67,31 +63,32 @@ SOURCES += main.cpp\
npushreportairtime.cpp \
fuzzydetector.cpp \
selfshrinkinglist.cpp \
- runcontroldialog.cpp \
runmanager.cpp \
ubiqlogsaver.cpp \
- graphicvarplot.cpp \
- graphictextbt.cpp \
- graphicsreportview.cpp \
- graphicslidingdownbts.cpp \
- liveview.cpp \
- graphicssettings.cpp \
+ UI/runcontroldialog.cpp \
+ UI/graphicvarplot.cpp \
+ UI/graphictextbt.cpp \
+ UI/graphicsreportview.cpp \
+ UI/graphicslidingdownbts.cpp \
+ UI/liveview.cpp \
+ UI/graphicssettings.cpp \
+ UI/mainwindow.cpp \
+ UI/graphicpixmapbt.cpp \
+ UI/graphicsdeviceinfo.cpp \
+ UI/graphicsconnmenu.cpp \
+ UI/pushburtonanimation.cpp \
virtualbrosdevice.cpp \
rotationcounter.cpp \
npushrotationstick.cpp \
broadcasterdevice.cpp
-HEADERS += mainwindow.h \
- graphicpixmapbt.h \
- graphicsdeviceinfo.h \
- pushburtonanimation.h \
- graphicsconnmenu.h \
+HEADERS += \
devicesmanager.h \
pushdevicesholder.h \
pushburtongenericdevice.h \
npushtickdisposer.h \
- npushlogtick.h \
pushn8simulationdevice.h \
+ npushlogtick.h \
npushnormfeettick.h \
npushmagtick.h \
npushimutick.h \
@@ -116,23 +113,29 @@ HEADERS += mainwindow.h \
npushreportairtime.h \
fuzzydetector.h \
selfshrinkinglist.h \
- runcontroldialog.h \
runmanager.h \
ubiqlogsaver.h \
- graphicvarplot.h \
- graphictextbt.h \
- graphicsreportview.h \
- graphicslidingdownbts.h \
- liveview.h \
- graphicssettings.h \
FilesystemConventions.h \
virtualbrosdevice.h \
rotationcounter.h \
npushrotationstick.h \
+ UI/mainwindow.h \
+ UI/graphicpixmapbt.h \
+ UI/graphicsdeviceinfo.h \
+ UI/graphicsconnmenu.h \
+ UI/runcontroldialog.h \
+ UI/graphicvarplot.h \
+ UI/graphictextbt.h \
+ UI/graphicsreportview.h \
+ UI/graphicslidingdownbts.h \
+ UI/liveview.h \
+ UI/graphicssettings.h \
+ UI/pushburtonanimation.h \
broadcasterdevice.h
-FORMS += mainwindow.ui \
- liveview.ui
+FORMS += \
+ UI/mainwindow.ui \
+ UI/liveview.ui
CONFIG += mobility
MOBILITY = location sensors
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -13,7 +13,7 @@ BroadcasterDevice::BroadcasterDevice(QObject *parent) :
- serverAddress = QHostAddress("192.168.0.3");
+ serverAddress = QHostAddress("192.168.0.2");
serverPort = 45454;
View
@@ -26,7 +26,7 @@
*/
#include <QtGui/QApplication>
-#include "mainwindow.h"
+#include "UI/mainwindow.h"
#include <QDebug>
#include <QString>
@@ -67,24 +67,6 @@ NPushAccTick::~NPushAccTick()
{
}
-void NPushAccTick::append_to_xml(QDomDocument& doc, QDomElement& root) const
-{
- QDomElement tickDom = doc.createElement("acc_data");
- tickDom.setAttribute("x", QString::number(tick.x()));
- tickDom.setAttribute("y", QString::number(tick.y()));
- tickDom.setAttribute("z", QString::number(tick.z()));
- tickDom.setAttribute("r", QString::number(pAccAbsMag));
-
- tickDom.setAttribute("tstamp", (double)(msecsToEpoch*0.001));
-
- if(pAccAbsMag < freefall_threshold)
- {
- tickDom.setAttribute("free_fall", "true");
- }
-
- root.appendChild(tickDom);
-}
-
void NPushAccTick::dump_to_xml(QXmlStreamWriter& xml) const
{
xml.writeStartElement("acc_data");
@@ -42,7 +42,6 @@ class NPushAccTick : public NPushLogTick
NPushAccTick(QAccelerometerReading * reading, quint64 a_msecsToEpoch);
~NPushAccTick();
- void append_to_xml(QDomDocument& doc, QDomElement& root) const;
void dump_to_xml(QXmlStreamWriter& xml) const;
QString get_pretty_print() const;
@@ -43,20 +43,6 @@ NPushAirTimeTick::~NPushAirTimeTick()
{
}
-
-void NPushAirTimeTick::append_to_xml(QDomDocument& doc, QDomElement& root) const
-{
- if(!isOnlyHint) {
- QDomElement tickDom = doc.createElement("air_time");
- tickDom.setAttribute("tstamp", (double)(msecsToEpoch*0.001));
- tickDom.setAttribute("in_air", (double)(msecsOnAir*0.001));
- tickDom.setAttribute("data_points", nOfDataPoints);
- tickDom.setAttribute("landed", ((landed)?"true":"false") );
-
- root.appendChild(tickDom);
- }
-}
-
void NPushAirTimeTick::dump_to_xml(QXmlStreamWriter& xml) const
{
if(!isOnlyHint) {
@@ -40,7 +40,6 @@ class NPushAirTimeTick : public NPushLogTick
NPushAirTimeTick(quint64 a_msecsInAir, bool a_landed, quint64 a_msecsToEpoch, int nDataPts=0, bool a_hint=false);
~NPushAirTimeTick();
- void append_to_xml(QDomDocument& doc, QDomElement& root) const;
void dump_to_xml(QXmlStreamWriter& xml) const;
QString get_pretty_print() const;
@@ -65,17 +65,6 @@ NPushFootTick::~NPushFootTick()
}
-void NPushFootTick::append_to_xml(QDomDocument& doc, QDomElement& root) const
-{
- QDomElement tickDom = doc.createElement("foot_data");
- tickDom.setAttribute("side", QString(side));
- tickDom.setAttribute("toes", QString::number(toes));
- tickDom.setAttribute("heel", QString::number(heel));
- tickDom.setAttribute("tstamp", (double)(msecsToEpoch*0.001));
-
- root.appendChild(tickDom);
-}
-
void NPushFootTick::dump_to_xml(QXmlStreamWriter& xml) const
{
xml.writeStartElement("foot_data");
@@ -41,7 +41,6 @@ class NPushFootTick : public NPushLogTick
NPushFootTick(char a_side, int a_toes, int a_heel, quint64 a_msecsToEpoch);
~NPushFootTick();
- void append_to_xml(QDomDocument& doc, QDomElement& root) const;
void dump_to_xml(QXmlStreamWriter& xml) const;
QString get_pretty_print() const;
@@ -39,17 +39,6 @@ NPushGpsTick::~NPushGpsTick()
{
}
-void NPushGpsTick::append_to_xml(QDomDocument& doc, QDomElement& root) const
-{
- QDomElement tickDom = doc.createElement("gps_data");
- tickDom.setAttribute("tstamp", tick.timestamp().toTime_t());
- tickDom.setAttribute("longitude", QString::number(tick.coordinate().longitude()));
- tickDom.setAttribute("latitude", QString::number(tick.coordinate().latitude()));
- tickDom.setAttribute("altitude", QString::number(tick.coordinate().altitude()));
- tickDom.setAttribute("ground_speed", QString::number(tick.attribute(QGeoPositionInfo::GroundSpeed)));
- root.appendChild(tickDom);
-}
-
void NPushGpsTick::dump_to_xml(QXmlStreamWriter& xml) const
{
xml.writeStartElement("gps_data");
@@ -45,7 +45,6 @@ class NPushGpsTick : public NPushLogTick
NPushGpsTick(const QGeoPositionInfo &info);
~NPushGpsTick();
- void append_to_xml(QDomDocument& doc, QDomElement& root) const;
void dump_to_xml(QXmlStreamWriter& xml) const;
QString get_pretty_print() const;
@@ -59,14 +59,6 @@ NPushGSRTick::~NPushGSRTick()
}
-void NPushGSRTick::append_to_xml(QDomDocument& doc, QDomElement& root) const
-{
- QDomElement tickDom = doc.createElement("gsr_data");
- tickDom.setAttribute("reading", QString::number(reading));
- tickDom.setAttribute("tstamp", (double)(msecsToEpoch*0.001));
- root.appendChild(tickDom);
-}
-
void NPushGSRTick::dump_to_xml(QXmlStreamWriter& xml) const
{
xml.writeStartElement("gsr_data");
@@ -41,7 +41,6 @@ class NPushGSRTick : public NPushLogTick
NPushGSRTick(int a_reading, quint64 a_msecsToEpoch);
~NPushGSRTick();
- void append_to_xml(QDomDocument& doc, QDomElement& root) const;
void dump_to_xml(QXmlStreamWriter& xml) const;
QString get_pretty_print() const;
@@ -64,18 +64,6 @@ NPushHeartTick::~NPushHeartTick()
{
}
-void NPushHeartTick::append_to_xml(QDomDocument& doc, QDomElement& root) const
-{
- QDomElement tickDom = doc.createElement("heart_data");
- tickDom.setAttribute("last32", QString::number(hr_3));
- tickDom.setAttribute("last16", QString::number(hr_2));
- tickDom.setAttribute("lastBeat", QString::number(hr_1));
-
- tickDom.setAttribute("tstamp", (double)(msecsToEpoch*0.001));
-
- root.appendChild(tickDom);
-}
-
void NPushHeartTick::dump_to_xml(QXmlStreamWriter& xml) const
{
xml.writeStartElement("heart_data");
@@ -42,7 +42,6 @@ class NPushHeartTick : public NPushLogTick
~NPushHeartTick();
- void append_to_xml(QDomDocument& doc, QDomElement& root) const;
void dump_to_xml(QXmlStreamWriter& xml) const;
QString get_pretty_print() const;
@@ -84,40 +84,6 @@ NPushIMUTick::~NPushIMUTick()
}
-void NPushIMUTick::append_to_xml(QDomDocument& doc, QDomElement& root) const
-{
- QDomElement tickDom = doc.createElement("imu_data");
-
- QDomNode gyroNode = doc.createElement("gyro");
- QDomText gyroText = doc.createTextNode(QString("%1,%2,%3")
- .arg(QString::number(gyro[0]))
- .arg(QString::number(gyro[1]))
- .arg(QString::number(gyro[2])));
- gyroNode.appendChild(gyroText);
- tickDom.appendChild(gyroNode);
-
- QDomNode accNode = doc.createElement("acc");
- QDomText accText = doc.createTextNode(QString("%1,%2,%3")
- .arg(QString::number(accel[0]))
- .arg(QString::number(accel[1]))
- .arg(QString::number(accel[2])));
-
- accNode.appendChild(accText);
- tickDom.appendChild(accNode);
-
- QDomNode magNode = doc.createElement("mag");
- QDomText magText = doc.createTextNode(QString("%1,%2,%3")
- .arg(QString::number(mag[0]))
- .arg(QString::number(mag[1]))
- .arg(QString::number(mag[2])));
-
- magNode.appendChild(magText);
- tickDom.appendChild(magNode);
-
- tickDom.setAttribute("tstamp", (double)(msecsToEpoch*0.001));
- root.appendChild(tickDom);
-}
-
void NPushIMUTick::dump_to_xml(QXmlStreamWriter& xml) const
{
xml.writeStartElement("imu_data");
@@ -42,7 +42,6 @@ class NPushIMUTick : public NPushLogTick
void ParseValues(QStringList& values);
- void append_to_xml(QDomDocument& doc, QDomElement& root) const;
void dump_to_xml(QXmlStreamWriter& xml) const;
QString get_pretty_print() const;
@@ -38,7 +38,6 @@ class NPushLogTick : QObject
Q_OBJECT
public:
- virtual void append_to_xml(QDomDocument& doc, QDomElement& root) const = 0;
virtual void dump_to_xml(QXmlStreamWriter& xml) const = 0;
virtual QString get_pretty_print() const = 0;
@@ -59,20 +59,6 @@ NPushMagTick::~NPushMagTick()
{
}
-void NPushMagTick::append_to_xml(QDomDocument& doc, QDomElement& root) const
-{
- QDomElement tickDom = doc.createElement("mag_data");
- tickDom.setAttribute("x", QString::number(tick.x()*1000.0,'f',5));
- tickDom.setAttribute("y", QString::number(tick.y()*1000.0,'f',5));
- tickDom.setAttribute("z", QString::number(tick.z()*1000.0,'f',5));
- tickDom.setAttribute("r", QString::number(qSqrt(tick.x()*tick.x()+
- tick.y()*tick.y()+
- tick.z()*tick.z())*1000.0,'f',5));
- tickDom.setAttribute("tstamp", (double)(msecsToEpoch*0.001));
-
- root.appendChild(tickDom);
-}
-
void NPushMagTick::dump_to_xml(QXmlStreamWriter& xml) const
{
xml.writeStartElement("mag_data");
@@ -42,7 +42,6 @@ class NPushMagTick : public NPushLogTick
NPushMagTick(QMagnetometerReading * reading, quint64 a_msecsToEpoch);
~NPushMagTick();
- void append_to_xml(QDomDocument& doc, QDomElement& root) const;
void dump_to_xml(QXmlStreamWriter& xml) const;
QString get_pretty_print() const;
@@ -39,15 +39,6 @@ NPushNormFeetTick::~NPushNormFeetTick()
}
-void NPushNormFeetTick::append_to_xml(QDomDocument& doc, QDomElement& root) const
-{
- QDomElement tickDom = doc.createElement("feet_sum");
- tickDom.setAttribute("tstamp", (double)(msecsToEpoch*0.001));
- tickDom.setAttribute("sum", pdata.totalRawSum);
-
- root.appendChild(tickDom);
-}
-
void NPushNormFeetTick::dump_to_xml(QXmlStreamWriter& xml) const
{
xml.writeStartElement("feet_sum");
@@ -39,7 +39,6 @@ class NPushNormFeetTick : public NPushLogTick
~NPushNormFeetTick();
- void append_to_xml(QDomDocument& doc, QDomElement& root) const;
void dump_to_xml(QXmlStreamWriter& xml) const;
QString get_pretty_print() const;
Oops, something went wrong.

0 comments on commit 63452f9

Please sign in to comment.