當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。