Added new routedialog
authorOlavi Pulkkinen <olavi.pulkkinen@fudeco.com>
Mon, 29 Mar 2010 10:15:37 +0000 (13:15 +0300)
committerOlavi Pulkkinen <olavi.pulkkinen@fudeco.com>
Mon, 29 Mar 2010 10:15:37 +0000 (13:15 +0300)
Client/routedialog.cpp [new file with mode: 0644]
Client/routedialog.h [new file with mode: 0644]
Client/routedialog.ui [new file with mode: 0644]
Client/speedfreak.pro

diff --git a/Client/routedialog.cpp b/Client/routedialog.cpp
new file mode 100644 (file)
index 0000000..3ac0fb6
--- /dev/null
@@ -0,0 +1,26 @@
+#include "routedialog.h"
+#include "ui_routedialog.h"
+
+RouteDialog::RouteDialog(QWidget *parent) :
+    QDialog(parent),
+    ui(new Ui::RouteDialog)
+{
+    ui->setupUi(this);
+}
+
+RouteDialog::~RouteDialog()
+{
+    delete ui;
+}
+
+void RouteDialog::changeEvent(QEvent *e)
+{
+    QDialog::changeEvent(e);
+    switch (e->type()) {
+    case QEvent::LanguageChange:
+        ui->retranslateUi(this);
+        break;
+    default:
+        break;
+    }
+}
diff --git a/Client/routedialog.h b/Client/routedialog.h
new file mode 100644 (file)
index 0000000..3386311
--- /dev/null
@@ -0,0 +1,23 @@
+#ifndef ROUTEDIALOG_H
+#define ROUTEDIALOG_H
+
+#include <QDialog>
+
+namespace Ui {
+    class RouteDialog;
+}
+
+class RouteDialog : public QDialog {
+    Q_OBJECT
+public:
+    RouteDialog(QWidget *parent = 0);
+    ~RouteDialog();
+
+protected:
+    void changeEvent(QEvent *e);
+
+private:
+    Ui::RouteDialog *ui;
+};
+
+#endif // ROUTEDIALOG_H
diff --git a/Client/routedialog.ui b/Client/routedialog.ui
new file mode 100644 (file)
index 0000000..3e5921f
--- /dev/null
@@ -0,0 +1,71 @@
+<ui version="4.0">
+ <author/>
+ <comment/>
+ <exportmacro/>
+ <class>RouteDialog</class>
+ <widget class="QDialog" name="RouteDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>400</width>
+    <height>300</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Dialog</string>
+  </property>
+  <widget class="QDialogButtonBox" name="buttonBox">
+   <property name="geometry">
+    <rect>
+     <x>30</x>
+     <y>240</y>
+     <width>341</width>
+     <height>32</height>
+    </rect>
+   </property>
+   <property name="orientation">
+    <enum>Qt::Horizontal</enum>
+   </property>
+   <property name="standardButtons">
+    <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+   </property>
+  </widget>
+ </widget>
+ <pixmapfunction/>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>RouteDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>RouteDialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
index 2cc5a1b..e1a0ddd 100644 (file)
@@ -5,8 +5,11 @@ TARGET = speedfreak
 TEMPLATE = app
 SOURCES += main.cpp \
     mainwindow.cpp \
-    creditsdialog.cpp
+    creditsdialog.cpp \
+    routedialog.cpp
 HEADERS += mainwindow.h \
-    creditsdialog.h
+    creditsdialog.h \
+    routedialog.h
 FORMS += mainwindow.ui \
-    creditsdialog.ui
+    creditsdialog.ui \
+    routedialog.ui