|
@@ -882,6 +882,13 @@ void MainWindow::CreateTab1View(QTabWidget * p)
|
|
|
pCB->addItem("end");
|
|
|
mpCBRC1 = pCB;
|
|
|
|
|
|
+ QCheckBox * pCheck = new QCheckBox(pGroup);
|
|
|
+ pCheck->setText("act");
|
|
|
+ pCheck->setGeometry(nXPos,nYPos,nLEWidth,nLEHeight);
|
|
|
+ mpCheckFromSel = pCheck;
|
|
|
+ mpCheckFromSel->setChecked(false);
|
|
|
+
|
|
|
+
|
|
|
nXPos = 10;
|
|
|
nYPos = nYPos + mnFontHeight * 2;
|
|
|
|
|
@@ -897,6 +904,15 @@ void MainWindow::CreateTab1View(QTabWidget * p)
|
|
|
pCB->addItem("end");
|
|
|
mpCBRC2 = pCB;
|
|
|
|
|
|
+ pCheck = new QCheckBox(pGroup);
|
|
|
+ pCheck->setText("act");
|
|
|
+ pCheck->setGeometry(nXPos,nYPos,nLEWidth,nLEHeight);
|
|
|
+ mpCheckToSel = pCheck;
|
|
|
+ mpCheckToSel->setChecked(false);
|
|
|
+
|
|
|
+ nXPos = 10;
|
|
|
+ nYPos = nYPos + mnFontHeight * 2;
|
|
|
+
|
|
|
pPB = new QPushButton(pGroup);
|
|
|
pPB->setText("Road Contact");
|
|
|
pPB->setGeometry(nXPos,nYPos,nLEWidth,nLEHeight);
|
|
@@ -1158,7 +1174,7 @@ void MainWindow::onClickXY(double x, double y)
|
|
|
rel_x = selx - mfViewMoveX;
|
|
|
rel_y = sely - mfViewMoveY;
|
|
|
|
|
|
- Road * pRoad;
|
|
|
+ Road * pRoad = 0;
|
|
|
GeometryBlock * pgeob;
|
|
|
double fdis,nearx,neary,hdg;
|
|
|
double fs;
|
|
@@ -1186,12 +1202,42 @@ void MainWindow::onClickXY(double x, double y)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ if(mpCheckFromSel->isChecked())
|
|
|
+ {
|
|
|
+ if(pRoad != 0)ComboToString(pRoad->GetRoadId(),mpCBRoad1);
|
|
|
+ mpCheckFromSel->setChecked(false);
|
|
|
+ }
|
|
|
+
|
|
|
+ if(mpCheckToSel->isChecked())
|
|
|
+ {
|
|
|
+ if(pRoad != 0)ComboToString(pRoad->GetRoadId(),mpCBRoad2);
|
|
|
+ mpCheckToSel->setChecked(false);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
mpLE_SelLon->setText(QString::number(lon,'f',7));
|
|
|
mpLE_SelLat->setText(QString::number(lat,'f',7));
|
|
|
update();
|
|
|
}
|
|
|
|
|
|
+void MainWindow::ComboToString(std::string strroadid,QComboBox * pCB)
|
|
|
+{
|
|
|
+ int i;
|
|
|
+ int nsize = pCB->count();
|
|
|
+ for(i=0;i<nsize;i++)
|
|
|
+ {
|
|
|
+ if(pCB->itemText(i).toStdString() == strroadid)
|
|
|
+ {
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(i<nsize)
|
|
|
+ {
|
|
|
+ if(i != pCB->currentIndex())
|
|
|
+ pCB->setCurrentIndex(i);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
void MainWindow::onChangeScale(int scale)
|
|
|
{
|
|
|
mnfac = scale;
|
|
@@ -4850,7 +4896,8 @@ void MainWindow::on_actionAutoConnect_triggered()
|
|
|
|
|
|
void MainWindow::on_actionSet_Speed_triggered()
|
|
|
{
|
|
|
- SpeedDialog sd(&mxodr,this);
|
|
|
+ std::string strroadid = mpCBRoad->currentText().toStdString();
|
|
|
+ SpeedDialog sd(&mxodr,strroadid,this);
|
|
|
int res = sd.exec();
|
|
|
}
|
|
|
|
|
@@ -4875,7 +4922,8 @@ void MainWindow::closeEvent(QCloseEvent *event)
|
|
|
|
|
|
void MainWindow::on_actionSet_Traffic_Light_triggered()
|
|
|
{
|
|
|
- TrafficLightDialog td(&mxodr,this);
|
|
|
+ std::string strroadid = mpCBRoad->currentText().toStdString();
|
|
|
+ TrafficLightDialog td(&mxodr,strroadid,this);
|
|
|
int res = td.exec();
|
|
|
}
|
|
|
|
|
@@ -4886,8 +4934,8 @@ void MainWindow::on_actionEdit_Road_Lane_triggered()
|
|
|
|
|
|
void MainWindow::on_actionEdit_Road_triggered()
|
|
|
{
|
|
|
-
|
|
|
- RoadEditDialog rd(&mxodr,this);
|
|
|
+ std::string strroadid = mpCBRoad->currentText().toStdString();
|
|
|
+ RoadEditDialog rd(&mxodr,strroadid,this);
|
|
|
int res = rd.exec();
|
|
|
}
|
|
|
|