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.

109 lines
3.3KB

  1. /*
  2. * Carla plugin host
  3. * Copyright (C) 2011-2022 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. #include "pluginlistdialog.hpp"
  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 "pluginlistdialog_ui.hpp"
  28. #ifdef __clang__
  29. # pragma clang diagnostic pop
  30. #elif defined(__GNUC__) && __GNUC__ >= 8
  31. # pragma GCC diagnostic pop
  32. #endif
  33. #include "CarlaString.hpp"
  34. // --------------------------------------------------------------------------------------------------------------------
  35. // Jack Application Dialog
  36. struct PluginListDialog::Self {
  37. Ui_PluginListDialog ui;
  38. Self() {}
  39. static Self& create()
  40. {
  41. Self* const self = new Self();
  42. return *self;
  43. }
  44. };
  45. PluginListDialog::PluginListDialog(QWidget* const parent, const bool useSystemIcons)
  46. : QDialog(parent),
  47. self(Self::create())
  48. {
  49. self.ui.setupUi(this);
  50. // -------------------------------------------------------------------------------------------------------------
  51. // UI setup
  52. // -------------------------------------------------------------------------------------------------------------
  53. // Load settings
  54. // -------------------------------------------------------------------------------------------------------------
  55. // Set-up connections
  56. }
  57. PluginListDialog::~PluginListDialog()
  58. {
  59. delete &self;
  60. }
  61. // -----------------------------------------------------------------------------------------------------------------
  62. // public methods
  63. // -----------------------------------------------------------------------------------------------------------------
  64. // private methods
  65. // -----------------------------------------------------------------------------------------------------------------
  66. // private slots
  67. // --------------------------------------------------------------------------------------------------------------------
  68. PluginListDialogResults* carla_frontend_createAndExecPluginListDialog(void* const parent, const bool useSystemIcons)
  69. {
  70. PluginListDialog gui(reinterpret_cast<QWidget*>(parent), useSystemIcons);
  71. if (gui.exec())
  72. {
  73. static PluginListDialogResults ret = {};
  74. static CarlaString retBinary;
  75. static CarlaString retLabel;
  76. // TODO
  77. ret.binary = retBinary;
  78. ret.label = retLabel;
  79. return &ret;
  80. }
  81. return nullptr;
  82. }
  83. // --------------------------------------------------------------------------------------------------------------------