当前位置: 首页>>代码示例>>Python>>正文


Python Actions.__init__方法代码示例

本文整理汇总了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
开发者ID:ncdesouza,项目名称:GameServer,代码行数:9,代码来源:game.py

示例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)
开发者ID:olpa,项目名称:tex,代码行数:101,代码来源:mainframe.py


注:本文中的actions.Actions.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。