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.

DistrhoUIQt4.h 1.8KB

11 years ago
11 years ago
11 years ago
11 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. * DISTRHO Plugin Toolkit (DPT)
  3. * Copyright (C) 2012-2013 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 Lesser General Public
  7. * License as published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU Lesser General Public License for more details.
  13. *
  14. * For a full copy of the license see the LGPL.txt file
  15. */
  16. #ifndef __DISTRHO_UI_QT4_H__
  17. #define __DISTRHO_UI_QT4_H__
  18. #include "src/DistrhoDefines.h"
  19. #ifdef DISTRHO_UI_QT4
  20. #include "DistrhoUI.h"
  21. #include <QtGui/QWidget>
  22. START_NAMESPACE_DISTRHO
  23. // -------------------------------------------------
  24. class Qt4UI : public UI,
  25. public QWidget
  26. {
  27. public:
  28. Qt4UI();
  29. virtual ~Qt4UI();
  30. // ---------------------------------------------
  31. protected:
  32. // Information
  33. virtual bool d_resizable() { return false; }
  34. virtual int d_minimumWidth() { return 100; }
  35. virtual int d_minimumHeight() { return 100; }
  36. // DSP Callbacks
  37. virtual void d_parameterChanged(uint32_t index, float value) = 0;
  38. #if DISTRHO_PLUGIN_WANT_PROGRAMS
  39. virtual void d_programChanged(uint32_t index) = 0;
  40. #endif
  41. #if DISTRHO_PLUGIN_WANT_STATE
  42. virtual void d_stateChanged(const char* key, const char* value) = 0;
  43. #endif
  44. // UI Callbacks
  45. virtual void d_uiIdle();
  46. // Implement resize internally
  47. unsigned int d_width() { return width(); }
  48. unsigned int d_height() { return height(); }
  49. private:
  50. friend class UIInternal;
  51. };
  52. // -------------------------------------------------
  53. END_NAMESPACE_DISTRHO
  54. #endif // DISTRHO_UI_QT4
  55. #endif // __DISTRHO_UI_QT4_H__