1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-23 16:25:16 +03:00

More statistics

This commit is contained in:
bsongis 2014-05-27 16:20:12 +02:00
parent fdde364307
commit b736517986
10 changed files with 28 additions and 5 deletions

View file

@ -342,10 +342,12 @@ set(simu_SRCS
modeledit/edge.cpp # TODO not needed
appdata.cpp
simulator.cpp
googleanalytics.cpp
)
set(simu_HDRS
modeledit/node.h
googleanalytics.h
)
qt4_wrap_cpp(simu_SRCS ${simu_HDRS} )

View file

@ -3,6 +3,7 @@
#include <QtGui>
#include "eeprominterface.h"
#include "flashinterface.h"
#include "googleanalytics.h"
#if defined WIN32 || !defined __GNUC__
#include <Windows.h>
@ -93,6 +94,8 @@ avrOutputDialog::avrOutputDialog(QWidget *parent, QString prog, QStringList arg,
process->start(prog,arg);
}
}
ga.sendPageView(getBoardName(GetCurrentFirmware()->getBoard()) + " Flash");
}
# if !__GNUC__

View file

@ -4,6 +4,7 @@
#include "appdata.h"
#include <QDateTime>
#include <QtGui>
#include "googleanalytics.h"
#define BIT_WARN_THR ( 0x01 )
#define BIT_WARN_SW ( 0x02 )
@ -307,6 +308,8 @@ GeneralEdit::GeneralEdit(RadioData &radioData, QWidget *parent) :
ui->backlightColor1_label->hide();
ui->backlightColor2_label->hide();
}
ga.sendPageView(getBoardName(GetCurrentFirmware()->getBoard()) + " GeneralEdit");
}
GeneralEdit::~GeneralEdit()

View file

@ -16,7 +16,7 @@ GoogleAnalytics::~GoogleAnalytics()
delete networkManager;
}
void GoogleAnalytics::sendPageView(QString page)
void GoogleAnalytics::sendPageView(QString title)
{
// create request and set URL of receiver
QNetworkRequest request;
@ -30,7 +30,8 @@ void GoogleAnalytics::sendPageView(QString page)
requestParams += "&t=pageview"; // type of request
requestParams += "&tid=" TRACKING_ID; // Google Analytics account
requestParams += "&cid=" + QString::number(userId); // unique user identifier
requestParams += "&dp=" + page; // name of page (or app name)
requestParams += "&dp=companion-" + title.toLower().replace(" ", "-"); // name of page
requestParams += "&dt=" + title; // title of page
requestParams += "&ul=" + QLocale::system().name(); // language
// send request via post method

View file

@ -164,7 +164,7 @@ MainWindow::MainWindow():
QTimer::singleShot(0, this, SLOT(autoClose()));
}
ga.sendEvent(getBoardName(GetCurrentFirmware()->getBoard()), "Start Companion");
ga.sendPageView("Home");
}
void MainWindow::displayWarnings()

View file

@ -55,6 +55,7 @@
#include "wizarddialog.h"
#include "taranisnotfound.h"
#include <QFileInfo>
#include "googleanalytics.h"
#if defined WIN32 || !defined __GNUC__
#include <windows.h>
@ -80,6 +81,8 @@ MdiChild::MdiChild():
if(!(this->isMaximized() || this->isMinimized())) {
adjustSize();
}
ga.sendPageView(getBoardName(firmware->getBoard()) + " Models");
}
MdiChild::~MdiChild()

View file

@ -13,6 +13,7 @@
#include "telemetry.h"
#include "appdata.h"
#include <QScrollArea>
#include "googleanalytics.h"
ModelEdit::ModelEdit(QWidget * parent, RadioData & radioData, int modelId, FirmwareInterface * firmware) :
QDialog(parent),
@ -42,6 +43,8 @@ ModelEdit::ModelEdit(QWidget * parent, RadioData & radioData, int modelId, Firmw
addTab(new TelemetryPanel(this, model, generalSettings, firmware), tr("Telemetry"));
connect(setupPanel, SIGNAL(extendedLimitsToggled()), chnPanel, SLOT(refreshExtendedLimits()));
ga.sendPageView(getBoardName(firmware->getBoard()) + " ModelEdit");
}
ModelEdit::~ModelEdit()

View file

@ -6,6 +6,7 @@
#include <QImage>
#include <QColor>
#include <QPainter>
#include "googleanalytics.h"
#if !defined WIN32 && defined __GNUC__
#include <unistd.h>
@ -61,6 +62,8 @@ PrintDialog::PrintDialog(QWidget *parent, FirmwareInterface * firmware, GeneralS
printToFile();
QTimer::singleShot(0, this, SLOT(autoClose()));
}
ga.sendPageView(getBoardName(GetCurrentFirmware()->getBoard()) + " ModelsPrint");
}
void PrintDialog::closeEvent(QCloseEvent *event)

View file

@ -4,6 +4,7 @@
#include <iostream>
#include "helpers.h"
#include "simulatorinterface.h"
#include "googleanalytics.h"
#define GBALL_SIZE 20
#define RESX 1024
@ -23,6 +24,7 @@ SimulatorDialog::SimulatorDialog(QWidget * parent, unsigned int flags):
trimPressed (TRIM_NONE),
middleButtonPressed(false)
{
ga.sendPageView(getBoardName(GetCurrentFirmware()->getBoard()) + " Simulator");
}
uint32_t SimulatorDialog9X::switchstatus = 0;

View file

@ -16,6 +16,7 @@
#include "wizarddialog.h"
#include "wizarddata.h"
#include "helpers.h"
#include "googleanalytics.h"
WizardDialog::WizardDialog(const GeneralSettings & settings, unsigned int modelId, QWidget *parent)
: QWizard(parent),
@ -55,6 +56,8 @@ WizardDialog::WizardDialog(const GeneralSettings & settings, unsigned int modelI
#endif
setOption(HaveHelpButton, true);
connect(this, SIGNAL(helpRequested()), this, SLOT(showHelp()));
ga.sendPageView("Wizard");
}
void WizardDialog::showHelp()