Ejemplo n.º 1
0
MacroDialog::MacroDialog(QWidget *parent) : QDialog(parent), ui(new Ui::MacroDialog) {
    ui->setupUi(this);

    macroSettings = MacroSettings::Instance();

    saveTime = false;

    this->loadSettings();
    this->loadSequenceTime();

    connect(ui->okButton, SIGNAL(clicked()), this, SLOT(okPressed()));
    connect(ui->cancelButton, SIGNAL(clicked()), this, SLOT(cancelPressed()));
    connect(ui->applyButton, SIGNAL(clicked()), this, SLOT(applyPressed()));

    connect(ui->altTable, SIGNAL(currentItemChanged(QTableWidgetItem*, QTableWidgetItem*)),
            this, SLOT(altCommandChanged(QTableWidgetItem*, QTableWidgetItem*)));
    connect(ui->ctrlTable, SIGNAL(currentItemChanged(QTableWidgetItem*, QTableWidgetItem*)),
            this, SLOT(ctrlCommandChanged(QTableWidgetItem*, QTableWidgetItem*)));
    connect(ui->functionTable, SIGNAL(currentItemChanged(QTableWidgetItem*, QTableWidgetItem*)),
            this, SLOT(functionCommandChanged(QTableWidgetItem*, QTableWidgetItem*)));
    connect(ui->keypadTable, SIGNAL(currentItemChanged(QTableWidgetItem*, QTableWidgetItem*)),
            this, SLOT(keypadCommandChanged(QTableWidgetItem*, QTableWidgetItem*)));
    connect(ui->sequenceTime, SIGNAL(textChanged(const QString&)),
            this, SLOT(sequenceTimeChanged(const QString&)));

    ui->altTable->setFocus();
}
Ejemplo n.º 2
0
EditGain::EditGain(QWidget* parent, int initGainValue)
: QDialog(parent)
{
	setupUi(this);
	sliderGain->setValue(sliderGain->maximum() - initGainValue);
	connect(buttonReset, SIGNAL(pressed()), this, SLOT(resetPressed()));
	connect(buttonApply, SIGNAL(pressed()), this, SLOT(applyPressed()));
	connect(buttonCancel, SIGNAL(pressed()), this, SLOT(cancelPressed()));
	connect(sliderGain, SIGNAL(valueChanged(int)), this, SLOT(gainChanged(int)));
	if (sliderGain->value() != 100)
		buttonReset->setEnabled(true);
}
Ejemplo n.º 3
0
void KTimerDialog::slotInternalTimeout()
{
    emit timerTimeout();
    switch(buttonOnTimeout)
    {
        case Help:
            slotHelp();
            break;
        case Default:
            slotDefault();
            break;
        case Ok:
            slotOk();
            break;
        case Apply:
            applyPressed();
            break;
        case Try:
            slotTry();
            break;
        case Cancel:
            slotCancel();
            break;
        case Close:
            slotClose();
            break;
        /*case User1:
            slotUser1();
            break;
        case User2:
            slotUser2();
            break;*/
        case User3:
            slotUser3();
            break;
        case No:
            slotNo();
            break;
        case Yes:
            slotCancel();
            break;
        case Details:
            slotDetails();
            break;
        case Filler:
        case Stretch:
            kdDebug() << "Cannot execute button code " << buttonOnTimeout << endl;
            break;
    }
}
Ejemplo n.º 4
0
HighlightDialog::HighlightDialog(QWidget *parent) : QDialog(parent), ui(new Ui::HighlightDialog) {
    ui->setupUi(this);

    mainWindow = (MainWindow*)qobject_cast<QObject *>(parent);
    settings = ClientSettings::Instance();

    generalTab = new HighlightGeneralTab(this);
    textTab = new HighlightTextTab(this);
    alertTab = new HighlightAlertTab(this);

    connect(ui->okButton, SIGNAL(clicked()), this, SLOT(okPressed()));
    connect(ui->cancelButton, SIGNAL(clicked()), this, SLOT(cancelPressed()));
    connect(ui->applyButton, SIGNAL(clicked()), this, SLOT(applyPressed()));
}
Ejemplo n.º 5
0
AppearanceDialog::AppearanceDialog(QWidget *parent) : QDialog(parent), ui(new Ui::AppearanceDialog) {
    ui->setupUi(this);

    mainWindow = (MainWindow*)parent;
    windowFacade = mainWindow->getWindowFacade();
    settings = new GeneralSettings();

    this->populateMainBox();
    this->populateDockBox();
    this->loadSettings();

    connect(ui->okButton, SIGNAL(clicked()), this, SLOT(okPressed()));
    connect(ui->applyButton, SIGNAL(clicked()), this, SLOT(applyPressed()));
    connect(ui->cancelButton, SIGNAL(clicked()), this, SLOT(cancelPressed()));
}
Ejemplo n.º 6
0
AppearanceDialog::AppearanceDialog(QWidget *parent) : QDialog(parent), ui(new Ui::AppearanceDialog) {
    ui->setupUi(this);

    mainWindow = (MainWindow*)parent;
    windowFacade = mainWindow->getWindowFacade();
    commandLine = mainWindow->getCommandLine();
    roundTimeDisplay = commandLine->getRoundtimeDisplay();

    settings = GeneralSettings::getInstance();

    this->populateMainBox();
    this->populateDockBox();
    this->populateCmdBox();
    this->loadSettings();

    connect(ui->okButton, SIGNAL(clicked()), this, SLOT(okPressed()));
    connect(ui->applyButton, SIGNAL(clicked()), this, SLOT(applyPressed()));
    connect(ui->cancelButton, SIGNAL(clicked()), this, SLOT(cancelPressed()));
}
Ejemplo n.º 7
0
int ColormapEdit::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QDialog::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: newColorList((*reinterpret_cast< QList<QColor>(*)>(_a[1]))); break;
        case 1: rotate((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 2: bias((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 3: contrast((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 4: setColor(); break;
        case 5: okPressed(); break;
        case 6: applyPressed(); break;
        case 7: biasReset(); break;
        case 8: rotateReset(); break;
        case 9: contrastRest(); break;
        case 10: updateColormap(); break;
        case 11: resetMap((*reinterpret_cast< int(*)>(_a[1]))); break;
        }
        _id -= 12;
    }
    return _id;
}