Quellcode durchsuchen

change tool/map_lanetoxodr. add DEFINES += OPENDRIVE_EDITONLY to .pro for set Only Edit OpenDrive.

yuchuli vor 3 Jahren
Ursprung
Commit
4111bb2e58

+ 37 - 14
src/tool/map_lanetoxodr/dialogparkingspaceedit.ui

@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>742</width>
-    <height>570</height>
+    <width>974</width>
+    <height>571</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -131,8 +131,8 @@
   <widget class="QLineEdit" name="lineEdit_width">
    <property name="geometry">
     <rect>
-     <x>120</x>
-     <y>280</y>
+     <x>710</x>
+     <y>220</y>
      <width>121</width>
      <height>31</height>
     </rect>
@@ -141,7 +141,7 @@
   <widget class="QLineEdit" name="lineEdit_length">
    <property name="geometry">
     <rect>
-     <x>430</x>
+     <x>120</x>
      <y>280</y>
      <width>121</width>
      <height>31</height>
@@ -151,8 +151,8 @@
   <widget class="QLabel" name="label_6">
    <property name="geometry">
     <rect>
-     <x>40</x>
-     <y>290</y>
+     <x>630</x>
+     <y>230</y>
      <width>67</width>
      <height>17</height>
     </rect>
@@ -164,10 +164,10 @@
   <widget class="QLabel" name="label_7">
    <property name="geometry">
     <rect>
-     <x>350</x>
-     <y>290</y>
+     <x>40</x>
+     <y>280</y>
      <width>67</width>
-     <height>17</height>
+     <height>41</height>
     </rect>
    </property>
    <property name="text">
@@ -177,8 +177,8 @@
   <widget class="QLineEdit" name="lineEdit_hdg">
    <property name="geometry">
     <rect>
-     <x>120</x>
-     <y>340</y>
+     <x>430</x>
+     <y>280</y>
      <width>121</width>
      <height>31</height>
     </rect>
@@ -187,8 +187,8 @@
   <widget class="QLabel" name="label_8">
    <property name="geometry">
     <rect>
-     <x>40</x>
-     <y>350</y>
+     <x>350</x>
+     <y>290</y>
      <width>67</width>
      <height>17</height>
     </rect>
@@ -236,6 +236,29 @@
     <string>Change</string>
    </property>
   </widget>
+  <widget class="QLabel" name="label_9">
+   <property name="geometry">
+    <rect>
+     <x>10</x>
+     <y>346</y>
+     <width>101</width>
+     <height>21</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>validLength</string>
+   </property>
+  </widget>
+  <widget class="QLineEdit" name="lineEdit_width_2">
+   <property name="geometry">
+    <rect>
+     <x>120</x>
+     <y>340</y>
+     <width>121</width>
+     <height>31</height>
+    </rect>
+   </property>
+  </widget>
  </widget>
  <resources/>
  <connections/>

+ 17 - 0
src/tool/map_lanetoxodr/mainwindow.cpp

@@ -5135,6 +5135,10 @@ void MainWindow::on_actionAutoConnect_triggered()
 
 void MainWindow::on_actionSet_Speed_triggered()
 {
+#ifdef OPENDRIVE_EDITONLY
+    QMessageBox::warning(this,"Warning","This Release is Only for Edit OpenDrive. Other Function Need Change conf.",QMessageBox::YesAll);
+    return;
+#endif
     std::string strroadid = mpCBRoad->currentText().toStdString();
     SpeedDialog sd(&mxodr,strroadid,this);
     int res = sd.exec();
@@ -5167,6 +5171,10 @@ void MainWindow::closeEvent(QCloseEvent *event)
 
 void MainWindow::on_actionSet_Traffic_Light_triggered()
 {
+#ifdef OPENDRIVE_EDITONLY
+    QMessageBox::warning(this,"Warning","This Release is Only for Edit OpenDrive. Other Function Need Change conf.",QMessageBox::YesAll);
+    return;
+#endif
     std::string strroadid = mpCBRoad->currentText().toStdString();
     TrafficLightDialog td(&mxodr,strroadid,this);
     int res = td.exec();
@@ -5198,6 +5206,11 @@ void MainWindow::on_actionEdit_Road_triggered()
 
 void MainWindow::on_actionAdd_Road_From_RTK_triggered()
 {
+
+#ifdef OPENDRIVE_EDITONLY
+    QMessageBox::warning(this,"Warning","This Release is Only for Edit OpenDrive. Other Function Need Change conf.",QMessageBox::YesAll);
+    return;
+#endif
     SaveBack();
     DialogAddRoadFromRTK arfrd(&mxodr,glon0,glat0,this);
     arfrd.exec();
@@ -5399,6 +5412,10 @@ void MainWindow::SaveBack()
 
 void MainWindow::on_actionEdit_Road_Borrow_triggered()
 {
+#ifdef OPENDRIVE_EDITONLY
+    QMessageBox::warning(this,"Warning","This Release is Only for Edit OpenDrive. Other Function Need Change conf.",QMessageBox::YesAll);
+    return;
+#endif
     std::string strroadid = mpCBRoad->currentText().toStdString();
     DialogRoadBorrow rbd(&mxodr,strroadid,this);
     int res = rbd.exec();

+ 0 - 12
src/tool/map_lanetoxodr/mainwindow.ui

@@ -52,8 +52,6 @@
      <string>Tool</string>
     </property>
     <addaction name="actionEdit_Road"/>
-    <addaction name="actionMerge_Road"/>
-    <addaction name="actionEdit_Road_Lane"/>
     <addaction name="actionAdd_Road_From_RTK"/>
     <addaction name="actionSummary_Road"/>
    </widget>
@@ -109,16 +107,6 @@
     <string>编辑道路</string>
    </property>
   </action>
-  <action name="actionMerge_Road">
-   <property name="text">
-    <string>Merge Road</string>
-   </property>
-  </action>
-  <action name="actionEdit_Road_Lane">
-   <property name="text">
-    <string>Edit Road Lane</string>
-   </property>
-  </action>
   <action name="actionAdd_Road_From_RTK">
    <property name="text">
     <string>Add Road From RTK</string>

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

@@ -159,6 +159,7 @@ INCLUDEPATH += $$PWD/../../include/msgtype
 INCLUDEPATH += $$PWD/../../common/common/xodr
 
 
+#DEFINES += OPENDRIVE_EDITONLY
 
 
 DISTFILES += \

+ 34 - 0
src/tool/map_lanetoxodr/roadeditdialog.cpp

@@ -476,6 +476,11 @@ void RoadEditDialog::on_pushButton_EditRoadMark_clicked()
 
 void RoadEditDialog::on_pushButton_LaneFromRTK_clicked()
 {
+
+#ifdef OPENDRIVE_EDITONLY
+    QMessageBox::warning(this,"Warning","This Release is Only for Edit OpenDrive. Other Function Need Change conf.",QMessageBox::YesAll);
+    return;
+#endif
     if(mpCurRoad == 0)
     {
         QMessageBox::warning(this,"Warning","Not Select Road");
@@ -488,6 +493,10 @@ void RoadEditDialog::on_pushButton_LaneFromRTK_clicked()
 
 void RoadEditDialog::on_pushButton_RoadSplit_clicked()
 {
+#ifdef OPENDRIVE_EDITONLY
+    QMessageBox::warning(this,"Warning","This Release is Only for Edit OpenDrive. Other Function Need Change conf.",QMessageBox::YesAll);
+    return;
+#endif
     if(mpCurRoad == 0)
     {
         QMessageBox::warning(this,"Warning","Not Select Road");
@@ -512,6 +521,10 @@ void RoadEditDialog::on_pushButton_RoadSplit_clicked()
 
 void RoadEditDialog::on_pushButton_RoadMerge_clicked()
 {
+#ifdef OPENDRIVE_EDITONLY
+    QMessageBox::warning(this,"Warning","This Release is Only for Edit OpenDrive. Other Function Need Change conf.",QMessageBox::YesAll);
+    return;
+#endif
     DialogRoadMerge roadmerge(mpxodr,this);
     roadmerge.exec();
 
@@ -530,6 +543,10 @@ void RoadEditDialog::on_pushButton_RoadMerge_clicked()
 
 void RoadEditDialog::on_pushButton_MoveRoad_clicked()
 {
+#ifdef OPENDRIVE_EDITONLY
+    QMessageBox::warning(this,"Warning","This Release is Only for Edit OpenDrive. Other Function Need Change conf.",QMessageBox::YesAll);
+    return;
+#endif
     if(mpCurRoad == 0)
     {
         QMessageBox::warning(this,"Warning","Not Select Road");
@@ -554,6 +571,10 @@ void RoadEditDialog::on_pushButton_MoveRoad_clicked()
 
 void RoadEditDialog::on_pushButton_RotateRoad_clicked()
 {
+#ifdef OPENDRIVE_EDITONLY
+    QMessageBox::warning(this,"Warning","This Release is Only for Edit OpenDrive. Other Function Need Change conf.",QMessageBox::YesAll);
+    return;
+#endif
     if(mpCurRoad == 0)
     {
         QMessageBox::warning(this,"Warning","Not Select Road");
@@ -578,6 +599,10 @@ void RoadEditDialog::on_pushButton_RotateRoad_clicked()
 
 void RoadEditDialog::on_pushButton_MirrorRoad_clicked()
 {
+#ifdef OPENDRIVE_EDITONLY
+    QMessageBox::warning(this,"Warning","This Release is Only for Edit OpenDrive. Other Function Need Change conf.",QMessageBox::YesAll);
+    return;
+#endif
     if(mpCurRoad == 0)
     {
         QMessageBox::warning(this,"Warning","Not Select Road");
@@ -612,3 +637,12 @@ void RoadEditDialog::on_pushButton_EditLaneOffset_clicked()
     dlglaneoffset.exec();
 }
 
+
+void RoadEditDialog::on_pushButton_EditRoadObjects_clicked()
+{
+#ifdef OPENDRIVE_EDITONLY
+    QMessageBox::warning(this,"Warning","This Release is Only for Edit OpenDrive. Other Function Need Change conf.",QMessageBox::YesAll);
+    return;
+#endif
+
+}

+ 2 - 0
src/tool/map_lanetoxodr/roadeditdialog.h

@@ -66,6 +66,8 @@ private slots:
 
     void on_pushButton_EditLaneOffset_clicked();
 
+    void on_pushButton_EditRoadObjects_clicked();
+
 private:
     bool IsDrawMark(double s);
 

+ 13 - 0
src/tool/map_lanetoxodr/roadeditdialog.ui

@@ -337,6 +337,19 @@
     <string>Edit LaneOffset</string>
    </property>
   </widget>
+  <widget class="QPushButton" name="pushButton_EditRoadObjects">
+   <property name="geometry">
+    <rect>
+     <x>980</x>
+     <y>210</y>
+     <width>211</width>
+     <height>31</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Edit Road Objects</string>
+   </property>
+  </widget>
  </widget>
  <resources/>
  <connections/>