Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

143 lines
4.7KB

  1. /*
  2. * Carla settings code
  3. * Copyright (C) 2011-2019 Filipe Coelho <falktx@falktx.com>
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU General Public License as
  7. * published by the Free Software Foundation; either version 2 of
  8. * the License, or any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * For a full copy of the GNU General Public License see the doc/GPL.txt file.
  16. */
  17. #ifndef CARLA_SETTINGS_HPP_INCLUDED
  18. #define CARLA_SETTINGS_HPP_INCLUDED
  19. //---------------------------------------------------------------------------------------------------------------------
  20. // Imports (Global)
  21. #include <QtWidgets/QDialog>
  22. //---------------------------------------------------------------------------------------------------------------------
  23. // Imports (Custom)
  24. #include "CarlaJuceUtils.hpp"
  25. struct CarlaHost;
  26. // --------------------------------------------------------------------------------------------------------------------
  27. // Driver Settings
  28. class DriverSettingsW : public QDialog
  29. {
  30. Q_OBJECT
  31. public:
  32. DriverSettingsW(QWidget* parent, uint driverIndex, QString driverName);
  33. ~DriverSettingsW() override;
  34. private:
  35. struct PrivateData;
  36. PrivateData* const self;
  37. Q_SLOT void slot_saveSettings();
  38. Q_SLOT void slot_showDevicePanel();
  39. Q_SLOT void slot_updateDeviceInfo();
  40. CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(DriverSettingsW)
  41. };
  42. // --------------------------------------------------------------------------------------------------------------------
  43. // Runtime Driver Settings
  44. class RuntimeDriverSettingsW : public QDialog
  45. {
  46. Q_OBJECT
  47. public:
  48. RuntimeDriverSettingsW(QWidget* parent = nullptr);
  49. ~RuntimeDriverSettingsW() override;
  50. void getValues(QString& audioDevice, uint& bufferSize, double& sampleRate);
  51. private:
  52. struct PrivateData;
  53. PrivateData* const self;
  54. Q_SLOT void slot_showDevicePanel();
  55. CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(RuntimeDriverSettingsW)
  56. };
  57. // --------------------------------------------------------------------------------------------------------------------
  58. // Settings Dialog
  59. class CarlaSettingsW : public QDialog
  60. {
  61. Q_OBJECT
  62. public:
  63. CarlaSettingsW(QWidget* parent, const CarlaHost& host, bool hasCanvas, bool hasCanvasGL);
  64. ~CarlaSettingsW() override;
  65. private:
  66. struct PrivateData;
  67. PrivateData* const self;
  68. // ----------------------------------------------------------------------------------------------------------------
  69. Q_SLOT void slot_saveSettings();
  70. Q_SLOT void slot_resetSettings();
  71. // ----------------------------------------------------------------------------------------------------------------
  72. Q_SLOT void slot_enableExperimental(bool toggled);
  73. Q_SLOT void slot_enableWineBridges(bool toggled);
  74. Q_SLOT void slot_pluginBridgesToggled(bool toggled);
  75. Q_SLOT void slot_canvasEyeCandyToggled(bool toggled);
  76. Q_SLOT void slot_canvasFancyEyeCandyToggled(bool toggled);
  77. Q_SLOT void slot_canvasOpenGLToggled(bool toggled);
  78. // ----------------------------------------------------------------------------------------------------------------
  79. Q_SLOT void slot_getAndSetProjectPath();
  80. // ----------------------------------------------------------------------------------------------------------------
  81. Q_SLOT void slot_engineAudioDriverChanged();
  82. Q_SLOT void slot_showAudioDriverSettings();
  83. // ----------------------------------------------------------------------------------------------------------------
  84. Q_SLOT void slot_addPluginPath();
  85. Q_SLOT void slot_removePluginPath();
  86. Q_SLOT void slot_changePluginPath();
  87. // ----------------------------------------------------------------------------------------------------------------
  88. Q_SLOT void slot_pluginPathTabChanged(int index);
  89. Q_SLOT void slot_pluginPathRowChanged(int row);
  90. // ----------------------------------------------------------------------------------------------------------------
  91. Q_SLOT void slot_addFilePath();
  92. Q_SLOT void slot_removeFilePath();
  93. Q_SLOT void slot_changeFilePath();
  94. // ----------------------------------------------------------------------------------------------------------------
  95. Q_SLOT void slot_filePathTabChanged(int index);
  96. Q_SLOT void slot_filePathRowChanged(int row);
  97. CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CarlaSettingsW)
  98. };
  99. //---------------------------------------------------------------------------------------------------------------------
  100. #endif // CARLA_SETTINGS_HPP_INCLUDED