void CPJoyToAckermannPlugin::start()
{
    if(!ros::ok())
    {
        ROS_WARN_STREAM("Tried to start a nodelet that wasn't ready!");
        return;
    }
    settings->setValue(uuid.toString() + "/Active", true);
    nodelet_priv->start();
    emit changeEnabled(true);
}
Пример #2
0
void CPBoolPlugin::start()
{
    if(!ros::ok())
    {
        ROS_WARN_STREAM("Tried to start a nodelet that wasn't ready!");
        return;
    }
    settings->setValue(uuid.toString() + "/Active", true);
    activateNodelet();
    emit changeEnabled(true);
}
CPJoyToAckermannPlugin::CPJoyToAckermannPlugin() :
    ui(new Ui::CPJoyToAckermannPlugin),
    linear_scale(0.20),
    angular_scale(M_PI / 4),
    nodelet_priv(new joy_to_ackermann::joy_to_ackermann_nodelet(false))
{
    ui->setupUi(this);
    connect(this, SIGNAL(changeLabel(const QString &)), ui->label, SLOT(setText(const QString &)));
    connect(this, SIGNAL(changeEnabled(bool)), ui->label, SLOT(setEnabled(bool)));
    emit changeLabel("CP Joy To Ackermann");
    emit changeEnabled(false);
}
Пример #4
0
void QgsScaleBarPluginGui::on_buttonBox_accepted()
{
  hide();
  emit changePlacement( cboPlacement->currentIndex() );
  emit changePreferredSize( spnSize->value() );
  emit changeSnapping( chkSnapping->isChecked() );
  emit changeEnabled( chkEnable->isChecked() );
  emit changeStyle( cboStyle->currentIndex() );
  emit changeColor( pbnChangeColor->color() );
  emit refreshCanvas();
  accept();
}
Пример #5
0
CPBoolPlugin::CPBoolPlugin() :
    ui(new Ui::CPBoolPlugin),
    topic("cp_bool"),
    nodelet_priv(new CPSSN())
{
    ui->setupUi(this);
    connect(this, SIGNAL(changeValue(const QString &)), ui->value, SLOT(setText(const QString &)));
    connect(this, SIGNAL(changeLabel(const QString &)), ui->label, SLOT(setText(const QString &)));
    connect(this, SIGNAL(changeEnabled(bool)), ui->value, SLOT(setEnabled(bool)));
    connect(this, SIGNAL(changeEnabled(bool)), ui->label, SLOT(setEnabled(bool)));
    emit changeEnabled(false);
    emit changeLabel("CPBool: ");
}
Пример #6
0
void CPBoolPlugin::stop()
{
    settings->setValue(uuid.toString() + "/Active", false);
    emit changeEnabled(false);
    nodelet_priv->deactivate();
}
Пример #7
0
SQLConfigWindow::SQLConfigWindow()
{
    setAttribute(Qt::WA_DeleteOnClose, true);

    QVBoxLayout *v = new QVBoxLayout(this);

    QLabel *desc = new QLabel(tr("<b><span style='color:red'>Don't touch anything if you've no clue what SQL is!</span></b><br /><br />For any change to have effect, you need to restart the server."
                                 "<br />If you change the settings without knowledge of what you are doing, you'll probably end up without any users stored anymore.<br/><br/>SQLite is the "
                                 "only system fully supported by default. PostGreSQL needs an external installation, and you then just have to put the .dlls in that are located in PostGreSQL's bin folder in the server folder. "
                                 "MySQL needs the user to get the right DLLs, the MySQL driver and to install a MySQL database too (it is advised to be on linux to do this as this is far less complicated)."));
    desc->setWordWrap(true);
    v->addWidget(desc);

    QLabel *desc2 = new QLabel(tr("If you have a player database from before BW 2, you may want to export it, delete the database file, and rerun the server. That way it's converted and players "
                                  "from that time will have their last login properly stored, which enables the functionality to delete old alts to work fine."));
    desc2->setWordWrap(true);
    v->addWidget(desc2);

    QSettings s("config", QSettings::IniFormat);

    b = new QComboBox();
    b->addItem("SQLite");
    b->addItem("PostGreSQL");
    b->addItem("MySQL");
    v->addLayout(new QSideBySide(new QLabel(tr("SQL Database type: ")), b));
    if (s.value("SQL/Driver").toInt() == SQLCreator::PostGreSQL) {
        b->setCurrentIndex(1);
    } else if (s.value("SQL/Driver").toInt() == SQLCreator::MySQL) {
        b->setCurrentIndex(2);
    }

    name = new QLineEdit();
    name->setText(s.value("SQL/Database").toString());
    v->addLayout(new QSideBySide(new QLabel(tr("Database name: ")), name));
    
    schema = new QLineEdit();
    schema->setText(s.value("SQL/DatabaseSchema", "").toString());
    v->addLayout(new QSideBySide(new QLabel(tr("Schema: ")), schema));

    user = new QLineEdit();
    user->setText(s.value("SQL/User").toString());
    v->addLayout(new QSideBySide(new QLabel(tr("User: "******"SQL/Pass").toString());
    v->addLayout(new QSideBySide(new QLabel(tr("Password: "******"SQL/Host").toString());
    v->addLayout(new QSideBySide(new QLabel(tr("Host: ")), host));

    port = new QSpinBox();
    port->setRange(0, 65535);
    port->setValue(s.value("SQL/Port").toInt());
    v->addLayout(new QSideBySide(new QLabel(tr("Port: ")), port));

    doVacuum = new QCheckBox("Do VACUUM on start if possible (recommended).");
    doVacuum->setChecked(s.value("SQL/VacuumOnStartup", true).toBool());
    v->addWidget(doVacuum);

    QPushButton *exporting = new QPushButton(tr("&Export"));
    connect(exporting, SIGNAL(clicked()), SLOT(exportDatabase()));

    QPushButton *apply = new QPushButton(tr("&Apply"));
    connect(apply, SIGNAL(clicked()), this, SLOT(apply()));

    v->addLayout(new QSideBySide(exporting, apply));

    connect(b, SIGNAL(activated(int)), SLOT(changeEnabled()));
    changeEnabled();
}
void CPJoyToAckermannPlugin::stop()
{
    emit changeEnabled(false);
    nodelet_priv->stop();
    settings->setValue(uuid.toString() + "/Active", false);
}