本文整理汇总了Python中actions.Actions.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Actions.__init__方法的具体用法?Python Actions.__init__怎么用?Python Actions.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类actions.Actions
的用法示例。
在下文中一共展示了Actions.__init__方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from actions import Actions [as 别名]
# 或者: from actions.Actions import __init__ [as 别名]
def __init__(self):
Board.__init__(self)
Actions.__init__(self)
Rules.__init__(self)
self.players = {}
self.turn = 0
self.game_over = True
示例2: __init__
# 需要导入模块: from actions import Actions [as 别名]
# 或者: from actions.Actions import __init__ [as 别名]
def __init__(self, parent, safetyMode="viewAccess", *args, **kwargs):
wx.Frame.__init__(self, parent, *args, **kwargs)
self.safetyMode = safetyMode
ConfigData.__init__(self, *args, **kwargs)
StatusBar.__init__(self, parent, *args, **kwargs)
MenuBar.__init__(self, parent, *args, **kwargs)
ToolBar.__init__(self, parent, *args, **kwargs)
TreeContextMenu.__init__(self, parent, *args, **kwargs)
# Some actions which are not relevant for any specific area
Actions.__init__(self, *args, **kwargs)
# The functions to enable printing
Printing.__init__(self, parent, *args, **kwargs)
# The functions to enable the help system
Help.__init__(self, *args, **kwargs)
# The functions to enable the about dialog
About.__init__(self, *args, **kwargs)
# The functions to enable the about dialog
Settings.__init__(self, *args, **kwargs)
#Set main splitter
MainSplitter.__init__(self, *args, **kwargs)
#Add the xml tree
Document.__init__(self, *args, **kwargs)
#Fill xml tree
GetData.__init__(self, *args, **kwargs)
#Add functions to modify the view of the xml tree
ViewData.__init__(self, *args, **kwargs)
#Add functions to edit the xml tree
EditData.__init__(self, *args, **kwargs)
#Copy example files: Comment this out if Template-Designer is in productive use.
#self.getExamples()
#Some kind of self check
self.saveConfig()
#Set panels
#self.propertiesPanel = wx.Panel(self.mainSplitter)
self.propertiesPanel = wx.ScrolledWindow(self.mainSplitter)
self.templatePanel = wx.Panel(self.mainSplitter)
#Buttons on main frame
self.applyButton = wx.Button(self.propertiesPanel,
wx.ID_APPLY,
_(u"Apply changes"),
name="applyButton")
self.defaultsButton = wx.Button(self.propertiesPanel,
wx.ID_RESET,
_(u"Restore settings"),
name="defaultsButtons")
expandAllButtonPath = self.documentTreeGraphics() + "/2downarrow.png"
expandAllButtonBmp = wx.Image(expandAllButtonPath, wx.BITMAP_TYPE_PNG).ConvertToBitmap()
self.expandAllButton = wx.BitmapButton(self.templatePanel,
-1,
expandAllButtonBmp,
name="expandButton")
collapseAllButtonPath = self.documentTreeGraphics() + "/2uparrow.png"
collapseAllButtonBmp = wx.Image(collapseAllButtonPath, wx.BITMAP_TYPE_PNG).ConvertToBitmap()
self.collapseAllButton = wx.BitmapButton(self.templatePanel,
-1,
collapseAllButtonBmp,
name="collapseButton")
addButtonPath = self.documentTreeGraphics() + "/filenew.png"
addButtonBmp = wx.Image(addButtonPath, wx.BITMAP_TYPE_PNG).ConvertToBitmap()
self.addButton = wx.BitmapButton(self.templatePanel,
-1,
addButtonBmp,
name="addButton")
deleteButtonPath = self.documentTreeGraphics() + "/edit_delete.png"
deleteButtonBmp = wx.Image(deleteButtonPath, wx.BITMAP_TYPE_PNG).ConvertToBitmap()
self.deleteButton = wx.BitmapButton(self.templatePanel,
-1,
deleteButtonBmp,
name="deleteButton")
"""
Set taskbar icon. If you remove this, do not forget to remove
the RemoveIcon() and Destroy() methods
in self.onCloseWindow()
"""
self.taskBarIcon = wx.TaskBarIcon()
iconPath = self.skinGraphics() + "/domtreeviewer.png"
icon = wx.Icon(iconPath, wx.BITMAP_TYPE_PNG)
self.taskBarIcon.SetIcon(icon, _(u"Template-Designer"))
#Set titlebar icon
self.SetIcon(icon)
#Initiate the contents of the property panel
self.pp = pp
self.__doProperties()
self.__doBindings()
self.__doLayout()
Safety(self)