Bläddra i källkod

change map_lanetoxodr. add object marking dialog, but not complete.

yuchuli 3 år sedan
förälder
incheckning
f358c7422b

+ 56 - 0
src/tool/map_lanetoxodr/dialogroadobject_marking.cpp

@@ -0,0 +1,56 @@
+#include "dialogroadobject_marking.h"
+#include "ui_dialogroadobject_marking.h"
+
+DialogRoadObject_Marking::DialogRoadObject_Marking(QWidget *parent) :
+    QDialog(parent),
+    ui(new Ui::DialogRoadObject_Marking)
+{
+    ui->setupUi(this);
+
+    CreateView();
+}
+
+DialogRoadObject_Marking::~DialogRoadObject_Marking()
+{
+    delete ui;
+}
+
+void DialogRoadObject_Marking::CreateView()
+{
+    int startpos_x = 30;
+    int startpos_y = 30;
+    int nSpace = 260;
+    int nLabelWidth = 80;
+    int nLEWidth = 150;
+    int nHeight = 35;
+    int nVSpace = 60;
+    int nVIndex = 0;
+    int nHIndex = 0;
+
+    mpCBside = ViewCreate::CreateCB(startpos_x+nHIndex*nSpace,startpos_y+nVIndex*nVSpace,nLabelWidth,nLEWidth,nHeight,"side",this);
+    nHIndex++;
+    mpCBweight = ViewCreate::CreateCB(startpos_x+nHIndex*nSpace,startpos_y+nVIndex*nVSpace,nLabelWidth,nLEWidth,nHeight,"weight",this);
+    nHIndex++;
+    mpLEwidth = ViewCreate::CreateLE(startpos_x+nHIndex*nSpace,startpos_y+nVIndex*nVSpace,nLabelWidth,nLEWidth,nHeight,"width",this);
+
+    nVIndex++;
+    nHIndex = 0;
+
+    mpCBcolor = ViewCreate::CreateCB(startpos_x+nHIndex*nSpace,startpos_y+nVIndex*nVSpace,nLabelWidth,nLEWidth,nHeight,"color",this);
+    nHIndex++;
+    mpLEzOffset = ViewCreate::CreateLE(startpos_x+nHIndex*nSpace,startpos_y+nVIndex*nVSpace,nLabelWidth,nLEWidth,nHeight,"zOffset",this);
+    nHIndex++;
+    mpLEspaceLength = ViewCreate::CreateLE(startpos_x+nHIndex*nSpace,startpos_y+nVIndex*nVSpace,nLabelWidth,nLEWidth,nHeight,"spaceLength",this);
+
+    nVIndex++;
+    nHIndex = 0;
+
+    mpLElineLength = ViewCreate::CreateLE(startpos_x+nHIndex*nSpace,startpos_y+nVIndex*nVSpace,nLabelWidth,nLEWidth,nHeight,"lineLength",this);
+    nHIndex++;
+    mpLEstartOffset = ViewCreate::CreateLE(startpos_x+nHIndex*nSpace,startpos_y+nVIndex*nVSpace,nLabelWidth,nLEWidth,nHeight,"startOffset",this);
+    nHIndex++;
+    mpLEstopOffset = ViewCreate::CreateLE(startpos_x+nHIndex*nSpace,startpos_y+nVIndex*nVSpace,nLabelWidth,nLEWidth,nHeight,"stopOffset",this);
+
+
+
+}

+ 40 - 0
src/tool/map_lanetoxodr/dialogroadobject_marking.h

@@ -0,0 +1,40 @@
+#ifndef DIALOGROADOBJECT_MARKING_H
+#define DIALOGROADOBJECT_MARKING_H
+
+#include <QDialog>
+
+#include "viewcreate.h"
+
+#include <OpenDrive/OpenDrive.h>
+
+namespace Ui {
+class DialogRoadObject_Marking;
+}
+
+class DialogRoadObject_Marking : public QDialog
+{
+    Q_OBJECT
+
+public:
+    explicit DialogRoadObject_Marking(QWidget *parent = nullptr);
+    ~DialogRoadObject_Marking();
+
+private:
+    Ui::DialogRoadObject_Marking *ui;
+
+private:
+    void CreateView();
+
+private:
+    QComboBox * mpCBside;
+    QComboBox * mpCBweight;
+    QLineEdit * mpLEwidth;
+    QComboBox * mpCBcolor;
+    QLineEdit * mpLEzOffset;
+    QLineEdit * mpLEspaceLength;
+    QLineEdit * mpLElineLength;
+    QLineEdit * mpLEstartOffset;
+    QLineEdit * mpLEstopOffset;
+};
+
+#endif // DIALOGROADOBJECT_MARKING_H

+ 19 - 0
src/tool/map_lanetoxodr/dialogroadobject_marking.ui

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DialogRoadObject_Marking</class>
+ <widget class="QDialog" name="DialogRoadObject_Marking">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>674</width>
+    <height>478</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Dialog</string>
+  </property>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>

+ 3 - 0
src/tool/map_lanetoxodr/map_lanetoxodr.pro

@@ -47,6 +47,7 @@ SOURCES += \
     dialogroadmove.cpp \
     dialogroadnoavoid.cpp \
     dialogroadobject.cpp \
+    dialogroadobject_marking.cpp \
     dialogroadobject_material.cpp \
     dialogroadobject_outline.cpp \
     dialogroadobject_outline_cornerroad.cpp \
@@ -108,6 +109,7 @@ HEADERS += \
     dialogroadmove.h \
     dialogroadnoavoid.h \
     dialogroadobject.h \
+    dialogroadobject_marking.h \
     dialogroadobject_material.h \
     dialogroadobject_outline.h \
     dialogroadobject_outline_cornerroad.h \
@@ -163,6 +165,7 @@ FORMS += \
         dialogroadmove.ui \
         dialogroadnoavoid.ui \
         dialogroadobject.ui \
+        dialogroadobject_marking.ui \
         dialogroadobject_material.ui \
         dialogroadobject_outline.ui \
         dialogroadobject_outline_cornerroad.ui \