void RenderSettingsDialog::load(const SceneContext *ctx) { const Scene *scene = ctx->scene.get(); const Film *film = scene->getFilm(); const Properties &rFilterProps = film->getReconstructionFilter()->getProperties(); const Properties &samplerProps = scene->getSampler()->getProperties(); const Integrator *integrator = scene->getIntegrator(); Properties integratorProps = integrator->getProperties(); if (integratorProps.getPluginName() == "adaptive") { ui->aiBox->setChecked(true); m_model->setProperties(m_aiNode, integratorProps); integrator = integrator->getSubIntegrator(0); integratorProps = integrator->getProperties(); } if (integratorProps.getPluginName() == "irrcache") { ui->icBox->setChecked(true); m_model->setProperties(m_icNode, integratorProps); integrator = integrator->getSubIntegrator(0); integratorProps = integrator->getProperties(); } ui->resolutionBox->lineEdit()->setText(QString("%1x%2") .arg(film->getCropSize().x).arg(film->getCropSize().y)); m_originalResolution = ui->resolutionBox->lineEdit()->text(); setComboBox(ui->integratorBox, integratorProps.getPluginName()); setComboBox(ui->rFilterBox, rFilterProps.getPluginName()); setComboBox(ui->samplerBox, samplerProps.getPluginName()); update(); m_model->setProperties(m_rFilterNode, rFilterProps); m_model->setProperties(m_samplerNode, samplerProps); m_model->setProperties(m_integratorNode, integratorProps); /* Make comboboxes etc editable by default */ int row = 0; for (int i = 0; i < m_model->rowCount(); ++i) { QModelIndex index = m_model->index(i, 0); for (int j = 0; j < m_model->rowCount(index); ++j) { QModelIndex idx = m_model->index(j, 1, index); ui->treeView->openPersistentEditor(idx); QAbstractSpinBox *spinBox = qobject_cast<QAbstractSpinBox *>(ui->treeView->indexWidget(idx)); if (spinBox) { QLineEdit *edit = spinBox->findChild<QLineEdit*>(); if (row % 2 == 0) edit->setStyleSheet("background-color: palette(alternate-base);"); edit->deselect(); } row++; } } ui->treeView->expandAll(); }
void MainWindow::buttonSixPressed() { m_currentNote = 5; Note * note = m_sequencerController->getSequencer()->getNotes().at( 5 ); Oscillator * oscillator = note->getOscillator(); float frequency = oscillator->getFrequency(); float amplitude = note->getAmplitude(); blockSignals( true ); if( note->getWavetype() == FM ) { FmOscillator * fm = static_cast<FmOscillator *>( oscillator ); ui->harmonicitySpinner->setEnabled( true ); ui->modIndexSpinner->setEnabled( true ); ui->harmonicitySpinner->setValue( fm->getHarmonicity() ); ui->modIndexSpinner->setValue( fm->getModulationIndex() ); } else { ui->harmonicitySpinner->setEnabled( false ); ui->modIndexSpinner->setEnabled( false ); } ui->frequencySpinner->setValue( frequency ); ui->amplitudeSlider->setValue( amplitude * 100.0f ); ui->bpmBox->setValue( m_sequencerController->getBpm() ); setComboBox( note->getWavetype() ); blockSignals( false ); }
stompbox_mod::stompbox_mod(QWidget *parent) : stompBox(parent) { /* MOD */ setImage(":/images/mod.png"); setLSB("07", "15"); setComboBox("07", "00", "16"); setKnob1("07", "CENTER", "17"); setSwitch("07", "00", "15"); editDetails()->patchPos(1522, 138, "07", "15"); //correct setEditPages(); }
stompbox_mfx::stompbox_mfx(QWidget *parent) : stompBox(parent) { /* MFX */ setImage(":/images/mfx.png"); setLSB("03", "04"); setComboBox("03", "00", "05"); setSwitch("03", "00", "04"); setKnob1("03", "CENTER", "06"); editDetails()->patchPos(776, 530, "03", "04"); //correct setEditPages(); }
stompbox_cs::stompbox_cs(QWidget *parent) : stompBox(parent) { /* COMP */ setImage(":/images/cs.png"); setLSB("00", "00"); setKnob1("00", "00", "42"); setKnob2("00", "00", "47"); setComboBox("00", "00", "41"); setButton("00", "00", "40"); editDetails()->patchPos(150, 16, "00", "40"); setEditPages(); };
stompbox_amp::stompbox_amp(QWidget *parent) : stompBox(parent) { /* AMP */ setImage(":/images/amp.png"); setLSB("07", "00"); setKnob1("07", "00", "02"); setKnob2("07", "00", "03"); setComboBox("07", "00", "01"); setSwitch("07", "00", "00"); editDetails()->patchPos(1480, 34, "07", "00"); //correct setEditPages(); }
stompbox_dd::stompbox_dd(QWidget *parent) : stompBox(parent) { /* DELAY */ setImage(":/images/dd.png"); setLSB("06", "05"); setKnob1("06", "00", "0B"); setKnob2("06", "00", "0A"); setComboBox("06", "00", "06"); setSwitch("06", "00", "05"); editDetails()->patchPos(1404, 14, "06", "05"); //correct setEditPages(); }
void MapDownloader::updateView() { QVariant x=mc->currentCoordinate().x(); QVariant y=mc->currentCoordinate().y(); labelLatitude->setText( y.toString() ); labelLongitude->setText( x.toString() ); sliderZoom->setSliderPosition( mapadapter->currentZoom()); setComboBox(); labelInfo(); QPointF GPS = mc->currentCoordinate(); // qDebug()<<"zoom:" << mapadapter->currentZoom()<< "GPS NB:"<<GPS << "TileSize"<<mapAdapter->tilesize(); // qDebug()<<"corDispl:" << mapadapter->coordinateToDisplay(GPS) <<"tilezoom:"<<tilesonzoomlevel(2); // qDebug()<<"tiles count"<<tilesDownloadCount; }
stompbox_eq::stompbox_eq(QWidget *parent) : stompBox(parent) { /* EQ */ setImage(":/images/eq.png"); setLSB("06", "11"); setSlider1("06", "00", "13"); setSlider2("06", "00", "16"); setSlider3("06", "00", "19"); setSlider4("06", "00", "1B"); setSlider5("06", "00", "1C"); setComboBox("06", "00", "1D"); setSwitch("06", "00", "11"); editDetails()->patchPos(1428, 26, "06", "11"); //correct setEditPages(); }
int main(int argc, char *argv[]) { //initialize GUI QApplication a(argc, argv); MainWindow w; w.show(); KinectManager manager; qRegisterMetaType<QMap<int,QString>>("QMap<int,QString>"); QObject::connect(&manager,SIGNAL( mapChanged(QMap<int,QString>)),&w,SLOT(setDropDownList(QMap<int,QString>))); QObject::connect(&manager,SIGNAL(selectionChanged(QString)),&w,SLOT(setComboBox(QString))); QObject::connect(&manager,SIGNAL(error(QString)),&w,SLOT(displayError(QString))); QObject::connect(&manager,SIGNAL(kinectAngleChanged(long)),&w,SLOT(kinectAngle(long))); QObject::connect(&manager,SIGNAL(sendKinectByteArray(QByteArray)),&w,SIGNAL(receiveVGAArray(QByteArray))); QObject::connect(&manager,SIGNAL(status(QString,int)),&w,SIGNAL(setStatus(QString,int))); QObject::connect(&w,SIGNAL(dropDownBoxUpdated(QString)),&manager,SLOT(changeSelected(QString))); QObject::connect(&w,SIGNAL(updateKinectAngle(long)),&manager,SIGNAL(changeKinectAngle(long))); HRESULT hr = manager.initialize(); if (FAILED(hr)) w.displayError("Something big happend: " + QString::number(hr)); return a.exec(); }