def addItem(self):
		newItem = AccountGroup.AccountGroup("New group")
		newListItem = QListWidgetItemMoarData(newItem.name)
		newListItem.setData(newItem)
		self.ui.listItems.addItem(newListItem)
		self.ui.listItems.setItemSelected(newListItem, True)
		self.instance.addAccountGroup(newItem)
	def addItem(self):
		newItem = BackpackViewer.BackpackViewer("Name","Url")
		newListItem = QListWidgetItemMoarData(newItem.name)
		newListItem.setData(newItem)
		self.ui.listItems.addItem(newListItem)
		self.ui.listItems.setItemSelected(newListItem, True)
		self.instance.addBackpackViewer(newItem)
	def refresh(self):
		self.refreshList(self.items)
		
		self.ui.txtName.setText("")
		self.ui.listAccounts.clear()
		for account in self.instance.allAccounts:
			newListItem = QListWidgetItemMoarData(account.name)
			newListItem.setData(account)
			self.ui.listAccounts.addItem(newListItem)
示例#4
0
	def addItem(self):
		newItem = App.App(123,
						 'Name',
						 launchArgs='')
		newListItem = QListWidgetItemMoarData(newItem.name)
		newListItem.setData(newItem)
		self.ui.listItems.addItem(newListItem)
		self.ui.listItems.setItemSelected(newListItem, True)
		self.instance.addApp(newItem)
	def addItem(self):
		newItem = Account.Account('Vanity ID',
								 'Username',
								 'Password',
								 'Steam Location',
								 'Sandboxie name',
								 name='Display name')
		newListItem = QListWidgetItemMoarData(newItem.name)
		newListItem.setData(newItem)
		self.ui.listItems.addItem(newListItem)
		self.ui.listItems.setItemSelected(newListItem, True)
		self.instance.addAccount(newItem)
示例#6
0
	def updateLists(self):
		self.ui.listAccountGroups.clear()
		self.ui.listAccounts.clear()
		self.ui.listApps.clear()
		
		for accountGroup in self.instance.allAccountGroups:
			newListItem = QListWidgetItemMoarData(accountGroup.name)
			newListItem.setData(accountGroup)
			self.ui.listAccountGroups.addItem(newListItem)
		
		for account in self.instance.allAccounts:
			newListItem = QListWidgetItemMoarData(account.name)
			newListItem.setData(account)
			self.ui.listAccounts.addItem(newListItem)
		
		for app in self.instance.allApps:
			newListItem = QListWidgetItemMoarData(app.name)
			newListItem.setData(app)
			self.ui.listApps.addItem(newListItem)
			
		newMenu = QtGui.QMenu(self)
		for bpViewer in self.instance.allBackpackViewers:
			newAction = QActionMoarData(self)
			newAction.setData(bpViewer)
			newAction.setText(bpViewer.name)
			
			QtCore.QObject.connect(newAction, QtCore.SIGNAL("triggered()"), self.viewBackpack)
			
			newMenu.addAction(newAction)
		
		manageBpAction = QtGui.QAction(self)
		manageBpAction.setText("Manage")
		QtCore.QObject.connect(manageBpAction, QtCore.SIGNAL("triggered()"), self.showManageBpViewersDialog)
		newMenu.addAction(manageBpAction)
		newMenu.insertSeparator(manageBpAction)	# Insert _before_ manageBpAction
		
		self.ui.btnViewBackpacks.setMenu(newMenu)
示例#7
0
	def refreshList(self, listItems):
		self.ui.listItems.clear()
		for item in listItems:
			newListItem = QListWidgetItemMoarData(item.name)
			newListItem.setData(item)
			self.ui.listItems.addItem(newListItem)