34 from classes
import info
35 from classes.logger
import log
36 from classes.app
import get_app
41 import simplejson
as json
46 QStandardItemModel.__init__(self)
50 star_icon = QIcon(os.path.join(info.IMAGES_PATH,
"star-icon.png"))
51 paypal_icon = QIcon(os.path.join(info.IMAGES_PATH,
"paypal-icon.png"))
52 kickstarter_icon = QIcon(os.path.join(info.IMAGES_PATH,
"kickstarter-icon.png"))
53 bitcoin_icon = QIcon(os.path.join(info.IMAGES_PATH,
"bitcoin-icon.png"))
54 patreon_icon = QIcon(os.path.join(info.IMAGES_PATH,
"patreon-icon.png"))
55 developer_icon = QIcon(os.path.join(info.IMAGES_PATH,
"python-icon.png"))
58 log.info(
"updating credits model.")
67 log.info(
'cleared credits model')
71 self.
model.setHorizontalHeaderLabels([
"",
"", _(
"Name"), _(
"Email"), _(
"Website")])
76 if "name" in person.keys():
77 name = person[
"name"]
or "" 79 if "email" in person.keys():
80 email = person[
"email"]
or "" 82 if "website" in person.keys():
83 website = person[
"website"]
or "" 85 if "amount" in person.keys():
86 amount = person[
"amount"]
88 if "icons" in person.keys():
89 icons = person[
"icons"]
92 if not (filter.lower()
in name.lower()
or filter.lower()
in email.lower()
or filter.lower()
in website.lower()):
101 col = QStandardItem()
104 col.setToolTip(_(
"PayPal Supporter!"))
107 col.setToolTip(_(
"Kickstarter Supporter!"))
110 col.setToolTip(_(
"Bitcoin Supporter!"))
113 col.setToolTip(_(
"Patreon Supporter!"))
116 col.setToolTip(_(
"Developer!"))
117 col.setFlags(Qt.ItemIsSelectable | Qt.ItemIsEnabled)
121 col = QStandardItem()
124 col.setToolTip(_(
"Multiple Contributions!"))
125 col.setFlags(Qt.ItemIsSelectable | Qt.ItemIsEnabled)
129 col = QStandardItem(
"Name")
131 col.setFlags(Qt.ItemIsSelectable | Qt.ItemIsEnabled)
135 col = QStandardItem(
"Email")
137 col.setFlags(Qt.ItemIsSelectable | Qt.ItemIsEnabled)
141 col = QStandardItem(
"Website")
143 col.setFlags(Qt.ItemIsSelectable | Qt.ItemIsEnabled)
147 self.
model.appendRow(row)
154 self.
model.setColumnCount(6)
def get_app()
Returns the current QApplication instance of OpenShot.
def __init__(self, parent=None)
def update_model(self, filter=None, clear=True)
def __init__(self, credits, args)