How to use the classes.ui_util.init_ui function in classes

To help you get started, we’ve selected a few classes examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github OpenShot / openshot-qt / src / windows / preferences.py View on Github external
def __init__(self):

        # Create dialog class
        QDialog.__init__(self)

        # Load UI from designer
        ui_util.load_ui(self, self.ui_path)

        # Init UI
        ui_util.init_ui(self)

        # Get settings
        self.s = settings.get_settings()

        # Dynamically load tabs from settings data
        self.settings_data = settings.get_settings().get_all_settings()

        # Track metrics
        track_metric_screen("preferences-screen")

        # Load all user values
        self.params = {}
        for item in self.settings_data:
            if "setting" in item and "value" in item:
                self.params[item["setting"]] = item
github OpenShot / openshot-qt / src / windows / presets.py View on Github external
def __init__(self):
        # Create dialog class
        QDialog.__init__(self)

        # Load UI from designer
        ui_util.load_ui(self, self.ui_path)

        # Init UI
        ui_util.init_ui(self)

        # get translations
        app = get_app()
        _ = app._tr

        ##set even handlers
        self.cmbpresets.activated.connect(self.load_presets_list)
        self.btnclearpreset.clicked.connect(self.delete_preset)
        self.btnsavecurrent.clicked.connect(self.save_current_preset)
github OpenShot / openshot-qt / src / windows / about.py View on Github external
def __init__(self):

        # Create dialog class
        QDialog.__init__(self)

        # Load UI from designer
        ui_util.load_ui(self, self.ui_path)

        # Init Ui
        ui_util.init_ui(self)

        # get translations
        self.app = get_app()
        _ = self.app._tr

        # Update github link button
        github_text = _("OpenShot on GitHub")
        github_html = '<p align="center"><a href="https://github.com/OpenShot/"><span style="text-decoration: underline; color:#55aaff;">%s</span></a></p>' % (github_text)
        self.lblGitHubLink.setText(github_html)

        # Get changelog for openshot-qt (if any)
        changelog_list = []
        changelog_path = os.path.join(info.PATH, 'settings', 'openshot-qt.log')
        if os.path.exists(changelog_path):
            # Attempt to open changelog with utf-8, and then utf-16-le (for unix / windows support)
            for encoding_name in ('utf-8', 'utf_16_le'):
github OpenShot / openshot-qt / src / windows / Import_image_seq.py View on Github external
def __init__(self):
        # Create dialog class
        QDialog.__init__(self)

        # Load UI from designer
        ui_util.load_ui(self, self.ui_path)

        # Init UI
        ui_util.init_ui(self)
github OpenShot / openshot-qt / src / windows / main_window.py View on Github external
track_metric_screen("initial-launch-screen")

        # Track main screen
        track_metric_screen("main-screen")

        # Create blank tutorial manager
        self.tutorial_manager = None

        # Load UI from designer
        ui_util.load_ui(self, self.ui_path)

        # Set all keyboard shortcuts from the settings file
        self.InitKeyboardShortcuts()

        # Init UI
        ui_util.init_ui(self)

        # Setup toolbars that aren't on main window, set initial state of items, etc
        self.setup_toolbars()

        # Add window as watcher to receive undo/redo status updates
        get_app().updates.add_watcher(self)

        # Get current version of OpenShot via HTTP
        self.FoundVersionSignal.connect(self.foundCurrentVersion)
        get_current_Version()

        # Connect signals
        self.is_transforming = False
        self.TransformSignal.connect(self.transformTriggered)
        if not self.mode == "unittest":
            self.RecoverBackup.connect(self.recover_backup)
github OpenShot / openshot-qt / src / windows / start_screen.py View on Github external
def __init__(self):
        # Create dialog class
        QDialog.__init__(self)

        # Load UI from designer
        ui_util.load_ui(self, self.ui_path)

        # Init UI
        ui_util.init_ui(self)
github OpenShot / openshot-qt / src / windows / simple_keyframe_clip_properties.py View on Github external
def __init__(self):
        # Create Dockwidget class
        QDockWidget.__init__(self)

        # Load UI from designer
        ui_util.load_ui(self, self.ui_path)

        # Init UI
        ui_util.init_ui(self)
github OpenShot / openshot-qt / src / windows / Import_maps.py View on Github external
def __init__(self):
        # Create dialog class
        QDialog.__init__(self)

        # Load UI from designer
        ui_util.load_ui(self, self.ui_path)

        # Init UI
        ui_util.init_ui(self)
github OpenShot / openshot-qt / src / windows / upload_video.py View on Github external
def __init__(self):
        # Create dialog class
        QDialog.__init__(self)

        # Load UI from designer
        ui_util.load_ui(self, self.ui_path)

        # Init Ui
        ui_util.init_ui(self)