本文整理汇总了Python中application.Application.instance方法的典型用法代码示例。如果您正苦于以下问题:Python Application.instance方法的具体用法?Python Application.instance怎么用?Python Application.instance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类application.Application
的用法示例。
在下文中一共展示了Application.instance方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from application import Application [as 别名]
# 或者: from application.Application import instance [as 别名]
def __init__(self, *args, **kwargs):
QtGui.QMainWindow.__init__(self, *args, **kwargs)
self._app = Application.instance()
title = "ChromaClub"
if self._app.isTestNet:
title += " [testnet]"
title += " - " + clubAsset['monikers'][0]
self.setWindowTitle(title)
self.setWindowIcon(QtGui.QIcon(':icons/chromaclub.png'))
self.resize(900, 550)
self.move(Application.instance().desktop().screen().rect().center() - self.rect().center())
self.setCentralWidget(QtGui.QStackedWidget())
self.overviewpage = OverviewPage(self)
self.sendpage = SendPage(self)
self.chatpage = ChatPage(self)
self.centralWidget().addWidget(self.overviewpage)
self.centralWidget().addWidget(self.sendpage)
self.centralWidget().addWidget(self.chatpage)
self._create_actions()
self._create_menu_bar()
self._create_tool_bar()
self._create_status_bar()
self._create_tray_icon()
self._create_tray_icon_menu()
self._app.statusChanged.connect(self._status_changed)
示例2: __init__
# 需要导入模块: from application import Application [as 别名]
# 或者: from application.Application import instance [as 别名]
def __init__(self, *args, **kwargs):
QtGui.QWidget.__init__(self, *args, **kwargs)
self.setupUi(self)
app = Application.instance()
self._wallet = app.wallet
self._wallet.balanceUpdated.connect(self._update_widget)
app.statusChanged.connect(self._update_widget)
示例3: __init__
# 需要导入模块: from application import Application [as 别名]
# 或者: from application.Application import instance [as 别名]
def __init__(self, chatpage, *args, **kwargs):
threading.Thread.__init__(self, *args, **kwargs)
self.chatpage = chatpage
self._running = False
self.lock = threading.Lock()
self.txQ, self.rxQ = Queue.Queue(), Queue.Queue()
self._wallet = Application.instance().wallet
self._lastId = -1
示例4: _create_tray_icon
# 需要导入模块: from application import Application [as 别名]
# 或者: from application.Application import instance [as 别名]
def _create_tray_icon(self):
self.trayIcon = QtGui.QSystemTrayIcon(self)
self.trayIcon.setIcon(QtGui.QIcon(':icons/chromaclub.png'))
self.trayIcon.setToolTip(_("ChromaClub") +
(" [testnet]" if Application.instance().isTestNet else ""))
def activated(reason):
if reason == QtGui.QSystemTrayIcon.Trigger:
self.toggleHideAction.trigger()
self.trayIcon.activated.connect(activated)
self.trayIcon.show()
示例5: __init__
# 需要导入模块: from application import Application [as 别名]
# 或者: from application.Application import instance [as 别名]
def __init__(self, *args, **kwargs):
QtGui.QWidget.__init__(self, *args, **kwargs)
self.setupUi(self)
self._app = Application.instance()
self._app.wallet.balanceUpdated.connect(self._balance_updated)
self._app.statusChanged.connect(self._balance_updated)
self.payToColor.setText(self._app.wallet.get_address(clubAsset['monikers'][0]).split('@')[0] + '@')
def focusInEvent(event):
self.payTo.setStyleSheet('')
QtGui.QLineEdit.focusInEvent(self.payTo, event)
self.payTo.focusInEvent = focusInEvent
self._available_check()