Skip to content
Snippets Groups Projects
Commit b54c483d authored by SeeLook's avatar SeeLook :musical_note:
Browse files

Got rid of playing detected notes, without midi input it has less usability,...

Got rid of playing detected notes, without midi input it has less usability, cleaned Tglobals from dump/grab temp
parent a951d46c
No related branches found
No related tags found
No related merge requests found
......@@ -13,8 +13,6 @@
Translations:
clumsy:
- Pitch-detected notes will be played with sound type defined here.<br>Delay depends on pitch detection settings.
- Attempts number
====== BUGS AND ISSUES ===============================================
MAJOR:
......
/***************************************************************************
* Copyright (C) 2011-2014 by Tomasz Bojczuk *
* Copyright (C) 2011-2015 by Tomasz Bojczuk *
* tomaszbojczuk@gmail.com *
* *
* This program is free software; you can redistribute it and/or modify *
......@@ -59,7 +59,6 @@ QString Tglobals::getInstPath(QString appInstPath) {
return p;
}
bool m_fromTemp;
/*end static*/
......@@ -86,11 +85,7 @@ Tglobals::Tglobals(bool fromTemp) :
#else
config = new QSettings();
#endif
if (fromTemp)
grabFromTemp();
else
loadSettings(config);
m_fromTemp = fromTemp;
loadSettings(config);
if (Tcore::gl() == 0)
Tcore::setGlobals(this);
......@@ -101,16 +96,13 @@ Tglobals::Tglobals(bool fromTemp) :
}
Tglobals::~Tglobals() {
if (!m_fromTemp) {
// qDebug() << "Global settings stored to" << config->fileName();
storeSettings(config);
}
delete config;
storeSettings(config);
delete E;
delete A;
delete S;
delete L;
delete m_tune;
delete config;
Tcore::reset();
}
......@@ -120,7 +112,7 @@ Tglobals::~Tglobals() {
//##########################################################################################
void Tglobals::dumpToTemp() {
#if defined(Q_OS_WIN32) // I hate mess in Win registry
/*#if defined(Q_OS_WIN32) // I hate mess in Win registry
QSettings tmpSett(tmpConfigFile(), QSettings::IniFormat);
#else
QSettings tmpSett(tmpConfigFile(), QSettings::NativeFormat);
......@@ -128,12 +120,12 @@ void Tglobals::dumpToTemp() {
storeSettings(&tmpSett);
tmpSett.beginGroup("temp");
tmpSett.setValue("nootkaPath", path); // other apps has to be able find the resources
tmpSett.endGroup();
tmpSett.endGroup();*/
}
bool Tglobals::grabFromTemp() {
if (QFileInfo::exists(tmpConfigFile())) {
/* if (QFileInfo::exists(tmpConfigFile())) {
#if defined(Q_OS_WIN32) // I hate mess in Win registry
QSettings tmpSett(tmpConfigFile(), QSettings::IniFormat);
#else
......@@ -147,7 +139,7 @@ bool Tglobals::grabFromTemp() {
if (path != "")
return true;
}
qDebug() << "Can not read from temp settings file!";
qDebug() << "Can not read from temp settings file!";*/
return false;
}
......@@ -290,7 +282,7 @@ void Tglobals::loadSettings(QSettings* cfg) {
A->a440diff = cfg->value("a440Offset", 0).toFloat();
A->intonation = (quint8)qBound(0, cfg->value("intonation", 3).toInt(), 5);
A->forwardInput = cfg->value("forwardInput", false).toBool();
A->playDetected = cfg->value("playDetected", false).toBool();
A->playDetected = false; //cfg->value("playDetected", false).toBool();
cfg->endGroup();
cfg->beginGroup("layout");
......@@ -439,7 +431,7 @@ void Tglobals::storeSettings(QSettings* cfg) {
cfg->setValue("a440Offset", A->a440diff);
cfg->setValue("intonation", A->intonation);
cfg->setValue("forwardInput", A->forwardInput);
cfg->setValue("playDetected", A->playDetected);
// cfg->setValue("playDetected", A->playDetected);
cfg->endGroup();
cfg->beginGroup("layout");
......
......@@ -355,7 +355,6 @@ void MainWindow::openLevelCreator(QString levelFile) {
sound->wait(); // stops pitch detection
sound->stopPlaying();
m_levelCreatorExist = true;
gl->dumpToTemp();
// setAttribute(Qt::WA_TransparentForMouseEvents, true);
TpluginsLoader loader;
if (loader.load(TpluginsLoader::e_level)) {
......
/***************************************************************************
* Copyright (C) 2011-2014 by Tomasz Bojczuk *
* Copyright (C) 2011-2015 by Tomasz Bojczuk *
* tomaszbojczuk@gmail.com *
* *
* This program is free software; you can redistribute it and/or modify *
......@@ -106,10 +106,11 @@ AudioOutSettings::AudioOutSettings(TaudioParams* aParams, QWidget* parent) :
audioOutLay->addWidget(m_midiGr);
audioOutLay->addStretch();
m_playDetectedChB = new QCheckBox(tr("Play detected notes"), this);
m_playDetectedChB->setChecked(m_params->playDetected);
m_playDetectedChB->setStatusTip(tr("Pitch-detected notes will be played with sound type defined here.<br>Delay depends on pitch detection settings."));
audioOutLay->addWidget(m_playDetectedChB, 0, Qt::AlignLeft);
// m_playDetectedChB = new QCheckBox(tr("Play detected notes"), this);
// m_playDetectedChB->setChecked(m_params->playDetected);
// // When it will bring back, following status tip has do be formed more clear!
// m_playDetectedChB->setStatusTip(tr("Pitch-detected notes will be played with sound type defined here.<br>Delay depends on pitch detection settings."));
// audioOutLay->addWidget(m_playDetectedChB, 0, Qt::AlignLeft);
m_audioOutEnableGr->setLayout(audioOutLay);
lay->addWidget(m_audioOutEnableGr);
......@@ -186,7 +187,7 @@ void AudioOutSettings::saveSettings() {
m_params->midiPortName = m_midiPortsCombo->currentText();
m_params->audioInstrNr = m_audioInstrCombo->currentIndex() + 1;
m_params->forwardInput = m_playInputChB->isChecked();
m_params->playDetected = m_playDetectedChB->isChecked();
// m_params->playDetected = m_playDetectedChB->isChecked();
m_params->JACKorASIO = m_JACK_ASIO_ChB->isChecked();
}
}
......@@ -199,7 +200,7 @@ void AudioOutSettings::restoreDefaults() {
m_audioOutDevListCombo->setCurrentIndex(0);
m_midiInstrCombo->setCurrentIndex(2); // classical guitar
m_audioInstrCombo->setCurrentIndex(0);
m_playDetectedChB->setChecked(false);
// m_playDetectedChB->setChecked(false);
m_playInputChB->setChecked(false);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment