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.

104 lines
2.3KB

  1. /*
  2. * DISTRHO Notes Plugin
  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 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 GPL.txt file
  16. */
  17. #ifndef __DISTRHO_UI_NOTES_HPP__
  18. #define __DISTRHO_UI_NOTES_HPP__
  19. #include "DistrhoUIQt4.hpp"
  20. #include "paramspinbox.hpp"
  21. #include <QtGui/QGridLayout>
  22. #include <QtGui/QLabel>
  23. #include <QtGui/QPushButton>
  24. #include <QtGui/QTextEdit>
  25. class QResizeEvent;
  26. START_NAMESPACE_DISTRHO
  27. // -------------------------------------------------
  28. class DistrhoUINotes : public Qt4UI
  29. {
  30. Q_OBJECT
  31. public:
  32. DistrhoUINotes();
  33. ~DistrhoUINotes();
  34. protected:
  35. // ---------------------------------------------
  36. // Information
  37. bool d_resizable()
  38. {
  39. return true;
  40. }
  41. uint d_minimumWidth()
  42. {
  43. return 180;
  44. }
  45. uint d_minimumHeight()
  46. {
  47. return 150;
  48. }
  49. // ---------------------------------------------
  50. // DSP Callbacks
  51. void d_parameterChanged(uint32_t index, float value);
  52. void d_stateChanged(const char* key, const char* value);
  53. // ---------------------------------------------
  54. // UI Callbacks
  55. void d_uiIdle();
  56. // ---------------------------------------------
  57. // listen for resize events
  58. void resizeEvent(QResizeEvent*);
  59. private slots:
  60. void buttonClicked(bool click);
  61. void progressBarValueChanged(float value);
  62. void textChanged();
  63. private:
  64. int fCurPage;
  65. int fSaveSizeNowChecker;
  66. int fSaveTextNowChecker;
  67. QString fNotes[100];
  68. QTextEdit fTextEdit;
  69. QPushButton fButton;
  70. ParamProgressBar fProgressBar;
  71. QLabel fSpacer;
  72. QGridLayout fGridLayout;
  73. void saveCurrentTextState();
  74. };
  75. // -------------------------------------------------
  76. END_NAMESPACE_DISTRHO
  77. #endif // __DISTRHO_UI_NOTES_HPP__