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.

pluginlistdialog.hpp 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. /*
  2. * Carla plugin host
  3. * Copyright (C) 2011-2023 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. #pragma once
  18. #ifdef __clang__
  19. # pragma clang diagnostic push
  20. # pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy"
  21. # pragma clang diagnostic ignored "-Wdeprecated-register"
  22. #elif defined(__GNUC__) && __GNUC__ >= 8
  23. # pragma GCC diagnostic push
  24. # pragma GCC diagnostic ignored "-Wclass-memaccess"
  25. # pragma GCC diagnostic ignored "-Wdeprecated-copy"
  26. #endif
  27. #include <QtWidgets/QDialog>
  28. #ifdef __clang__
  29. # pragma clang diagnostic pop
  30. #elif defined(__GNUC__) && __GNUC__ >= 8
  31. # pragma GCC diagnostic pop
  32. #endif
  33. #include "CarlaBackend.h"
  34. static constexpr const uint PLUGIN_QUERY_API_VERSION = 12;
  35. struct HostSettings {
  36. bool showPluginBridges;
  37. bool showWineBridges;
  38. bool useSystemIcons;
  39. };
  40. struct PluginInfo {
  41. uint API;
  42. CARLA_BACKEND_NAMESPACE::BinaryType build;
  43. CARLA_BACKEND_NAMESPACE::PluginType type;
  44. uint hints;
  45. QString category;
  46. QString filename;
  47. QString name;
  48. QString label;
  49. QString maker;
  50. uint64_t uniqueId;
  51. uint audioIns;
  52. uint audioOuts;
  53. uint cvIns;
  54. uint cvOuts;
  55. uint midiIns;
  56. uint midiOuts;
  57. uint parametersIns;
  58. uint parametersOuts;
  59. };
  60. // --------------------------------------------------------------------------------------------------------------------
  61. // Plugin List Dialog
  62. class PluginListDialog : public QDialog
  63. {
  64. struct Self;
  65. Self& self;
  66. // ----------------------------------------------------------------------------------------------------------------
  67. public:
  68. explicit PluginListDialog(QWidget* parent, const HostSettings& hostSettings);
  69. ~PluginListDialog() override;
  70. // ----------------------------------------------------------------------------------------------------------------
  71. // public methods
  72. const PluginInfo& getSelectedPluginInfo() const;
  73. // ----------------------------------------------------------------------------------------------------------------
  74. // protected methods
  75. protected:
  76. void showEvent(QShowEvent*) override;
  77. // ----------------------------------------------------------------------------------------------------------------
  78. // private methods
  79. void loadSettings();
  80. // ----------------------------------------------------------------------------------------------------------------
  81. // private slots
  82. private Q_SLOTS:
  83. void slot_cellClicked(int row, int column);
  84. void slot_cellDoubleClicked(int row, int column);
  85. void slot_focusSearchFieldAndSelectAll();
  86. void slot_addPlugin();
  87. void slot_checkPlugin(int row);
  88. void slot_checkFilters();
  89. void slot_checkFiltersCategoryAll(bool clicked);
  90. void slot_checkFiltersCategorySpecific(bool clicked);
  91. void slot_refreshPlugins();
  92. void slot_clearFilters();
  93. void slot_saveSettings();
  94. };
  95. // --------------------------------------------------------------------------------------------------------------------