How to use the classes.ui_util 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 / openshot / windows / MainWindow.py View on Github external
#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)
		
		#setup files tree
		self.filesTreeView = MediaTreeView(self)
		self.tabFiles.layout().addWidget(self.filesTreeView) #gridLayout_2  , 1, 0

		#setup transitions tree
github OpenShot / openshot-qt / src / windows / squeze.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 events handlers
        self.btncrop.clicked.connect(self.load_crop)
        self.btnsqueze.clicked.connect(self.load_squeze)
        self.btnletterbox.clicked.connect(self.load_letter_box)
        self.btnnone.clicked.connect(self.close_dialog)
        self.btnnone.pressed.connect(self.reject)
github OpenShot / openshot-qt / src / windows / squeze.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 events handlers
        self.btncrop.clicked.connect(self.load_crop)
        self.btnsqueze.clicked.connect(self.load_squeze)
        self.btnletterbox.clicked.connect(self.load_letter_box)
        self.btnnone.clicked.connect(self.close_dialog)
        self.btnnone.pressed.connect(self.reject)
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 / new_preset_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 / Import_titles.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 / progress_bar_export.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 / export_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)

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

        self.preset_name = ""
        self.project = self.app.project

        # set events handlers
        self.btnfolder.clicked.connect(self.choose_folder_output)
        self.btndeletepreset.clicked.connect(self.delete_preset)
        self.btnapplypreset.clicked.connect(self.apply_preset)
        self.cbopreset.activated.connect(self.load_preset)
        self.chkentiresequence.stateChanged.connect(self.lenght_group_state)
        self.chkprojectprofilesettings.stateChanged.connect(self.direction_group)
        self.cbosqueze.activated.connect(self.load_squeze)