Beispiel #1
0
	def populateTable(self,filterA= 'ALL',filterS='ALL',filterT='ALL'):
		self.ui.shotsQListWidget.clear()
		for a in c.get_shots_simple_row(filterA,filterS,filterT):
			rowWidget=SimpleRow()
			rowWidget.ui.shot_label.setText(a.name)
			c.populate_artists(rowWidget.ui.artist_box)
			c.populate_status(rowWidget.ui.status_box)
			c.populate_types(rowWidget.ui.type_box)
			
			index=rowWidget.ui.artist_box.findText(a.currentArtist.first)
			rowWidget.ui.artist_box.setCurrentIndex(index)

			index=rowWidget.ui.status_box.findText(a.status.status)
			rowWidget.ui.status_box.setCurrentIndex(index)

			index=rowWidget.ui.type_box.findText(a.shotType.shotType)
			rowWidget.ui.type_box.setCurrentIndex(index)
			
			rowWidget.ui.notes_edit.setText(c.get_current_submission_note(a))

			rowWidget.ui.version_label.setText(c.get_current_submission_version(a))

			rowWidget.ui.artist_box.currentIndexChanged.connect(self.modifiedRow)
			rowWidget.ui.status_box.currentIndexChanged.connect(self.modifiedRow)
			rowWidget.ui.type_box.currentIndexChanged.connect(self.modifiedRow)
			

			listWidgetItem=QListWidgetItem(self.ui.shotsQListWidget)
			listWidgetItem.setSizeHint(rowWidget.sizeHint())
			self.ui.shotsQListWidget.addItem(listWidgetItem)
			self.ui.shotsQListWidget.setItemWidget(listWidgetItem,rowWidget)
Beispiel #2
0
	def populateFilters(self):
		self.ui.status_search.addItem('ALL')
		self.ui.type_search.addItem('ALL')
		self.ui.artist_search.addItem('ALL')
		c.populate_status(self.ui.status_search)
		c.populate_types(self.ui.type_search)
		c.populate_artists(self.ui.artist_search)
		self.ui.artist_search.currentIndexChanged.connect(self.refreshFilter)
		self.ui.status_search.currentIndexChanged.connect(self.refreshFilter)
		self.ui.type_search.currentIndexChanged.connect(self.refreshFilter)