Skip to content

Commit

Permalink
start setting up alias
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreRochard committed Jan 9, 2019
1 parent 038c31d commit 93144e4
Show file tree
Hide file tree
Showing 17 changed files with 48 additions and 13 deletions.
2 changes: 1 addition & 1 deletion node_launcher/gui/main_widget.py
Expand Up @@ -32,8 +32,8 @@ def __init__(self):
self.error_message = QErrorMessage(self)
self.message_box.setTextFormat(Qt.RichText)
try:
self.testnet_group_box = NetworkWidget(network=TESTNET)
self.mainnet_group_box = NetworkWidget(network=MAINNET)
self.testnet_group_box = NetworkWidget(network=TESTNET)
except ZmqPortsNotOpenError as e:
self.error_message.showMessage(str(e))
self.error_message.exec_()
Expand Down
File renamed without changes.
@@ -1,10 +1,10 @@
from PySide2.QtWidgets import QWidget

from node_launcher.gui.advanced.configuration_files_layout import ConfigurationFilesLayout
from node_launcher.gui.advanced.cli_layout import CliLayout
from node_launcher.gui.advanced.ports_layout import PortsLayout
from node_launcher.gui.advanced.tls_layout import TlsLayout
from node_launcher.gui.advanced.versions_layout import VersionsLayout
from node_launcher.gui.network_buttons.advanced import ConfigurationFilesLayout
from node_launcher.gui.network_buttons.advanced import CliLayout
from node_launcher.gui.network_buttons.advanced import PortsLayout
from node_launcher.gui.network_buttons.advanced.tls_layout import TlsLayout
from node_launcher.gui.network_buttons.advanced import VersionsLayout
from node_launcher.gui.components.grid_layout import QGridLayout
from node_launcher.gui.components.horizontal_line import HorizontalLine
from node_launcher.node_set import NodeSet
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
21 changes: 21 additions & 0 deletions node_launcher/gui/network_buttons/alias_layout.py
@@ -0,0 +1,21 @@
from PySide2.QtWidgets import QColorDialog, QPushButton, QLineEdit

from node_launcher.gui.components.grid_layout import QGridLayout


class AliasLayout(QGridLayout):
def __init__(self):
super().__init__()
self.alias_dialog = QLineEdit()
self.color_dialog = QColorDialog()

self.alias = None
self.color = None

self.alias_label = AliasLabel()
self.color_label = ColorLabel()

self.change_alias_button = QPushButton('Change Alias')
self.change_alias_button.clicked.connect(
lambda: self.
)
2 changes: 1 addition & 1 deletion node_launcher/gui/network_buttons/nodes_layout.py
@@ -1,6 +1,6 @@
from PySide2.QtWidgets import QPushButton

from node_launcher.gui.advanced.advanced_widget import AdvancedWidget
from node_launcher.gui.network_buttons.advanced.advanced_widget import AdvancedWidget
from node_launcher.gui.components.grid_layout import QGridLayout
from node_launcher.gui.components.horizontal_line import HorizontalLine
from node_launcher.gui.components.image_label import ImageLabel
Expand Down
Expand Up @@ -2,7 +2,7 @@

import pytest

from node_launcher.gui.advanced.advanced_widget import AdvancedWidget
from node_launcher.gui.network_buttons.advanced import AdvancedWidget


@pytest.fixture
Expand Down
Expand Up @@ -5,7 +5,7 @@
from PySide2.QtGui import QClipboard
from PySide2.QtTest import QTest

from node_launcher.gui.advanced.cli_layout import CliLayout
from node_launcher.gui.network_buttons.advanced import CliLayout


@pytest.fixture
Expand Down
Expand Up @@ -4,7 +4,7 @@
from PySide2.QtCore import Qt
from PySide2.QtTest import QTest

from node_launcher.gui.advanced.configuration_files_layout import ConfigurationFilesLayout
from node_launcher.gui.network_buttons.advanced import ConfigurationFilesLayout


@pytest.fixture
Expand Down
Expand Up @@ -10,7 +10,7 @@
LND_DEFAULT_GRPC_PORT,
LND_DEFAULT_REST_PORT
)
from node_launcher.gui.advanced.ports_layout import PortsLayout
from node_launcher.gui.network_buttons.advanced import PortsLayout


@pytest.fixture
Expand Down
Expand Up @@ -4,7 +4,7 @@
from PySide2.QtCore import Qt
from PySide2.QtTest import QTest

from node_launcher.gui.advanced.tls_layout import TlsLayout
from node_launcher.gui.network_buttons.advanced.tls_layout import TlsLayout


@pytest.fixture
Expand Down
Expand Up @@ -5,7 +5,7 @@

from node_launcher.constants import NODE_LAUNCHER_RELEASE, \
TARGET_BITCOIN_RELEASE, TARGET_LND_RELEASE
from node_launcher.gui.advanced.versions_layout import VersionsLayout
from node_launcher.gui.network_buttons.advanced import VersionsLayout


@pytest.fixture
Expand Down
14 changes: 14 additions & 0 deletions tests/test_gui/test_network_buttons/test_alias_layout.py
@@ -0,0 +1,14 @@
import pytest

from node_launcher.gui.network_buttons.alias_layout import AliasLayout


@pytest.fixture
def alias_layout() -> AliasLayout:
alias_layout = AliasLayout()
return alias_layout


class TestAliasLayout(object):
def test_set_alias(self, alias_layout: AliasLayout):
pass

0 comments on commit 93144e4

Please sign in to comment.