OpenShot Video Editor  2.0.0
animation.py
Go to the documentation of this file.
1 ##
2 #
3 # @file
4 # @brief This file loads the Animation dialog (i.e about Openshot Project)
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 from functools import partial
32 
33 from PyQt5.QtCore import *
34 from PyQt5.QtWidgets import *
35 
36 from classes import info, ui_util
37 from classes.logger import log
38 from classes.app import get_app
39 from classes.metrics import *
40 from windows.views.credits_treeview import CreditsTreeView
41 
42 try:
43  import json
44 except ImportError:
45  import simplejson as json
46 
47 
48 ##
49 # Animation Dialog
50 class Animation(QDialog):
51 
52  ui_path = os.path.join(info.PATH, 'windows', 'ui', 'animation.ui')
53 
54  def __init__(self):
55  # Create dialog class
56  QDialog.__init__(self)
57 
58  # Load UI from designer
59  ui_util.load_ui(self, self.ui_path)
60 
61  # Init Ui
62  ui_util.init_ui(self)
63 
64  # get translations
65  self.app = get_app()
66  _ = self.app._tr
67 
68  # Track metrics
69  track_metric_screen("animation-screen")
def get_app()
Returns the current QApplication instance of OpenShot.
Definition: app.py:54
def __init__(self)
Definition: animation.py:54
Animation Dialog.
Definition: animation.py:50
def init_ui(window)
Initialize all child widgets and action of a window or dialog.
Definition: ui_util.py:200
def track_metric_screen(screen_name)
Track a GUI screen being shown.
Definition: metrics.py:94
def load_ui(window, path)
Load a Qt *.ui file, and also load an XML parsed version.
Definition: ui_util.py:65