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.

152 lines
4.1KB

  1. /*
  2. * Carla plugin database 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_DATABASE_HPP_INCLUDED
  18. #define CARLA_DATABASE_HPP_INCLUDED
  19. //---------------------------------------------------------------------------------------------------------------------
  20. // Imports (Global)
  21. #include <QtCore/QThread>
  22. #include <QtWidgets/QDialog>
  23. //---------------------------------------------------------------------------------------------------------------------
  24. // Imports (Custom)
  25. #include "CarlaJuceUtils.hpp"
  26. class CarlaHost;
  27. // --------------------------------------------------------------------------------------------------------------------
  28. // Separate Thread for Plugin Search
  29. class SearchPluginsThread : public QThread
  30. {
  31. Q_OBJECT
  32. signals:
  33. void pluginLook(float percent, QString plugin);
  34. public:
  35. SearchPluginsThread(QObject* parent, QString pathBinaries);
  36. ~SearchPluginsThread() override;
  37. private:
  38. struct PrivateData;
  39. PrivateData* const self;
  40. protected:
  41. void run() override;
  42. CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(SearchPluginsThread)
  43. };
  44. // --------------------------------------------------------------------------------------------------------------------
  45. // Plugin Refresh Dialog
  46. class PluginRefreshW : public QDialog
  47. {
  48. Q_OBJECT
  49. public:
  50. PluginRefreshW(QWidget* parent, const CarlaHost& host);
  51. ~PluginRefreshW() override;
  52. void getValues(QString& audioDevice, uint& bufferSize, double& sampleRate);
  53. private:
  54. struct PrivateData;
  55. PrivateData* const self;
  56. protected:
  57. void closeEvent(QCloseEvent* event) override;
  58. private slots:
  59. void slot_saveSettings();
  60. void slot_start();
  61. void slot_skip();
  62. void slot_checkTools();
  63. void slot_handlePluginLook(float percent, QString plugin);
  64. void slot_handlePluginThreadFinished();
  65. private:
  66. CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(PluginRefreshW)
  67. };
  68. // --------------------------------------------------------------------------------------------------------------------
  69. // Plugin Database Dialog
  70. class PluginDatabaseW : public QDialog
  71. {
  72. Q_OBJECT
  73. public:
  74. PluginDatabaseW(QWidget* parent, const CarlaHost& host, bool hasCanvas, bool hasCanvasGL);
  75. ~PluginDatabaseW() override;
  76. private:
  77. struct PrivateData;
  78. PrivateData* const self;
  79. protected:
  80. void showEvent(QShowEvent* event) override;
  81. private slots:
  82. void slot_cellClicked(int row, int column);
  83. void slot_cellDoubleClicked(int row, int column);
  84. void slot_addPlugin();
  85. void slot_checkPlugin(int row);
  86. void slot_checkFilters();
  87. void slot_refreshPlugins();
  88. void slot_clearFilters();
  89. void slot_saveSettings();
  90. private:
  91. CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(PluginDatabaseW)
  92. };
  93. // --------------------------------------------------------------------------------------------------------------------
  94. // Jack Application Dialog
  95. class JackApplicationW : public QDialog
  96. {
  97. Q_OBJECT
  98. public:
  99. JackApplicationW(QWidget* parent);
  100. ~JackApplicationW() override;
  101. void getCommandAndFlags(QString& command, QString& name, QString& labelSetup);
  102. private:
  103. struct PrivateData;
  104. PrivateData* const self;
  105. private slots:
  106. void slot_commandChanged(QString text);
  107. void slot_sessionManagerChanged(int index);
  108. void slot_saveSettings();
  109. private:
  110. CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(JackApplicationW)
  111. };
  112. //---------------------------------------------------------------------------------------------------------------------
  113. #endif // CARLA_DATABASE_HPP_INCLUDED