Example #1
0
void BlockBase::cancel()
{    SettingsLock* lock= new SettingsLock;

    //Step thru old values and copy them to right places
    QHash<int*, int>::iterator i = originalInt.begin();
    while (i != originalInt.end()) {
        *i.key() = i.value();
        ++i;
    }
    QHash<double*, double>::iterator j = originalDouble.begin();
    while (j != originalDouble.end()) {
        *j.key() = j.value();
        ++j;
    }
    QHash<char*, QString>::iterator k = originalString.begin();
    while (k != originalString.end()) {
        strcpy(k.key(),k.value().toStdString().c_str());
        ++k;
    }

    QHash<Matrix*, Matrix>::iterator l = originalMatrix.begin();
    while (l != originalMatrix.end()) {
        *l.key() = l.value();
        ++l;
    }

    delete lock;
    pressedOk();
}
Example #2
0
PlayerSettings::PlayerSettings() {
	ui.setupUi( this );

	m_iDelay = ui.delaySpinBox->value();

	connect( ui.okButton, SIGNAL( clicked() ), this, SLOT( pressedOk() ) );
	connect( ui.cancelButton, SIGNAL( clicked() ), this, SLOT( pressedCancel() ) );
}
Example #3
0
ReminderSettings::ReminderSettings() {
	ui.setupUi( this );

	// it can't be on initialization list, because the ui.setupUi creates the controls
	m_bIsOn = ui.signalCheck->isChecked();
	m_fTimeEarlier = ui.signalSpinBox->value();
	m_bIsSoundOn = ui.soundCheck->isChecked();
	m_strSoundPath = ui.soundPathEdit->text();

	connect( ui.okButton, SIGNAL( clicked() ), this, SLOT( pressedOk() ) );
	connect( ui.cancelButton, SIGNAL( clicked() ), this, SLOT( pressedCancel() ) );
	connect( ui.browseSoundButton, SIGNAL( clicked() ), this, SLOT( browseSound() ) );
	connect( ui.playSoundButton, SIGNAL( clicked() ), this, SLOT( playSound() ) );
	connect( ui.stopSoundButton, SIGNAL( clicked() ), this, SLOT( stopSound() ) );
	connect( ui.soundCheck, SIGNAL( clicked() ), this, SLOT( soundChecked() ) );
	connect( ui.signalCheck, SIGNAL( clicked() ), this, SLOT( signalUnchecked() ) );

	m_sound = new Phonon::MediaObject( this );
}
Example #4
0
BlockBase::BlockBase(QWidget *parent, const QString& execName, const QString& name) :
    QMainWindow(parent),d_execName(execName),d_name(name),d_entryNum(0)
{
    QWidget *holder = new QWidget(this);

    d_verticalLayout = new QVBoxLayout();
    holder->setLayout(d_verticalLayout);


    d_descriptionGroup = new QGroupBox(this);
    d_descriptionLayout = new QVBoxLayout();
    d_descriptionGroup->setLayout(d_descriptionLayout);
    //setDescription()

    d_settingsGroup = new QGroupBox("Settings",this);

    d_settingsLayout = new QGridLayout();
    d_settingsGroup->setLayout(d_settingsLayout);
    //setSettings();

    d_verticalLayout->addWidget(d_descriptionGroup);
    d_verticalLayout->addWidget(d_settingsGroup);

    QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok
                                     | QDialogButtonBox::Cancel | QDialogButtonBox::Apply);
    connect(buttonBox, SIGNAL(clicked(QAbstractButton*)),
            this, SLOT(pressedApply(QAbstractButton*)) );
    connect(buttonBox, SIGNAL(accepted()),
            this, SLOT(pressedOk()));
    connect(buttonBox, SIGNAL(rejected()),
            this, SLOT(cancel()));

    d_verticalLayout->addWidget(buttonBox);

    setCentralWidget(holder);

    setFocusPolicy(Qt::TabFocus);

}