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


Python pyjd.run函数代码示例

本文整理汇总了Python中pyjd.run函数的典型用法代码示例。如果您正苦于以下问题:Python run函数的具体用法?Python run怎么用?Python run使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了run函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: display_ui

    def display_ui(ui, parent, style):
        """Display the UI."""

        ui.owner.init(ui, parent, style)
        ui.control = ui.owner.control
        ui.control._parent = parent

        try:
            ui.prepare_ui()
        except:
            ui.control.setParent(None)
            ui.control.ui = None
            ui.control = None
            ui.owner = None
            ui.result = False
            raise

        ui.handler.position(ui.info)
#        restore_window(ui)

        RootPanel().add(ui.control)
        pyjd.run()

        if style == BaseDialog.NONMODAL:
            ui.control.show()
        else:
#            ui.control.setWindowModality(QtCore.Qt.WindowModal)
            ui.control.exec_()

        RootPanel().add(ui.control)
        pyjd.run()
开发者ID:rwl,项目名称:traitsbackendpyjamas,代码行数:31,代码来源:ui_base.py

示例2: main

def main(test_gen_out):

    pyjd.setup("public/uitest.html")
    t = RunTests(test_gen_out)
    t.add(LabelTest)
    t.add(EventTest)
    t.add(DOMTest)
    pyjd.run()
开发者ID:certik,项目名称:pyjamas,代码行数:8,代码来源:uitest.py

示例3: str

        msg = name + ' ' + action + ' (' + str(x) + ', ' + str(y) + ')'
        self.msgarea1.setText(msg)
        log.debug(msg)

    def onMouseMove(self, sender, x, y):
        self._mouseActionMessage(sender.areaname, "move", x, y)
        
    def onMouseDown(self, sender, x, y):
        self._mouseActionMessage(sender.areaname, "down", x, y)

    def onMouseUp(self, sender, x, y):
        self._mouseActionMessage(sender.areaname, "up", x, y)

    def onMouseEnter(self, sender):
        self._mouseActionMessage(sender.areaname, "enter")

    def onMouseLeave(self, sender):
        self._mouseActionMessage(sender.areaname, "leave")

    def onClick(self, sender):
        msg = "you clicked on baby katie's " + sender.areaname
        self.msgarea2.setText(msg)
        log.debug(msg)
    

if __name__ == '__main__':
    pyjd.setup("http://127.0.0.1/examples/maparea/public/MapAreaDemo.html")
    app = MapAreaDemo()
    app.onModuleLoad()
    pyjd.run()
开发者ID:brodybits,项目名称:pyjs,代码行数:30,代码来源:MapAreaDemo.py

示例4: onModuleLoad

import pyjd # dummy in pyjs

from pyjamas.ui.RootPanel import RootPanel
from DayFilterWidget import DayFilterWidget
from SchoolCalendarWidget import SchoolCalendarWidget

class DynaTable:

    def onModuleLoad(self):
        slot = RootPanel("calendar")
        if slot is not None:
            calendar = SchoolCalendarWidget(15)
            slot.add(calendar)
            
            slot = RootPanel("days")
            if slot is not None:
                filterWidget = DayFilterWidget(calendar)
                slot.add(filterWidget)


if __name__ == '__main__':
    pyjd.setup("http://127.0.0.1/examples/dynamictable/public/DynaTable.html") # dummy in pyjs
    app = DynaTable()
    app.onModuleLoad()
    pyjd.run() # dummy in pyjd
开发者ID:anandology,项目名称:pyjamas,代码行数:25,代码来源:DynaTable.py

示例5: onModuleLoad

    def onModuleLoad(self):

        text = TextBox()
        df1 = DateField()
        df2 = DateField(format='%Y/%m/%d')
        b = Button("Show Calendar", self)
        self.cal = Calendar()
        df3 = MonthField()

        vp = VerticalPanel()
        vp.setSpacing(10)
        vp.add(df1)
        vp.add(b)
        vp.add(df2)
        vp.add(df3)

        RootPanel().add(vp)

    def onClick(self, sender):
        p = CalendarPopup(self.cal)
        x = sender.getAbsoluteLeft() + 10
        y = sender.getAbsoluteTop() + 10
        p.setPopupPosition(x,y)
        p.show()

if __name__ == '__main__':
    pyjd.setup("./public/cssauto.html") # dummy in pyjs
    app = App()
    app.onModuleLoad()
    pyjd.run() # dummy in pyjs
开发者ID:Afey,项目名称:pyjs,代码行数:30,代码来源:cssauto.py


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