OpenShot Video Editor  2.0.0
presets.py
Go to the documentation of this file.
1 ##
2 #
3 # @file
4 # @brief This file loads the custom ffmpeg command dialog (i.e create custom presets)
5 # @author Jonathan Thomas <jonathan@openshot.org>
6 # @author Olivier Girard <olivier@openshot.org>
7 #
8 # @section LICENSE
9 #
10 # Copyright (c) 2008-2016 OpenShot Studios, LLC
11 # (http://www.openshotstudios.com). This file is part of
12 # OpenShot Video Editor (http://www.openshot.org), an open-source project
13 # dedicated to delivering high quality video editing and animation solutions
14 # to the world.
15 #
16 # OpenShot Video Editor is free software: you can redistribute it and/or modify
17 # it under the terms of the GNU General Public License as published by
18 # the Free Software Foundation, either version 3 of the License, or
19 # (at your option) any later version.
20 #
21 # OpenShot Video Editor is distributed in the hope that it will be useful,
22 # but WITHOUT ANY WARRANTY; without even the implied warranty of
23 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 # GNU General Public License for more details.
25 #
26 # You should have received a copy of the GNU General Public License
27 # along with OpenShot Library. If not, see <http://www.gnu.org/licenses/>.
28 #
29 
30 import os
31 
32 from PyQt5.QtWidgets import *
33 
34 from classes import info, ui_util
35 from classes.app import get_app
36 
37 
38 ##
39 # Presets Dialog
40 class Presets(QDialog):
41 
42  # Path to ui file
43  ui_path = os.path.join(info.PATH, 'windows', 'ui', 'presets.ui')
44 
45  def __init__(self):
46  # Create dialog class
47  QDialog.__init__(self)
48 
49  # Load UI from designer
50  ui_util.load_ui(self, self.ui_path)
51 
52  # Init UI
53  ui_util.init_ui(self)
54 
55  # get translations
56  app = get_app()
57  _ = app._tr
58 
59  ##set even handlers
60  self.cmbpresets.activated.connect(self.load_presets_list)
61  self.btnclearpreset.clicked.connect(self.delete_preset)
62  self.btnsavecurrent.clicked.connect(self.save_current_preset)
63 
64  ##
65  # Display presets list
66  def load_presets_list(self):
67  # log.info('The preset {} has been used'.format(name))
68  pass
69 
70  ##
71  # Delete the preset which has been previously created
72  def delete_preset(self):
73  # log.info('The preset {} has been deleted'.format(name))
74  pass
75 
76  ##
77  # Save this new preset
79  # log.info('The preset {} has been created'.format(name))
80  pass
def get_app()
Returns the current QApplication instance of OpenShot.
Definition: app.py:54
Presets Dialog.
Definition: presets.py:40
def delete_preset(self)
Delete the preset which has been previously created.
Definition: presets.py:72
def save_current_preset(self)
Save this new preset.
Definition: presets.py:78
def __init__(self)
Definition: presets.py:45
def init_ui(window)
Initialize all child widgets and action of a window or dialog.
Definition: ui_util.py:200
def load_presets_list(self)
Display presets list.
Definition: presets.py:66
def load_ui(window, path)
Load a Qt *.ui file, and also load an XML parsed version.
Definition: ui_util.py:65