Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Rearranging source tree; Removing Deprecated code in ticks

  • Loading branch information...
commit 63452f99d2370ded1c00bf8fa186bf3261709b64 1 parent f299873
Clovis Scotti authored
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
61 PushBurton2/PushBurton2.pro
View
@@ -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
0  PushBurton2/graphicpixmapbt.cpp → PushBurton2/UI/graphicpixmapbt.cpp
View
File renamed without changes
0  PushBurton2/graphicpixmapbt.h → PushBurton2/UI/graphicpixmapbt.h
View
File renamed without changes
0  PushBurton2/graphicsconnmenu.cpp → PushBurton2/UI/graphicsconnmenu.cpp
View
File renamed without changes
0  PushBurton2/graphicsconnmenu.h → PushBurton2/UI/graphicsconnmenu.h
View
File renamed without changes
0  PushBurton2/graphicsdeviceinfo.cpp → PushBurton2/UI/graphicsdeviceinfo.cpp
View
File renamed without changes
0  PushBurton2/graphicsdeviceinfo.h → PushBurton2/UI/graphicsdeviceinfo.h
View
File renamed without changes
0  PushBurton2/graphicslidingdownbts.cpp → PushBurton2/UI/graphicslidingdownbts.cpp
View
File renamed without changes
0  PushBurton2/graphicslidingdownbts.h → PushBurton2/UI/graphicslidingdownbts.h
View
File renamed without changes
0  PushBurton2/graphicsreportview.cpp → PushBurton2/UI/graphicsreportview.cpp
View
File renamed without changes
0  PushBurton2/graphicsreportview.h → PushBurton2/UI/graphicsreportview.h
View
File renamed without changes
0  PushBurton2/graphicssettings.cpp → PushBurton2/UI/graphicssettings.cpp
View
File renamed without changes
0  PushBurton2/graphicssettings.h → PushBurton2/UI/graphicssettings.h
View
File renamed without changes
0  PushBurton2/graphictextbt.cpp → PushBurton2/UI/graphictextbt.cpp
View
File renamed without changes
0  PushBurton2/graphictextbt.h → PushBurton2/UI/graphictextbt.h
View
File renamed without changes
0  PushBurton2/graphicvarplot.cpp → PushBurton2/UI/graphicvarplot.cpp
View
File renamed without changes
0  PushBurton2/graphicvarplot.h → PushBurton2/UI/graphicvarplot.h
View
File renamed without changes
0  PushBurton2/liveview.cpp → PushBurton2/UI/liveview.cpp
View
File renamed without changes
0  PushBurton2/liveview.h → PushBurton2/UI/liveview.h
View
File renamed without changes
0  PushBurton2/liveview.ui → PushBurton2/UI/liveview.ui
View
File renamed without changes
0  PushBurton2/mainwindow.cpp → PushBurton2/UI/mainwindow.cpp
View
File renamed without changes
0  PushBurton2/mainwindow.h → PushBurton2/UI/mainwindow.h
View
File renamed without changes
0  PushBurton2/mainwindow.ui → PushBurton2/UI/mainwindow.ui
View
File renamed without changes
0  PushBurton2/pushburtonanimation.cpp → PushBurton2/UI/pushburtonanimation.cpp
View
File renamed without changes
0  PushBurton2/pushburtonanimation.h → PushBurton2/UI/pushburtonanimation.h
View
File renamed without changes
0  PushBurton2/runcontroldialog.cpp → PushBurton2/UI/runcontroldialog.cpp
View
File renamed without changes
0  PushBurton2/runcontroldialog.h → PushBurton2/UI/runcontroldialog.h
View
File renamed without changes
2  PushBurton2/broadcasterdevice.cpp
View
@@ -13,7 +13,7 @@ BroadcasterDevice::BroadcasterDevice(QObject *parent) :
- serverAddress = QHostAddress("192.168.0.3");
+ serverAddress = QHostAddress("192.168.0.2");
serverPort = 45454;
2  PushBurton2/main.cpp
View
@@ -26,7 +26,7 @@
*/
#include <QtGui/QApplication>
-#include "mainwindow.h"
+#include "UI/mainwindow.h"
#include <QDebug>
#include <QString>
18 PushBurton2/npushacctick.cpp
View
@@ -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");
1  PushBurton2/npushacctick.h
View
@@ -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;
14 PushBurton2/npushairtimetick.cpp
View
@@ -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) {
1  PushBurton2/npushairtimetick.h
View
@@ -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;
11 PushBurton2/npushfoottick.cpp
View
@@ -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");
1  PushBurton2/npushfoottick.h
View
@@ -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;
11 PushBurton2/npushgpstick.cpp
View
@@ -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");
1  PushBurton2/npushgpstick.h
View
@@ -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;
8 PushBurton2/npushgsrtick.cpp
View
@@ -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");
1  PushBurton2/npushgsrtick.h
View
@@ -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;
12 PushBurton2/npushhearttick.cpp
View
@@ -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");
1  PushBurton2/npushhearttick.h
View
@@ -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;
34 PushBurton2/npushimutick.cpp
View
@@ -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");
1  PushBurton2/npushimutick.h
View
@@ -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;
1  PushBurton2/npushlogtick.h
View
@@ -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;
14 PushBurton2/npushmagtick.cpp
View
@@ -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");
1  PushBurton2/npushmagtick.h
View
@@ -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;
9 PushBurton2/npushnormfeettick.cpp
View
@@ -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");
1  PushBurton2/npushnormfeettick.h
View
@@ -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;
7 PushBurton2/npushrotationstick.cpp
View
@@ -13,13 +13,6 @@ NPushRotationsTick::~NPushRotationsTick()
{
}
-void NPushRotationsTick::append_to_xml(QDomDocument& doc, QDomElement& root) const
-{
- Q_UNUSED(doc);
- Q_UNUSED(root);
- //Not necessary. Append is deprecated
-}
-
void NPushRotationsTick::dump_to_xml(QXmlStreamWriter& xml) const
{
xml.writeStartElement("rot_count");
1  PushBurton2/npushrotationstick.h
View
@@ -15,7 +15,6 @@ class NPushRotationsTick : public NPushLogTick
~NPushRotationsTick();
- void append_to_xml(QDomDocument& doc, QDomElement& root) const;
void dump_to_xml(QXmlStreamWriter& xml) const;
QString get_pretty_print() const;
Please sign in to comment.
Something went wrong with that request. Please try again.