PreferencesDialog::PreferencesDialog(QWidget *parent, PreferencesModel *preferences, const SysinfoModel *sysinfo)
:
	QDialog(parent),
	m_sysinfo(sysinfo),
	ui(new Ui::PreferencesDialog())
{
	ui->setupUi(this);
	setWindowFlags(windowFlags() & (~Qt::WindowContextHelpButtonHint));
	setFixedSize(minimumSize());
	MUtils::GUI::enable_close_button(this, false);
	
	ui->comboBoxPriority->setItemData(0, QVariant::fromValue( 1)); //Above Normal
	ui->comboBoxPriority->setItemData(1, QVariant::fromValue( 0)); //Normal
	ui->comboBoxPriority->setItemData(2, QVariant::fromValue(-1)); //Below Normal
	ui->comboBoxPriority->setItemData(3, QVariant::fromValue(-2)); //Idle

	ui->labelRunNextJob        ->installEventFilter(this);
	ui->labelUse64BitAvs2YUV   ->installEventFilter(this);
	ui->labelSaveLogFiles      ->installEventFilter(this);
	ui->labelSaveToSourceFolder->installEventFilter(this);
	ui->labelEnableSounds      ->installEventFilter(this);
	ui->labelDisableWarnings   ->installEventFilter(this);
	ui->labelNoUpdateReminder  ->installEventFilter(this);
	ui->labelSaveQueueNoConfirm->installEventFilter(this);

	ui->checkBoxDummy1->installEventFilter(this);
	ui->checkBoxDummy2->installEventFilter(this);

	connect(ui->resetButton, SIGNAL(clicked()), this, SLOT(resetButtonPressed()));
	connect(ui->checkDisableWarnings, SIGNAL(toggled(bool)), this, SLOT(disableWarningsToggled(bool)));
	
	m_preferences = preferences;
}
예제 #2
0
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    connect(ui->buttonReset,SIGNAL(clicked()),this,SLOT(resetButtonPressed()));
    connect(ui->buttonRun,SIGNAL(clicked()),this,SLOT(runButtonPressed()));
    ui->tabMain->setCurrentIndex(0);
}
예제 #3
0
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    connect(ui->buttonReset,SIGNAL(clicked()),this,SLOT(resetButtonPressed()));
    connect(ui->buttonRun,SIGNAL(clicked()),this,SLOT(runButtonPressed()));
    connect(this, SIGNAL(completed()), this, SLOT(runButtonPressed()), Qt::ConnectionType(Qt::QueuedConnection | Qt::UniqueConnection));
}
예제 #4
0
//--------------------------------------------------------------
void ofApp::keyPressed(int key){
    if (key == 'h') {
        isMenuHidden = !isMenuHidden;
        return;
    }
    
    if (key == 'r') {
        resetButtonPressed();
        return;
    }
    
    if (key == 'p' || key == ' ') {
        paused = !paused;
    }
    
    if (key == 'q') {
        ofExit();
    }
}
예제 #5
0
void MainWindow::createActions() {

    _openiTunesAction = new QAction(QIcon(":/images/iTunes.png"),
                                    tr("Open i&Tunes Library..."), this);
    _openiTunesAction->setShortcut(tr("Ctrl+T"));
    _openiTunesAction->setStatusTip(tr("Open iTunes Library file"));
    connect(_openiTunesAction, SIGNAL(triggered()), this, SLOT(openiTunesLibrary()));

    _openCollectionAction = new QAction(QIcon(":/images/openCollection.png"),
                                        tr("Open Collection File"), this);
    _openCollectionAction->setShortcut(tr("Ctrl+T"));
    _openCollectionAction->setStatusTip(tr("Open Collection file"));
    connect(_openCollectionAction, SIGNAL(triggered()), this, SLOT(openCollectionFile()));

    _exitAction = new QAction(tr("E&xit"), this);
    _exitAction->setShortcut(tr("Ctrl+Q"));
    connect(_exitAction, SIGNAL(triggered()), this, SLOT(close()));

    _coutAction = new QAction(tr("&Cout Library"), this);
    _coutAction->setShortcut(tr("Ctrl+E"));
    connect(_coutAction, SIGNAL(triggered()), this, SLOT(display()));

    _predictAction = new QAction(QIcon(":/images/predict.png"),
                                 tr("&Predict"), this);
    _predictAction->setShortcut(tr("Ctrl+3"));
    _predictAction->setStatusTip(tr("Predict the the placement of the prediction tracks"));
    connect(_predictAction, SIGNAL(triggered()), _display, SLOT(predict()));

    _extractAction = new QAction(QIcon(":/images/extract.png"),
                                 tr("&Extract"), this);
    _extractAction->setShortcut(tr("Ctrl+1"));
    _extractAction->setStatusTip(tr("Extract features from the defined training tracks"));
    connect(_extractAction, SIGNAL(triggered()), _display, SLOT(extract()));

    _trainingAction = new QAction(QIcon(":/images/train.png"),
                                  tr("&Train"), this);
    _trainingAction->setShortcut(tr("Ctrl+2"));
    _trainingAction->setStatusTip(tr("Train the grid using the defined training tracks"));
    connect(_trainingAction, SIGNAL(triggered()), _display, SLOT(train()));

    _initAction = new QAction(QIcon(":/images/init.png"), tr("&Initlize"), this);
    connect(_initAction, SIGNAL(triggered()), _display, SLOT(init()));

    _aboutAction = new QAction(tr("&About"), this);
    connect(_aboutAction, SIGNAL(triggered()), this, SLOT(about()));

    _saveGridAction = new QAction(tr("&Save Grid"), this);
    connect(_saveGridAction, SIGNAL(triggered()), this, SLOT(saveCurrentGrid()) );

    _loadGridAction = new QAction(tr("&Load Saved Grid"),this);
    connect(_loadGridAction, SIGNAL(triggered()), this, SLOT(openSavedGrid()));
    _playModeAction = new QAction(tr("&Continuous"), this);
    connect(_playModeAction, SIGNAL(triggered()), this, SLOT(changedPlayMode()));

    _cancelAction = new QAction(tr("&Cancel Action"), this);
    connect(_cancelAction, SIGNAL(triggered()), this, SLOT(cancelButton()));

    _normHashAction = new QAction(tr("Open Saved Hash"), this);
    connect(_normHashAction, SIGNAL(triggered()), _display, SLOT(hashLoad()));

    _fullScreenAction = new QAction (tr("&Full Screen Mouse Mode"), this);
    connect(_fullScreenAction, SIGNAL(triggered()), _display, SLOT(fullScreenMouse()));

    _colourMapMode = new QAction (tr("&Colour Mapping Mode"),this);
    connect(_colourMapMode, SIGNAL(triggered()), _display, SLOT(colourMapMode()));

    _resetButtonAction = new QAction (tr("&Reset"), this);
    connect (_resetButtonAction, SIGNAL(triggered()), this, SLOT(resetButtonPressed()));

    _optionsDialogAction = new QAction(tr("&Options"), this);
    connect(_optionsDialogAction, SIGNAL(triggered()), this, SLOT(optionsDialogTriggered()));
}