/*
* Acceleration start dialog
*
- * @author Jukka Kurttila <jukka.kurttila@fudeco.com>
+ * @author Jukka Kurttila <jukka.kurttila@fudeco.com>
* @author Toni Jussila <toni.jussila@fudeco.com>
* @copyright (c) 2010 Speed Freak team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
#include "accelerationstart.h"
#include "ui_accelerationstartdialog.h"
#include <QMessageBox>
+#include <QDebug>
accelerationstart::accelerationstart(QWidget *parent) :
QDialog(parent),
ui->buttonStart->setDisabled(true);
accRealTimeDialog = NULL;
+ helpAccelerationDialog = NULL;
stopMeasureSpeed = 0;
ui->buttonCalib->setStyleSheet("background-color: rgb(0, 0, 0); color: rgb(255, 255, 255)");
ui->buttonStart->setAutoFillBackground(true);
ui->buttonStart->setStyleSheet("background-color: rgb(0, 0, 0); color: rgb(255, 255, 255)");
+ ui->pushButtonInfo->setAutoFillBackground(true);
+ ui->pushButtonInfo->setStyleSheet("background-color: rgb(0, 0, 0); color: rgb(255, 255, 255)");
}
accelerationstart::~accelerationstart()
{
emit sendresult(measureCategory, result);
}
+
+/**
+ * This slot function called when ever info button clicked.
+ */
+void accelerationstart::on_pushButtonInfo_clicked()
+{
+ if(!helpAccelerationDialog)
+ {
+ helpAccelerationDialog = new HelpAccelerationDialog;
+ }
+ connect(helpAccelerationDialog, SIGNAL(rejected()), this, SLOT(killHelpDialog()));
+ helpAccelerationDialog->show();
+}
+
+/**
+ * This slot function called when ever dialog rejected.
+ */
+void accelerationstart::killHelpDialog()
+{
+ if(helpAccelerationDialog)
+ {
+ qDebug() << "__Acc kill: helpAccelerationDialog";
+ delete helpAccelerationDialog;
+ helpAccelerationDialog = NULL;
+ }
+}
#include <QDialog>
#include "accrealtimedialog.h"
+#include <helpaccelerationdialog.h>
namespace Ui {
class accelerationstart;
~accelerationstart();
AccRealTimeDialog* accRealTimeDialog;
QString getMeasureCategory();
+ HelpAccelerationDialog *helpAccelerationDialog;
protected:
void changeEvent(QEvent *e);
QString measureCategory;
private slots:
+ void on_pushButtonInfo_clicked();
void on_categorComboBox_currentIndexChanged(int index);
void on_buttonStart_clicked();
void on_buttonCalib_clicked();
void sendResult(double);
+ void killHelpDialog();
signals:
void sendresult(QString, double);
<pixmap resource="graphics.qrc">:/new/prefix1/Graphics/sf_2.png</pixmap>
</property>
</widget>
- <widget class="QWidget" name="layoutWidget">
+ <widget class="QPushButton" name="pushButtonInfo">
<property name="geometry">
<rect>
- <x>590</x>
+ <x>750</x>
<y>0</y>
- <width>201</width>
- <height>381</height>
+ <width>50</width>
+ <height>50</height>
</rect>
</property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QPushButton" name="buttonCalib">
- <property name="text">
- <string/>
- </property>
- <property name="icon">
- <iconset resource="graphics.qrc">
- <normaloff>:/new/prefix1/Graphics/Speedometer_calibrate.png</normaloff>:/new/prefix1/Graphics/Speedometer_calibrate.png</iconset>
- </property>
- <property name="iconSize">
- <size>
- <width>125</width>
- <height>125</height>
- </size>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="buttonStart">
- <property name="text">
- <string/>
- </property>
- <property name="icon">
- <iconset resource="graphics.qrc">
- <normaloff>:/new/prefix1/Graphics/Speedometer_start.png</normaloff>:/new/prefix1/Graphics/Speedometer_start.png</iconset>
- </property>
- <property name="iconSize">
- <size>
- <width>125</width>
- <height>125</height>
- </size>
- </property>
- </widget>
- </item>
- </layout>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="icon">
+ <iconset resource="graphics.qrc">
+ <normaloff>:/new/prefix1/Graphics/info.png</normaloff>:/new/prefix1/Graphics/info.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>45</width>
+ <height>45</height>
+ </size>
+ </property>
+ </widget>
+ <widget class="QPushButton" name="buttonStart">
+ <property name="geometry">
+ <rect>
+ <x>591</x>
+ <y>210</y>
+ <width>147</width>
+ <height>135</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="icon">
+ <iconset resource="graphics.qrc">
+ <normaloff>:/new/prefix1/Graphics/Speedometer_start.png</normaloff>:/new/prefix1/Graphics/Speedometer_start.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>125</width>
+ <height>125</height>
+ </size>
+ </property>
+ </widget>
+ <widget class="QPushButton" name="buttonCalib">
+ <property name="geometry">
+ <rect>
+ <x>591</x>
+ <y>35</y>
+ <width>147</width>
+ <height>135</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="icon">
+ <iconset resource="graphics.qrc">
+ <normaloff>:/new/prefix1/Graphics/Speedometer_calibrate.png</normaloff>:/new/prefix1/Graphics/Speedometer_calibrate.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>125</width>
+ <height>125</height>
+ </size>
+ </property>
</widget>
</widget>
<resources>
#include "math.h"
#include <QPainter>
#include <QPicture>
+#include <QDebug>
const int DIAGRAM_WIDTH = 400;
const int DIAGRAM_HEIGHT = 300;
ui(new Ui::ResultDialog)
{
ui->setupUi(this);
+
+ helpAccelerationDialog = NULL;
+
timeAxelLength = 10;
resultString = "";
speedList << "0" << "10" << "20" << "30" << "40" << "50" << "60" << "70" << "80" << "90" << "100" ;
{
ui->pushButtonSend->setEnabled(true);
}
+
+/**
+ * This slot function called when ever info button clicked.
+ */
+void ResultDialog::on_pushButtonInfo_clicked()
+{
+ if(!helpAccelerationDialog)
+ {
+ helpAccelerationDialog = new HelpAccelerationDialog;
+ }
+ connect(helpAccelerationDialog, SIGNAL(rejected()), this, SLOT(killHelpDialog()));
+ helpAccelerationDialog->show();
+}
+
+/**
+ * This slot function called when ever dialog rejected.
+ */
+void ResultDialog::killHelpDialog()
+{
+ if(helpAccelerationDialog)
+ {
+ qDebug() << "__Result kill: helpAccelerationDialog";
+ delete helpAccelerationDialog;
+ helpAccelerationDialog = NULL;
+ }
+}
+
#define RESULTDIALOG_H
#include <QDialog>
+#include <helpaccelerationdialog.h>
namespace Ui {
public:
ResultDialog(QWidget *parent = 0);
~ResultDialog();
+ HelpAccelerationDialog *helpAccelerationDialog;
void setEnd(int pValue);
void setValue(int pSpeed, double pTime);
QString resultString;
private slots:
+ void on_pushButtonInfo_clicked();
void on_pushButtonNew_clicked();
void on_pushButtonSend_clicked();
+ void killHelpDialog();
};
#endif // RESULTDIALOG_H
<string>User info label</string>
</property>
</widget>
+ <widget class="QPushButton" name="pushButtonInfo">
+ <property name="geometry">
+ <rect>
+ <x>750</x>
+ <y>0</y>
+ <width>50</width>
+ <height>50</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="icon">
+ <iconset resource="graphics.qrc">
+ <normaloff>:/new/prefix1/Graphics/info.png</normaloff>:/new/prefix1/Graphics/info.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>45</width>
+ <height>45</height>
+ </size>
+ </property>
+ </widget>
</widget>
- <resources/>
+ <resources>
+ <include location="graphics.qrc"/>
+ </resources>
<connections/>
</ui>
{
qDebug() << "__RouteDialog";
ui->setupUi(this);
+
+ helpRoutingDialog = NULL;
+
this->setWindowTitle("Route");
left = 5; top = 5; right = 495; bottom = 295; // Limits in screen coordinates
ui->labelInfoToUser->setText("You're not logged! Please register or log in.");
}
}
+
+/**
+ * This slot function called when ever info button clicked.
+ */
+void RouteDialog::on_pushButtonInfo_clicked()
+{
+ if(!helpRoutingDialog)
+ {
+ helpRoutingDialog = new HelpRoutingDialog;
+ }
+ connect(helpRoutingDialog, SIGNAL(rejected()), this, SLOT(killHelpDialog()));
+ helpRoutingDialog->show();
+}
+
+/**
+ * This slot function called when ever dialog rejected.
+ */
+void RouteDialog::killHelpDialog()
+{
+ if(helpRoutingDialog)
+ {
+ qDebug() << "__Route kill: helpRoutingDialog";
+ delete helpRoutingDialog;
+ helpRoutingDialog = NULL;
+ }
+}
#define ROUTEDIALOG_H
#include <QDialog>
+#include <helproutingdialog.h>
namespace Ui {
class RouteDialog;
int getBottom();
void setLabelInfoToUser(QString infoText);
void setSendServerButtonEnabled();
+ HelpRoutingDialog *helpRoutingDialog;
signals:
void sendroute();
void checkLogin();
private slots:
+ void on_pushButtonInfo_clicked();
void on_sendPushButton_clicked();
void on_newPushButton_clicked();
+ void killHelpDialog();
};
#endif // ROUTEDIALOG_H
<property name="geometry">
<rect>
<x>670</x>
- <y>110</y>
+ <y>150</y>
<width>90</width>
<height>90</height>
</rect>
<property name="geometry">
<rect>
<x>670</x>
- <y>10</y>
+ <y>50</y>
<width>90</width>
<height>90</height>
</rect>
<property name="geometry">
<rect>
<x>650</x>
- <y>210</y>
+ <y>250</y>
<width>141</width>
<height>81</height>
</rect>
<string>User info</string>
</property>
</widget>
+ <widget class="QPushButton" name="pushButtonInfo">
+ <property name="geometry">
+ <rect>
+ <x>750</x>
+ <y>0</y>
+ <width>50</width>
+ <height>50</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="icon">
+ <iconset resource="graphics.qrc">
+ <normaloff>:/new/prefix1/Graphics/info.png</normaloff>:/new/prefix1/Graphics/info.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>45</width>
+ <height>45</height>
+ </size>
+ </property>
+ </widget>
</widget>
<resources>
<include location="graphics.qrc"/>
routeDialog = NULL;
location = NULL;
gpsData = NULL;
+ helpRoutingDialog = NULL;
//Button settings
buttonStatus = true;
ui->buttonRouteStartStop->setIcon(*iconRouteStart);
ui->buttonRouteStartStop->setAutoFillBackground(true);
ui->buttonRouteStartStop->setStyleSheet("background-color: rgb(0, 0, 0); color: rgb(255, 255, 255)");
+ ui->pushButtonInfo->setAutoFillBackground(true);
+ ui->pushButtonInfo->setStyleSheet("background-color: rgb(0, 0, 0); color: rgb(255, 255, 255)");
//Satellite picture and label
ui->labelRouteSatelliteStatus->setVisible(0);
{
emit sendroute(); //Emit mainwindow clientSendRoute
}
+
+/**
+ * This slot function called when ever info button clicked.
+ */
+void RouteSaveDialog::on_pushButtonInfo_clicked()
+{
+ if(!helpRoutingDialog)
+ {
+ helpRoutingDialog = new HelpRoutingDialog;
+ }
+ connect(helpRoutingDialog, SIGNAL(rejected()), this, SLOT(killHelpDialog()));
+ helpRoutingDialog->show();
+}
+
+/**
+ * This slot function called when ever dialog rejected.
+ */
+void RouteSaveDialog::killHelpDialog()
+{
+ if(helpRoutingDialog)
+ {
+ qDebug() << "__Route save kill: helpRoutingDialog";
+ delete helpRoutingDialog;
+ helpRoutingDialog = NULL;
+ }
+}
#include <maemo5location.h>
#include "gpsdata.h"
#include "routedialog.h"
+#include <helproutingdialog.h>
namespace Ui {
class RouteSaveDialog;
RouteSaveDialog(QWidget *parent = 0);
~RouteSaveDialog();
RouteDialog *routeDialog;
+ HelpRoutingDialog *helpRoutingDialog;
protected:
void changeEvent(QEvent *e);
bool buttonStatus;
private slots:
+ void on_pushButtonInfo_clicked();
void on_buttonRouteStartStop_clicked();
void timerSatellitePictureTimeout();
void timerRoutePictureTimeout();
void gpsStatus();
void sendRoute();
+ void killHelpDialog();
signals:
void sendroute();
<string>labelSignalStrength</string>
</property>
</widget>
+ <widget class="QPushButton" name="pushButtonInfo">
+ <property name="geometry">
+ <rect>
+ <x>750</x>
+ <y>0</y>
+ <width>50</width>
+ <height>50</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="icon">
+ <iconset resource="graphics.qrc">
+ <normaloff>:/new/prefix1/Graphics/info.png</normaloff>:/new/prefix1/Graphics/info.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>45</width>
+ <height>45</height>
+ </size>
+ </property>
+ </widget>
</widget>
<resources>
<include location="graphics.qrc"/>
/*
* SettingsDialog class
*
- * @author Olavi Pulkkinen <olavi.pulkkinen@fudeco.com>
- * @copyright (c) 2010 Speed Freak team
- * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @author Olavi Pulkkinen <olavi.pulkkinen@fudeco.com>
+ * @author Toni Jussila <toni.jussila@fudeco.com>
+ * @copyright (c) 2010 Speed Freak team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
*/
#include "settingsdialog.h"
#include "ui_settingsdialog.h"
#include "usersettings.h"
#include <QMessageBox>
+#include <QDebug>
SettingsDialog::SettingsDialog(QWidget *parent) :
- QDialog(parent),
- ui(new Ui::SettingsDialog)
+ QDialog(parent), ui(new Ui::SettingsDialog)
{
ui->setupUi(this);
+
+ helpSettingsDialog = NULL;
+
this->setWindowTitle("Settings");
this->ui->regEMailLineEdit->setText("@");
// Already someone as user - change button text to "Change"
ui->setUserPushButton->setText("Log out");
+
+ // Button settings
+ ui->pushButtonInfo->setAutoFillBackground(true);
+ ui->pushButtonInfo->setStyleSheet("background-color: rgb(0, 0, 0); color: rgb(255, 255, 255)");
}
}
ui->regPasswordLineEdit->setText("");
ui->regUserNameLineEdit->setText("");
}
+
+/**
+ * This slot function called when ever info button clicked.
+ */
+void SettingsDialog::on_pushButtonInfo_clicked()
+{
+ if(!helpSettingsDialog)
+ {
+ helpSettingsDialog = new HelpSettingsDialog;
+ }
+ connect(helpSettingsDialog, SIGNAL(rejected()), this, SLOT(killHelpDialog()));
+ helpSettingsDialog->show();
+}
+
+/**
+ * This slot function called when ever dialog rejected.
+ */
+void SettingsDialog::killHelpDialog()
+{
+ if(helpSettingsDialog)
+ {
+ qDebug() << "__Settings kill: helpSettingsDialog";
+ delete helpSettingsDialog;
+ helpSettingsDialog = NULL;
+ }
+}
#define SETTINGSDIALOG_H
#include <QDialog>
-
#include "instructionsdialog.h"
+#include <helpsettingsdialog.h>
namespace Ui {
class SettingsDialog;
public:
SettingsDialog(QWidget *parent = 0);
~SettingsDialog();
+ HelpSettingsDialog *helpSettingsDialog;
void setRegUserName(QString username);
void setRegPassword(QString password);
void setRegEmail(QString email);
QString password;
private slots:
+ void on_pushButtonInfo_clicked();
void on_setUserPushButton_clicked();
void on_registratePushButton_clicked();
+ void killHelpDialog();
};
#endif // SETTINGSDIALOG_H
<pixmap resource="graphics.qrc">:/new/prefix1/Graphics/sf_2.png</pixmap>
</property>
</widget>
- <zorder>label</zorder>
- <zorder>setUserLabel</zorder>
- <zorder>setUserPushButton</zorder>
- <zorder>registrateLabel</zorder>
- <zorder>registratePushButton</zorder>
- <zorder>layoutWidget</zorder>
- <zorder>labelInfoToUser</zorder>
- <zorder>layoutWidget</zorder>
+ <widget class="QPushButton" name="pushButtonInfo">
+ <property name="geometry">
+ <rect>
+ <x>750</x>
+ <y>0</y>
+ <width>50</width>
+ <height>50</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="icon">
+ <iconset resource="graphics.qrc">
+ <normaloff>:/new/prefix1/Graphics/info.png</normaloff>:/new/prefix1/Graphics/info.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>45</width>
+ <height>45</height>
+ </size>
+ </property>
+ </widget>
</widget>
<tabstops>
<tabstop>regUserNameLineEdit</tabstop>
#include "ui_topresultdialog.h"
TopResultDialog::TopResultDialog(QWidget *parent) :
- QDialog(parent),
- ui(new Ui::TopResultDialog)
+ QDialog(parent), ui(new Ui::TopResultDialog)
{
ui->setupUi(this);
+
+ helpResultsDialog = NULL;
+
this->setWindowTitle("Top Results");
//Set the amount of requested top results here, untill there is user input
//Button settings
ui->buttonTopRefresh->setAutoFillBackground(true);
ui->buttonTopRefresh->setStyleSheet("background-color: rgb(0, 0, 0); color: rgb(255, 255, 255)");
+ ui->pushButtonInfo->setAutoFillBackground(true);
+ ui->pushButtonInfo->setStyleSheet("background-color: rgb(0, 0, 0); color: rgb(255, 255, 255)");
//Clear labels
ui->labelInfoToUser->setText("");
{
this->ui->labelInfoToUser->setText(infoText);
}
+
+/**
+ * This slot function called when ever info button clicked.
+ */
+void TopResultDialog::on_pushButtonInfo_clicked()
+{
+ if(!helpResultsDialog)
+ {
+ helpResultsDialog = new HelpResultsDialog;
+ }
+ connect(helpResultsDialog, SIGNAL(rejected()), this, SLOT(killHelpDialog()));
+ helpResultsDialog->show();
+}
+
+/**
+ * This slot function called when ever dialog rejected.
+ */
+void TopResultDialog::killHelpDialog()
+{
+ if(helpResultsDialog)
+ {
+ qDebug() << "__Top result kill: helpResultsDialog";
+ delete helpResultsDialog;
+ helpResultsDialog = NULL;
+ }
+}
#define TOPRESULTDIALOG_H
#include <QDialog>
+#include <helpresultsdialog.h>
namespace Ui {
class TopResultDialog;
public:
TopResultDialog(QWidget *parent = 0);
~TopResultDialog();
+ HelpResultsDialog *helpResultsDialog;
void setCompoBoxCategories(QStringList list);
void showTopList(QString str);
int getRecentCategoryIndex();
int limitNr;
private slots:
+ void on_pushButtonInfo_clicked();
void on_comboBoxTopCategory_currentIndexChanged(int index);
void on_buttonTopRefresh_clicked();
-
+ void killHelpDialog();
};
#endif // TOPRESULTDIALOG_H
<property name="geometry">
<rect>
<x>650</x>
- <y>20</y>
+ <y>70</y>
<width>130</width>
<height>130</height>
</rect>
<pixmap resource="graphics.qrc">:/new/prefix1/Graphics/sf_2.png</pixmap>
</property>
</widget>
+ <widget class="QPushButton" name="pushButtonInfo">
+ <property name="geometry">
+ <rect>
+ <x>750</x>
+ <y>0</y>
+ <width>50</width>
+ <height>50</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="icon">
+ <iconset resource="graphics.qrc">
+ <normaloff>:/new/prefix1/Graphics/info.png</normaloff>:/new/prefix1/Graphics/info.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>45</width>
+ <height>45</height>
+ </size>
+ </property>
+ </widget>
<zorder>label</zorder>
<zorder>buttonTopRefresh</zorder>
<zorder>labelTopList</zorder>
<zorder>labelCategory</zorder>
<zorder>comboBoxTopCategory</zorder>
+ <zorder>pushButtonInfo</zorder>
<zorder>labelInfoToUser</zorder>
</widget>
<resources>