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.

154 lines
5.1KB

  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. #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
  22. # pragma GCC diagnostic push
  23. # pragma GCC diagnostic ignored "-Wconversion"
  24. # pragma GCC diagnostic ignored "-Weffc++"
  25. # pragma GCC diagnostic ignored "-Wsign-conversion"
  26. #endif
  27. #include <QtWidgets/QDialog>
  28. #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
  29. # pragma GCC diagnostic pop
  30. #endif
  31. //---------------------------------------------------------------------------------------------------------------------
  32. // Imports (Custom)
  33. #include "CarlaJuceUtils.hpp"
  34. class CarlaHost;
  35. // --------------------------------------------------------------------------------------------------------------------
  36. // Driver Settings
  37. class DriverSettingsW : public QDialog
  38. {
  39. Q_OBJECT
  40. public:
  41. DriverSettingsW(QWidget* parent, uint driverIndex, QString driverName);
  42. ~DriverSettingsW() override;
  43. private:
  44. struct PrivateData;
  45. PrivateData* const self;
  46. Q_SLOT void slot_saveSettings();
  47. Q_SLOT void slot_showDevicePanel();
  48. Q_SLOT void slot_updateDeviceInfo();
  49. CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(DriverSettingsW)
  50. };
  51. // --------------------------------------------------------------------------------------------------------------------
  52. // Runtime Driver Settings
  53. class RuntimeDriverSettingsW : public QDialog
  54. {
  55. Q_OBJECT
  56. public:
  57. RuntimeDriverSettingsW(QWidget* parent = nullptr);
  58. ~RuntimeDriverSettingsW() override;
  59. void getValues(QString& audioDevice, uint& bufferSize, double& sampleRate);
  60. private:
  61. struct PrivateData;
  62. PrivateData* const self;
  63. Q_SLOT void slot_showDevicePanel();
  64. CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(RuntimeDriverSettingsW)
  65. };
  66. // --------------------------------------------------------------------------------------------------------------------
  67. // Settings Dialog
  68. class CarlaSettingsW : public QDialog
  69. {
  70. Q_OBJECT
  71. public:
  72. CarlaSettingsW(QWidget* parent, CarlaHost& host, bool hasCanvas, bool hasCanvasGL);
  73. ~CarlaSettingsW() override;
  74. private:
  75. struct PrivateData;
  76. PrivateData* const self;
  77. // ----------------------------------------------------------------------------------------------------------------
  78. Q_SLOT void slot_saveSettings();
  79. Q_SLOT void slot_resetSettings();
  80. // ----------------------------------------------------------------------------------------------------------------
  81. Q_SLOT void slot_enableExperimental(bool toggled);
  82. Q_SLOT void slot_enableWineBridges(bool toggled);
  83. Q_SLOT void slot_pluginBridgesToggled(bool toggled);
  84. Q_SLOT void slot_canvasEyeCandyToggled(bool toggled);
  85. Q_SLOT void slot_canvasFancyEyeCandyToggled(bool toggled);
  86. Q_SLOT void slot_canvasOpenGLToggled(bool toggled);
  87. // ----------------------------------------------------------------------------------------------------------------
  88. Q_SLOT void slot_getAndSetProjectPath();
  89. // ----------------------------------------------------------------------------------------------------------------
  90. Q_SLOT void slot_engineAudioDriverChanged();
  91. Q_SLOT void slot_showAudioDriverSettings();
  92. // ----------------------------------------------------------------------------------------------------------------
  93. Q_SLOT void slot_addPluginPath();
  94. Q_SLOT void slot_removePluginPath();
  95. Q_SLOT void slot_changePluginPath();
  96. // ----------------------------------------------------------------------------------------------------------------
  97. Q_SLOT void slot_pluginPathTabChanged(int index);
  98. Q_SLOT void slot_pluginPathRowChanged(int row);
  99. // ----------------------------------------------------------------------------------------------------------------
  100. Q_SLOT void slot_addFilePath();
  101. Q_SLOT void slot_removeFilePath();
  102. Q_SLOT void slot_changeFilePath();
  103. // ----------------------------------------------------------------------------------------------------------------
  104. Q_SLOT void slot_filePathTabChanged(int index);
  105. Q_SLOT void slot_filePathRowChanged(int row);
  106. CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CarlaSettingsW)
  107. };
  108. //---------------------------------------------------------------------------------------------------------------------
  109. #endif // CARLA_SETTINGS_HPP_INCLUDED