OpenShot Video Editor  2.0.0
Functions | Variables
ui_util Namespace Reference

Functions

def center
 Center a window on the main window. More...
 
def connect_auto_events
 Connect any events in a *.ui file with matching Python method names. More...
 
def get_default_icon
 Get a QIcon, and fallback to default theme if OS does not support themes. More...
 
def get_icon
 Get either the current theme icon or fallback to default theme (for custom icons). More...
 
def init_element
 Initialize language and icons of the given element. More...
 
def init_ui
 Initialize all child widgets and action of a window or dialog. More...
 
def load_theme
 Load the current OS theme, or fallback to a default one. More...
 
def load_ui
 Load a Qt *.ui file, and also load an XML parsed version. More...
 
def search_dir
 Search for theme name. More...
 
def setup_icon
 Using the window xml, set the icon on the given element, or if theme_name passed load that icon. More...
 
def transfer_children
 

Variables

string DEFAULT_THEME_NAME = "Humanity"
 

Function Documentation

def ui_util.center (   window)

Center a window on the main window.

Definition at line 245 of file ui_util.py.

def ui_util.connect_auto_events (   window,
  elem,
  name 
)

Connect any events in a *.ui file with matching Python method names.

Definition at line 201 of file ui_util.py.

def ui_util.get_default_icon (   theme_name)

Get a QIcon, and fallback to default theme if OS does not support themes.

Definition at line 96 of file ui_util.py.

def ui_util.get_icon (   theme_name)

Get either the current theme icon or fallback to default theme (for custom icons).

Returns None if none found or empty name.

Definition at line 134 of file ui_util.py.

def ui_util.init_element (   window,
  elem 
)

Initialize language and icons of the given element.

Definition at line 167 of file ui_util.py.

def ui_util.init_ui (   window)

Initialize all child widgets and action of a window or dialog.

Definition at line 220 of file ui_util.py.

def ui_util.load_theme ( )

Load the current OS theme, or fallback to a default one.

Definition at line 48 of file ui_util.py.

def ui_util.load_ui (   window,
  path 
)

Load a Qt *.ui file, and also load an XML parsed version.

Definition at line 66 of file ui_util.py.

def ui_util.search_dir (   base_path,
  theme_name 
)

Search for theme name.

Definition at line 106 of file ui_util.py.

def ui_util.setup_icon (   window,
  elem,
  name,
  theme_name = None 
)

Using the window xml, set the icon on the given element, or if theme_name passed load that icon.

Definition at line 149 of file ui_util.py.

def ui_util.transfer_children (   from_widget,
  to_widget 
)

Definition at line 253 of file ui_util.py.

Variable Documentation

string ui_util.DEFAULT_THEME_NAME = "Humanity"

Definition at line 43 of file ui_util.py.