|
@@ -66,33 +66,6 @@ DialogRoadObject::~DialogRoadObject()
|
|
delete ui;
|
|
delete ui;
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
-QLineEdit * DialogRoadObject::CreateLE(int pos_x, int pos_y, int nLabelWidth, int nLEWidth, int nHeight, std::string strname)
|
|
|
|
-{
|
|
|
|
- QLineEdit * pLE;
|
|
|
|
- QLabel * pLabel;
|
|
|
|
- pLabel = new QLabel(this);
|
|
|
|
- pLabel->setGeometry(pos_x,pos_y,nLabelWidth,nHeight);
|
|
|
|
- pLabel->setText(strname.data());
|
|
|
|
- pLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
|
|
|
- pLE = new QLineEdit(this);
|
|
|
|
- pLE->setGeometry(pos_x+nLabelWidth+10,pos_y,nLEWidth,nHeight);
|
|
|
|
- return pLE;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-QComboBox * DialogRoadObject::CreateCB(int pos_x, int pos_y, int nLabelWidth, int nLEWidth, int nHeight, std::string strname)
|
|
|
|
-{
|
|
|
|
- QComboBox * pCB;
|
|
|
|
- QLabel * pLabel;
|
|
|
|
- pLabel = new QLabel(this);
|
|
|
|
- pLabel->setGeometry(pos_x,pos_y,nLabelWidth,nHeight);
|
|
|
|
- pLabel->setText(strname.data());
|
|
|
|
- pLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
|
|
|
- pCB = new QComboBox(this);
|
|
|
|
- pCB->setGeometry(pos_x+nLabelWidth+10,pos_y,nLEWidth,nHeight);
|
|
|
|
- return pCB;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
void DialogRoadObject::CreateView()
|
|
void DialogRoadObject::CreateView()
|
|
{
|
|
{
|
|
int startpos_x = 30;
|
|
int startpos_x = 30;
|
|
@@ -103,66 +76,73 @@ void DialogRoadObject::CreateView()
|
|
int nHeight = 30;
|
|
int nHeight = 30;
|
|
int nVSpace = 50;
|
|
int nVSpace = 50;
|
|
int nVIndex = 0;
|
|
int nVIndex = 0;
|
|
- mpLEt = CreateLE(startpos_x+0*nSpace,startpos_y+nVIndex*nVSpace,nLabelWidth,nLEWidth,nHeight,"t");
|
|
|
|
- mpLEzOffset = CreateLE(startpos_x+1*nSpace,startpos_y+nVIndex*nVSpace,nLabelWidth,nLEWidth,nHeight,"zOffset");
|
|
|
|
- mpCBtype = CreateCB(startpos_x+2*nSpace,startpos_y+nVIndex*nVSpace,nLabelWidth,nLEWidth,nHeight,"type");
|
|
|
|
|
|
+ mpLEt = ViewCreate::CreateLE(startpos_x+0*nSpace,startpos_y+nVIndex*nVSpace,nLabelWidth,nLEWidth,nHeight,"t",this);
|
|
|
|
+ mpLEzOffset = ViewCreate::CreateLE(startpos_x+1*nSpace,startpos_y+nVIndex*nVSpace,nLabelWidth,nLEWidth,nHeight,"zOffset",this);
|
|
|
|
+ mpCBtype = ViewCreate::CreateCB(startpos_x+2*nSpace,startpos_y+nVIndex*nVSpace,nLabelWidth,nLEWidth,nHeight,"type",this);
|
|
nVIndex++;
|
|
nVIndex++;
|
|
- mpLEvalidLength = CreateLE(startpos_x+0*nSpace,startpos_y+nVIndex*nVSpace,nLabelWidth,nLEWidth,nHeight,"validLength");
|
|
|
|
- mpCBorientation = CreateCB(startpos_x+1*nSpace,startpos_y+nVIndex*nVSpace,nLabelWidth,nLEWidth,nHeight,"orientation");
|
|
|
|
- mpLEsubtype = CreateLE(startpos_x+2*nSpace,startpos_y+nVIndex*nVSpace,nLabelWidth,nLEWidth,nHeight,"subtype");
|
|
|
|
|
|
+ mpLEvalidLength = ViewCreate::CreateLE(startpos_x+0*nSpace,startpos_y+nVIndex*nVSpace,nLabelWidth,nLEWidth,nHeight,"validLength",this);
|
|
|
|
+ mpCBorientation = ViewCreate::CreateCB(startpos_x+1*nSpace,startpos_y+nVIndex*nVSpace,nLabelWidth,nLEWidth,nHeight,"orientation",this);
|
|
|
|
+ mpLEsubtype = ViewCreate::CreateLE(startpos_x+2*nSpace,startpos_y+nVIndex*nVSpace,nLabelWidth,nLEWidth,nHeight,"subtype",this);
|
|
nVIndex++;
|
|
nVIndex++;
|
|
- mpCBdynamic = CreateCB(startpos_x+0*nSpace,startpos_y+nVIndex*nVSpace,nLabelWidth,nLEWidth,nHeight,"dynamic");
|
|
|
|
- mpLEhdg = CreateLE(startpos_x+1*nSpace,startpos_y+nVIndex*nVSpace,nLabelWidth,nLEWidth,nHeight,"hdg");
|
|
|
|
- mpLEname = CreateLE(startpos_x+2*nSpace,startpos_y+nVIndex*nVSpace,nLabelWidth,nLEWidth,nHeight,"name");
|
|
|
|
|
|
+ mpCBdynamic = ViewCreate::CreateCB(startpos_x+0*nSpace,startpos_y+nVIndex*nVSpace,nLabelWidth,nLEWidth,nHeight,"dynamic",this);
|
|
|
|
+ mpLEhdg = ViewCreate::CreateLE(startpos_x+1*nSpace,startpos_y+nVIndex*nVSpace,nLabelWidth,nLEWidth,nHeight,"hdg",this);
|
|
|
|
+ mpLEname = ViewCreate::CreateLE(startpos_x+2*nSpace,startpos_y+nVIndex*nVSpace,nLabelWidth,nLEWidth,nHeight,"name",this);
|
|
nVIndex++;
|
|
nVIndex++;
|
|
- mpLEpitch = CreateLE(startpos_x+0*nSpace,startpos_y+nVIndex*nVSpace,nLabelWidth,nLEWidth,nHeight,"pitch");
|
|
|
|
- mpLEid = CreateLE(startpos_x+1*nSpace,startpos_y+nVIndex*nVSpace,nLabelWidth,nLEWidth,nHeight,"id");
|
|
|
|
- mpLEroll = CreateLE(startpos_x+2*nSpace,startpos_y+nVIndex*nVSpace,nLabelWidth,nLEWidth,nHeight,"roll");
|
|
|
|
|
|
+ mpLEpitch = ViewCreate::CreateLE(startpos_x+0*nSpace,startpos_y+nVIndex*nVSpace,nLabelWidth,nLEWidth,nHeight,"pitch",this);
|
|
|
|
+ mpLEid = ViewCreate::CreateLE(startpos_x+1*nSpace,startpos_y+nVIndex*nVSpace,nLabelWidth,nLEWidth,nHeight,"id",this);
|
|
|
|
+ mpLEroll = ViewCreate::CreateLE(startpos_x+2*nSpace,startpos_y+nVIndex*nVSpace,nLabelWidth,nLEWidth,nHeight,"roll",this);
|
|
nVIndex++;
|
|
nVIndex++;
|
|
- mpLEheight = CreateLE(startpos_x+0*nSpace,startpos_y+nVIndex*nVSpace,nLabelWidth,nLEWidth,nHeight,"height");
|
|
|
|
- mpLEs = CreateLE(startpos_x+1*nSpace,startpos_y+nVIndex*nVSpace,nLabelWidth,nLEWidth,nHeight,"s");
|
|
|
|
- mpLElength = CreateLE(startpos_x+2*nSpace,startpos_y+nVIndex*nVSpace,nLabelWidth,nLEWidth,nHeight,"length");
|
|
|
|
|
|
+ mpLEheight = ViewCreate::CreateLE(startpos_x+0*nSpace,startpos_y+nVIndex*nVSpace,nLabelWidth,nLEWidth,nHeight,"height",this);
|
|
|
|
+ mpLEs = ViewCreate::CreateLE(startpos_x+1*nSpace,startpos_y+nVIndex*nVSpace,nLabelWidth,nLEWidth,nHeight,"s",this);
|
|
|
|
+ mpLElength = ViewCreate::CreateLE(startpos_x+2*nSpace,startpos_y+nVIndex*nVSpace,nLabelWidth,nLEWidth,nHeight,"length",this);
|
|
nVIndex++;
|
|
nVIndex++;
|
|
- mpLEwidth = CreateLE(startpos_x+0*nSpace,startpos_y+nVIndex*nVSpace,nLabelWidth,nLEWidth,nHeight,"width");
|
|
|
|
- mpLEradius = CreateLE(startpos_x+1*nSpace,startpos_y+nVIndex*nVSpace,nLabelWidth,nLEWidth,nHeight,"radius");
|
|
|
|
-}
|
|
|
|
|
|
+ mpLEwidth = ViewCreate::CreateLE(startpos_x+0*nSpace,startpos_y+nVIndex*nVSpace,nLabelWidth,nLEWidth,nHeight,"width",this);
|
|
|
|
+ mpLEradius = ViewCreate::CreateLE(startpos_x+1*nSpace,startpos_y+nVIndex*nVSpace,nLabelWidth,nLEWidth,nHeight,"radius",this);
|
|
|
|
|
|
-bool DialogRoadObject::CheckLE(QLineEdit *pLE, QString stritemname,bool bWarning)
|
|
|
|
-{
|
|
|
|
- QString str = pLE->text();
|
|
|
|
- if(str == "")
|
|
|
|
- {
|
|
|
|
- if(bWarning)QMessageBox::warning(this,"Warning",stritemname + " is not set",QMessageBox::YesAll);
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
- return true;
|
|
|
|
|
|
+ int nPBSpace = 200;
|
|
|
|
+ int nPBWidth = 150;
|
|
|
|
+ nVIndex++;
|
|
|
|
+ mpPBmaterial = ViewCreate::CreatePB(startpos_x+0*nPBSpace,startpos_y+nVIndex*nVSpace,nPBWidth,nHeight,"material",this);
|
|
|
|
+ mpPBrepeat = ViewCreate::CreatePB(startpos_x+1*nPBSpace,startpos_y+nVIndex*nVSpace,nPBWidth,nHeight,"repeat",this);
|
|
|
|
+ mpPBparkingspace = ViewCreate::CreatePB(startpos_x+2*nPBSpace,startpos_y+nVIndex*nVSpace,nPBWidth,nHeight,"parkingspace",this);
|
|
|
|
+ mpPBoutlines = ViewCreate::CreatePB(startpos_x+3*nPBSpace,startpos_y+nVIndex*nVSpace,nPBWidth,nHeight,"outlines",this);
|
|
|
|
+
|
|
|
|
+ nVIndex++;
|
|
|
|
+ mpPBoutline = ViewCreate::CreatePB(startpos_x+0*nPBSpace,startpos_y+nVIndex*nVSpace,nPBWidth,nHeight,"outline",this);
|
|
|
|
+ mpPBmarkings = ViewCreate::CreatePB(startpos_x+1*nPBSpace,startpos_y+nVIndex*nVSpace,nPBWidth,nHeight,"markings",this);
|
|
|
|
+ mpPBborders = ViewCreate::CreatePB(startpos_x+2*nPBSpace,startpos_y+nVIndex*nVSpace,nPBWidth,nHeight,"borders",this);
|
|
|
|
+ mpPBvalidity = ViewCreate::CreatePB(startpos_x+3*nPBSpace,startpos_y+nVIndex*nVSpace,nPBWidth,nHeight,"validity",this);
|
|
|
|
+
|
|
|
|
+ connect(mpPBmaterial,SIGNAL(clicked(bool)),this,SLOT(onClickMaterial()));
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
void DialogRoadObject::on_pushButton_add_clicked()
|
|
void DialogRoadObject::on_pushButton_add_clicked()
|
|
{
|
|
{
|
|
Road * pRoad = mpRoad;
|
|
Road * pRoad = mpRoad;
|
|
- if(CheckLE(mpLEid,"id") == false)return;
|
|
|
|
|
|
+ if(ViewCreate::CheckLE(mpLEid,"id",true,this) == false)return;
|
|
string id = mpLEid->text().toStdString();
|
|
string id = mpLEid->text().toStdString();
|
|
|
|
|
|
- if(CheckLE(mpLEt,"t") == false)return;
|
|
|
|
|
|
+ if(ViewCreate::CheckLE(mpLEt,"t",true,this) == false)return;
|
|
double t = mpLEt->text().toDouble();
|
|
double t = mpLEt->text().toDouble();
|
|
|
|
|
|
- if(CheckLE(mpLEs,"s") == false)return;
|
|
|
|
|
|
+ if(ViewCreate::CheckLE(mpLEs,"s",true,this) == false)return;
|
|
double s = mpLEs->text().toDouble();
|
|
double s = mpLEs->text().toDouble();
|
|
|
|
|
|
- if(CheckLE(mpLEzOffset,"zOffset") == false)return;
|
|
|
|
|
|
+ if(ViewCreate::CheckLE(mpLEzOffset,"zOffset",true,this) == false)return;
|
|
double zOffset = mpLEzOffset->text().toDouble();
|
|
double zOffset = mpLEzOffset->text().toDouble();
|
|
|
|
|
|
double length,width,hdg;
|
|
double length,width,hdg;
|
|
if(mpCBtype->currentText() == "parkingSpace")
|
|
if(mpCBtype->currentText() == "parkingSpace")
|
|
{
|
|
{
|
|
- if(CheckLE(mpLElength,"length") == false)return;
|
|
|
|
|
|
+ if(ViewCreate::CheckLE(mpLElength,"length",true,this) == false)return;
|
|
length = mpLElength->text().toDouble();
|
|
length = mpLElength->text().toDouble();
|
|
|
|
|
|
- if(CheckLE(mpLEwidth,"width") == false)return;
|
|
|
|
|
|
+ if(ViewCreate::CheckLE(mpLEwidth,"width",true,this) == false)return;
|
|
width = mpLEwidth->text().toDouble();
|
|
width = mpLEwidth->text().toDouble();
|
|
|
|
|
|
- if(CheckLE(mpLEhdg,"hdg") == false)return;
|
|
|
|
|
|
+ if(ViewCreate::CheckLE(mpLEhdg,"hdg",true,this) == false)return;
|
|
hdg = mpLEhdg->text().toDouble();
|
|
hdg = mpLEhdg->text().toDouble();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -172,7 +152,7 @@ void DialogRoadObject::on_pushButton_add_clicked()
|
|
|
|
|
|
pObject->Settype(mpCBtype->currentText().toStdString());
|
|
pObject->Settype(mpCBtype->currentText().toStdString());
|
|
|
|
|
|
- if(CheckLE(mpLEvalidLength,"validLength",false))
|
|
|
|
|
|
+ if(ViewCreate::CheckLE(mpLEvalidLength,"validLength",false,this))
|
|
{
|
|
{
|
|
pObject->SetvalidLength(mpLEvalidLength->text().toDouble());
|
|
pObject->SetvalidLength(mpLEvalidLength->text().toDouble());
|
|
}
|
|
}
|
|
@@ -182,7 +162,7 @@ void DialogRoadObject::on_pushButton_add_clicked()
|
|
pObject->Setorientation(mpCBorientation->currentText().toStdString());
|
|
pObject->Setorientation(mpCBorientation->currentText().toStdString());
|
|
}
|
|
}
|
|
|
|
|
|
- if(CheckLE(mpLEsubtype,"subtype",false))
|
|
|
|
|
|
+ if(ViewCreate::CheckLE(mpLEsubtype,"subtype",false,this))
|
|
{
|
|
{
|
|
pObject->Setsubtype(mpLEsubtype->text().toStdString());
|
|
pObject->Setsubtype(mpLEsubtype->text().toStdString());
|
|
}
|
|
}
|
|
@@ -192,42 +172,42 @@ void DialogRoadObject::on_pushButton_add_clicked()
|
|
pObject->Setdynamic(mpCBdynamic->currentText().toStdString());
|
|
pObject->Setdynamic(mpCBdynamic->currentText().toStdString());
|
|
}
|
|
}
|
|
|
|
|
|
- if(CheckLE(mpLEname,"name",false))
|
|
|
|
|
|
+ if(ViewCreate::CheckLE(mpLEname,"name",false,this))
|
|
{
|
|
{
|
|
pObject->Setname(mpLEname->text().toStdString());
|
|
pObject->Setname(mpLEname->text().toStdString());
|
|
}
|
|
}
|
|
|
|
|
|
- if(CheckLE(mpLEhdg,"hdg",false))
|
|
|
|
|
|
+ if(ViewCreate::CheckLE(mpLEhdg,"hdg",false,this))
|
|
{
|
|
{
|
|
pObject->Sethdg(mpLEhdg->text().toDouble());
|
|
pObject->Sethdg(mpLEhdg->text().toDouble());
|
|
}
|
|
}
|
|
|
|
|
|
- if(CheckLE(mpLEpitch,"pitch",false))
|
|
|
|
|
|
+ if(ViewCreate::CheckLE(mpLEpitch,"pitch",false,this))
|
|
{
|
|
{
|
|
pObject->Setpitch(mpLEpitch->text().toDouble());
|
|
pObject->Setpitch(mpLEpitch->text().toDouble());
|
|
}
|
|
}
|
|
|
|
|
|
- if(CheckLE(mpLEroll,"roll",false))
|
|
|
|
|
|
+ if(ViewCreate::CheckLE(mpLEroll,"roll",false,this))
|
|
{
|
|
{
|
|
pObject->Setroll(mpLEroll->text().toDouble());
|
|
pObject->Setroll(mpLEroll->text().toDouble());
|
|
}
|
|
}
|
|
|
|
|
|
- if(CheckLE(mpLEheight,"height",false))
|
|
|
|
|
|
+ if(ViewCreate::CheckLE(mpLEheight,"height",false,this))
|
|
{
|
|
{
|
|
pObject->Setheight(mpLEheight->text().toDouble());
|
|
pObject->Setheight(mpLEheight->text().toDouble());
|
|
}
|
|
}
|
|
|
|
|
|
- if(CheckLE(mpLElength,"length",false))
|
|
|
|
|
|
+ if(ViewCreate::CheckLE(mpLElength,"length",false,this))
|
|
{
|
|
{
|
|
pObject->Setlength(mpLElength->text().toDouble());
|
|
pObject->Setlength(mpLElength->text().toDouble());
|
|
}
|
|
}
|
|
|
|
|
|
- if(CheckLE(mpLEwidth,"width",false))
|
|
|
|
|
|
+ if(ViewCreate::CheckLE(mpLEwidth,"width",false,this))
|
|
{
|
|
{
|
|
pObject->Setwidth(mpLEwidth->text().toDouble());
|
|
pObject->Setwidth(mpLEwidth->text().toDouble());
|
|
}
|
|
}
|
|
|
|
|
|
- if(CheckLE(mpLEradius,"radius",false))
|
|
|
|
|
|
+ if(ViewCreate::CheckLE(mpLEradius,"radius",false,this))
|
|
{
|
|
{
|
|
pObject->Setradius(mpLEradius->text().toDouble());
|
|
pObject->Setradius(mpLEradius->text().toDouble());
|
|
}
|
|
}
|
|
@@ -369,29 +349,29 @@ void DialogRoadObject::on_pushButton_change_clicked()
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
- if(CheckLE(mpLEid,"id") == false)return;
|
|
|
|
|
|
+ if(ViewCreate::CheckLE(mpLEid,"id",true,this) == false)return;
|
|
string id = mpLEid->text().toStdString();
|
|
string id = mpLEid->text().toStdString();
|
|
|
|
|
|
- if(CheckLE(mpLEt,"t") == false)return;
|
|
|
|
|
|
+ if(ViewCreate::CheckLE(mpLEt,"t",true,this) == false)return;
|
|
double t = mpLEt->text().toDouble();
|
|
double t = mpLEt->text().toDouble();
|
|
|
|
|
|
- if(CheckLE(mpLEs,"s") == false)return;
|
|
|
|
|
|
+ if(ViewCreate::CheckLE(mpLEs,"s",true,this) == false)return;
|
|
double s = mpLEs->text().toDouble();
|
|
double s = mpLEs->text().toDouble();
|
|
|
|
|
|
- if(CheckLE(mpLEzOffset,"zOffset") == false)return;
|
|
|
|
|
|
+ if(ViewCreate::CheckLE(mpLEzOffset,"zOffset",true,this) == false)return;
|
|
double zOffset = mpLEzOffset->text().toDouble();
|
|
double zOffset = mpLEzOffset->text().toDouble();
|
|
|
|
|
|
|
|
|
|
double length,width,hdg;
|
|
double length,width,hdg;
|
|
if(mpCBtype->currentText() == "parkingSpace")
|
|
if(mpCBtype->currentText() == "parkingSpace")
|
|
{
|
|
{
|
|
- if(CheckLE(mpLElength,"length") == false)return;
|
|
|
|
|
|
+ if(ViewCreate::CheckLE(mpLElength,"length",true,this) == false)return;
|
|
length = mpLElength->text().toDouble();
|
|
length = mpLElength->text().toDouble();
|
|
|
|
|
|
- if(CheckLE(mpLEwidth,"width") == false)return;
|
|
|
|
|
|
+ if(ViewCreate::CheckLE(mpLEwidth,"width",true,this) == false)return;
|
|
width = mpLEwidth->text().toDouble();
|
|
width = mpLEwidth->text().toDouble();
|
|
|
|
|
|
- if(CheckLE(mpLEhdg,"hdg") == false)return;
|
|
|
|
|
|
+ if(ViewCreate::CheckLE(mpLEhdg,"hdg",true,this) == false)return;
|
|
hdg = mpLEhdg->text().toDouble();
|
|
hdg = mpLEhdg->text().toDouble();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -402,7 +382,7 @@ void DialogRoadObject::on_pushButton_change_clicked()
|
|
|
|
|
|
pObject->Settype(mpCBtype->currentText().toStdString());
|
|
pObject->Settype(mpCBtype->currentText().toStdString());
|
|
|
|
|
|
- if(CheckLE(mpLEvalidLength,"validLength",false))
|
|
|
|
|
|
+ if(ViewCreate::CheckLE(mpLEvalidLength,"validLength",false,this))
|
|
{
|
|
{
|
|
pObject->SetvalidLength(mpLEvalidLength->text().toDouble());
|
|
pObject->SetvalidLength(mpLEvalidLength->text().toDouble());
|
|
}
|
|
}
|
|
@@ -412,7 +392,7 @@ void DialogRoadObject::on_pushButton_change_clicked()
|
|
pObject->Setorientation(mpCBorientation->currentText().toStdString());
|
|
pObject->Setorientation(mpCBorientation->currentText().toStdString());
|
|
}
|
|
}
|
|
|
|
|
|
- if(CheckLE(mpLEsubtype,"subtype",false))
|
|
|
|
|
|
+ if(ViewCreate::CheckLE(mpLEsubtype,"subtype",false,this))
|
|
{
|
|
{
|
|
pObject->Setsubtype(mpLEsubtype->text().toStdString());
|
|
pObject->Setsubtype(mpLEsubtype->text().toStdString());
|
|
}
|
|
}
|
|
@@ -422,42 +402,42 @@ void DialogRoadObject::on_pushButton_change_clicked()
|
|
pObject->Setdynamic(mpCBdynamic->currentText().toStdString());
|
|
pObject->Setdynamic(mpCBdynamic->currentText().toStdString());
|
|
}
|
|
}
|
|
|
|
|
|
- if(CheckLE(mpLEhdg,"hdg",false))
|
|
|
|
|
|
+ if(ViewCreate::CheckLE(mpLEhdg,"hdg",false,this))
|
|
{
|
|
{
|
|
pObject->Sethdg(mpLEhdg->text().toDouble());
|
|
pObject->Sethdg(mpLEhdg->text().toDouble());
|
|
}
|
|
}
|
|
|
|
|
|
- if(CheckLE(mpLEname,"name",false))
|
|
|
|
|
|
+ if(ViewCreate::CheckLE(mpLEname,"name",false,this))
|
|
{
|
|
{
|
|
pObject->Setname(mpLEname->text().toStdString());
|
|
pObject->Setname(mpLEname->text().toStdString());
|
|
}
|
|
}
|
|
|
|
|
|
- if(CheckLE(mpLEpitch,"pitch",false))
|
|
|
|
|
|
+ if(ViewCreate::CheckLE(mpLEpitch,"pitch",false,this))
|
|
{
|
|
{
|
|
pObject->Setpitch(mpLEpitch->text().toDouble());
|
|
pObject->Setpitch(mpLEpitch->text().toDouble());
|
|
}
|
|
}
|
|
|
|
|
|
- if(CheckLE(mpLEroll,"roll",false))
|
|
|
|
|
|
+ if(ViewCreate::CheckLE(mpLEroll,"roll",false,this))
|
|
{
|
|
{
|
|
pObject->Setroll(mpLEroll->text().toDouble());
|
|
pObject->Setroll(mpLEroll->text().toDouble());
|
|
}
|
|
}
|
|
|
|
|
|
- if(CheckLE(mpLEheight,"height",false))
|
|
|
|
|
|
+ if(ViewCreate::CheckLE(mpLEheight,"height",false,this))
|
|
{
|
|
{
|
|
pObject->Setheight(mpLEheight->text().toDouble());
|
|
pObject->Setheight(mpLEheight->text().toDouble());
|
|
}
|
|
}
|
|
|
|
|
|
- if(CheckLE(mpLElength,"length",false))
|
|
|
|
|
|
+ if(ViewCreate::CheckLE(mpLElength,"length",false,this))
|
|
{
|
|
{
|
|
pObject->Setlength(mpLElength->text().toDouble());
|
|
pObject->Setlength(mpLElength->text().toDouble());
|
|
}
|
|
}
|
|
|
|
|
|
- if(CheckLE(mpLEwidth,"width",false))
|
|
|
|
|
|
+ if(ViewCreate::CheckLE(mpLEwidth,"width",false,this))
|
|
{
|
|
{
|
|
pObject->Setwidth(mpLEwidth->text().toDouble());
|
|
pObject->Setwidth(mpLEwidth->text().toDouble());
|
|
}
|
|
}
|
|
|
|
|
|
- if(CheckLE(mpLEradius,"radius",false))
|
|
|
|
|
|
+ if(ViewCreate::CheckLE(mpLEradius,"radius",false,this))
|
|
{
|
|
{
|
|
pObject->Setradius(mpLEradius->text().toDouble());
|
|
pObject->Setradius(mpLEradius->text().toDouble());
|
|
}
|
|
}
|
|
@@ -465,3 +445,29 @@ void DialogRoadObject::on_pushButton_change_clicked()
|
|
QMessageBox::information(this,"Info","Change Object Successfull.",QMessageBox::YesAll);
|
|
QMessageBox::information(this,"Info","Change Object Successfull.",QMessageBox::YesAll);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+void DialogRoadObject::onClickMaterial()
|
|
|
|
+{
|
|
|
|
+ if(mpRoad == 0)return;
|
|
|
|
+ Road * pRoad = mpRoad;
|
|
|
|
+ if(pRoad->GetObjectCount() == 0)
|
|
|
|
+ {
|
|
|
|
+ QMessageBox::warning(this,"Warning","No Object.",QMessageBox::YesAll);
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ int index = ui->comboBox_Object->currentIndex();
|
|
|
|
+ if(index<0)return;
|
|
|
|
+ if(index >= mpRoad->GetObjectCount())return;
|
|
|
|
+
|
|
|
|
+ Object * pObject = mpRoad->GetObject(index);
|
|
|
|
+ if(pObject == 0)
|
|
|
|
+ {
|
|
|
|
+ QMessageBox::warning(this,"Warning","Can't found Object.",QMessageBox::YesAll);
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ DialogRoadObject_material dlgmaterail(pObject);
|
|
|
|
+
|
|
|
|
+ dlgmaterail.exec();
|
|
|
|
+}
|
|
|
|
+
|