Signed-off-by: falkTX <falktx@falktx.com>pull/1775/head
@@ -17,7 +17,7 @@ | |||
#pragma once | |||
#include "CarlaDefines.h" | |||
#include "CarlaBackend.h" | |||
#ifdef __cplusplus | |||
extern "C" { | |||
@@ -58,16 +58,17 @@ typedef struct { | |||
// -------------------------------------------------------------------------------------------------------------------- | |||
CARLA_API | |||
void carla_frontend_createAndExecAboutJuceDialog(void* parent); | |||
CARLA_API void | |||
carla_frontend_createAndExecAboutJuceDialog(void* parent); | |||
CARLA_API JackAppDialogResults* carla_frontend_createAndExecJackAppDialog(void* parent, const char* projectFilename); | |||
CARLA_API const JackAppDialogResults* | |||
carla_frontend_createAndExecJackAppDialog(void* parent, const char* projectFilename); | |||
CARLA_API | |||
PluginListDialogResults* carla_frontend_createAndExecPluginListDialog(void* parent/*, const HostSettings& hostSettings*/); | |||
CARLA_API const PluginListDialogResults* | |||
carla_frontend_createAndExecPluginListDialog(void* parent/*, const HostSettings& hostSettings*/); | |||
CARLA_API | |||
PluginListRefreshDialogResults* carla_frontend_createAndExecPluginListRefreshDialog(void* parent, bool useSystemIcons); | |||
CARLA_API const PluginListRefreshDialogResults* | |||
carla_frontend_createAndExecPluginListRefreshDialog(void* parent, bool useSystemIcons); | |||
// -------------------------------------------------------------------------------------------------------------------- | |||
@@ -180,6 +180,10 @@ ui_%.py: $(RESDIR)/ui/%.ui | |||
resources_rc.py: $(RESDIR)/resources.qrc $(RESDIR)/*/*.png $(RESDIR)/*/*.svg $(RESDIR)/*/*.svgz | |||
$(PYRCC) $< -o $@ | |||
test: $(OBJS) $(LIBS) test.cpp | |||
@echo "Linking test" | |||
$(SILENT)$(CXX) $(OBJS) test.cpp $(BUILD_CXX_FLAGS) -Wl,-rpath,$(abspath $(BINDIR)) $(QT5_LINK_FLAGS) -o $@ | |||
$(BINDIR)/resources/%: % | |||
-@mkdir -p $(BINDIR)/resources | |||
$(LINK) $(CURDIR)/$* $(BINDIR)/resources/ | |||
@@ -249,7 +249,8 @@ void JackAppDialog::slot_saveSettings() | |||
// -------------------------------------------------------------------------------------------------------------------- | |||
JackAppDialogResults* carla_frontend_createAndExecJackAppDialog(void* const parent, const char* const projectFilename) | |||
const JackAppDialogResults* | |||
carla_frontend_createAndExecJackAppDialog(void* const parent, const char* const projectFilename) | |||
{ | |||
JackAppDialog gui(reinterpret_cast<QWidget*>(parent), projectFilename); | |||
@@ -67,7 +67,7 @@ struct PluginInfo { | |||
}; | |||
// -------------------------------------------------------------------------------------------------------------------- | |||
// Jack Application Dialog | |||
// Plugin List Dialog | |||
class PluginListDialog : public QDialog | |||
{ | |||
@@ -80,9 +80,6 @@ public: | |||
explicit PluginListDialog(QWidget* parent, const HostSettings& hostSettings); | |||
~PluginListDialog() override; | |||
// ---------------------------------------------------------------------------------------------------------------- | |||
// public methods | |||
// ---------------------------------------------------------------------------------------------------------------- | |||
// protected methods | |||
@@ -97,7 +94,7 @@ protected: | |||
// ---------------------------------------------------------------------------------------------------------------- | |||
// private slots | |||
private slots: | |||
private Q_SLOTS: | |||
void slot_cellClicked(int row, int column); | |||
void slot_cellDoubleClicked(int row, int column); | |||
void slot_focusSearchFieldAndSelectAll(); | |||
@@ -104,7 +104,7 @@ class PluginListDialog(QDialog): | |||
self.fRealParent = parent | |||
self.fFavoritePlugins = [] | |||
self.fFavoritePluginsChanged = False | |||
self.fUseSystemIcons = useSystemIcons | |||
self.fUseSystemIcons = useSystemIcons # TODO cpp | |||
self.fTrYes = self.tr("Yes") | |||
self.fTrNo = self.tr("No") | |||
@@ -468,28 +468,28 @@ class PluginListDialog(QDialog): | |||
if self.ui.ch_cat_all.isChecked(): | |||
settings.setValue("PluginDatabase/ShowCategory", "all") | |||
else: | |||
categoryhash = "" | |||
categories = "" | |||
if self.ui.ch_cat_delay.isChecked(): | |||
categoryhash += ":delay" | |||
categories += ":delay" | |||
if self.ui.ch_cat_distortion.isChecked(): | |||
categoryhash += ":distortion" | |||
categories += ":distortion" | |||
if self.ui.ch_cat_dynamics.isChecked(): | |||
categoryhash += ":dynamics" | |||
categories += ":dynamics" | |||
if self.ui.ch_cat_eq.isChecked(): | |||
categoryhash += ":eq" | |||
categories += ":eq" | |||
if self.ui.ch_cat_filter.isChecked(): | |||
categoryhash += ":filter" | |||
categories += ":filter" | |||
if self.ui.ch_cat_modulator.isChecked(): | |||
categoryhash += ":modulator" | |||
categories += ":modulator" | |||
if self.ui.ch_cat_synth.isChecked(): | |||
categoryhash += ":synth" | |||
categories += ":synth" | |||
if self.ui.ch_cat_utility.isChecked(): | |||
categoryhash += ":utility" | |||
categories += ":utility" | |||
if self.ui.ch_cat_other.isChecked(): | |||
categoryhash += ":other" | |||
if categoryhash: | |||
categoryhash += ":" | |||
settings.setValue("PluginDatabase/ShowCategory", categoryhash) | |||
categories += ":other" | |||
if categories: | |||
categories += ":" | |||
settings.setValue("PluginDatabase/ShowCategory", categories) | |||
if self.fFavoritePluginsChanged: | |||
settings.setValue("PluginDatabase/Favorites", self.fFavoritePlugins) | |||
@@ -527,8 +527,8 @@ class PluginListDialog(QDialog): | |||
self.ui.ch_stereo.setChecked(settings.value("PluginDatabase/ShowStereoOnly", False, bool)) | |||
self.ui.lineEdit.setText(settings.value("PluginDatabase/SearchText", "", str)) | |||
categoryhash = settings.value("PluginDatabase/ShowCategory", "all", str) | |||
if categoryhash == "all" or len(categoryhash) < 2: | |||
categories = settings.value("PluginDatabase/ShowCategory", "all", str) | |||
if categories == "all" or len(categories) < 2: | |||
self.ui.ch_cat_all.setChecked(True) | |||
self.ui.ch_cat_delay.setChecked(False) | |||
self.ui.ch_cat_distortion.setChecked(False) | |||
@@ -541,15 +541,15 @@ class PluginListDialog(QDialog): | |||
self.ui.ch_cat_other.setChecked(False) | |||
else: | |||
self.ui.ch_cat_all.setChecked(False) | |||
self.ui.ch_cat_delay.setChecked(":delay:" in categoryhash) | |||
self.ui.ch_cat_distortion.setChecked(":distortion:" in categoryhash) | |||
self.ui.ch_cat_dynamics.setChecked(":dynamics:" in categoryhash) | |||
self.ui.ch_cat_eq.setChecked(":eq:" in categoryhash) | |||
self.ui.ch_cat_filter.setChecked(":filter:" in categoryhash) | |||
self.ui.ch_cat_modulator.setChecked(":modulator:" in categoryhash) | |||
self.ui.ch_cat_synth.setChecked(":synth:" in categoryhash) | |||
self.ui.ch_cat_utility.setChecked(":utility:" in categoryhash) | |||
self.ui.ch_cat_other.setChecked(":other:" in categoryhash) | |||
self.ui.ch_cat_delay.setChecked(":delay:" in categories) | |||
self.ui.ch_cat_distortion.setChecked(":distortion:" in categories) | |||
self.ui.ch_cat_dynamics.setChecked(":dynamics:" in categories) | |||
self.ui.ch_cat_eq.setChecked(":eq:" in categories) | |||
self.ui.ch_cat_filter.setChecked(":filter:" in categories) | |||
self.ui.ch_cat_modulator.setChecked(":modulator:" in categories) | |||
self.ui.ch_cat_synth.setChecked(":synth:" in categories) | |||
self.ui.ch_cat_utility.setChecked(":utility:" in categories) | |||
self.ui.ch_cat_other.setChecked(":other:" in categories) | |||
tableGeometry = settings.value("PluginDatabase/TableGeometry_6", QByteArray(), QByteArray) | |||
horizontalHeader = self.ui.tableWidget.horizontalHeader() | |||
@@ -572,8 +572,8 @@ void PluginListRefreshDialog::slot_handlePluginThreadFinished() | |||
// -------------------------------------------------------------------------------------------------------------------- | |||
PluginListRefreshDialogResults* carla_frontend_createAndExecPluginListRefreshDialog(void* const parent, | |||
const bool useSystemIcons) | |||
const PluginListRefreshDialogResults* | |||
carla_frontend_createAndExecPluginListRefreshDialog(void* const parent, const bool useSystemIcons) | |||
{ | |||
PluginListRefreshDialog gui(reinterpret_cast<QWidget*>(parent), useSystemIcons); | |||
@@ -0,0 +1,8 @@ | |||
#include "CarlaFrontend.h" | |||
#include <QApplication> | |||
int main(int argc, char* argv[]) | |||
{ | |||
QApplication app(argc, argv); | |||
carla_frontend_createAndExecPluginListDialog(nullptr); | |||
} |