OpenShot Video Editor  2.0.0
Public Member Functions | Public Attributes | List of all members
project_data.ProjectDataStore Class Reference

This class allows advanced searching of data structure, implements changes interface. More...

Inheritance diagram for project_data.ProjectDataStore:

Public Member Functions

def __init__ (self)
 
def add_to_recent_files (self, file_path)
 Add this project to the recent files list. More...
 
def changed (self, action)
 This method is invoked by the UpdateManager each time a change happens (i.e UpdateInterface) More...
 
def check_if_paths_are_valid (self)
 Check if all paths are valid, and prompt to update them if needed. More...
 
def convert_paths_to_absolute (self)
 Convert all paths to absolute. More...
 
def convert_paths_to_relative (self, file_path)
 Convert all paths relative to this filepath. More...
 
def generate_id (self, digits=10)
 Generate random alphanumeric ids. More...
 
def get (self, key)
 Get copied value of a given key in data store. More...
 
def is_image (self, file)
 
def load (self, file_path)
 Load project from file. More...
 
def move_temp_paths_to_project_folder (self, file_path)
 Move all temp files (such as Thumbnails, Titles, and Blender animations) to the project folder. More...
 
def needs_save (self)
 Returns if project data Has unsaved changes. More...
 
def new (self)
 Try to load default project settings file, will raise error on failure. More...
 
def read_legacy_project_file (self, file_path)
 Attempt to read a legacy version 1.x openshot project file. More...
 
def save (self, file_path, move_temp_files=True, make_paths_relative=True)
 Save project file to disk. More...
 
def set (self, key, value)
 Prevent calling JsonDataStore set() method. More...
 
def upgrade_project_data_structures (self)
 Fix any issues with old project files (if any) More...
 

Public Attributes

 current_filepath
 
 data_type
 
 default_project_filepath
 
 has_unsaved_changes
 

Detailed Description

This class allows advanced searching of data structure, implements changes interface.

Definition at line 45 of file project_data.py.

Constructor & Destructor Documentation

◆ __init__()

def project_data.ProjectDataStore.__init__ (   self)

Definition at line 47 of file project_data.py.

Member Function Documentation

◆ add_to_recent_files()

def project_data.ProjectDataStore.add_to_recent_files (   self,
  file_path 
)

Add this project to the recent files list.

Definition at line 818 of file project_data.py.

◆ changed()

def project_data.ProjectDataStore.changed (   self,
  action 
)

This method is invoked by the UpdateManager each time a change happens (i.e UpdateInterface)

Definition at line 1022 of file project_data.py.

◆ check_if_paths_are_valid()

def project_data.ProjectDataStore.check_if_paths_are_valid (   self)

Check if all paths are valid, and prompt to update them if needed.

Definition at line 910 of file project_data.py.

◆ convert_paths_to_absolute()

def project_data.ProjectDataStore.convert_paths_to_absolute (   self)

Convert all paths to absolute.

Definition at line 963 of file project_data.py.

◆ convert_paths_to_relative()

def project_data.ProjectDataStore.convert_paths_to_relative (   self,
  file_path 
)

Convert all paths relative to this filepath.

Definition at line 843 of file project_data.py.

◆ generate_id()

def project_data.ProjectDataStore.generate_id (   self,
  digits = 10 
)

Generate random alphanumeric ids.

Definition at line 1044 of file project_data.py.

◆ get()

def project_data.ProjectDataStore.get (   self,
  key 
)

Get copied value of a given key in data store.

Definition at line 68 of file project_data.py.

◆ is_image()

def project_data.ProjectDataStore.is_image (   self,
  file 
)

Definition at line 632 of file project_data.py.

◆ load()

def project_data.ProjectDataStore.load (   self,
  file_path 
)

Load project from file.

Definition at line 315 of file project_data.py.

◆ move_temp_paths_to_project_folder()

def project_data.ProjectDataStore.move_temp_paths_to_project_folder (   self,
  file_path 
)

Move all temp files (such as Thumbnails, Titles, and Blender animations) to the project folder.

Definition at line 732 of file project_data.py.

◆ needs_save()

def project_data.ProjectDataStore.needs_save (   self)

Returns if project data Has unsaved changes.

Definition at line 63 of file project_data.py.

◆ new()

def project_data.ProjectDataStore.new (   self)

Try to load default project settings file, will raise error on failure.

Definition at line 259 of file project_data.py.

◆ read_legacy_project_file()

def project_data.ProjectDataStore.read_legacy_project_file (   self,
  file_path 
)

Attempt to read a legacy version 1.x openshot project file.

Definition at line 373 of file project_data.py.

◆ save()

def project_data.ProjectDataStore.save (   self,
  file_path,
  move_temp_files = True,
  make_paths_relative = True 
)

Save project file to disk.

Definition at line 698 of file project_data.py.

◆ set()

def project_data.ProjectDataStore.set (   self,
  key,
  value 
)

Prevent calling JsonDataStore set() method.

It is not allowed in ProjectDataStore, as changes come from UpdateManager.

Definition at line 143 of file project_data.py.

◆ upgrade_project_data_structures()

def project_data.ProjectDataStore.upgrade_project_data_structures (   self)

Fix any issues with old project files (if any)

Definition at line 642 of file project_data.py.

Member Data Documentation

◆ current_filepath

project_data.ProjectDataStore.current_filepath

Definition at line 53 of file project_data.py.

◆ data_type

project_data.ProjectDataStore.data_type

Definition at line 49 of file project_data.py.

◆ default_project_filepath

project_data.ProjectDataStore.default_project_filepath

Definition at line 50 of file project_data.py.

◆ has_unsaved_changes

project_data.ProjectDataStore.has_unsaved_changes

Definition at line 56 of file project_data.py.


The documentation for this class was generated from the following file: