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


Python selectable_list.GUISelectableList类代码示例

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


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

示例1: AccountReassignPanel

class AccountReassignPanel(MainWindowPanel):
    def __init__(self, mainwindow):
        MainWindowPanel.__init__(self, mainwindow)
        self.account_list = GUISelectableList()
    
    def _load(self, accounts):
        self.deleted_accounts = set(accounts)
        all_accounts = self.document.accounts[:]
        target_accounts = [a for a in all_accounts if a not in self.deleted_accounts]
        sort_accounts(target_accounts)
        target_account_names = [a.name for a in target_accounts]
        target_account_names.insert(0, tr('No Account'))
        self._target_accounts = target_accounts
        self._target_accounts.insert(0, None)
        self.account_list[:] = target_account_names
        self.account_list.select(0)
    
    def _save(self):
        reassign_to = self._target_accounts[self.account_list.selected_index]
        self.document.delete_accounts(self.deleted_accounts, reassign_to=reassign_to)
开发者ID:Mouchnino,项目名称:moneyguru,代码行数:20,代码来源:account_reassign_panel.py

示例2: _update_selection

 def _update_selection(self):
     GUISelectableList._update_selection(self)
     selected_type = AccountType.InOrder[self.selected_index]
     self.panel.type = selected_type
开发者ID:Mouchnino,项目名称:moneyguru,代码行数:4,代码来源:account_panel.py

示例3: __init__

 def __init__(self, panel):
     self.panel = panel
     account_types_desc = [ACCOUNT_TYPE_DESC[at] for at in AccountType.InOrder]
     GUISelectableList.__init__(self, account_types_desc)
开发者ID:Mouchnino,项目名称:moneyguru,代码行数:4,代码来源:account_panel.py

示例4: _update_selection

 def _update_selection(self):
     GUISelectableList._update_selection(self)
     repeat_type = REPEAT_OPTIONS_ORDER[self.selected_index]
     self.panel.repeat_type = repeat_type
开发者ID:glasmasin,项目名称:moneyguru,代码行数:4,代码来源:schedule_panel.py

示例5: __init__

 def __init__(self, panel):
     self.panel = panel
     GUISelectableList.__init__(self)
开发者ID:glasmasin,项目名称:moneyguru,代码行数:3,代码来源:schedule_panel.py

示例6: _update_selection

 def _update_selection(self):
     GUISelectableList._update_selection(self)
     if self.setfunc is not None:
         self.setfunc(self.selected_index)
开发者ID:patrickatamaniuk,项目名称:moneyguru,代码行数:4,代码来源:base.py

示例7: __init__

 def __init__(self, items=None, setfunc=None):
     # setfunc(newindex)
     GUISelectableList.__init__(self, items=items)
     self.setfunc = setfunc
开发者ID:patrickatamaniuk,项目名称:moneyguru,代码行数:4,代码来源:base.py

示例8: _update_selection

 def _update_selection(self):
     GUISelectableList._update_selection(self)
     target = self.panel._targets[self.selected_index]
     self.panel.budget.target = target
开发者ID:glasmasin,项目名称:moneyguru,代码行数:4,代码来源:budget_panel.py

示例9: __init__

 def __init__(self, dialog):
     self.dialog = dialog
     GUISelectableList.__init__(self)
开发者ID:1kakarot,项目名称:dupeguru,代码行数:3,代码来源:prioritize_dialog.py

示例10: _update_selection

 def _update_selection(self):
     self.dialog.select_category(self.dialog.categories[self.selected_index])
     GUISelectableList._update_selection(self)
开发者ID:1kakarot,项目名称:dupeguru,代码行数:3,代码来源:prioritize_dialog.py

示例11: __init__

 def __init__(self, mainwindow):
     MainWindowPanel.__init__(self, mainwindow)
     self.account_list = GUISelectableList()
开发者ID:Mouchnino,项目名称:moneyguru,代码行数:3,代码来源:account_reassign_panel.py


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