Collection of tools useful for audio production
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.

75 lines
1.8KB

  1. /*
  2. * DISTHRO Plugin Toolkit (DPT)
  3. * Copyright (C) 2012 Filipe Coelho <falktx@gmail.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 license see the GPL.txt file
  16. */
  17. #ifndef __DISTRHO_UI_QT4_H__
  18. #define __DISTRHO_UI_QT4_H__
  19. #include "src/DistrhoDefines.h"
  20. #ifdef DISTRHO_UI_QT4
  21. #include "DistrhoUI.h"
  22. #include <QtGui/QWidget>
  23. START_NAMESPACE_DISTRHO
  24. // -------------------------------------------------
  25. class Qt4UI : public UI,
  26. public QWidget
  27. {
  28. public:
  29. Qt4UI();
  30. virtual ~Qt4UI();
  31. // ---------------------------------------------
  32. protected:
  33. // Information
  34. virtual bool d_resizable() { return false; }
  35. virtual int d_minimumWidth() { return 100; }
  36. virtual int d_minimumHeight() { return 100; }
  37. // DSP Callbacks
  38. virtual void d_parameterChanged(uint32_t index, float value) = 0;
  39. #if DISTRHO_PLUGIN_WANT_PROGRAMS
  40. virtual void d_programChanged(uint32_t index) = 0;
  41. #endif
  42. #if DISTRHO_PLUGIN_WANT_STATE
  43. virtual void d_stateChanged(const char* key, const char* value) = 0;
  44. #endif
  45. // UI Callbacks
  46. virtual void d_uiIdle();
  47. // Implement resize internally
  48. unsigned int d_width() { return width(); }
  49. unsigned int d_height() { return height(); }
  50. private:
  51. friend class UIInternal;
  52. };
  53. // -------------------------------------------------
  54. END_NAMESPACE_DISTRHO
  55. #endif // DISTRHO_UI_QT4
  56. #endif // __DISTRHO_UI_QT4_H__