Last active
August 29, 2015 14:13
-
-
Save yorikvanhavre/537b1d4ae7db200acd3c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ViewProviderPath: | |
def __init__(self,vobj): #mandatory | |
obj.addProperty("App::PropertyFloat","SomePropertyName","PropertyGroup","Description of this property") | |
obj.Proxy = self | |
def __getstate__(self): #mandatory | |
return None | |
def __setstate__(self,state): #mandatory | |
return None | |
def getIcon(self): #optional | |
return ":/icons/my_icon.svg" | |
def attach(self): #optional | |
# this is executed on object creation and object load from file | |
pass | |
def onChanged(self,vobj,prop): #optional | |
# this is executed when a property of the VIEW PROVIDER changes | |
pass | |
def updateData(self,obj,prop): #optional | |
# this is executed when a property of the APP OBJECT changes | |
pass | |
def setEdit(self,vobj,mode): #optional | |
# this is executed when the object is double-clicked in the tree | |
pass | |
def unsetEdit(self,vobj,mode): #optional | |
# this is executed when the user cancels or terminates edit mode | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment