Changed ui of settings to make it fit to dialog
[speedfreak] / Client / routedialog.cpp
index 61e4434..5a680aa 100644 (file)
@@ -8,6 +8,7 @@
 
 #include "routedialog.h"
 #include "ui_routedialog.h"
+#include "usersettings.h"
 #include <cmath>
 #include <QPainter>
 #include <QList>
@@ -167,7 +168,15 @@ RouteDialog::RouteDialog(QWidget *parent) :
     ui(new Ui::RouteDialog)
 {
     ui->setupUi(this);
+    this->setWindowTitle("Route");
     left = 5; top = 5; right = 495; bottom = 295; // Limits in screen coordinates
+
+    // Send rout to server button disable/enable.
+    ui->sendPushButton->setEnabled(false);
+    if (loginSaved())
+    {
+        ui->sendPushButton->setEnabled(true);
+    }
 }
 
 RouteDialog::~RouteDialog()
@@ -348,7 +357,7 @@ void RouteDialog::paintEvent(QPaintEvent *)
 
         QString jono;
         jono = QString("%1 m/s").arg(maxv);
-        ui->maxSpeedLabel->setText(jono);
+        ui->speedValueLabel->setText(jono);
     }
 }