How to use the classes.ui_util.load_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 / animated_title.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)

        # Track metrics
        track_metric_screen("animated-title-screen")

        # Add render button
        app = get_app()
        _ = app._tr
        self.btnRender = QPushButton(_('Render'))
        self.btnCancel = QPushButton(_('Cancel'))
        self.buttonBox.addButton(self.btnRender, QDialogButtonBox.AcceptRole)
        self.buttonBox.addButton(self.btnCancel, QDialogButtonBox.RejectRole)

        # Add blender treeview
github OpenShot / openshot-qt / src / windows / main_window.py View on Github external
# Set unique install id (if blank)
        if not s.get("unique_install_id"):
            s.set("unique_install_id", str(uuid4()))

            # Track 1st launch metric
            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()
github OpenShot / openshot-qt / src / windows / add_to_timeline.py View on Github external
def __init__(self, files=None, position=0.0):
        # 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.settings = settings.get_settings()

        # Get translation object
        self.app = get_app()
        _ = self.app._tr

        # Track metrics
        track_metric_screen("add-to-timeline-screen")

        # Add custom treeview to window
        self.treeFiles = TimelineTreeView(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 / folder_name.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 / 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:
github OpenShot / openshot-qt / src / windows / current_exporting_projects.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

        # set events handlers
        self.btnAdd.clicked.connect(self.add_preset)
        self.btnModified.clicked.connect(self.modified_preset)
        self.btnRename.clicked.connect(self.rename_preset)
        self.btnCopy.clicked.connect(self.copy_preset)
        self.btnDelete.clicked.connect(self.delete_preset)
github OpenShot / openshot-qt / src / windows / clip_properties.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 / transitions_properties.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 / openshot / windows / MainWindow.py View on Github external
def __init__(self):

		#Create main window base class
		QMainWindow.__init__(self)
		#set window on app for reference during initialization of children
		get_app().window = self
		
		#Load theme if not set by OS
		ui_util.load_theme()
		
		#Load UI from designer
		ui_util.load_ui(self, self.ui_path)
		
		#Load user settings for window
		self.load_settings()

		#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().update_manager.add_watcher(self)
		
		#setup timeline
		self.timeline = TimelineWebView(self)
		self.frameWeb.layout().addWidget(self.timeline)