import PyQt4

class example_plugin(): # class name and filename must match!

    def __init__():
        self.ready = False

    def getName(self):
        return "python_test_sink" # this is not displayed, might be used in the future internally

    def getText(self):
        return "Python Test Sink" # this is displayed on the button

    def getImage(self):
        # return an image to be displayed on the button
        return Nothing

    def getInformativeText(self):
        return "Informative text"

    def clickAction(self):
        # this is the callback that indicates the button has been pressed
        # do whatever processing on the barcode data
        # add more detail here, e.g. opening a window to display stuff to the user
        print "This is from Python!!"

    def barcodeAnalysed(self, barcodeType, barcodeData):
        # see if we want to handle this particular barcode
        # return true or false depending on whether we like the content
        self.ready = True

def mbarcode_plugin_instance():
    return example_plugin()

