Exemplo n.º 1
0
void ConfigTabTwo::loadConfigData(ConfigData data)
{
    this->changeCount = data.procent;
    this->iterationCount = data.iteration;

    cancelChanges();
}
Exemplo n.º 2
0
void ConfigTabFour::loadConfigData(ConfigData data)
{
    for(int i = 0; i < figureCount; i++)
        this->figures[i] = data.figures[i];

    cancelChanges();
}
Exemplo n.º 3
0
MetadataDialog::MetadataDialog(UAVObject::Metadata mdata, QWidget *parent) :
    QDialog(parent),
    resetDefaults_flag(false),
    saveMetadata_flag(false)
{
    m_mdata = &mdata;

    metadata_editor.setupUi(this);

    // In case GCS is not in expert mode, hide the apply button
    ExtensionSystem::PluginManager *pm=ExtensionSystem::PluginManager::instance();
    Core::Internal::GeneralSettings *settings=pm->getObject<Core::Internal::GeneralSettings>();
    if(!settings->useExpertMode())
        metadata_editor.bnApplyMetadata->setVisible(false);

    // Set comboboxes
    metadata_editor.cmbFlightTelemetryMode->addItem("Periodic", UAVObject::UPDATEMODE_PERIODIC);
    metadata_editor.cmbFlightTelemetryMode->addItem("Throttled", UAVObject::UPDATEMODE_THROTTLED);
    metadata_editor.cmbFlightTelemetryMode->addItem("On Change", UAVObject::UPDATEMODE_ONCHANGE);
    metadata_editor.cmbFlightTelemetryMode->addItem("Manual", UAVObject::UPDATEMODE_MANUAL);

    metadata_editor.cmbGCSTelemetryMode->addItem("Periodic", UAVObject::UPDATEMODE_PERIODIC);
    metadata_editor.cmbGCSTelemetryMode->addItem("Throttled", UAVObject::UPDATEMODE_THROTTLED);
    metadata_editor.cmbGCSTelemetryMode->addItem("On Change", UAVObject::UPDATEMODE_ONCHANGE);
    metadata_editor.cmbGCSTelemetryMode->addItem("Manual", UAVObject::UPDATEMODE_MANUAL);

    // Connect the before setting any signals
    connect(metadata_editor.bnApplyMetadata, SIGNAL(clicked()), this, SLOT(saveApplyMetadata()));
    connect(metadata_editor.bnSaveMetadata, SIGNAL(clicked()), this, SLOT(saveApplyMetadata()));
    connect(metadata_editor.bnCancel, SIGNAL(clicked()), this, SLOT(cancelChanges()));
    connect(metadata_editor.bnResetToDefaults, SIGNAL(clicked()), this, SLOT(resetMetadataToDefaults()));

    // Fill buttons and check boxes
    fillWidgets();
}
Exemplo n.º 4
0
void PlaylistComponent::applyChanges()
{
    if (noChanges())
        cancelChanges(true);
    else
        applyChangesChanged();
}
Exemplo n.º 5
0
bool MoveTool::switchingLayer()
{
    if (!transformHasBeenModified())
    {
        mScribbleArea->deselectAll();
        return true;
    }

    int returnValue = showTransformWarning();

    if (returnValue == QMessageBox::Yes)
    {
        if (mCurrentLayer->type() == Layer::BITMAP)
        {
            applySelectionChanges();
        }
        else if (mCurrentLayer->type() == Layer::VECTOR)
        {
            applyTransformation();
        }

        mScribbleArea->deselectAll();
        return true;
    }
    else if (returnValue == QMessageBox::No)
    {
        cancelChanges();
        return true;
    }
    else if (returnValue == QMessageBox::Cancel)
    {
        return false;
    }
    return true;
}
Exemplo n.º 6
0
long
GNEVariableSpeedSignDialog::onCmdCancel(FXObject*, FXSelector, void*) {
    // cancel changes
    cancelChanges();
    // Stop Modal
    getApp()->stopModal(this, FALSE);
    return 1;
}
Exemplo n.º 7
0
bool PlaylistComponent::applyChangesChanged()
{
    bool cancelled;
    saveTemporaryTree(& cancelled);
    if (cancelled)
        return false;
    itemTree_ = std::move(* temporaryTree_);
    cancelChanges(false);
    return true;
}
Exemplo n.º 8
0
void PlaylistComponent::onEditModeStateChanged()
{
    if (treeWidget_.editMode()) {
        if (noChanges())
            cancelChanges(true);
        else {
            if (! leaveAskChangedEditMode())
                actions_.playlist.editMode->setChecked(true);
        }
    }
    else
        enterEditMode();
}
Exemplo n.º 9
0
bool PlaylistComponent::leaveAskUnchangedEditMode()
{
    const auto selectedButton =
        inputController_.showMessage(
            editModeTitle(), tr("Cancel editing?"),
            QMessageBox::Yes | QMessageBox::No, QMessageBox::No,
            QMessageBox::Question);

    if (selectedButton == QMessageBox::Yes) {
        cancelChanges(true);
        return true;
    }
    return false;
}
Exemplo n.º 10
0
PreferencesPanel::PreferencesPanel(boost::shared_ptr<Settings> settings,
                                   Gui *parent)
    : QWidget(parent)
    , _gui(parent)
    , _settings(settings)
    , _changedKnobs()
    , _closeIsOK(false)
{
    setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);

    setWindowFlags(Qt::Window);
    setWindowTitle( tr("Preferences") );
    _mainLayout = new QVBoxLayout(this);
    _mainLayout->setContentsMargins(0, 0, 0, 0);
    _mainLayout->setSpacing(0);

    _panel = new DockablePanel(_gui, _settings.get(), _mainLayout, DockablePanel::eHeaderModeNoHeader, true, boost::shared_ptr<QUndoStack>(), QString(), QString(), false, QString(), this);
    _panel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
    _mainLayout->addWidget(_panel);

    _buttonBox = new QDialogButtonBox(Qt::Horizontal);
    _restoreDefaultsB = new Button( tr("Restore defaults") );
    _restoreDefaultsB->setToolTip( GuiUtils::convertFromPlainText(tr("Restore default values for all preferences."), Qt::WhiteSpaceNormal) );

    _prefsHelp = new Button( tr("Help") );
    _prefsHelp->setToolTip( tr("Show help for preference") );

    _cancelB = new Button( tr("Discard") );
    _cancelB->setToolTip( GuiUtils::convertFromPlainText(tr("Cancel changes that were not saved and close the window."), Qt::WhiteSpaceNormal) );
    _okB = new Button( tr("Save") );
    _okB->setToolTip( GuiUtils::convertFromPlainText(tr("Save changes on disk and close the window."), Qt::WhiteSpaceNormal) );
    _buttonBox->addButton(_restoreDefaultsB, QDialogButtonBox::ResetRole);
    _buttonBox->addButton(_prefsHelp, QDialogButtonBox::ResetRole);
    _buttonBox->addButton(_cancelB, QDialogButtonBox::RejectRole);
    _buttonBox->addButton(_okB, QDialogButtonBox::AcceptRole);

    // _mainLayout->addStretch();
    _mainLayout->addWidget(_buttonBox);

    QObject::connect( _restoreDefaultsB, SIGNAL(clicked()), this, SLOT(restoreDefaults()) );
    QObject::connect( _prefsHelp, SIGNAL(clicked()), this, SLOT(openHelp()) );
    QObject::connect( _buttonBox, SIGNAL(rejected()), this, SLOT(cancelChanges()) );
    QObject::connect( _buttonBox, SIGNAL(accepted()), this, SLOT(saveChangesAndClose()) );
    QObject::connect( _settings.get(), SIGNAL(settingChanged(KnobI*)), this, SLOT(onSettingChanged(KnobI*)) );

    _panel->initializeKnobs();

    resize( TO_DPIX(900), TO_DPIY(600) );
}
Exemplo n.º 11
0
void WorldTime::slotNewTzCancelled()
{
    QString currTz;
    if(isEditMode) {
        int selButton = findCurrentButton();
        currTz = strCityTz[selButton];
        frmMap->setZone( QTimeZone( currTz.toLocal8Bit() ) );
        slotNewTz( QTimeZone( currTz.toLocal8Bit() ) );
        if( listCities.at(selButton)->isChecked())
            listCities.at(selButton)->setChecked( false);

    }

    cancelChanges();
    readInTimes();
}
Exemplo n.º 12
0
bool PlaylistComponent::leaveAskChangedEditMode()
{
    const auto selectedButton =
        inputController_.showMessage(
            editModeTitle(), tr("Save changes to playlist?"),
            QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel,
            QMessageBox::Cancel, QMessageBox::Question);

    switch (selectedButton) {
        case QMessageBox::Yes:
            return applyChangesChanged();
        case QMessageBox::No:
            cancelChanges(false);
            return true;
        default:
            return false;
    }
}
Exemplo n.º 13
0
/** Binds events (signals) to actions (slots). */
void
MessageLog::createActions()
{
  connect(ui.actionSave_Selected, SIGNAL(triggered()),
          this, SLOT(saveSelected()));

  connect(ui.actionSave_All, SIGNAL(triggered()),
          this, SLOT(saveAll()));

  connect(ui.actionSelect_All, SIGNAL(triggered()),
          this, SLOT(selectAll()));

  connect(ui.actionCopy, SIGNAL(triggered()),
          this, SLOT(copy()));

  connect(ui.actionFind, SIGNAL(triggered()),
          this, SLOT(find()));

  connect(ui.actionClear, SIGNAL(triggered()),
          this, SLOT(clear()));

  connect(ui.actionHelp, SIGNAL(triggered()),
          this, SLOT(help()));

  connect(ui.btnSaveSettings, SIGNAL(clicked()),
          this, SLOT(saveSettings()));

  connect(ui.btnCancelSettings, SIGNAL(clicked()),
          this, SLOT(cancelChanges()));

  connect(ui.btnBrowse, SIGNAL(clicked()),
          this, SLOT(browse()));

#if defined(Q_WS_MAC)
  ui.actionHelp->setShortcut(QString("Ctrl+?"));
#endif
  ui.actionClose->setShortcut(QString("Esc"));
  Vidalia::createShortcut("Ctrl+W", this, ui.actionClose, SLOT(trigger()));
}
Exemplo n.º 14
0
/**
 * @brief Constructeur de la classe UVEditeur qui ouvre une fenêtre avec les différentes caractéristiques de l'UV à éditer.
 * @param uvToEdit L'UV à modifier.
 * @param parent Un pointeur sur la fenêtre principale.
 */
UVEditeur::UVEditeur(UV& uvToEdit, QMainWindow* parent):uv(uvToEdit){

    codeLabel= new QLabel("Code",this);
    titreLabel= new QLabel("Titre", this);
    creditsLabel= new QLabel("Crédits",this);
    creditsCSLabel= new QLabel("CS",this);
    creditsTMLabel= new QLabel("TM",this);
    creditsTSHLabel= new QLabel("TSH",this);
    creditsSPLabel= new QLabel("SP",this);
    ouvertureLabel= new QLabel("Ouverture",this);
    //brancheLabel= new QLabel("Branche",this);



    creditsCS= new QSpinBox(this);
    creditsCS->setRange(0,8);


    creditsTM= new QSpinBox(this);
    creditsTM->setRange(0,8);


    creditsTSH= new QSpinBox(this);
    creditsTSH->setRange(0,8);


    creditsSP= new QSpinBox(this);
    creditsSP->setRange(0,8);


    automne = new QCheckBox("Automne",this);


    printemps = new QCheckBox("Printemps",this);


    save = new QPushButton("Sauvegarder",this);
    save->setEnabled(false); //desactive le bouton

    code = new QLineEdit(uv.getCode(),this);
    titre = new QTextEdit(uv.getTitre(),this);
    //branche = new QLineEdit(uv.getBranche(),this);
    parent->setWindowTitle(QString("Edition de l'UV ")+uv.getCode());
    creditsCS->setValue(uv.getNbCreditsCS());
    creditsTM->setValue(uv.getNbCreditsTM());
    creditsTSH->setValue(uv.getNbCreditsTSH());
    creditsSP->setValue(uv.getNbCreditsTSH());
    automne->setChecked(uv.ouvertureAutomne());
    printemps->setChecked(uv.ouverturePrintemps());

    QObject::connect(save, SIGNAL(clicked()), this, SLOT(sauverUV()));

    QObject::connect(code, SIGNAL(textChanged(QString)),this,SLOT(activSave(/*QString*/)));
    QObject::connect(titre, SIGNAL(textChanged(/*QString*/)),this,SLOT(activSave(/*QString*/)));
    //QObject::connect(branche, SIGNAL(textChanged(QString)),this,SLOT(activSave(/*QString*/)));
    QObject::connect(creditsSP, SIGNAL(valueChanged(QString)),this,SLOT(activSave(/*QString*/)));
    QObject::connect(creditsTSH, SIGNAL(valueChanged(QString)),this,SLOT(activSave(/*QString*/)));
    QObject::connect(creditsTM, SIGNAL(valueChanged(QString)),this,SLOT(activSave(/*QString*/)));
    QObject::connect(creditsCS, SIGNAL(valueChanged(QString)),this,SLOT(activSave(/*QString*/)));
    QObject::connect(automne, SIGNAL(stateChanged(/*QString*/int)),this,SLOT(activSave(/*QString*/)));
    QObject::connect(printemps, SIGNAL(stateChanged(/*QString*/int)),this,SLOT(activSave(/*QString*/)));





    cancel=new QPushButton("Annuler",this);
    QObject::connect(cancel, SIGNAL(clicked()), this, SLOT(cancelChanges()));

    coucheH1 = new QHBoxLayout;
    coucheH2 = new QHBoxLayout;
    coucheH3 = new QHBoxLayout;
    coucheH4 = new QHBoxLayout;
    couche = new QVBoxLayout;


    coucheH1->addWidget(codeLabel);
    coucheH1->addWidget(code);
    coucheH1->addWidget(creditsLabel);
    coucheH1->addWidget(creditsCSLabel);
    coucheH1->addWidget(creditsCS);
    coucheH1->addWidget(creditsTMLabel);
    coucheH1->addWidget(creditsTM);
    coucheH1->addWidget(creditsTSHLabel);
    coucheH1->addWidget(creditsTSH);
    coucheH1->addWidget(creditsSPLabel);
    coucheH1->addWidget(creditsSP);

    coucheH2->addWidget(titreLabel);
    coucheH2->addWidget(titre);

    coucheH3->addWidget(ouvertureLabel);
    coucheH3->addWidget(automne);
    coucheH3->addWidget(printemps);

    coucheH4->addWidget(cancel);
    coucheH4->addWidget(save);


    couche->addLayout(coucheH1);
    couche->addLayout(coucheH2);
    couche->addLayout(coucheH3);
    couche->addLayout(coucheH4);

    this->setLayout(couche);
    parent->setCentralWidget(this);
}
/**
 * @brief Constructeur de la classe FormationCreateur qui permet de créer et ajouter une Formation aux formations déjà existantes.
 * @param parent Pointeur vers la fenêtre principale.
 */
FormationCreateur::FormationCreateur(QMainWindow *parent){

    codeLabel= new QLabel("code",this);
    titreLabel= new QLabel("titre", this);
    creditsCSLabel= new QLabel("CS",this);
    creditsTMLabel= new QLabel("TM",this);
    creditsTSHLabel= new QLabel("TSH",this);
    creditsSPLabel= new QLabel("SP",this);

    code = new QLineEdit(this);
    titre = new QTextEdit(this);
    CS = new QSpinBox(this);
    TM = new QSpinBox(this);
    TSH = new QSpinBox(this);
    SP = new QSpinBox(this);
    CS->setRange(0,50);
    TM->setRange(0,50);
    TSH->setRange(0,50);
    SP->setRange(0,50);

    QObject::connect(code, SIGNAL(textChanged(QString)),this,SLOT(activSave(QString)));
    QObject::connect(titre, SIGNAL(textEdited(QString)),this,SLOT(activSave(QString)));
    QObject::connect(SP, SIGNAL(valueChanged(QString)),this,SLOT(activSave(QString)));
    QObject::connect(TSH, SIGNAL(valueChanged(QString)),this,SLOT(activSave(QString)));
    QObject::connect(CS, SIGNAL(valueChanged(QString)),this,SLOT(activSave(QString)));
    QObject::connect(TM, SIGNAL(valueChanged(QString)),this,SLOT(activSave(QString)));

    cancel=new QPushButton("Annuler",this);
    QObject::connect(cancel, SIGNAL(clicked()), this, SLOT(cancelChanges()));

    save = new QPushButton("sauver",this);
    save->setEnabled(false); //desactive le bouton
    QObject::connect(save, SIGNAL(clicked()), this, SLOT(sauverFormation()));

    coucheH1= new QHBoxLayout;
    coucheH2= new QHBoxLayout;
    coucheH4 = new QHBoxLayout;
    couche = new QVBoxLayout;

    coucheH1->addWidget(codeLabel);
    coucheH1->addWidget(code);
    coucheH1->addWidget(creditsCSLabel);
    coucheH1->addWidget(CS);
    coucheH1->addWidget(creditsTMLabel);
    coucheH1->addWidget(TM);
    coucheH1->addWidget(creditsTSHLabel);
    coucheH1->addWidget(TSH);
    coucheH1->addWidget(creditsSPLabel);
    coucheH1->addWidget(SP);

    coucheH2->addWidget(titreLabel);
    coucheH2->addWidget(titre);

    coucheH4->addWidget(cancel);
    coucheH4->addWidget(save);

    couche->addLayout(coucheH1);
    couche->addLayout(coucheH2);
    couche->addLayout(coucheH4);

    this->setLayout(couche);
    parent->setCentralWidget(this);
}
Exemplo n.º 16
0
/** Binds events to actions. */
void
BandwidthGraph::createActions()
{
  connect(ui.btnToggleSettings, SIGNAL(toggled(bool)),
      this, SLOT(showSettingsFrame(bool)));

  connect(ui.btnReset, SIGNAL(clicked()),
      this, SLOT(reset()));

  connect(ui.btnSaveSettings, SIGNAL(clicked()),
      this, SLOT(saveChanges()));

  connect(ui.btnCancelSettings, SIGNAL(clicked()),
      this, SLOT(cancelChanges()));
  
  connect(ui.sldrOpacity, SIGNAL(valueChanged(int)),
      this, SLOT(setOpacity(int)));
}

/** Adds new data to the graph. */
void
BandwidthGraph::updateGraph(qreal bytesRead, qreal bytesWritten)
{
  /* Graph only cares about kilobytes */
  ui.frmGraph->addPoints(bytesRead/*/1024.0*/, bytesWritten/*/1024.0*/);
}

/** Loads the saved Bandwidth Graph settings. */
void
/**
 * @brief Constructeur de la classe objet FormationEditeur, avec définition des différents éléments permettant l'édition des formations.
 * @param FormationToEdit La formation à éditer.
 * @param parent Fentêtre principale.
 */
FormationEditeur::FormationEditeur(Formation& FormationToEdit,QMainWindow *parent):fo(FormationToEdit){

    codeLabel= new QLabel("code",this);
    titreLabel= new QLabel("titre", this);
    creditsCSLabel= new QLabel("CS",this);
    creditsTMLabel= new QLabel("TM",this);
    creditsTSHLabel= new QLabel("TSH",this);
    creditsSPLabel= new QLabel("SP",this);

    code = new QLineEdit(fo.getCode(),this);
    titre = new QTextEdit(fo.getTitre(),this);
    CS = new QSpinBox(this);
    TM = new QSpinBox(this);
    TSH = new QSpinBox(this);
    SP = new QSpinBox(this);
    CS->setRange(0,50);
    TM->setRange(0,50);
    TSH->setRange(0,50);
    SP->setRange(0,50);

    CS->setValue(fo.getCS());
    TM->setValue(fo.getTM());
    TSH->setValue(fo.getTSH());
    SP->setValue(fo.getSP());

    addUV=new QPushButton("Ajouter une UV",this);
    deleteUV=new QPushButton("Supprimer une UV",this);
    addUVCons= new QPushButton("Ajouter UV conseillée");
    deleteUVCons= new QPushButton("Supprimer UV conseillée");
    addFiliere=new QPushButton("Ajouter une Filiere",this);
    deleteFiliere=new QPushButton("Supprimer une Filiere",this);

    QObject::connect(addUV,SIGNAL(clicked()),this,SLOT(ajouterUV()));
    QObject::connect(deleteUV,SIGNAL(clicked()),this,SLOT(supprimerUV()));
    QObject::connect(addUVCons,SIGNAL(clicked()),this,SLOT(ajouterUVCons()));
    QObject::connect(deleteUVCons,SIGNAL(clicked()),this,SLOT(supprimerUVCons()));
    QObject::connect(addFiliere,SIGNAL(clicked()),this,SLOT(ajouterFiliere()));
    QObject::connect(deleteFiliere,SIGNAL(clicked()),this,SLOT(supprimerFiliere()));

    QObject::connect(code, SIGNAL(textChanged(QString)),this,SLOT(activSave(QString)));
    QObject::connect(titre, SIGNAL(textEdited()),this,SLOT(activSave()));
    QObject::connect(SP, SIGNAL(valueChanged(QString)),this,SLOT(activSave(QString)));
    QObject::connect(TSH, SIGNAL(valueChanged(QString)),this,SLOT(activSave(QString)));
    QObject::connect(CS, SIGNAL(valueChanged(QString)),this,SLOT(activSave(QString)));
    QObject::connect(TM, SIGNAL(valueChanged(QString)),this,SLOT(activSave(QString)));
    QObject::connect(addUV, SIGNAL(clicked()),this,SLOT(activSave()));
    QObject::connect(addFiliere, SIGNAL(clicked()),this,SLOT(activSave()));
    QObject::connect(deleteUV, SIGNAL(clicked()),this,SLOT(activSave()));
    QObject::connect(deleteFiliere, SIGNAL(clicked()),this,SLOT(activSave()));

    cancel=new QPushButton("Annuler",this);
    QObject::connect(cancel, SIGNAL(clicked()), this, SLOT(cancelChanges()));

    save = new QPushButton("sauver",this);
    save->setEnabled(false); //desactive le bouton
    QObject::connect(save, SIGNAL(clicked()), this, SLOT(sauverFormation()));

    coucheH1= new QHBoxLayout;
    coucheH2= new QHBoxLayout;
    coucheH3= new QHBoxLayout;
    coucheH4 = new QHBoxLayout;
    coucheH5= new QHBoxLayout;
    couche = new QVBoxLayout;

    coucheH1->addWidget(codeLabel);
    coucheH1->addWidget(code);
    coucheH1->addWidget(creditsCSLabel);
    coucheH1->addWidget(CS);
    coucheH1->addWidget(creditsTMLabel);
    coucheH1->addWidget(TM);
    coucheH1->addWidget(creditsTSHLabel);
    coucheH1->addWidget(TSH);
    coucheH1->addWidget(creditsSPLabel);
    coucheH1->addWidget(SP);

    coucheH2->addWidget(titreLabel);
    coucheH2->addWidget(titre);

    coucheH4->addWidget(addFiliere);
    coucheH4->addWidget(deleteFiliere);
    coucheH3->addWidget(addUV);
    coucheH3->addWidget(deleteUV);
    coucheH3->addWidget(addUVCons);
    coucheH3->addWidget(deleteUVCons);

    coucheH5->addWidget(cancel);
    coucheH5->addWidget(save);

    couche->addLayout(coucheH1);
    couche->addLayout(coucheH2);
    couche->addLayout(coucheH3);
    couche->addLayout(coucheH4);
    couche->addLayout(coucheH5);

    this->setLayout(couche);
    parent->setCentralWidget(this);
}
Exemplo n.º 18
0
void PlaylistComponent::cancelChanges()
{
    cancelChanges(noChanges());
}
Exemplo n.º 19
0
editSimulators::editSimulators(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::editSimulators)
{

    edited = false;

    ui->setupUi(this);

    ui->buttonBox->setFocusPolicy(Qt::NoFocus);

    connect(ui->addEnv, SIGNAL(clicked()), this, SLOT(addEnvVar()));

    // load existing simulators:
    QSettings settings;

    settings.beginGroup("simulators");
    QStringList sims = settings.childGroups();
    for (int i = 0; i < sims.size(); ++i) {
        this->ui->comboBox->addItem(sims[i]);
        if (i == 0) selectSimulator(sims[0]);
    }
    settings.endGroup();

    ((QHBoxLayout *) ui->scrollAreaWidgetContents->layout())->removeWidget(ui->addEnv);
    ((QHBoxLayout *) ui->scrollAreaWidgetContents->layout())->addWidget(ui->addEnv);

    // connect up comboBox
    connect(ui->comboBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(selectSimulator(QString)));
    // connect up buttons
    connect(this->ui->findFile, SIGNAL(clicked()), this, SLOT(getScript()));
    connect(this->ui->addSim, SIGNAL(clicked()), this, SLOT(getNewSimName()));

    // accept
    connect(ui->buttonBox->button(QDialogButtonBox::Apply), SIGNAL(clicked()), this, SLOT(applyChanges()));

    // cancel
    connect(ui->buttonBox->button(QDialogButtonBox::Reset), SIGNAL(clicked()), this, SLOT(cancelChanges()));

    //close
    connect(ui->buttonBox_2->button(QDialogButtonBox::Close), SIGNAL(clicked()), this, SLOT(close()));

    // change path
    connect(ui->scriptLineEdit, SIGNAL(editingFinished()), this, SLOT(changeScript()));

    // change if we save large connections as binary data
    bool writeBinary = settings.value("fileOptions/saveBinaryConnections", "error").toBool();
    ui->save_as_binary->setChecked(writeBinary);
    connect(ui->save_as_binary, SIGNAL(toggled(bool)), this, SLOT(saveAsBinaryToggled(bool)));

    // change level of detail box
    int lod = settings.value("glOptions/detail", 5).toInt();
    ui->openGLDetailSpinBox->setValue(lod);
    connect(ui->openGLDetailSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setGLDetailLevel(int)));

    // TESTING:
    //connect(ui->test, SIGNAL(clicked()), this, SLOT(testFunc()));

    redrawEnvVars();
}