def __init__(self, parent, host, hasCanvas, hasCanvasGL): QDialog.__init__(self, parent) self.host = host self.ui = ui_carla_settings.Ui_CarlaSettingsW() self.ui.setupUi(self) if False: # kdevelop likes this :) host = CarlaHostNull() self.host = host # ---------------------------------------------------------------------------------------------------- # Set-up GUI self.ui.lw_page.setFixedWidth(48 + 6*3 + QFontMetrics(self.ui.lw_page.font()).width(" Experimental ")) for i in range(host.get_engine_driver_count()): self.ui.cb_engine_audio_driver.addItem(host.get_engine_driver_name(i)) for i in range(Theme.THEME_MAX): self.ui.cb_canvas_theme.addItem(getThemeName(i)) if MACOS or (WINDOWS and not config_UseQt5): self.ui.group_main_theme.setEnabled(False) self.ui.group_main_theme.setVisible(False) if WINDOWS or host.isControl: self.ui.ch_main_show_logs.setEnabled(False) self.ui.ch_main_show_logs.setVisible(False) if host.isControl: self.ui.lw_page.hideRow(self.TAB_INDEX_CANVAS) self.ui.lw_page.hideRow(self.TAB_INDEX_ENGINE) self.ui.lw_page.hideRow(self.TAB_INDEX_PATHS) self.ui.lw_page.hideRow(self.TAB_INDEX_EXPERIMENTAL) self.ui.ch_main_experimental.setEnabled(False) self.ui.group_main_experimental.setEnabled(False) self.ui.group_main_experimental.setVisible(False) elif not hasCanvas: self.ui.lw_page.hideRow(self.TAB_INDEX_CANVAS) elif not hasCanvasGL: self.ui.cb_canvas_use_opengl.setEnabled(False) self.ui.cb_canvas_render_hq_aa.setEnabled(False) if host.isPlugin: self.ui.cb_engine_audio_driver.setEnabled(False) if host.audioDriverForced is not None: self.ui.cb_engine_audio_driver.setEnabled(False) self.ui.tb_engine_driver_config.setEnabled(False) if host.processModeForced: self.ui.cb_engine_process_mode_jack.setEnabled(False) self.ui.cb_engine_process_mode_other.setEnabled(False) if self.host.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK: self.ui.ch_engine_force_stereo.setEnabled(False) if host.isControl or host.isPlugin: self.ui.ch_main_confirm_exit.hide() self.ui.ch_exp_load_lib_global.hide() self.ui.lw_page.hideRow(self.TAB_INDEX_WINE) if not LINUX: self.ui.ch_exp_wine_bridges.setVisible(False) self.ui.ch_exp_jack_apps.setVisible(False) self.ui.ch_exp_prevent_bad_behaviour.setVisible(False) self.ui.lw_page.hideRow(self.TAB_INDEX_WINE) if not MACOS: self.ui.label_engine_ui_bridges_mac_note.setVisible(False) # FIXME, pipes on win32 not working, and mis-behaving on macOS if MACOS or WINDOWS: self.ui.ch_engine_prefer_ui_bridges.setChecked(False) self.ui.ch_engine_prefer_ui_bridges.setEnabled(False) self.ui.ch_engine_prefer_ui_bridges.setVisible(False) self.ui.label_engine_ui_bridges_timeout.setEnabled(False) self.ui.label_engine_ui_bridges_timeout.setVisible(False) self.ui.sb_engine_ui_bridges_timeout.setEnabled(False) self.ui.sb_engine_ui_bridges_timeout.setVisible(False) # FIXME, not implemented yet self.ui.ch_engine_uis_always_on_top.hide() # ---------------------------------------------------------------------------------------------------- # Load settings self.loadSettings() # ---------------------------------------------------------------------------------------------------- # Set-up connections self.accepted.connect(self.slot_saveSettings) self.ui.buttonBox.button(QDialogButtonBox.Reset).clicked.connect(self.slot_resetSettings) self.ui.b_main_proj_folder_open.clicked.connect(self.slot_getAndSetProjectPath) self.ui.cb_engine_audio_driver.currentIndexChanged.connect(self.slot_engineAudioDriverChanged) self.ui.tb_engine_driver_config.clicked.connect(self.slot_showAudioDriverSettings) self.ui.b_paths_add.clicked.connect(self.slot_addPluginPath) self.ui.b_paths_remove.clicked.connect(self.slot_removePluginPath) self.ui.b_paths_change.clicked.connect(self.slot_changePluginPath) self.ui.cb_paths.currentIndexChanged.connect(self.slot_pluginPathTabChanged) self.ui.lw_ladspa.currentRowChanged.connect(self.slot_pluginPathRowChanged) self.ui.lw_dssi.currentRowChanged.connect(self.slot_pluginPathRowChanged) self.ui.lw_lv2.currentRowChanged.connect(self.slot_pluginPathRowChanged) self.ui.lw_vst.currentRowChanged.connect(self.slot_pluginPathRowChanged) self.ui.lw_sf2.currentRowChanged.connect(self.slot_pluginPathRowChanged) self.ui.lw_sfz.currentRowChanged.connect(self.slot_pluginPathRowChanged) self.ui.ch_main_experimental.toggled.connect(self.slot_enableExperimental) self.ui.ch_exp_wine_bridges.toggled.connect(self.slot_enableWineBridges) self.ui.cb_exp_plugin_bridges.toggled.connect(self.slot_pluginBridgesToggled) self.ui.cb_canvas_eyecandy.toggled.connect(self.slot_canvasEyeCandyToggled) self.ui.cb_canvas_fancy_eyecandy.toggled.connect(self.slot_canvasFancyEyeCandyToggled) self.ui.cb_canvas_use_opengl.toggled.connect(self.slot_canvasOpenGLToggled) # ---------------------------------------------------------------------------------------------------- # Post-connect setup self.ui.lw_ladspa.setCurrentRow(0) self.ui.lw_dssi.setCurrentRow(0) self.ui.lw_lv2.setCurrentRow(0) self.ui.lw_vst.setCurrentRow(0) self.ui.lw_sf2.setCurrentRow(0) self.ui.lw_sfz.setCurrentRow(0) self.ui.lw_page.setCurrentCell(0, 0) self.adjustSize()
def __init__(self, parent, host, hasCanvas, hasCanvasGL): QDialog.__init__(self, parent) self.host = host self.ui = ui_carla_settings.Ui_CarlaSettingsW() self.ui.setupUi(self) if False: # kdevelop likes this :) host = CarlaHostMeta() self.host = host # ---------------------------------------------------------------------------------------------------- # Set-up GUI self.ui.lw_page.setFixedWidth( 48 + 6 + 6 + QFontMetrics(self.ui.lw_page.font()).width("88888888")) for i in range(host.get_engine_driver_count()): self.ui.cb_engine_audio_driver.addItem( host.get_engine_driver_name(i)) for i in range(Theme.THEME_MAX): self.ui.cb_canvas_theme.addItem(getThemeName(i)) if WINDOWS and not config_UseQt5: self.ui.group_main_theme.setEnabled(False) if not MACOS: auIndex = self.ui.cb_paths.findText("AU") self.ui.cb_paths.removeItem(auIndex) self.ui.tw_paths.removeWidget(self.ui.tw_paths.widget(auIndex)) if not hasCanvas: self.ui.lw_page.hideRow(self.TAB_INDEX_CANVAS) elif not hasCanvasGL: self.ui.cb_canvas_use_opengl.setEnabled(False) self.ui.cb_canvas_render_hq_aa.setEnabled(False) if host.isPlugin: self.ui.cb_engine_audio_driver.setEnabled(False) if host.processModeForced: self.ui.cb_engine_process_mode_jack.setEnabled(False) self.ui.cb_engine_process_mode_other.setEnabled(False) # ---------------------------------------------------------------------------------------------------- # Load settings self.loadSettings() # ---------------------------------------------------------------------------------------------------- # Set-up connections self.accepted.connect(self.slot_saveSettings) self.ui.buttonBox.button(QDialogButtonBox.Reset).clicked.connect( self.slot_resetSettings) self.ui.b_main_proj_folder_open.clicked.connect( self.slot_getAndSetProjectPath) self.ui.cb_engine_audio_driver.currentIndexChanged.connect( self.slot_engineAudioDriverChanged) self.ui.tb_engine_driver_config.clicked.connect( self.slot_showAudioDriverSettings) self.ui.b_paths_add.clicked.connect(self.slot_addPluginPath) self.ui.b_paths_remove.clicked.connect(self.slot_removePluginPath) self.ui.b_paths_change.clicked.connect(self.slot_changePluginPath) self.ui.cb_paths.currentIndexChanged.connect( self.slot_pluginPathTabChanged) self.ui.lw_ladspa.currentRowChanged.connect( self.slot_pluginPathRowChanged) self.ui.lw_dssi.currentRowChanged.connect( self.slot_pluginPathRowChanged) self.ui.lw_lv2.currentRowChanged.connect( self.slot_pluginPathRowChanged) self.ui.lw_vst.currentRowChanged.connect( self.slot_pluginPathRowChanged) self.ui.lw_vst3.currentRowChanged.connect( self.slot_pluginPathRowChanged) self.ui.lw_au.currentRowChanged.connect(self.slot_pluginPathRowChanged) self.ui.lw_gig.currentRowChanged.connect( self.slot_pluginPathRowChanged) self.ui.lw_sf2.currentRowChanged.connect( self.slot_pluginPathRowChanged) self.ui.lw_sfz.currentRowChanged.connect( self.slot_pluginPathRowChanged) # ---------------------------------------------------------------------------------------------------- # Post-connect setup self.ui.lw_ladspa.setCurrentRow(0) self.ui.lw_dssi.setCurrentRow(0) self.ui.lw_lv2.setCurrentRow(0) self.ui.lw_vst.setCurrentRow(0) self.ui.lw_vst3.setCurrentRow(0) self.ui.lw_au.setCurrentRow(0) self.ui.lw_gig.setCurrentRow(0) self.ui.lw_sf2.setCurrentRow(0) self.ui.lw_sfz.setCurrentRow(0) self.ui.lw_page.setCurrentCell(0, 0)
def __init__(self, parent, host, hasCanvas, hasCanvasGL): QDialog.__init__(self, parent) self.host = host self.ui = ui_carla_settings.Ui_CarlaSettingsW() self.ui.setupUi(self) if False: # kdevelop likes this :) host = CarlaHostNull() self.host = host # ---------------------------------------------------------------------------------------------------- # Set-up GUI self.ui.lw_page.setFixedWidth( 48 + 6 + 6 + QFontMetrics(self.ui.lw_page.font()).width("88888888")) for i in range(host.get_engine_driver_count()): self.ui.cb_engine_audio_driver.addItem( host.get_engine_driver_name(i)) for i in range(Theme.THEME_MAX): self.ui.cb_canvas_theme.addItem(getThemeName(i)) if WINDOWS and not config_UseQt5: self.ui.group_main_theme.setEnabled(False) if host.isControl: self.ui.lw_page.hideRow(self.TAB_INDEX_CANVAS) self.ui.lw_page.hideRow(self.TAB_INDEX_ENGINE) self.ui.lw_page.hideRow(self.TAB_INDEX_PATHS) elif not hasCanvas: self.ui.lw_page.hideRow(self.TAB_INDEX_CANVAS) elif not hasCanvasGL: self.ui.cb_canvas_use_opengl.setEnabled(False) self.ui.cb_canvas_render_hq_aa.setEnabled(False) if host.isPlugin: self.ui.cb_engine_audio_driver.setEnabled(False) if host.processModeForced: self.ui.cb_engine_process_mode_jack.setEnabled(False) self.ui.cb_engine_process_mode_other.setEnabled(False) if self.host.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK: self.ui.ch_engine_force_stereo.setEnabled(False) # FIXME, pipes on win32 not working if WINDOWS: self.ui.ch_engine_prefer_ui_bridges.setChecked(False) self.ui.ch_engine_prefer_ui_bridges.setEnabled(False) self.ui.ch_engine_prefer_ui_bridges.setVisible(False) # FIXME, not implemented yet self.ui.ch_engine_uis_always_on_top.hide() # ---------------------------------------------------------------------------------------------------- # Load settings self.loadSettings() # ---------------------------------------------------------------------------------------------------- # Set-up connections self.accepted.connect(self.slot_saveSettings) self.ui.buttonBox.button(QDialogButtonBox.Reset).clicked.connect( self.slot_resetSettings) self.ui.b_main_proj_folder_open.clicked.connect( self.slot_getAndSetProjectPath) self.ui.cb_engine_audio_driver.currentIndexChanged.connect( self.slot_engineAudioDriverChanged) self.ui.tb_engine_driver_config.clicked.connect( self.slot_showAudioDriverSettings) self.ui.b_paths_add.clicked.connect(self.slot_addPluginPath) self.ui.b_paths_remove.clicked.connect(self.slot_removePluginPath) self.ui.b_paths_change.clicked.connect(self.slot_changePluginPath) self.ui.cb_paths.currentIndexChanged.connect( self.slot_pluginPathTabChanged) self.ui.lw_ladspa.currentRowChanged.connect( self.slot_pluginPathRowChanged) self.ui.lw_dssi.currentRowChanged.connect( self.slot_pluginPathRowChanged) self.ui.lw_lv2.currentRowChanged.connect( self.slot_pluginPathRowChanged) self.ui.lw_vst.currentRowChanged.connect( self.slot_pluginPathRowChanged) self.ui.lw_vst3.currentRowChanged.connect( self.slot_pluginPathRowChanged) self.ui.lw_gig.currentRowChanged.connect( self.slot_pluginPathRowChanged) self.ui.lw_sf2.currentRowChanged.connect( self.slot_pluginPathRowChanged) self.ui.lw_sfz.currentRowChanged.connect( self.slot_pluginPathRowChanged) # ---------------------------------------------------------------------------------------------------- # Post-connect setup self.ui.lw_ladspa.setCurrentRow(0) self.ui.lw_dssi.setCurrentRow(0) self.ui.lw_lv2.setCurrentRow(0) self.ui.lw_vst.setCurrentRow(0) self.ui.lw_vst3.setCurrentRow(0) self.ui.lw_gig.setCurrentRow(0) self.ui.lw_sf2.setCurrentRow(0) self.ui.lw_sfz.setCurrentRow(0) self.ui.lw_page.setCurrentCell(0, 0)