32 from functools
import partial
37 from classes
import info, ui_util
38 from classes.logger
import log
39 from classes.app
import get_app
41 from windows.views.credits_treeview
import CreditsTreeView
46 import simplejson
as json
54 ui_path = os.path.join(info.PATH,
'windows',
'ui',
'about.ui')
58 QDialog.__init__(self)
70 create_text = _(
'Create & Edit Amazing Videos and Movies')
71 description_text = _(
'OpenShot Video Editor 2.x is the next generation of the award-winning <br/>OpenShot video editing platform.')
72 learnmore_text = _(
'Learn more')
73 copyright_text = _(
'Copyright © %(begin_year)s-%(current_year)s') % {
'begin_year':
'2008',
'current_year': str(datetime.datetime.today().year) }
74 about_html =
'<html><head/><body><hr/><p align="center"><span style=" font-size:10pt; font-weight:600;">%s</span></p><p align="center"><span style=" font-size:10pt;">%s </span><a href="http://%s.openshot.org?r=about-us"><span style=" font-size:10pt; text-decoration: none; color:#55aaff;">%s</span></a><span style=" font-size:10pt;">.</span></p></body></html>' % (create_text, description_text,
info.website_language(), learnmore_text)
75 company_html =
'<html><head/><body style="font-size:11pt; font-weight:400; font-style:normal;">\n<hr />\n<p align="center" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">%s </span><a href="http://%s.openshotstudios.com?r=about-us"><span style=" font-size:10pt; font-weight:600; text-decoration: none; color:#55aaff;">OpenShot Studios, LLC<br /></span></a></p></body></html>' % (copyright_text,
info.website_language())
78 self.lblAboutDescription.setText(about_html)
79 self.lblAboutCompany.setText(company_html)
86 self.txtversion.setText(_(
"Version: %s") % info.VERSION)
87 self.txtversion.setAlignment(Qt.AlignCenter)
95 log.info(
'Credit screen has been opened')
102 log.info(
'License screen has been opened')
111 ui_path = os.path.join(info.PATH,
'windows',
'ui',
'license.ui')
115 QDialog.__init__(self)
128 with open(os.path.join(info.PATH,
'settings',
'license.txt'),
'r') as my_license: 129 text = my_license.read() 130 self.textBrowser.append(text) 133 cursor = self.textBrowser.textCursor()
134 cursor.setPosition(0)
135 self.textBrowser.setTextCursor(cursor)
142 ui_path = os.path.join(info.PATH,
'windows',
'ui',
'credits.ui')
148 treeview.refresh_view(filter=textbox.text())
153 QDialog.__init__(self)
166 supporter_text = _(
"Become a Supporter")
167 supporter_html =
'<html><head/><body><p align="center"><a href="http://%s.openshot.org/donate/?app-about-us"><span style=" text-decoration: underline; color:#55aaff;">%s</span></a></p></body></html>' % (
info.website_language(), supporter_text)
168 self.lblBecomeSupporter.setText(supporter_html)
172 with codecs.open(os.path.join(info.PATH,
'settings',
'contributors.json'),
'r', 'utf-8') as contributors_file:
173 developer_string = contributors_file.read()
174 developer_list = json.loads(developer_string)
181 translator_credits = []
182 translator_credits_string = _(
"translator-credits").replace(
"Launchpad Contributions:\n",
"").replace(
"translator-credits",
"")
183 if translator_credits_string:
185 translator_rows = translator_credits_string.split(
"\n")
186 for row
in translator_rows:
188 translator_parts = row.split(
"https://launchpad.net/")
189 name = translator_parts[0].strip()
190 username = translator_parts[1].strip()
191 translator_credits.append({
"name":name,
"website":
"https://launchpad.net/%s" % username})
199 self.tabCredits.removeTab(1)
203 with codecs.open(os.path.join(info.PATH,
'settings',
'supporters.json'),
'r', 'utf-8') as supporter_file:
204 supporter_string = supporter_file.read()
205 supporter_list = json.loads(supporter_string)
def website_language()
Get the current website language code for URLs.
def get_app()
Returns the current QApplication instance of OpenShot.
def load_credit(self)
Load Credits for everybody who has contributed in several domain for Openshot.
def Filter_Triggered(self, textbox, treeview)
Callback for filter being changed.
def load_license(self)
Load License of the project.
def init_ui(window)
Initialize all child widgets and action of a window or dialog.
def track_metric_screen(screen_name)
Track a GUI screen being shown.
def load_ui(window, path)
Load a Qt *.ui file, and also load an XML parsed version.