Robot: move to new style connect()
This commit is contained in:
@@ -37,14 +37,11 @@ TaskDlgSimulate::TaskDlgSimulate(Robot::RobotObject *pcRobotObject,Robot::Trajec
|
||||
{
|
||||
rob = new TaskRobot6Axis(pcRobotObject);
|
||||
ctr = new TaskRobotControl(pcRobotObject);
|
||||
|
||||
|
||||
trac = new TaskTrajectory(pcRobotObject,pcTrajectoryObject);
|
||||
msg = new TaskRobotMessages(pcRobotObject);
|
||||
|
||||
|
||||
QObject::connect(
|
||||
trac, SIGNAL(axisChanged(float, float, float, float, float, float, const Base::Placement&)),
|
||||
rob, SLOT(setAxis(float, float, float, float, float, float, const Base::Placement&)));
|
||||
|
||||
QObject::connect(trac, &TaskTrajectory::axisChanged, rob, &TaskRobot6Axis::setAxis);
|
||||
|
||||
Content.push_back(rob);
|
||||
Content.push_back(ctr);
|
||||
|
||||
@@ -53,9 +53,11 @@ TaskEdge2TracParameter::TaskEdge2TracParameter(Robot::Edge2TracObject *pcObject,
|
||||
|
||||
this->groupLayout()->addWidget(proxy);
|
||||
|
||||
QObject::connect(ui->pushButton_HideShow,SIGNAL(clicked()),this,SLOT(hideShow()));
|
||||
QObject::connect(ui->doubleSpinBoxSizing,SIGNAL(valueChanged (double)),this,SLOT(sizingValueChanged(double)));
|
||||
QObject::connect(ui->checkBoxOrientation,SIGNAL(toggled (bool)),this,SLOT(orientationToggled(bool)));
|
||||
QObject::connect(ui->pushButton_HideShow, &QPushButton::clicked, this, &TaskEdge2TracParameter::hideShow);
|
||||
QObject::connect(ui->doubleSpinBoxSizing, qOverload<double>(&QDoubleSpinBox::valueChanged),
|
||||
this, &TaskEdge2TracParameter::sizingValueChanged);
|
||||
QObject::connect(ui->checkBoxOrientation, &QCheckBox::toggled,
|
||||
this, &TaskEdge2TracParameter::orientationToggled);
|
||||
|
||||
setHideShowObject();
|
||||
|
||||
|
||||
@@ -49,17 +49,17 @@ TaskRobot6Axis::TaskRobot6Axis(Robot::RobotObject *pcRobotObject,QWidget *parent
|
||||
|
||||
this->groupLayout()->addWidget(proxy);
|
||||
|
||||
QObject::connect(ui->horizontalSlider_Axis1,SIGNAL(sliderMoved(int)),this,SLOT(changeSliderA1(int)));
|
||||
QObject::connect(ui->horizontalSlider_Axis2,SIGNAL(sliderMoved(int)),this,SLOT(changeSliderA2(int)));
|
||||
QObject::connect(ui->horizontalSlider_Axis3,SIGNAL(sliderMoved(int)),this,SLOT(changeSliderA3(int)));
|
||||
QObject::connect(ui->horizontalSlider_Axis4,SIGNAL(sliderMoved(int)),this,SLOT(changeSliderA4(int)));
|
||||
QObject::connect(ui->horizontalSlider_Axis5,SIGNAL(sliderMoved(int)),this,SLOT(changeSliderA5(int)));
|
||||
QObject::connect(ui->horizontalSlider_Axis6,SIGNAL(sliderMoved(int)),this,SLOT(changeSliderA6(int)));
|
||||
QObject::connect(ui->horizontalSlider_Axis1, &QSlider::sliderMoved, this, &TaskRobot6Axis::changeSliderA1);
|
||||
QObject::connect(ui->horizontalSlider_Axis2, &QSlider::sliderMoved, this, &TaskRobot6Axis::changeSliderA2);
|
||||
QObject::connect(ui->horizontalSlider_Axis3, &QSlider::sliderMoved, this, &TaskRobot6Axis::changeSliderA3);
|
||||
QObject::connect(ui->horizontalSlider_Axis4, &QSlider::sliderMoved, this, &TaskRobot6Axis::changeSliderA4);
|
||||
QObject::connect(ui->horizontalSlider_Axis5, &QSlider::sliderMoved, this, &TaskRobot6Axis::changeSliderA5);
|
||||
QObject::connect(ui->horizontalSlider_Axis6, &QSlider::sliderMoved, this, &TaskRobot6Axis::changeSliderA6);
|
||||
QObject::connect(ui->pushButtonChooseTool, &QPushButton::clicked, this, &TaskRobot6Axis::createPlacementDlg);
|
||||
|
||||
QObject::connect(ui->pushButtonChooseTool,SIGNAL(clicked()),this,SLOT(createPlacementDlg()));
|
||||
|
||||
if(pcRobotObject)
|
||||
if (pcRobotObject) {
|
||||
setRobot(pcRobotObject);
|
||||
}
|
||||
}
|
||||
|
||||
TaskRobot6Axis::~TaskRobot6Axis()
|
||||
|
||||
@@ -52,7 +52,7 @@ public:
|
||||
|
||||
void setRobot(Robot::RobotObject *pcRobotObject);
|
||||
|
||||
private Q_SLOTS:
|
||||
public Q_SLOTS:
|
||||
void setAxis(float A1,float A2,float A3,float A4,float A5,float A6,const Base::Placement &Tcp);
|
||||
void changeSliderA1(int value);
|
||||
void changeSliderA2(int value);
|
||||
|
||||
@@ -78,21 +78,23 @@ TaskTrajectory::TaskTrajectory(Robot::RobotObject *pcRobotObject,Robot::Trajecto
|
||||
|
||||
}
|
||||
|
||||
QObject::connect(ui->ButtonStepStart ,SIGNAL(clicked()),this,SLOT(start()));
|
||||
QObject::connect(ui->ButtonStepStop ,SIGNAL(clicked()),this,SLOT(stop()));
|
||||
QObject::connect(ui->ButtonStepRun ,SIGNAL(clicked()),this,SLOT(run()));
|
||||
QObject::connect(ui->ButtonStepBack ,SIGNAL(clicked()),this,SLOT(back()));
|
||||
QObject::connect(ui->ButtonStepForward ,SIGNAL(clicked()),this,SLOT(forward()));
|
||||
QObject::connect(ui->ButtonStepEnd ,SIGNAL(clicked()),this,SLOT(end()));
|
||||
QObject::connect(ui->ButtonStepStart , &QPushButton::clicked, this, &TaskTrajectory::start);
|
||||
QObject::connect(ui->ButtonStepStop , &QPushButton::clicked, this, &TaskTrajectory::stop);
|
||||
QObject::connect(ui->ButtonStepRun , &QPushButton::clicked, this, &TaskTrajectory::run);
|
||||
QObject::connect(ui->ButtonStepBack , &QPushButton::clicked, this, &TaskTrajectory::back);
|
||||
QObject::connect(ui->ButtonStepForward , &QPushButton::clicked, this, &TaskTrajectory::forward);
|
||||
QObject::connect(ui->ButtonStepEnd , &QPushButton::clicked, this, &TaskTrajectory::end);
|
||||
|
||||
|
||||
// set up timer
|
||||
timer = new QTimer( this );
|
||||
timer->setInterval(100);
|
||||
QObject::connect(timer ,SIGNAL(timeout ()),this,SLOT(timerDone()));
|
||||
QObject::connect(timer, &QTimer::timeout, this, &TaskTrajectory::timerDone);
|
||||
|
||||
QObject::connect( ui->timeSpinBox ,SIGNAL(valueChanged(double)), this, SLOT(valueChanged(double)) );
|
||||
QObject::connect( ui->timeSlider ,SIGNAL(valueChanged(int) ), this, SLOT(valueChanged(int)) );
|
||||
QObject::connect(ui->timeSpinBox, qOverload<double>(&QDoubleSpinBox::valueChanged),
|
||||
this, qOverload<double>(&TaskTrajectory::valueChanged));
|
||||
QObject::connect(ui->timeSlider, qOverload<int>(&QSlider::valueChanged),
|
||||
this, qOverload<int>(&TaskTrajectory::valueChanged));
|
||||
|
||||
// get the view provider
|
||||
ViewProv = dynamic_cast<ViewProviderRobotObject*>(Gui::Application::Instance->activeDocument()->getViewProvider(pcRobotObject) );
|
||||
|
||||
@@ -62,7 +62,8 @@ TaskTrajectoryDressUpParameter::TaskTrajectoryDressUpParameter(Robot::Trajectory
|
||||
PosAdd = pcObject->PosAdd.getValue();
|
||||
viewPlacement();
|
||||
|
||||
QObject::connect(ui->toolButtonChoosePlacement,SIGNAL(clicked()),this,SLOT(createPlacementDlg()));
|
||||
QObject::connect(ui->toolButtonChoosePlacement, &QToolButton::clicked,
|
||||
this, &TaskTrajectoryDressUpParameter::createPlacementDlg);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -76,20 +76,21 @@ TrajectorySimulate::TrajectorySimulate(Robot::RobotObject *pcRobotObject,Robot::
|
||||
|
||||
}
|
||||
|
||||
QObject::connect(ui->ButtonStepStart, SIGNAL(clicked()), this, SLOT(start()));
|
||||
QObject::connect(ui->ButtonStepStop, SIGNAL(clicked()), this, SLOT(stop()));
|
||||
QObject::connect(ui->ButtonStepRun, SIGNAL(clicked()), this, SLOT(run()));
|
||||
QObject::connect(ui->ButtonStepBack, SIGNAL(clicked()), this, SLOT(back()));
|
||||
QObject::connect(ui->ButtonStepForward, SIGNAL(clicked()), this, SLOT(forward()));
|
||||
QObject::connect(ui->ButtonStepEnd, SIGNAL(clicked()), this, SLOT(end()));
|
||||
QObject::connect(ui->ButtonStepStart, &QPushButton::clicked, this, &TrajectorySimulate::start);
|
||||
QObject::connect(ui->ButtonStepStop, &QPushButton::clicked, this, &TrajectorySimulate::stop);
|
||||
QObject::connect(ui->ButtonStepRun, &QPushButton::clicked, this, &TrajectorySimulate::run);
|
||||
QObject::connect(ui->ButtonStepBack, &QPushButton::clicked, this, &TrajectorySimulate::back);
|
||||
QObject::connect(ui->ButtonStepForward, &QPushButton::clicked, this, &TrajectorySimulate::forward);
|
||||
QObject::connect(ui->ButtonStepEnd, &QPushButton::clicked, this, &TrajectorySimulate::end);
|
||||
|
||||
// set up timer
|
||||
timer = new QTimer(this);
|
||||
timer->setInterval(100);
|
||||
QObject::connect(timer, SIGNAL(timeout()), this, SLOT(timerDone()));
|
||||
QObject::connect(ui->timeSpinBox, SIGNAL(valueChanged(double)), this,
|
||||
SLOT(valueChanged(double)));
|
||||
QObject::connect(ui->timeSlider, SIGNAL(valueChanged(int)), this, SLOT(valueChanged(int)));
|
||||
QObject::connect(timer, &QTimer::timeout, this, &TrajectorySimulate::timerDone);
|
||||
QObject::connect(ui->timeSpinBox, qOverload<double>(&QDoubleSpinBox::valueChanged),
|
||||
this, qOverload<double>(&TrajectorySimulate::valueChanged));
|
||||
QObject::connect(ui->timeSlider, qOverload<int>(&QSlider::valueChanged),
|
||||
this, qOverload<int>(&TrajectorySimulate::valueChanged));
|
||||
|
||||
// get the view provider
|
||||
ViewProv = static_cast<ViewProviderRobotObject*>(Gui::Application::Instance->activeDocument()->getViewProvider(pcRobotObject) );
|
||||
|
||||
Reference in New Issue
Block a user