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.

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