Example #1
0
Client::Client(QString server_address, QString _name, QString _password, QObject *parent) :
    QObject(parent)
{
    this->manager = new QNetworkAccessManager(this);
    this->server_address = server_address;
    this->name = _name;
    this->password = _password;

    this->authenticate();

    if (this->is_authenticated())
    {
        this->active = true;
        this->timer = new QTimer(this);
        connect(this->timer, SIGNAL(timeout()),
                this, SLOT(timer_slot()));
        this->timer->start(PERIODIC_TIME_DEFAULT);

        this->get_projects();
        this->get_tasks();

        this->current_project = this->tasks_to_projects[this->current_task];
        if (this->current_task.length() > 0)
            this->send_action("resume");
    }
}
Example #2
0
wgt_shead_command::wgt_shead_command(const 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::shead::UiRobot *>(_robot);

	// utworzenie list widgetow

	checkBox_m_mip_Vector.append(ui.checkBox_ml_mip);

	doubleSpinBox_m_current_position_Vector.append(ui.doubleSpinBox_ml_current_position);

	doubleSpinBox_m_absolute_Vector.append(ui.doubleSpinBox_ml_absolute);

	doubleSpinBox_m_relative_Vector.append(ui.doubleSpinBox_ml_relative);

	// uruchomienei timera
	timer = (boost::shared_ptr <QTimer>) new QTimer(this);
	connect(timer.get(), SIGNAL(timeout()), this, SLOT(timer_slot()));
	timer->start(interface.position_refresh_interval);

	// podpiecie pozostalych sygnalow do slotow
	connect(this, SIGNAL(synchro_depended_init_signal()), this, SLOT(synchro_depended_init_slot()), Qt::QueuedConnection);

}
Example #3
0
wgt_spkm_inc::wgt_spkm_inc(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::spkm::UiRobot *>(_robot);

	doubleSpinBox_cur_Vector.append(ui.doubleSpinBox_cur_p0);
	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_des_Vector.append(ui.doubleSpinBox_des_p0);
	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_mcur_Vector.append(ui.doubleSpinBox_mcur_0);
	doubleSpinBox_mcur_Vector.append(ui.doubleSpinBox_mcur_1);
	doubleSpinBox_mcur_Vector.append(ui.doubleSpinBox_mcur_2);
	doubleSpinBox_mcur_Vector.append(ui.doubleSpinBox_mcur_3);
	doubleSpinBox_mcur_Vector.append(ui.doubleSpinBox_mcur_4);
	doubleSpinBox_mcur_Vector.append(ui.doubleSpinBox_mcur_5);

	radioButton_mip_Vector.append(ui.radioButton_mip_0);
	radioButton_mip_Vector.append(ui.radioButton_mip_1);
	radioButton_mip_Vector.append(ui.radioButton_mip_2);
	radioButton_mip_Vector.append(ui.radioButton_mip_3);
	radioButton_mip_Vector.append(ui.radioButton_mip_4);
	radioButton_mip_Vector.append(ui.radioButton_mip_5);

	timer = (boost::shared_ptr <QTimer>) new QTimer(this);
	connect(timer.get(), SIGNAL(timeout()), this, SLOT(timer_slot()));
	timer->start(interface.position_refresh_interval);
	ui.radioButton_non_sync_trapezoidal->setChecked(true);

	connect(this, SIGNAL(synchro_depended_init_signal()), this, SLOT(synchro_depended_init_slot()), Qt::QueuedConnection);

	for (int i = 0; i < robot->number_of_servos; i++) {
		doubleSpinBox_des_Vector[i]->setMaximum(robot->kinematic_params.upper_motor_pos_limits[i]);
		doubleSpinBox_des_Vector[i]->setMinimum(robot->kinematic_params.lower_motor_pos_limits[i]);
	}

}
Example #4
0
wgt_spkm_ext::wgt_spkm_ext(mrrocpp::ui::common::Interface& _interface, mrrocpp::ui::spkm::UiRobot& _robot, QWidget *parent) :
	wgt_base("Spkm external motion", _interface, parent), robot(_robot)
{
	ui.setupUi(this);

	doubleSpinBox_cur_Vector.append(ui.doubleSpinBox_cur_p0);
	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_des_Vector.append(ui.doubleSpinBox_des_p0);
	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_mcur_Vector.append(ui.doubleSpinBox_mcur_0);
	doubleSpinBox_mcur_Vector.append(ui.doubleSpinBox_mcur_1);
	doubleSpinBox_mcur_Vector.append(ui.doubleSpinBox_mcur_2);
	doubleSpinBox_mcur_Vector.append(ui.doubleSpinBox_mcur_3);
	doubleSpinBox_mcur_Vector.append(ui.doubleSpinBox_mcur_4);
	doubleSpinBox_mcur_Vector.append(ui.doubleSpinBox_mcur_5);

	radioButton_mip_Vector.append(ui.radioButton_mip_0);
	radioButton_mip_Vector.append(ui.radioButton_mip_1);
	radioButton_mip_Vector.append(ui.radioButton_mip_2);
	radioButton_mip_Vector.append(ui.radioButton_mip_3);
	radioButton_mip_Vector.append(ui.radioButton_mip_4);
	radioButton_mip_Vector.append(ui.radioButton_mip_5);

	timer = new QTimer(this);
	connect(timer, SIGNAL(timeout()), this, SLOT(timer_slot()));
	timer->start(interface.position_refresh_interval);
	ui.radioButton_non_sync_trapezoidal->setChecked(true);
}
Example #5
0
wgt_smb_command::wgt_smb_command(const 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::smb::UiRobot *>(_robot);

	// utworzenie list widgetow

	checkBox_fl_in_Vector.append(ui.checkBox_fl1_in);
	checkBox_fl_in_Vector.append(ui.checkBox_fl2_in);
	checkBox_fl_in_Vector.append(ui.checkBox_fl3_in);

	checkBox_fl_out_Vector.append(ui.checkBox_fl1_out);
	checkBox_fl_out_Vector.append(ui.checkBox_fl2_out);
	checkBox_fl_out_Vector.append(ui.checkBox_fl3_out);

	checkBox_fl_undetachable_Vector.append(ui.checkBox_fl1_udetachable);
	checkBox_fl_undetachable_Vector.append(ui.checkBox_fl2_udetachable);
	checkBox_fl_undetachable_Vector.append(ui.checkBox_fl3_udetachable);

	checkBox_fl_attached_Vector.append(ui.checkBox_fl1_attached);
	checkBox_fl_attached_Vector.append(ui.checkBox_fl2_attached);
	checkBox_fl_attached_Vector.append(ui.checkBox_fl3_attached);

	checkBox_m_mip_Vector.append(ui.checkBox_ml_mip);
	checkBox_m_mip_Vector.append(ui.checkBox_ms_mip);

	radioButton_fl_in_Vector.append(ui.radioButton_fl1_in);
	radioButton_fl_in_Vector.append(ui.radioButton_fl2_in);
	radioButton_fl_in_Vector.append(ui.radioButton_fl3_in);

	radioButton_fl_out_Vector.append(ui.radioButton_fl1_out);
	radioButton_fl_out_Vector.append(ui.radioButton_fl2_out);
	radioButton_fl_out_Vector.append(ui.radioButton_fl3_out);

	doubleSpinBox_m_current_position_Vector.append(ui.doubleSpinBox_ml_current_position);
	doubleSpinBox_m_current_position_Vector.append(ui.doubleSpinBox_ms_current_position);

	doubleSpinBox_m_absolute_Vector.append(ui.doubleSpinBox_ml_absolute);
	doubleSpinBox_m_absolute_Vector.append(ui.doubleSpinBox_ms_absolute);

	doubleSpinBox_m_relative_Vector.append(ui.doubleSpinBox_ml_relative);
	doubleSpinBox_m_relative_Vector.append(ui.doubleSpinBox_ms_relative);

	// uruchomienei timera
	timer = (boost::shared_ptr <QTimer>) new QTimer(this);
	connect(timer.get(), SIGNAL(timeout()), this, SLOT(timer_slot()));
	timer->start(interface.position_refresh_interval);

	// podpiecie pozostalych sygnalow do slotow
	connect(this, SIGNAL(synchro_depended_init_signal()), this, SLOT(synchro_depended_init_slot()), Qt::QueuedConnection);

	// Set decimal properties for the motor-based control.
	ui.doubleSpinBox_ml_absolute->setMinimum(-1200000);
	ui.doubleSpinBox_ml_absolute->setMaximum(1200000);
	ui.doubleSpinBox_ml_absolute->setSingleStep(10000);
	ui.doubleSpinBox_ml_absolute->setDecimals(0);

	ui.doubleSpinBox_ml_relative->setMinimum(0);
	ui.doubleSpinBox_ml_relative->setMaximum(1200000);
	ui.doubleSpinBox_ml_relative->setSingleStep(10000);
	ui.doubleSpinBox_ml_relative->setDecimals(0);

	ui.doubleSpinBox_ms_absolute->setMinimum(-120000);
	ui.doubleSpinBox_ms_absolute->setMaximum(120000);
	ui.doubleSpinBox_ms_absolute->setSingleStep(1000);
	ui.doubleSpinBox_ms_absolute->setDecimals(0);

	ui.doubleSpinBox_ms_relative->setMinimum(0);
	ui.doubleSpinBox_ms_relative->setMaximum(120000);
	ui.doubleSpinBox_ms_relative->setSingleStep(1000);
	ui.doubleSpinBox_ms_relative->setDecimals(0);

	// Set precision of widgets with current positions.
	ui.doubleSpinBox_ml_current_position->setDecimals(0);
	ui.doubleSpinBox_ms_current_position->setDecimals(0);
	ui.doubleSpinBox_ml_current_position->setMinimum(-1200000);
	ui.doubleSpinBox_ml_current_position->setMaximum(1200000);
	ui.doubleSpinBox_ms_current_position->setMinimum(-120000);
	ui.doubleSpinBox_ms_current_position->setMaximum(120000);
}