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"))
56 log.info(
"updating credits model.")
65 log.info(
'cleared credits model')
69 self.model.setHorizontalHeaderLabels([
"",
"", _(
"Name"), _(
"Email"), _(
"Website")])
74 if "name" in person.keys():
75 name = person[
"name"]
or "" 77 if "email" in person.keys():
78 email = person[
"email"]
or "" 80 if "website" in person.keys():
81 website = person[
"website"]
or "" 83 if "amount" in person.keys():
84 amount = person[
"amount"]
86 if "icons" in person.keys():
87 icons = person[
"icons"]
90 if not (filter.lower()
in name.lower()
or filter.lower()
in email.lower()
or filter.lower()
in website.lower()):
102 col.setToolTip(_(
"PayPal Supporter!"))
105 col.setToolTip(_(
"Kickstarter Supporter!"))
108 col.setToolTip(_(
"Bitcoin Supporter!"))
109 col.setFlags(Qt.ItemIsSelectable | Qt.ItemIsEnabled)
113 col = QStandardItem()
116 col.setToolTip(_(
"Multiple Contributions!"))
117 col.setFlags(Qt.ItemIsSelectable | Qt.ItemIsEnabled)
121 col = QStandardItem(
"Name")
123 col.setFlags(Qt.ItemIsSelectable | Qt.ItemIsEnabled)
127 col = QStandardItem(
"Email")
129 col.setFlags(Qt.ItemIsSelectable | Qt.ItemIsEnabled)
133 col = QStandardItem(
"Website")
135 col.setFlags(Qt.ItemIsSelectable | Qt.ItemIsEnabled)
139 self.model.appendRow(row)
146 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)