# Path: python2.7libs/hpaste/logger.py
# def simpleLogger(s,level=1):
# def passLogger(s,level=1):


	import os
import collectionbase
	import sys
from ..logger import defaultLogger as log
	from PySide2.QtCore import *
	from PySide2.QtWidgets import *
	from PySide2.QtGui import *
	from PySide.QtCore import *
	from PySide.QtGui import *
from QDropdownWidget import QDropdownWidget
		self.model().rescanCollections()


	def addCollection(self, collection, async=False):
		"""
		shortcut to self.model().addCollection()
		:collection: collection to add
		:return:
		"""
		if async:
			self.model().addCollectionAsync(collection)
		else:
			self.model().addCollection(collection)


	def removeCollection(self, collection):
		"""
		shortcut to self.model().removeCollection()
		:collection: collection or collection name to remove
		:return: bool - if collection was removed
		"""
		return self.model().removeCollection(collection)

	@Slot(str)
	def filterTable(self, filtername):
		super(CollectionWidget, self).filterTable(filtername)
		self.sort(0)


	def _addItem(self,collection):

# Path: python2.7libs/hpaste/logger.py
# def simpleLogger(s,level=1):
# def passLogger(s,level=1):


# Path: python2.7libs/hpaste/hcollections/collectionwidget.py
	import os
import collectionbase
	import sys
from ..logger import defaultLogger as log
	from PySide2.QtCore import *
	from PySide2.QtWidgets import *
	from PySide2.QtGui import *
	from PySide.QtCore import *
	from PySide.QtGui import *
from QDropdownWidget import QDropdownWidget

		self.model().rescanCollections()


	def addCollection(self, collection, async=False):
		"""
		shortcut to self.model().addCollection()
		:collection: collection to add
		:return:
		"""
		if async:
			self.model().addCollectionAsync(collection)
		else:
			self.model().addCollection(collection)


	def removeCollection(self, collection):
		"""
		shortcut to self.model().removeCollection()
		:collection: collection or collection name to remove
		:return: bool - if collection was removed
		"""
		return self.model().removeCollection(collection)

	@Slot(str)
	def filterTable(self, filtername):
		super(CollectionWidget, self).filterTable(filtername)
		self.sort(0)


	def _addItem(self,collection):

		log('_addItem should be reimplemented in subclass to do what is needed in any specific situation',3)