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


Python ui.load_view函数代码示例

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


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

示例1: load_editor

def load_editor(file_manager=None, file_viewer=ui.View(), frame=(0, 0, 540, 600)): #  575)):
    try:
        view = ui.load_view("HTMLEditor/__init__")
    except ValueError as e:
        print "Attempt 1 'HTMLEditor/__init__' failed " + exception_str(e)
        try:
            view = ui.load_view("__init__")
        except ValueError as e:
            print "Attempt 2 '__init__' failed " + exception_str(e)
            view = ui.Editor()
    view.frame = frame
    view.set_fv_fm(file_manager, file_viewer)
    return view
开发者ID:c0ns0le,项目名称:Pythonista,代码行数:13,代码来源:__init__.py

示例2: load_editor_view

def load_editor_view(frame=None, load_addons=True):
    try:
        view = ui.load_view("EditorView/EditorView")
    except ValueError as e:
        logger.debug("Attempt 1 'EditorView/EditorView' failed")
        logger.exception(exception_str(e))
        try:
            view = ui.load_view("EditorView")
        except ValueError as e:
            logger.debug("Attempt 2 'EditorView' failed")
            logger.exception(exception_str(e))
            view = ui.WebView()
    if frame:
        view.frame = frame
    return view
开发者ID:dewww,项目名称:HTMLEditor-Pythonista,代码行数:15,代码来源:WebDelegate.py

示例3: load_console

def load_console(frame=(0, 0, 540, 575), load_addons=True):
    try:
        view = ui.load_view("EditorView/EditorViewConsole")
    except ValueError as e:
        logger.error("Attempt 1 'EditorView/EditorViewConsole' failed")
        logger.exception(exception_str(e))
        try:
            view = ui.load_view("EditorViewConsole")
        except ValueError as e:
            logger.error("Attempt 2 'EditorViewConsole' failed")
            logger.exception(exception_str(e))
            view = WebViewConsole()
    logger.debug("Setting Frame")
    view.frame = frame
    logger.debug("Done")
    return view
开发者ID:dewww,项目名称:HTMLEditor-Pythonista,代码行数:16,代码来源:WebDelegate.py

示例4: showsidebar

def showsidebar():
    """show the sidebar. """
    import ui
    v=ui.load_view('editmenu')
    uncom = v['uncomment']
    uncom.transform = ui.Transform.rotation(pi)
    v.present('sidebar')
开发者ID:pysmath,项目名称:editmenu,代码行数:7,代码来源:editmenu.py

示例5: __init__

    def __init__(self):
        self.view_names = ['switchview1', 'SwitchViews']
        self.view_index = -1
        self.view_array = []
        
        # load and hide views
        for i in range(len(self.view_names)):
            self.view_index += 1
            self.view_array.append(ui.load_view(self.view_names[self.view_index]))
            self.add_subview(self.view_array[self.view_index])
            self.view_array[self.view_index].hidden = True
        
        # initialize some actions
        self.view_array[0]['btn_Okay'].action = self.all_action
        self.view_array[0]['btn_Cancel'].action = self.all_action
        self.view_array[1]['button1'].action = self.all_action
        
        # show empty white view
        self.background_color = 'white'
        back.action = self.bt_back
        forward.action = self.bt_forward
        self.left_button_items = [space, back]
        self.right_button_items = [space, space, forward]
        self.present()

        # show view 'SwitchViews'
        self.switch_views()
开发者ID:c0ns0le,项目名称:Pythonista,代码行数:27,代码来源:SwitchViews.py

示例6: __init__

  def __init__(self, Test = False):
    """
    The class initialise function that sets up the view and handles test conditions if requested
    Arguments:
    Specifics:
    """
    global CAMPAIGN_DATA_DIRECTORY
    global CAMPAIGN_LOG_SELECTED, CAMPAIGN_ASSETS_SELECTED, CAMPAIGN_NOTES_SELECTED
    CAMPAIGN_DATA_DIRECTORY = '/Data/Campaigns/'

    try:
      strCampaignManagementViewName = 'Campaign Management'
      self.vwInterface = ui.load_view(strCampaignManagementViewName)
      self.vwInterface.name = strCampaignManagementViewName
      self.objCampaignData = clsCampaign.clsCampaign()
      self._SelectedLogEntry = -1
      
      self._initialise_campaign_interface()
      self._initialise_control_handlers()
      
      self.vwInterface['tblCampaigns'].data_source.items = os.listdir(os.getcwdu() + CAMPAIGN_DATA_DIRECTORY)
      
      if Test:
        #self.objCampaignData = initialise_test_data()
        #self.objCampaignData.save('xml', CampaignDataDirectory = CAMPAIGN_DATA_DIRECTORY)
        pass

    except:
      pass
开发者ID:ssnowden,项目名称:TravellerAidApp,代码行数:29,代码来源:Campaign+Management.py

示例7: prompt_save

    def prompt_save(self, sender):
        """Prompt the user for the name of a task file."""

        self.save_dialog = ui.load_view("dialogs/save_task_file")
        self.save_dialog["txt_save_file"].begin_editing()
        self.save_dialog["txt_save_file"].delegate = self
        self.save_dialog.present("popover", popover_location=(500, 500))
开发者ID:robinsiebler,项目名称:Task-List,代码行数:7,代码来源:menu.py

示例8: prompt_modify_task_number

    def prompt_modify_task_number(self, sender):
        """Prompt the user for the number of the task to modify."""

        self.modify_dialog = ui.load_view("dialogs/modify_task_number")
        self.modify_dialog["txt_mod_task_num"].begin_editing()
        self.modify_dialog["txt_mod_task_num"].delegate = self
        self.modify_dialog.present("popover", popover_location=(500, 500))
开发者ID:robinsiebler,项目名称:Task-List,代码行数:7,代码来源:menu.py

示例9: prompt_delete_task

    def prompt_delete_task(self, sender):
        """Prompt the user to delete a task."""

        self.delete_dialog = ui.load_view("dialogs/delete_task")
        self.delete_dialog["txt_del_task"].begin_editing()
        self.delete_dialog["txt_del_task"].delegate = self
        self.delete_dialog.present("popover", popover_location=(500, 500))
开发者ID:robinsiebler,项目名称:Task-List,代码行数:7,代码来源:menu.py

示例10: create_cell_contents

	def create_cell_contents(self):
		cust_cell = ui.load_view('mycell1')
		self.add_subview(cust_cell)
		cust_cell['lb'].text = str(time.time())
		cust_cell['img1'].image = rand_image()
		
		cust_cell['img2'].image = rand_image()
开发者ID:Phuket2,项目名称:VirtualView,代码行数:7,代码来源:vpv.py

示例11: __init__

 def __init__(self):
     self.view = ui.load_view('FileManager')
     self.root = os.path.expanduser('~')
     self.rootlen = len(self.root)
     self.path = os.getcwd()
     self.path_po = self.path
     self.view.name = self.path[self.rootlen:]
     self.tableview1 = self.make_tableview1()
     self.lst = self.make_lst()
     self.lst_po = self.lst
     self.filename = ''
     self.view['btn_Rename'].action = self.btn_Rename
     self.view['btn_Copy'].action = self.btn_Copy
     self.view['btn_Move'].action = self.btn_Move
     self.view['btn_MakeDir'].action = self.btn_MakeDir
     self.view['btn_Delete'].action = self.btn_Delete
     self.view['btn_RemoveDir'].action = self.btn_RemoveDir
     self.view['btn_OpenIn'].action = self.btn_OpenIn
     self.view['btn_Download'].action = self.btn_Download
     self.view['btn_Compress'].action = self.btn_Compress
     self.view['btn_Extract'].action = self.btn_Extract
     self.view['btn_HexView'].action = self.btn_HexView
     self.view['btn_GetPic'].action = self.btn_GetPic #from CameraRoll
     self.view['btn_Settings'].action = self.btn_Settings
     self.view['btn_Help'].action = self.btn_Help
     self.view.present('full_screen')
开发者ID:cclauss,项目名称:FileManager,代码行数:26,代码来源:FileManager.py

示例12: load

 def load(cls):
     import os, inspect
     pyui= os.path.abspath(inspect.getfile(inspect.currentframe()))+'ui'
     
     if cls._lastinstance is None:
         cls._lastinstance = ui.load_view(pyui)
     return cls._lastinstance
开发者ID:c0ns0le,项目名称:Pythonista,代码行数:7,代码来源:Tabs.py

示例13: quit

 def quit(self, sender):
   def ask_user(sender):	#action method for both buttons (yes and no)
     PopOverView.view_po.close()
     if sender.name == 'yes':
       PopOverView.view_main.close()
   PopOverView.view_po = ui.load_view('po')
   PopOverView.view_po.present('popover',popover_location=(400,400))
开发者ID:c0ns0le,项目名称:Pythonista,代码行数:7,代码来源:pop-over.py

示例14: __init__

	def __init__(self):
		self.view = ui.load_view('SpecialButton')
		self.view.present('fullscreen')
		self.label = ui.Label(frame=(120,100,100,100))
		self.btn = MyButtonClass(self.label)
		self.view.add_subview(self.btn)		#watch the order, first button and then the label
		self.view.add_subview(self.label)
开发者ID:humberry,项目名称:ui-tutorial,代码行数:7,代码来源:SpecialButton3.py

示例15: hexview_a_file

 def hexview_a_file(self, filename):
     self.view_po = ui.load_view('hexview')
     self.view_po.name = 'HexViewer: ' + filename
     self.view_po.present('full_screen')
     self.view_po['btn_search'].action = self.button_action
     full_pathname = self.path + '/' + filename
     self.view_po['tv_data'].text = hex_view(full_pathname)
开发者ID:c0ns0le,项目名称:Pythonista,代码行数:7,代码来源:FileManager.py


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