Lv2SubPluginFeatures.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * Lv2SubPluginFeatures.h - derivation from
  3. * Plugin::Descriptor::SubPluginFeatures for
  4. * hosting LV2 plugins
  5. *
  6. * Copyright (c) 2018-2020 Johannes Lorenz <jlsf2013$users.sourceforge.net, $=@>
  7. *
  8. * This file is part of LMMS - https://lmms.io
  9. *
  10. * This program is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU General Public
  12. * License as published by the Free Software Foundation; either
  13. * version 2 of the License, or (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  18. * General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public
  21. * License along with this program (see COPYING); if not, write to the
  22. * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  23. * Boston, MA 02110-1301 USA.
  24. *
  25. */
  26. #ifndef LV2_SUBPLUGIN_FEATURES_H
  27. #define LV2_SUBPLUGIN_FEATURES_H
  28. #include "lmmsconfig.h"
  29. #ifdef LMMS_HAVE_LV2
  30. #include <lilv/lilv.h>
  31. #include "lmms_export.h"
  32. #include "Plugin.h"
  33. class LMMS_EXPORT Lv2SubPluginFeatures : public Plugin::Descriptor::SubPluginFeatures
  34. {
  35. private:
  36. static const LilvPlugin *getPlugin(const Key &k);
  37. static QString pluginName(const LilvPlugin *plug);
  38. public:
  39. Lv2SubPluginFeatures(Plugin::PluginTypes type);
  40. void fillDescriptionWidget(
  41. QWidget *parent, const Key *k) const override;
  42. QString additionalFileExtensions(const Key &k) const override;
  43. QString displayName(const Key &k) const override;
  44. QString description(const Key &k) const override;
  45. const PixmapLoader *logo(const Key &k) const override;
  46. void listSubPluginKeys(
  47. const Plugin::Descriptor *desc, KeyList &kl) const override;
  48. };
  49. #endif // LMMS_HAVE_LV2
  50. #endif