Mercurial > hg > sonic-visualiser
comparison main/PreferencesDialog.cpp @ 1837:9fbaf30a09ab plugin-path-config
Wire up plugin path settings logic (needs more testing)
author | Chris Cannam |
---|---|
date | Fri, 25 May 2018 16:09:40 +0100 |
parents | bc3e56ef251b |
children | 47bbee02fa8f |
comparison
equal
deleted
inserted
replaced
1836:42f89437f70b | 1837:9fbaf30a09ab |
---|---|
579 m_tabOrdering[AudioIOTab] = m_tabs->count(); | 579 m_tabOrdering[AudioIOTab] = m_tabs->count(); |
580 m_tabs->addTab(frame, tr("A&udio I/O")); | 580 m_tabs->addTab(frame, tr("A&udio I/O")); |
581 | 581 |
582 // Plugins tab | 582 // Plugins tab |
583 | 583 |
584 PluginPathConfigurator *pathConfig = new PluginPathConfigurator(this); | 584 m_pluginPathConfigurator = new PluginPathConfigurator(this); |
585 QStringList path; | 585 m_pluginPathConfigurator->setPaths(PluginPathSetter::getPaths()); |
586 path << "/usr/lib/vamp"; | 586 connect(m_pluginPathConfigurator, SIGNAL(pathsChanged()), |
587 path << "/usr/local/lib/vamp"; | 587 this, SLOT(pluginPathsChanged())); |
588 path << "/home/user/.vamp"; | |
589 PluginPathConfigurator::Paths paths; | |
590 paths["Vamp"] = { path, "VAMP_PATH", true }; | |
591 path.clear(); | |
592 path << "/usr/lib/ladspa"; | |
593 path << "/usr/local/lib/ladspa"; | |
594 path << "/home/user/.ladspa"; | |
595 paths["LADSPA"] = { path, "LADSPA_PATH", true }; | |
596 pathConfig->setPaths(paths); | |
597 | 588 |
598 m_tabOrdering[PluginTab] = m_tabs->count(); | 589 m_tabOrdering[PluginTab] = m_tabs->count(); |
599 m_tabs->addTab(pathConfig, tr("&Plugins")); | 590 m_tabs->addTab(m_pluginPathConfigurator, tr("&Plugins")); |
600 | 591 |
601 // General tab | 592 // General tab |
602 | 593 |
603 frame = new QFrame; | 594 frame = new QFrame; |
604 subgrid = new QGridLayout; | 595 subgrid = new QGridLayout; |
920 void | 911 void |
921 PreferencesDialog::viewFontSizeChanged(int sz) | 912 PreferencesDialog::viewFontSizeChanged(int sz) |
922 { | 913 { |
923 m_viewFontSize = sz; | 914 m_viewFontSize = sz; |
924 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; | |
925 } | 923 } |
926 | 924 |
927 void | 925 void |
928 PreferencesDialog::okClicked() | 926 PreferencesDialog::okClicked() |
929 { | 927 { |
1024 | 1022 |
1025 if (m_coloursChanged) { | 1023 if (m_coloursChanged) { |
1026 emit coloursChanged(); | 1024 emit coloursChanged(); |
1027 m_coloursChanged = false; | 1025 m_coloursChanged = false; |
1028 } | 1026 } |
1027 | |
1028 PluginPathSetter::savePathSettings(m_pluginPathConfigurator->getPaths()); | |
1029 } | 1029 } |
1030 | 1030 |
1031 void | 1031 void |
1032 PreferencesDialog::cancelClicked() | 1032 PreferencesDialog::cancelClicked() |
1033 { | 1033 { |