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.

78 lines
2.6KB

  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. # Carla plugin host
  4. # Copyright (C) 2011-2022 Filipe Coelho <falktx@falktx.com>
  5. #
  6. # This program is free software; you can redistribute it and/or
  7. # modify it under the terms of the GNU General Public License as
  8. # published by the Free Software Foundation; either version 2 of
  9. # the License, or any later version.
  10. #
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU General Public License for more details.
  15. #
  16. # For a full copy of the GNU General Public License see the doc/GPL.txt file.
  17. # ---------------------------------------------------------------------------------------------------------------------
  18. # Imports (Global)
  19. from PyQt5.QtCore import Qt
  20. from PyQt5.QtWidgets import QDialog
  21. # ---------------------------------------------------------------------------------------------------------------------
  22. # Imports (Carla)
  23. from common import MACOS, WINDOWS
  24. from carla_shared import gCarla
  25. # ---------------------------------------------------------------------------------------------------------------------
  26. # Imports (Local)
  27. from aboutjucedialog_ui import Ui_AboutJuceDialog
  28. # ------------------------------------------------------------------------------------------------------------
  29. # About JUCE dialog
  30. class AboutJuceDialog(QDialog):
  31. def __init__(self, parent):
  32. QDialog.__init__(self, parent)
  33. self.ui = Ui_AboutJuceDialog()
  34. self.ui.setupUi(self)
  35. self.ui.l_text2.setText(self.tr("This program uses JUCE version %s." % gCarla.utils.get_juce_version()))
  36. self.adjustSize()
  37. self.setFixedSize(self.size())
  38. flags = self.windowFlags()
  39. flags &= ~Qt.WindowContextHelpButtonHint
  40. if WINDOWS:
  41. flags |= Qt.MSWindowsFixedSizeDialogHint
  42. self.setWindowFlags(flags)
  43. if MACOS:
  44. self.setWindowModality(Qt.WindowModal)
  45. # ---------------------------------------------------------------------------------------------------------------------
  46. # Testing
  47. if __name__ == '__main__':
  48. import sys
  49. # pylint: disable=ungrouped-imports
  50. from PyQt5.QtWidgets import QApplication
  51. # pylint: enable=ungrouped-imports
  52. # from carla_utils import CarlaUtils
  53. # gCarla.utils = CarlaUtils(os.path.dirname(__file__) + "/../../../bin/libcarla_utils.dylib")
  54. _app = QApplication(sys.argv)
  55. _gui = AboutJuceDialog(None)
  56. _gui.exec_()
  57. # ---------------------------------------------------------------------------------------------------------------------