當前位置: 首頁>>代碼示例>>Python>>正文


Python settings.SettingsDialog類代碼示例

本文整理匯總了Python中uix.dialogs.settings.SettingsDialog的典型用法代碼示例。如果您正苦於以下問題:Python SettingsDialog類的具體用法?Python SettingsDialog怎麽用?Python SettingsDialog使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了SettingsDialog類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: settings_dialog

    def settings_dialog(self):
        if self._settings_dialog is None:
            from uix.dialogs.settings import SettingsDialog

            self._settings_dialog = SettingsDialog(self)
        self._settings_dialog.update()
        self._settings_dialog.open()
開發者ID:ywzqhl,項目名稱:electrum,代碼行數:7,代碼來源:main_window.py

示例2: popup_dialog

 def popup_dialog(self, name):
     if name == 'settings':
         from uix.dialogs.settings import SettingsDialog
         d = SettingsDialog(self)
         d.open()
     elif name == 'wallets':
         from uix.dialogs.wallets import WalletDialog
         d = WalletDialog()
         d.open()
     else:
         popup = Builder.load_file('gui/kivy/uix/ui_screens/'+name+'.kv')
         popup.open()
開發者ID:phamthaithinh,項目名稱:electrum,代碼行數:12,代碼來源:main_window.py

示例3: popup_dialog

    def popup_dialog(self, name):
        if name == "settings":
            from uix.dialogs.settings import SettingsDialog

            d = SettingsDialog(self)
            d.open()
        elif name == "wallets":
            from uix.dialogs.wallets import WalletDialog

            d = WalletDialog()
            d.open()
        else:
            popup = Builder.load_file("gui/kivy/uix/ui_screens/" + name + ".kv")
            popup.open()
開發者ID:bitbandi,項目名稱:electrum,代碼行數:14,代碼來源:main_window.py

示例4: ElectrumWindow


#.........這裏部分代碼省略.........

    def on_key_down(self, instance, key, keycode, codepoint, modifiers):
        if 'ctrl' in modifiers:
            # q=24 w=25
            if keycode in (24, 25):
                self.stop()
            elif keycode == 27:
                # r=27
                # force update wallet
                self.update_wallet()
            elif keycode == 112:
                # pageup
                #TODO move to next tab
                pass
            elif keycode == 117:
                # pagedown
                #TODO move to prev tab
                pass
        #TODO: alt+tab_number to activate the particular tab

    def on_keyboard(self, instance, key, keycode, codepoint, modifiers):
        if key == 27 and self.is_exit is False:
            self.is_exit = True
            self.show_info(_('Press again to exit'))
            return True
        self.is_exit = False
        # override settings button
        if key in (319, 282): #f1/settings button on android
            #self.gui.main_gui.toggle_settings(self)
            return True

    def settings_dialog(self):
        if self._settings_dialog is None:
            from uix.dialogs.settings import SettingsDialog
            self._settings_dialog = SettingsDialog(self)
        self._settings_dialog.update()
        self._settings_dialog.open()

    def popup_dialog(self, name):
        if name == 'settings':
            self.settings_dialog()
        elif name == 'wallets':
            from uix.dialogs.wallets import WalletDialog
            d = WalletDialog()
            d.open()
        else:
            popup = Builder.load_file('gui/kivy/uix/ui_screens/'+name+'.kv')
            popup.open()

    @profiler
    def init_ui(self):
        ''' Initialize The Ux part of electrum. This function performs the basic
        tasks of setting up the ui.
        '''
        from weakref import ref

        self.funds_error = False
        # setup UX
        self.screens = {}

        #setup lazy imports for mainscreen
        Factory.register('AnimatedPopup',
                         module='electrum_gui.kivy.uix.dialogs')
        Factory.register('QRCodeWidget',
                         module='electrum_gui.kivy.uix.qrcodewidget')
開發者ID:gerrit-rws,項目名稱:electrum,代碼行數:66,代碼來源:main_window.py

示例5: ElectrumWindow


#.........這裏部分代碼省略.........
            self.wallet = None

    def on_key_down(self, instance, key, keycode, codepoint, modifiers):
        if "ctrl" in modifiers:
            # q=24 w=25
            if keycode in (24, 25):
                self.stop()
            elif keycode == 27:
                # r=27
                # force update wallet
                self.update_wallet()
            elif keycode == 112:
                # pageup
                # TODO move to next tab
                pass
            elif keycode == 117:
                # pagedown
                # TODO move to prev tab
                pass
        # TODO: alt+tab_number to activate the particular tab

    def on_keyboard(self, instance, key, keycode, codepoint, modifiers):
        if key == 27 and self.is_exit is False:
            self.is_exit = True
            self.show_info(_("Press again to exit"))
            return True
        # override settings button
        if key in (319, 282):  # f1/settings button on android
            # self.gui.main_gui.toggle_settings(self)
            return True

    def settings_dialog(self):
        if self._settings_dialog is None:
            from uix.dialogs.settings import SettingsDialog

            self._settings_dialog = SettingsDialog(self)
        self._settings_dialog.update()
        self._settings_dialog.open()

    def popup_dialog(self, name):
        if name == "settings":
            self.settings_dialog()
        elif name == "wallets":
            from uix.dialogs.wallets import WalletDialog

            d = WalletDialog()
            d.open()
        else:
            popup = Builder.load_file("gui/kivy/uix/ui_screens/" + name + ".kv")
            popup.open()

    @profiler
    def init_ui(self):
        """ Initialize The Ux part of electrum. This function performs the basic
        tasks of setting up the ui.
        """
        from weakref import ref

        self.funds_error = False
        # setup UX
        self.screens = {}

        # setup lazy imports for mainscreen
        Factory.register("AnimatedPopup", module="electrum_gui.kivy.uix.dialogs")
        Factory.register("QRCodeWidget", module="electrum_gui.kivy.uix.qrcodewidget")
開發者ID:ywzqhl,項目名稱:electrum,代碼行數:66,代碼來源:main_window.py


注:本文中的uix.dialogs.settings.SettingsDialog類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。