def __init__(self, parent=None): super(NetworkStatus, self).__init__(parent) widgets.load('networkstatus.ui', self) header = self.tableWidgetConnectionCount.horizontalHeader() header.setResizeMode(QtGui.QHeaderView.ResizeToContents) # Somehow this value was 5 when I tested if header.sortIndicatorSection() > 4: header.setSortIndicator(0, QtCore.Qt.AscendingOrder) self.startup = time.localtime() self.labelStartupTime.setText(_translate("networkstatus", "Since startup on %1").arg( l10n.formatTimestamp(self.startup))) self.UISignalThread = UISignaler.get() # pylint: disable=no-member QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL( "updateNumberOfMessagesProcessed()"), self.updateNumberOfMessagesProcessed) QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL( "updateNumberOfPubkeysProcessed()"), self.updateNumberOfPubkeysProcessed) QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL( "updateNumberOfBroadcastsProcessed()"), self.updateNumberOfBroadcastsProcessed) QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL( "updateNetworkStatusTab(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"), self.updateNetworkStatusTab) self.timer = QtCore.QTimer() QtCore.QObject.connect(self.timer, QtCore.SIGNAL("timeout()"), self.runEveryTwoSeconds)
def __init__(self, parent=None): super(NetworkStatus, self).__init__(parent) widgets.load('networkstatus.ui', self) self.tableWidgetConnectionCount.horizontalHeader().setResizeMode( QtGui.QHeaderView.ResizeToContents) self.startup = time.localtime() self.labelStartupTime.setText( _translate("networkstatus", "Since startup on %1").arg( l10n.formatTimestamp(self.startup))) self.UISignalThread = UISignaler.get() QtCore.QObject.connect( self.UISignalThread, QtCore.SIGNAL("updateNumberOfMessagesProcessed()"), self.updateNumberOfMessagesProcessed) QtCore.QObject.connect( self.UISignalThread, QtCore.SIGNAL("updateNumberOfPubkeysProcessed()"), self.updateNumberOfPubkeysProcessed) QtCore.QObject.connect( self.UISignalThread, QtCore.SIGNAL("updateNumberOfBroadcastsProcessed()"), self.updateNumberOfBroadcastsProcessed) QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL("updateNetworkStatusTab()"), self.updateNetworkStatusTab) self.timer = QtCore.QTimer() self.timer.start(2000) # milliseconds QtCore.QObject.connect(self.timer, QtCore.SIGNAL("timeout()"), self.runEveryTwoSeconds)
def __init__(self, parent=None): super(Blacklist, self).__init__(parent) widgets.load('blacklist.ui', self) QtCore.QObject.connect(self.radioButtonBlacklist, QtCore.SIGNAL("clicked()"), self.click_radioButtonBlacklist) QtCore.QObject.connect(self.radioButtonWhitelist, QtCore.SIGNAL("clicked()"), self.click_radioButtonWhitelist) QtCore.QObject.connect(self.pushButtonAddBlacklist, QtCore.SIGNAL("clicked()"), self.click_pushButtonAddBlacklist) self.init_blacklist_popup_menu() # Initialize blacklist QtCore.QObject.connect( self.tableWidgetBlacklist, QtCore.SIGNAL("itemChanged(QTableWidgetItem *)"), self.tableWidgetBlacklistItemChanged) # Set the icon sizes for the identicons identicon_size = 3 * 7 self.tableWidgetBlacklist.setIconSize( QtCore.QSize(identicon_size, identicon_size)) self.UISignalThread = UISignaler.get() QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL("rerenderBlackWhiteList()"), self.rerenderBlackWhiteList)
def __init__(self, parent=None): super(NetworkStatus, self).__init__(parent) widgets.load('networkstatus.ui', self) header = self.tableWidgetConnectionCount.horizontalHeader() header.setResizeMode(QtGui.QHeaderView.ResizeToContents) # Somehow this value was 5 when I tested if header.sortIndicatorSection() > 4: header.setSortIndicator(0, QtCore.Qt.AscendingOrder) self.startup = time.localtime() self.labelStartupTime.setText(_translate("networkstatus", "Since startup on %1").arg( l10n.formatTimestamp(self.startup))) self.UISignalThread = UISignaler.get() QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL( "updateNumberOfMessagesProcessed()"), self.updateNumberOfMessagesProcessed) QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL( "updateNumberOfPubkeysProcessed()"), self.updateNumberOfPubkeysProcessed) QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL( "updateNumberOfBroadcastsProcessed()"), self.updateNumberOfBroadcastsProcessed) QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL( "updateNetworkStatusTab(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"), self.updateNetworkStatusTab) self.timer = QtCore.QTimer() QtCore.QObject.connect( self.timer, QtCore.SIGNAL("timeout()"), self.runEveryTwoSeconds)
def __init__(self, parent=None): super(NetworkStatus, self).__init__(parent) widgets.load('networkstatus.ui', self) self.labelStartupTime.setText(_translate("networkstatus", "Since startup on %1").arg( l10n.formatTimestamp())) self.UISignalThread = UISignaler.get() QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL( "updateNumberOfMessagesProcessed()"), self.updateNumberOfMessagesProcessed) QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL( "updateNumberOfPubkeysProcessed()"), self.updateNumberOfPubkeysProcessed) QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL( "updateNumberOfBroadcastsProcessed()"), self.updateNumberOfBroadcastsProcessed) QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL( "updateNetworkStatusTab()"), self.updateNetworkStatusTab) self.totalNumberOfBytesReceived = 0 self.totalNumberOfBytesSent = 0 self.timer = QtCore.QTimer() self.timer.start(2000) # milliseconds QtCore.QObject.connect(self.timer, QtCore.SIGNAL("timeout()"), self.runEveryTwoSeconds)
def __init__(self, parent=None): super(Blacklist, self).__init__(parent) widgets.load('blacklist.ui', self) QtCore.QObject.connect(self.radioButtonBlacklist, QtCore.SIGNAL( "clicked()"), self.click_radioButtonBlacklist) QtCore.QObject.connect(self.radioButtonWhitelist, QtCore.SIGNAL( "clicked()"), self.click_radioButtonWhitelist) QtCore.QObject.connect(self.pushButtonAddBlacklist, QtCore.SIGNAL( "clicked()"), self.click_pushButtonAddBlacklist) self.init_blacklist_popup_menu() # Initialize blacklist QtCore.QObject.connect(self.tableWidgetBlacklist, QtCore.SIGNAL( "itemChanged(QTableWidgetItem *)"), self.tableWidgetBlacklistItemChanged) # Set the icon sizes for the identicons identicon_size = 3*7 self.tableWidgetBlacklist.setIconSize(QtCore.QSize(identicon_size, identicon_size)) self.UISignalThread = UISignaler.get() QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL( "rerenderBlackWhiteList()"), self.rerenderBlackWhiteList)
def __init__(self, parent=None): super(NetworkStatus, self).__init__(parent) widgets.load('networkstatus.ui', self) self.startup = time.localtime() self.labelStartupTime.setText(_translate("networkstatus", "Since startup on %1").arg( l10n.formatTimestamp(self.startup))) self.UISignalThread = UISignaler.get() QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL( "updateNumberOfMessagesProcessed()"), self.updateNumberOfMessagesProcessed) QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL( "updateNumberOfPubkeysProcessed()"), self.updateNumberOfPubkeysProcessed) QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL( "updateNumberOfBroadcastsProcessed()"), self.updateNumberOfBroadcastsProcessed) QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL( "updateNetworkStatusTab()"), self.updateNetworkStatusTab) self.totalNumberOfBytesReceived = 0 self.totalNumberOfBytesSent = 0 self.timer = QtCore.QTimer() self.timer.start(2000) # milliseconds QtCore.QObject.connect(self.timer, QtCore.SIGNAL("timeout()"), self.runEveryTwoSeconds)