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.

DistrhoUIQt.hpp 2.1KB

11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. * DISTRHO Plugin Toolkit (DPT)
  3. * Copyright (C) 2012-2013 Filipe Coelho <falktx@falktx.com>
  4. *
  5. * Permission to use, copy, modify, and/or distribute this software for any purpose with
  6. * or without fee is hereby granted, provided that the above copyright notice and this
  7. * permission notice appear in all copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
  10. * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
  11. * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  12. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
  13. * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  14. * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  15. */
  16. #ifndef DISTRHO_UI_QT_HPP_INCLUDED
  17. #define DISTRHO_UI_QT_HPP_INCLUDED
  18. #include "DistrhoUI.hpp"
  19. #include <QtCore/Qt>
  20. #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
  21. # include <QtWidgets/QWidget>
  22. #else
  23. # include <QtGui/QWidget>
  24. #endif
  25. START_NAMESPACE_DISTRHO
  26. // -----------------------------------------------------------------------
  27. // Qt UI
  28. class QtUI : public UI,
  29. public QWidget
  30. {
  31. public:
  32. QtUI();
  33. virtual ~QtUI() override;
  34. // -------------------------------------------------------------------
  35. // UI Helpers
  36. void setSize(unsigned int width, unsigned int height);
  37. protected:
  38. // -------------------------------------------------------------------
  39. // Information (Qt)
  40. virtual bool d_isResizable() const noexcept { return false; }
  41. virtual uint d_getMinimumWidth() const noexcept { return 100; }
  42. virtual uint d_getMinimumHeight() const noexcept { return 100; }
  43. private:
  44. // -------------------------------------------------------------------
  45. // Implemented internally
  46. unsigned int d_getWidth() const noexcept override { return width(); }
  47. unsigned int d_getHeight() const noexcept override { return height(); }
  48. friend class UIInternal;
  49. };
  50. // -----------------------------------------------------------------------
  51. END_NAMESPACE_DISTRHO
  52. #endif // DISTRHO_UI_QT_HPP_INCLUDED