diff options
author | Daniel Schürmann <daschuer@mixxx.org> | 2014-11-23 23:39:56 +0100 |
---|---|---|
committer | Daniel Schürmann <daschuer@mixxx.org> | 2014-11-23 23:39:56 +0100 |
commit | 5c0958817e5c62cbf0b45d542c9c8be7f7b85c95 (patch) | |
tree | 3ec2e0241166100823d403ecfb7969c746386aff /src/dlgprefcontrols.cpp | |
parent | ea6bc9c49d14b16f812305acc2b9756055c5778c (diff) |
Add preference option to set the coloumn height in the range from 10 to 60
Diffstat (limited to 'src/dlgprefcontrols.cpp')
-rw-r--r-- | src/dlgprefcontrols.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/dlgprefcontrols.cpp b/src/dlgprefcontrols.cpp index a07ff5b00a..18e3fd43af 100644 --- a/src/dlgprefcontrols.cpp +++ b/src/dlgprefcontrols.cpp @@ -47,7 +47,8 @@ DlgPrefControls::DlgPrefControls(QWidget * parent, MixxxMainWindow * mixxx, m_pSkinLoader(pSkinLoader), m_pPlayerManager(pPlayerManager), m_iNumConfiguredDecks(0), - m_iNumConfiguredSamplers(0) { + m_iNumConfiguredSamplers(0), + m_rebootNotifiedColoumnHeight(false) { setupUi(this); m_pNumDecks = new ControlObjectSlave("[Master]", "num_decks", this); @@ -79,6 +80,13 @@ DlgPrefControls::DlgPrefControls(QWidget * parent, MixxxMainWindow * mixxx, this, SLOT(slotSetPositionDisplay(int))); // Set default direction as stored in config file + int coloumnHeight = m_pConfig->getValueString(ConfigKey("[Library]","ColoumnHeight"), "20").toInt(); + spinBoxColoumnHeight->setValue(coloumnHeight); + connect(spinBoxColoumnHeight, SIGNAL(valueChanged(int)), + this, SLOT(slotColoumnHeightValueChanged(int))); + + + // Set default direction as stored in config file if (m_pConfig->getValueString(ConfigKey("[Controls]","RateDir")).length() == 0) m_pConfig->set(ConfigKey("[Controls]","RateDir"),ConfigValue(0)); @@ -672,3 +680,11 @@ void DlgPrefControls::slotNumSamplersChanged(double new_count) { slotSetRateDir(m_pConfig->getValueString(ConfigKey("[Controls]","RateDir")).toInt()); slotSetRateRange(m_pConfig->getValueString(ConfigKey("[Controls]","RateRange")).toInt()); } + +void DlgPrefControls::slotColoumnHeightValueChanged(int height) { + m_pConfig->set(ConfigKey("[Library]","ColoumnHeight"),ConfigValue(height)); + if(!m_rebootNotifiedColoumnHeight) { + notifyRebootNecessary(); + m_rebootNotifiedColoumnHeight = true; + } +} |