Mercurial > hg > sonic-visualiser
changeset 1097:df73c834764c 3.0-integration
Make colour 3d plot layer colour a preference as well
author | Chris Cannam |
---|---|
date | Thu, 21 Jan 2016 09:28:57 +0000 |
parents | 11ef2f95ea15 |
children | bd3cb9d6db66 |
files | .hgsubstate main/PreferencesDialog.cpp main/PreferencesDialog.h |
diffstat | 3 files changed, 22 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgsubstate Wed Jan 20 11:43:16 2016 +0000 +++ b/.hgsubstate Thu Jan 21 09:28:57 2016 +0000 @@ -6,4 +6,4 @@ 55ece8862b6d3a54aad271a53f9c1615e5d3bcf8 sv-dependency-builds 14a81e881b1ae7ade2520611c902a20971d9898d svapp afed8be790321ebc805b2620bcddb91405886c8d svcore -9c890b7dfa836bf6999df4601ae8974a6888284b svgui +072f0db59081e069e5d9bb65692d94989201b6cf svgui
--- a/main/PreferencesDialog.cpp Wed Jan 20 11:43:16 2016 +0000 +++ b/main/PreferencesDialog.cpp Thu Jan 21 09:28:57 2016 +0000 @@ -130,19 +130,26 @@ int(ColourMapper::Green)).toInt()); m_spectrogramMColour = (settings.value("spectrogram-melodic-colour", int(ColourMapper::Sunset)).toInt()); + m_colour3DColour = (settings.value("colour-3d-plot-colour", + int(ColourMapper::Green)).toInt()); settings.endGroup(); QComboBox *spectrogramGColour = new QComboBox; QComboBox *spectrogramMColour = new QComboBox; + QComboBox *colour3DColour = new QComboBox; for (i = 0; i < ColourMapper::getColourMapCount(); ++i) { spectrogramGColour->addItem(ColourMapper::getColourMapName(i)); spectrogramMColour->addItem(ColourMapper::getColourMapName(i)); + colour3DColour->addItem(ColourMapper::getColourMapName(i)); if (i == m_spectrogramGColour) spectrogramGColour->setCurrentIndex(i); if (i == m_spectrogramMColour) spectrogramMColour->setCurrentIndex(i); + if (i == m_colour3DColour) colour3DColour->setCurrentIndex(i); } connect(spectrogramGColour, SIGNAL(currentIndexChanged(int)), this, SLOT(spectrogramGColourChanged(int))); connect(spectrogramMColour, SIGNAL(currentIndexChanged(int)), this, SLOT(spectrogramMColourChanged(int))); + connect(colour3DColour, SIGNAL(currentIndexChanged(int)), + this, SLOT(colour3DColourChanged(int))); m_tuningFrequency = prefs->getTuningFrequency(); @@ -403,6 +410,10 @@ row, 0); subgrid->addWidget(spectrogramMColour, row++, 1, 1, 2); + subgrid->addWidget(new QLabel(tr("Default color 3D plot color:")), + row, 0); + subgrid->addWidget(colour3DColour, row++, 1, 1, 2); + #ifdef NOT_DEFINED // see earlier subgrid->addWidget(new QLabel(tr("%1:").arg(prefs->getPropertyLabel ("Background Mode"))), @@ -578,6 +589,13 @@ } void +PreferencesDialog::colour3DColourChanged(int colour) +{ + m_colour3DColour = colour; + m_applyButton->setEnabled(true); +} + +void PreferencesDialog::propertyLayoutChanged(int layout) { m_propertyLayout = layout; @@ -752,6 +770,7 @@ #endif settings.setValue("spectrogram-colour", m_spectrogramGColour); settings.setValue("spectrogram-melodic-colour", m_spectrogramMColour); + settings.setValue("colour-3d-plot-colour", m_colour3DColour); settings.endGroup(); settings.beginGroup("MainWindow");
--- a/main/PreferencesDialog.h Wed Jan 20 11:43:16 2016 +0000 +++ b/main/PreferencesDialog.h Thu Jan 21 09:28:57 2016 +0000 @@ -51,6 +51,7 @@ void spectrogramXSmoothingChanged(int state); void spectrogramGColourChanged(int state); void spectrogramMColourChanged(int state); + void colour3DColourChanged(int state); void propertyLayoutChanged(int layout); void tuningFrequencyChanged(double freq); void audioDeviceChanged(int device); @@ -94,6 +95,7 @@ int m_spectrogramXSmoothing; int m_spectrogramGColour; int m_spectrogramMColour; + int m_colour3DColour; int m_propertyLayout; double m_tuningFrequency; int m_audioDevice;