GlobalSettingsConfig::GlobalSettingsConfig(QWidget* parent) : QDialog(parent) { setupUi(this); startSongGroup = new QButtonGroup(this); startSongGroup->addButton(startLastButton, 0); startSongGroup->addButton(startEmptyButton, 1); startSongGroup->addButton(startSongButton, 2); recDrumGroup = new QButtonGroup(this); recDrumGroup->addButton(recordAllButton, MusECore::REC_ALL); recDrumGroup->addButton(dontRecHiddenButton, MusECore::DONT_REC_HIDDEN); recDrumGroup->addButton(dontRecMutedButton, MusECore::DONT_REC_MUTED); recDrumGroup->addButton(dontRecBothButton, MusECore::DONT_REC_MUTED_OR_HIDDEN); updateSettings(); projDirOpenToolButton->setIcon(*openIcon); connect(projDirOpenToolButton, SIGNAL(clicked()), SLOT(browseProjDir())); startSongFileOpenToolButton->setIcon(*openIcon); connect(startSongFileOpenToolButton, SIGNAL(clicked()), SLOT(browseStartSongFile())); startSongResetToolButton->setIcon(*undoIcon); connect(startSongResetToolButton, SIGNAL(clicked()), SLOT(startSongReset())); connect(applyButton, SIGNAL(clicked()), SLOT(apply())); connect(okButton, SIGNAL(clicked()), SLOT(ok())); connect(cancelButton, SIGNAL(clicked()), SLOT(cancel())); connect(setMixerCurrent, SIGNAL(clicked()), SLOT(mixerCurrent())); connect(setMixer2Current, SIGNAL(clicked()), SLOT(mixer2Current())); connect(setBigtimeCurrent, SIGNAL(clicked()), SLOT(bigtimeCurrent())); connect(setMainCurrent, SIGNAL(clicked()), SLOT(mainCurrent())); connect(setTransportCurrent, SIGNAL(clicked()), SLOT(transportCurrent())); connect(buttonTraditionalPreset, SIGNAL(clicked()), SLOT(traditionalPreset())); connect(buttonMDIPreset, SIGNAL(clicked()), SLOT(mdiPreset())); connect(buttonBorlandPreset, SIGNAL(clicked()), SLOT(borlandPreset())); addMdiSettings(TopWin::ARRANGER); addMdiSettings(TopWin::SCORE); addMdiSettings(TopWin::PIANO_ROLL); addMdiSettings(TopWin::DRUM); addMdiSettings(TopWin::LISTE); addMdiSettings(TopWin::WAVE); addMdiSettings(TopWin::MASTER); addMdiSettings(TopWin::LMASTER); addMdiSettings(TopWin::CLIPLIST); addMdiSettings(TopWin::MARKER); }
ProjectCreateImpl::ProjectCreateImpl(QWidget *parent) : QDialog(parent) { setupUi(this); //bool is_new = (MusEGlobal::museProject == MusEGlobal::museProjectInitPath); directoryPath = MusEGlobal::config.projectBaseFolder; QStringList filters = localizedStringListFromCharArray(MusEGlobal::project_create_file_save_pattern, "file_patterns"); projectFileTypeCB->addItems(filters); QString proj_title = MusEGlobal::muse->projectTitle(); QString proj_path = MusEGlobal::muse->projectPath(); QString proj_ext = MusEGlobal::muse->projectExtension(); projectNameEdit->setText(proj_title); bool is_template = proj_path.startsWith(MusEGlobal::configPath + "/templates"); templateCheckBox->setChecked(is_template); projDirPath = proj_path; int type_idx = 0; if(!proj_ext.isEmpty()) { // FIXME Imperfect. Trying to avoid adding yet another series of character strings. p4.0.40 type_idx = projectFileTypeCB->findText(proj_ext, Qt::MatchContains | Qt::MatchCaseSensitive); if(type_idx == -1) type_idx = 0; } projectFileTypeCB->setCurrentIndex(type_idx); projDirToolButton->setIcon(*openIcon); browseDirButton->setIcon(*openIcon); restorePathButton->setIcon(*undoIcon); restorePathButton->setEnabled(false); // Disabled at first. //createFolderCheckbox->setChecked(MusEGlobal::config.projectStoreInFolder && is_new); // Suggest no folder if not new. connect(templateCheckBox,SIGNAL(toggled(bool)), this, SLOT(templateButtonChanged(bool))); //connect(templateCheckBox,SIGNAL(clicked()), this, SLOT(updateDirectoryPath())); connect(projDirToolButton,SIGNAL(clicked()), this, SLOT(browseProjDir())); connect(restorePathButton,SIGNAL(clicked()), this, SLOT(restorePath())); connect(browseDirButton,SIGNAL(clicked()), this, SLOT(selectDirectory())); //connect(projectNameEdit,SIGNAL(textChanged(QString)), this, SLOT(updateDirectoryPath())); connect(projectNameEdit,SIGNAL(textChanged(QString)), this, SLOT(updateProjectName())); connect(createFolderCheckbox,SIGNAL(clicked()), this, SLOT(createProjFolderChanged())); connect(projectFileTypeCB,SIGNAL(currentIndexChanged(int)), this, SLOT(updateDirectoryPath())); connect(buttonBox, SIGNAL(accepted()), this, SLOT(ok())); #if QT_VERSION >= 0x040700 projectNameEdit->setPlaceholderText("<Project Name>"); // Orcan: Commented out since there is no QPlainTextEdit::setPlaceholderText() // as of Qt-4.7.1 //commentEdit->setPlaceholderText("<Add information about project here>"); #endif updateDirectoryPath(); projectNameEdit->setFocus(); show(); }