Mercurial > hg > sonic-visualiser
comparison main/PreferencesDialog.cpp @ 1861:8c4df1f3fef7
Merge from branch plugin-path-config
| author | Chris Cannam |
|---|---|
| date | Mon, 11 Jun 2018 14:42:56 +0100 |
| parents | 9fbaf30a09ab |
| children | 47bbee02fa8f |
comparison
equal
deleted
inserted
replaced
| 1849:4af1e71eaa3f | 1861:8c4df1f3fef7 |
|---|---|
| 38 | 38 |
| 39 #include "widgets/WindowTypeSelector.h" | 39 #include "widgets/WindowTypeSelector.h" |
| 40 #include "widgets/IconLoader.h" | 40 #include "widgets/IconLoader.h" |
| 41 #include "widgets/ColourMapComboBox.h" | 41 #include "widgets/ColourMapComboBox.h" |
| 42 #include "widgets/ColourComboBox.h" | 42 #include "widgets/ColourComboBox.h" |
| 43 #include "widgets/PluginPathConfigurator.h" | |
| 44 #include "widgets/WidgetScale.h" | |
| 43 #include "base/Preferences.h" | 45 #include "base/Preferences.h" |
| 44 #include "base/ResourceFinder.h" | 46 #include "base/ResourceFinder.h" |
| 45 #include "layer/ColourMapper.h" | 47 #include "layer/ColourMapper.h" |
| 46 #include "layer/ColourDatabase.h" | 48 #include "layer/ColourDatabase.h" |
| 47 | 49 |
| 274 m_tempDirRootEdit->setReadOnly(true); | 276 m_tempDirRootEdit->setReadOnly(true); |
| 275 QPushButton *tempDirButton = new QPushButton; | 277 QPushButton *tempDirButton = new QPushButton; |
| 276 tempDirButton->setIcon(IconLoader().load("fileopen")); | 278 tempDirButton->setIcon(IconLoader().load("fileopen")); |
| 277 connect(tempDirButton, SIGNAL(clicked()), | 279 connect(tempDirButton, SIGNAL(clicked()), |
| 278 this, SLOT(tempDirButtonClicked())); | 280 this, SLOT(tempDirButtonClicked())); |
| 279 tempDirButton->setFixedSize(QSize(24, 24)); | 281 tempDirButton->setFixedSize(WidgetScale::scaleQSize(QSize(24, 24))); |
| 280 | 282 |
| 281 QCheckBox *showSplash = new QCheckBox; | 283 QCheckBox *showSplash = new QCheckBox; |
| 282 m_showSplash = prefs->getShowSplash(); | 284 m_showSplash = prefs->getShowSplash(); |
| 283 showSplash->setCheckState(m_showSplash ? Qt::Checked : Qt::Unchecked); | 285 showSplash->setCheckState(m_showSplash ? Qt::Checked : Qt::Unchecked); |
| 284 connect(showSplash, SIGNAL(stateChanged(int)), | 286 connect(showSplash, SIGNAL(stateChanged(int)), |
| 574 | 576 |
| 575 subgrid->setRowStretch(row, 10); | 577 subgrid->setRowStretch(row, 10); |
| 576 | 578 |
| 577 m_tabOrdering[AudioIOTab] = m_tabs->count(); | 579 m_tabOrdering[AudioIOTab] = m_tabs->count(); |
| 578 m_tabs->addTab(frame, tr("A&udio I/O")); | 580 m_tabs->addTab(frame, tr("A&udio I/O")); |
| 579 | 581 |
| 582 // Plugins tab | |
| 583 | |
| 584 m_pluginPathConfigurator = new PluginPathConfigurator(this); | |
| 585 m_pluginPathConfigurator->setPaths(PluginPathSetter::getPaths()); | |
| 586 connect(m_pluginPathConfigurator, SIGNAL(pathsChanged()), | |
| 587 this, SLOT(pluginPathsChanged())); | |
| 588 | |
| 589 m_tabOrdering[PluginTab] = m_tabs->count(); | |
| 590 m_tabs->addTab(m_pluginPathConfigurator, tr("&Plugins")); | |
| 591 | |
| 580 // General tab | 592 // General tab |
| 581 | 593 |
| 582 frame = new QFrame; | 594 frame = new QFrame; |
| 583 subgrid = new QGridLayout; | 595 subgrid = new QGridLayout; |
| 584 frame->setLayout(subgrid); | 596 frame->setLayout(subgrid); |
| 899 void | 911 void |
| 900 PreferencesDialog::viewFontSizeChanged(int sz) | 912 PreferencesDialog::viewFontSizeChanged(int sz) |
| 901 { | 913 { |
| 902 m_viewFontSize = sz; | 914 m_viewFontSize = sz; |
| 903 m_applyButton->setEnabled(true); | 915 m_applyButton->setEnabled(true); |
| 916 } | |
| 917 | |
| 918 void | |
| 919 PreferencesDialog::pluginPathsChanged() | |
| 920 { | |
| 921 m_applyButton->setEnabled(true); | |
| 922 m_changesOnRestart = true; | |
| 904 } | 923 } |
| 905 | 924 |
| 906 void | 925 void |
| 907 PreferencesDialog::okClicked() | 926 PreferencesDialog::okClicked() |
| 908 { | 927 { |
| 1003 | 1022 |
| 1004 if (m_coloursChanged) { | 1023 if (m_coloursChanged) { |
| 1005 emit coloursChanged(); | 1024 emit coloursChanged(); |
| 1006 m_coloursChanged = false; | 1025 m_coloursChanged = false; |
| 1007 } | 1026 } |
| 1027 | |
| 1028 PluginPathSetter::savePathSettings(m_pluginPathConfigurator->getPaths()); | |
| 1008 } | 1029 } |
| 1009 | 1030 |
| 1010 void | 1031 void |
| 1011 PreferencesDialog::cancelClicked() | 1032 PreferencesDialog::cancelClicked() |
| 1012 { | 1033 { |
