wgt_single_motor_move::wgt_single_motor_move(QString _widget_label, mrrocpp::ui::common::Interface& _interface, mrrocpp::ui::common::UiRobot* _robot, QWidget *parent) : wgt_base(_widget_label, _interface, parent) { ui.setupUi(this); robot = dynamic_cast <mrrocpp::ui::single_motor::UiRobot *>(_robot); connect(this, SIGNAL(synchro_depended_init_signal()), this, SLOT(synchro_depended_init_slot()), Qt::QueuedConnection); connect(this, SIGNAL(init_and_copy_signal()), this, SLOT(init_and_copy_slot()), Qt::QueuedConnection); // ui.doubleSpinBox_des_p0->setMaximum(robot->kinematic_params.upper_motor_pos_limits[0]); // ui.doubleSpinBox_des_p0->setMinimum(robot->kinematic_params.lower_motor_pos_limits[0]); }
wgt_base::wgt_base(QString _widget_label, mrrocpp::ui::common::Interface& _interface, mrrocpp::ui::common::UiRobot *robo, QWidget *parent) : QWidget(parent), widget_label(_widget_label), interface(_interface), robot(robo) { dwgt = new QDockWidget((QMainWindow *) interface.get_main_window()); //dwgt_pc->setAllowedAreas(Qt::TopDockWidgetArea); dwgt->setWindowTitle(widget_label); //vl = new QVBoxLayout(); //dwgt->setLayout(vl); // vl->addWidget(this); dwgt->setWidget(this); dwgt->hide(); //dwgt->setFloating(true); interface.get_main_window()->addDockWidget(Qt::LeftDockWidgetArea, dwgt); connect(this, SIGNAL(synchro_depended_init_signal()), this, SLOT(synchro_depended_init_slot()), Qt::QueuedConnection); connect(this, SIGNAL(init_and_copy_signal()), this, SLOT(init_and_copy_slot()), Qt::QueuedConnection); }
wgt_irp6_m_tool_euler::wgt_irp6_m_tool_euler(QString _widget_label, mrrocpp::ui::common::Interface& _interface, mrrocpp::ui::irp6_m::UiRobot& _robot, QWidget *parent) : wgt_base(_widget_label, _interface, parent), robot(_robot) { ui.setupUi(this); connect(this, SIGNAL(synchro_depended_init_signal()), this, SLOT(synchro_depended_init_slot()), Qt::QueuedConnection); connect(this, SIGNAL(init_and_copy_signal()), this, SLOT(init_and_copy_slot()), Qt::QueuedConnection); doubleSpinBox_cur_Vector.append(ui.doubleSpinBox_cur_p1); doubleSpinBox_cur_Vector.append(ui.doubleSpinBox_cur_p2); doubleSpinBox_cur_Vector.append(ui.doubleSpinBox_cur_p3); doubleSpinBox_cur_Vector.append(ui.doubleSpinBox_cur_p4); doubleSpinBox_cur_Vector.append(ui.doubleSpinBox_cur_p5); doubleSpinBox_cur_Vector.append(ui.doubleSpinBox_cur_p6); doubleSpinBox_des_Vector.append(ui.doubleSpinBox_des_p1); doubleSpinBox_des_Vector.append(ui.doubleSpinBox_des_p2); doubleSpinBox_des_Vector.append(ui.doubleSpinBox_des_p3); doubleSpinBox_des_Vector.append(ui.doubleSpinBox_des_p4); doubleSpinBox_des_Vector.append(ui.doubleSpinBox_des_p5); doubleSpinBox_des_Vector.append(ui.doubleSpinBox_des_p6); }
wgt_irp6_m_motors::wgt_irp6_m_motors(QString _widget_label, mrrocpp::ui::common::Interface& _interface, mrrocpp::ui::irp6_m::UiRobot& _robot, QWidget *parent) : wgt_base(_widget_label, _interface, parent), robot(_robot) { ui.setupUi(this); connect(this, SIGNAL(synchro_depended_init_signal()), this, SLOT(synchro_depended_init_slot()), Qt::QueuedConnection); connect(this, SIGNAL(init_and_copy_signal()), this, SLOT(init_and_copy_slot()), Qt::QueuedConnection); doubleSpinBox_cur_Vector.append(ui.doubleSpinBox_cur_p1); doubleSpinBox_cur_Vector.append(ui.doubleSpinBox_cur_p2); doubleSpinBox_cur_Vector.append(ui.doubleSpinBox_cur_p3); doubleSpinBox_cur_Vector.append(ui.doubleSpinBox_cur_p4); doubleSpinBox_cur_Vector.append(ui.doubleSpinBox_cur_p5); doubleSpinBox_cur_Vector.append(ui.doubleSpinBox_cur_p6); doubleSpinBox_des_Vector.append(ui.doubleSpinBox_des_p1); doubleSpinBox_des_Vector.append(ui.doubleSpinBox_des_p2); doubleSpinBox_des_Vector.append(ui.doubleSpinBox_des_p3); doubleSpinBox_des_Vector.append(ui.doubleSpinBox_des_p4); doubleSpinBox_des_Vector.append(ui.doubleSpinBox_des_p5); doubleSpinBox_des_Vector.append(ui.doubleSpinBox_des_p6); if (robot.robot_name == lib::irp6ot_m::ROBOT_NAME) { doubleSpinBox_cur_Vector.append(ui.doubleSpinBox_cur_p7); doubleSpinBox_des_Vector.append(ui.doubleSpinBox_des_p7); } if (robot.robot_name == lib::irp6p_m::ROBOT_NAME) { ui.label_2->hide(); ui.doubleSpinBox_cur_p7->hide(); ui.doubleSpinBox_des_p7->hide(); ui.pushButton_7l->hide(); ui.pushButton_7r->hide(); } }
void wgt_base::init_and_copy() { emit init_and_copy_signal(); }
void wgt_irp6_m_motors::init_and_copy() { emit init_and_copy_signal(); }
void wgt_single_motor_move::init_and_copy() { emit init_and_copy_signal(); }
void wgt_irp6_m_tool_euler::init_and_copy() { emit init_and_copy_signal(); }
wgt_bird_hand_command::wgt_bird_hand_command(mrrocpp::ui::common::Interface& _interface, mrrocpp::ui::bird_hand::UiRobot& _robot, QWidget *parent) : wgt_base("Bird hand incremental motion", _interface, parent), ui(new Ui::wgt_bird_hand_commandClass()), robot(_robot) { //ui = new Ui::wgt_bird_hand_commandClass::wgt_bird_hand_commandClass(); ui->setupUi(this); connect(this, SIGNAL(synchro_depended_init_signal()), this, SLOT(synchro_depended_init_slot()), Qt::QueuedConnection); connect(this, SIGNAL(init_and_copy_signal()), this, SLOT(init_and_copy_slot()), Qt::QueuedConnection); doubleSpinBox_curpos_Vector.append(ui->doubleSpinBox_curpos_thumb_0); doubleSpinBox_curpos_Vector.append(ui->doubleSpinBox_curpos_thumb_1); doubleSpinBox_curpos_Vector.append(ui->doubleSpinBox_curpos_index_0); doubleSpinBox_curpos_Vector.append(ui->doubleSpinBox_curpos_index_1); doubleSpinBox_curpos_Vector.append(ui->doubleSpinBox_curpos_index_2); doubleSpinBox_curpos_Vector.append(ui->doubleSpinBox_curpos_ring_0); doubleSpinBox_curpos_Vector.append(ui->doubleSpinBox_curpos_ring_1); doubleSpinBox_curpos_Vector.append(ui->doubleSpinBox_curpos_ring_2); doubleSpinBox_despos_Vector.append(ui->doubleSpinBox_despos_thumb_0); doubleSpinBox_despos_Vector.append(ui->doubleSpinBox_despos_thumb_1); doubleSpinBox_despos_Vector.append(ui->doubleSpinBox_despos_index_0); doubleSpinBox_despos_Vector.append(ui->doubleSpinBox_despos_index_1); doubleSpinBox_despos_Vector.append(ui->doubleSpinBox_despos_index_2); doubleSpinBox_despos_Vector.append(ui->doubleSpinBox_despos_ring_0); doubleSpinBox_despos_Vector.append(ui->doubleSpinBox_despos_ring_1); doubleSpinBox_despos_Vector.append(ui->doubleSpinBox_despos_ring_2); doubleSpinBox_destor_Vector.append(ui->doubleSpinBox_destor_thumb_0); doubleSpinBox_destor_Vector.append(ui->doubleSpinBox_destor_thumb_1); doubleSpinBox_destor_Vector.append(ui->doubleSpinBox_destor_index_0); doubleSpinBox_destor_Vector.append(ui->doubleSpinBox_destor_index_1); doubleSpinBox_destor_Vector.append(ui->doubleSpinBox_destor_index_2); doubleSpinBox_destor_Vector.append(ui->doubleSpinBox_destor_ring_0); doubleSpinBox_destor_Vector.append(ui->doubleSpinBox_destor_ring_1); doubleSpinBox_destor_Vector.append(ui->doubleSpinBox_destor_ring_2); doubleSpinBox_curtor_Vector.append(ui->doubleSpinBox_curtor_thumb_0); doubleSpinBox_curtor_Vector.append(ui->doubleSpinBox_curtor_thumb_1); doubleSpinBox_curtor_Vector.append(ui->doubleSpinBox_curtor_index_0); doubleSpinBox_curtor_Vector.append(ui->doubleSpinBox_curtor_index_1); doubleSpinBox_curtor_Vector.append(ui->doubleSpinBox_curtor_index_2); doubleSpinBox_curtor_Vector.append(ui->doubleSpinBox_curtor_ring_0); doubleSpinBox_curtor_Vector.append(ui->doubleSpinBox_curtor_ring_1); doubleSpinBox_curtor_Vector.append(ui->doubleSpinBox_curtor_ring_2); doubleSpinBox_rdamp_Vector.append(ui->doubleSpinBox_rdamp_thumb_0); doubleSpinBox_rdamp_Vector.append(ui->doubleSpinBox_rdamp_thumb_1); doubleSpinBox_rdamp_Vector.append(ui->doubleSpinBox_rdamp_index_0); doubleSpinBox_rdamp_Vector.append(ui->doubleSpinBox_rdamp_index_1); doubleSpinBox_rdamp_Vector.append(ui->doubleSpinBox_rdamp_index_2); doubleSpinBox_rdamp_Vector.append(ui->doubleSpinBox_rdamp_ring_0); doubleSpinBox_rdamp_Vector.append(ui->doubleSpinBox_rdamp_ring_1); doubleSpinBox_rdamp_Vector.append(ui->doubleSpinBox_rdamp_ring_2); doubleSpinBox_mcur_Vector.append(ui->doubleSpinBox_mcur_thumb_0); doubleSpinBox_mcur_Vector.append(ui->doubleSpinBox_mcur_thumb_1); doubleSpinBox_mcur_Vector.append(ui->doubleSpinBox_mcur_index_0); doubleSpinBox_mcur_Vector.append(ui->doubleSpinBox_mcur_index_1); doubleSpinBox_mcur_Vector.append(ui->doubleSpinBox_mcur_index_2); doubleSpinBox_mcur_Vector.append(ui->doubleSpinBox_mcur_ring_0); doubleSpinBox_mcur_Vector.append(ui->doubleSpinBox_mcur_ring_1); doubleSpinBox_mcur_Vector.append(ui->doubleSpinBox_mcur_ring_2); buttonGroup_Vector.append(ui->buttonGroup_thumb_0); buttonGroup_Vector.append(ui->buttonGroup_thumb_1); buttonGroup_Vector.append(ui->buttonGroup_index_0); buttonGroup_Vector.append(ui->buttonGroup_index_1); buttonGroup_Vector.append(ui->buttonGroup_index_2); buttonGroup_Vector.append(ui->buttonGroup_ring_0); buttonGroup_Vector.append(ui->buttonGroup_ring_1); buttonGroup_Vector.append(ui->buttonGroup_ring_2); checkboxButtonGroup_Vector.append(ui->buttonGroup_checkbox_thumb_0); checkboxButtonGroup_Vector.append(ui->buttonGroup_checkbox_thumb_1); checkboxButtonGroup_Vector.append(ui->buttonGroup_checkbox_index_0); checkboxButtonGroup_Vector.append(ui->buttonGroup_checkbox_index_1); checkboxButtonGroup_Vector.append(ui->buttonGroup_checkbox_index_2); checkboxButtonGroup_Vector.append(ui->buttonGroup_checkbox_ring_0); checkboxButtonGroup_Vector.append(ui->buttonGroup_checkbox_ring_1); checkboxButtonGroup_Vector.append(ui->buttonGroup_checkbox_ring_2); for(int i=0; i<robot.number_of_servos; i++) { checkboxButtonGroup_Vector[i]->setExclusive(false); doubleSpinBox_curtor_Vector[i]->setEnabled(false); doubleSpinBox_mcur_Vector[i]->setEnabled(false); doubleSpinBox_curpos_Vector[i]->setEnabled(false); QList<QAbstractButton*> buttons_in_group = checkboxButtonGroup_Vector[i]->buttons(); for(int j=0; j<buttons_in_group.size(); j++) { buttons_in_group[j]->setEnabled(false); } } }
void wgt_bird_hand_command::init_and_copy() { emit init_and_copy_signal(); }