def __init__(self, node_set: NodeSet): super(CliLayout, self).__init__() self.node_set = node_set columns = 2 self.copy_bitcoin_cli = CopyButton('bitcoin-cli', self.node_set.bitcoin.bitcoin_cli) self.copy_lncli = CopyButton('lncli', ' '.join(self.node_set.lnd.lncli)) self.addWidget(SectionName('Command Line'), column_span=columns) self.addLayout(self.copy_bitcoin_cli) self.addLayout(self.copy_lncli, same_row=True, column=columns)
def __init__(self, node_set: NodeSet): super(CliLayout, self).__init__() self.node_set = node_set self.copy_bitcoin_cli = CopyButton( button_text='bitcoin-cli', copy_text=self.node_set.bitcoin.bitcoin_cli ) self.copy_lncli = CopyButton( button_text='lncli', copy_text=self.node_set.lnd.lncli ) columns = 2 self.section_name = SectionName('Command Line') self.addWidget(self.section_name, column_span=columns) self.addLayout(self.copy_bitcoin_cli) self.addLayout(self.copy_lncli, same_row=True, column=columns)
def __init__(self, node_set: NodeSet): super(ZapLayout, self).__init__() self.node_set = node_set columns = 3 self.addWidget(SectionName('<a href="https://github.com/LN-Zap/zap-desktop/blob/master/README.md">Zap Desktop Wallet</a>'), column_span=columns) self.copy_grpc_url = CopyButton('Host gRPC', self.node_set.lnd.grpc_url) self.addLayout(self.copy_grpc_url) self.copy_tls_cert_path = CopyButton('TLS Cert Path', self.node_set.lnd.tls_cert_path) self.addLayout(self.copy_tls_cert_path, same_row=True, column=2) self.copy_admin_macaroon_path = CopyButton( 'Macaroon Path', self.node_set.lnd.admin_macaroon_path ) self.addLayout(self.copy_admin_macaroon_path, same_row=True, column=3) self.addWidget(HorizontalLine(), column_span=columns)
def __init__(self, node_set: NodeSet): super(JouleLayout, self).__init__() self.node_set = node_set columns = 2 section_name = SectionName( '<a href="https://lightningjoule.com/">Joule Chrome Extension</a>') self.addWidget(section_name, column_span=columns) self.copy_rest = CopyButton('Node URL (REST)', self.node_set.lnd.rest_url) self.addLayout(self.copy_rest) self.show_macaroons = QtWidgets.QPushButton('Show Macaroons') # noinspection PyUnresolvedReferences self.show_macaroons.clicked.connect( lambda: reveal(self.node_set.lnd.macaroon_path)) self.addWidget(self.show_macaroons, same_row=True, column=columns)
def __init__(self, node_set: NodeSet): super(JouleLayout, self).__init__() self.node_set = node_set columns = 2 self.addWidget(SectionName( '<a href="https://github.com/wbobeirne/joule-extension/wiki/How-to:-Install-Extension-Manually">Joule Chrome Extension</a>' ), column_span=columns) self.copy_rest = CopyButton('Node URL (REST)', self.node_set.lnd.rest_url) self.addLayout(self.copy_rest) self.show_macaroons_button = QtWidgets.QPushButton('Show Macaroons') # noinspection PyUnresolvedReferences self.show_macaroons_button.clicked.connect( lambda: reveal(self.node_set.lnd.macaroon_path)) self.addWidget(self.show_macaroons_button, same_row=True, column=columns) self.addWidget(HorizontalLine(), column_span=columns)
def copy_button() -> CopyButton: copy_button = CopyButton(button_text='Test Me', copy_text='copy_this') return copy_button