Calibrate dialog addition.
authorKai Rasilainen <kai.rasilainen@gmail.com>
Tue, 30 Mar 2010 11:36:07 +0000 (14:36 +0300)
committerKai Rasilainen <kai.rasilainen@gmail.com>
Tue, 30 Mar 2010 11:36:07 +0000 (14:36 +0300)
Client/calibratedialog.cpp [new file with mode: 0644]
Client/calibratedialog.h [new file with mode: 0644]
Client/calibratedialog.ui [new file with mode: 0644]

diff --git a/Client/calibratedialog.cpp b/Client/calibratedialog.cpp
new file mode 100644 (file)
index 0000000..a2ac9bd
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * Calibrate dialog
+ *
+ * @author     Kai Rasilainen <kai.rasilainen@fudeco.com>
+ * @copyright  (c) 2010 Speed Freak team
+ * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
+ */
+
+#include "calibratedialog.h"
+#include "ui_calibratedialog.h"
+
+CalibrateDialog::CalibrateDialog(QWidget *parent) :
+    QDialog(parent),
+    ui(new Ui::CalibrateDialog)
+{
+    ui->setupUi(this);
+    this->setWindowTitle("Calibrating...");
+}
+
+CalibrateDialog::~CalibrateDialog()
+{
+    delete ui;
+}
+
+void CalibrateDialog::changeEvent(QEvent *e)
+{
+    QDialog::changeEvent(e);
+    switch (e->type()) {
+    case QEvent::LanguageChange:
+        ui->retranslateUi(this);
+        break;
+    default:
+        break;
+    }
+}
+
+void CalibrateDialog::setProgressValue(int value)
+{
+    ui->progressBar->setValue(value);
+}
+
+void CalibrateDialog::resetProgressValue()
+{
+    ui->progressBar->reset();
+}
diff --git a/Client/calibratedialog.h b/Client/calibratedialog.h
new file mode 100644 (file)
index 0000000..af7af1c
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Calibrate dialog
+ *
+ * @author     Kai Rasilainen <kai.rasilainen@fudeco.com>
+ * @copyright  (c) 2010 Speed Freak team
+ * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
+ */
+
+#ifndef CALIBRATEDIALOG_H
+#define CALIBRATEDIALOG_H
+
+#include <QDialog>
+
+namespace Ui {
+    class CalibrateDialog;
+}
+
+class CalibrateDialog : public QDialog {
+    Q_OBJECT
+public:
+    CalibrateDialog(QWidget *parent = 0);
+    ~CalibrateDialog();
+
+    void setProgressValue(int value);
+    void resetProgressValue();
+
+protected:
+    void changeEvent(QEvent *e);
+
+private:
+    Ui::CalibrateDialog *ui;
+};
+
+#endif // CALIBRATEDIALOG_H
diff --git a/Client/calibratedialog.ui b/Client/calibratedialog.ui
new file mode 100644 (file)
index 0000000..ac7a81a
--- /dev/null
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>CalibrateDialog</class>
+ <widget class="QDialog" name="CalibrateDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>800</width>
+    <height>480</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Dialog</string>
+  </property>
+  <widget class="QLabel" name="label">
+   <property name="geometry">
+    <rect>
+     <x>300</x>
+     <y>30</y>
+     <width>201</width>
+     <height>161</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string/>
+   </property>
+   <property name="pixmap">
+    <pixmap>line_chart.png</pixmap>
+   </property>
+   <property name="scaledContents">
+    <bool>true</bool>
+   </property>
+   <property name="alignment">
+    <set>Qt::AlignHCenter|Qt::AlignTop</set>
+   </property>
+  </widget>
+  <widget class="QProgressBar" name="progressBar">
+   <property name="geometry">
+    <rect>
+     <x>60</x>
+     <y>220</y>
+     <width>681</width>
+     <height>71</height>
+    </rect>
+   </property>
+   <property name="styleSheet">
+    <string notr="true">color: rgb(255, 255, 255);
+selection-color: rgb(0, 0, 255);</string>
+   </property>
+   <property name="maximum">
+    <number>1024</number>
+   </property>
+   <property name="value">
+    <number>0</number>
+   </property>
+  </widget>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>