src/eric7/MicroPython/EthernetDialogs/HostnameDialog.py

branch
eric7
changeset 10153
ffe7432f716b
child 10439
21c28b0f9e41
diff -r 33e7b9d3f91c -r ffe7432f716b src/eric7/MicroPython/EthernetDialogs/HostnameDialog.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/eric7/MicroPython/EthernetDialogs/HostnameDialog.py	Thu Aug 03 17:33:07 2023 +0200
@@ -0,0 +1,37 @@
+# -*- coding: utf-8 -*-
+
+# Copyright (c) 2023 Detlev Offenbach <detlev@die-offenbachs.de>
+#
+
+"""
+Module implementing a dialog to enter a host name for the device.
+"""
+
+from PyQt6.QtWidgets import QDialog
+
+from .Ui_HostnameDialog import Ui_HostnameDialog
+
+
+class HostnameDialog(QDialog, Ui_HostnameDialog):
+    """
+    Class implementing a dialog to enter a host name for the device.
+    """
+
+    def __init__(self, parent=None):
+        """
+        Constructor
+
+        @param parent reference to the parent widget (defaults to None)
+        @type QWidget (optional)
+        """
+        super().__init__(parent)
+        self.setupUi(self)
+
+    def getHostname(self):
+        """
+        Public method to get the entered host name.
+
+        @return host name for the device
+        @rtype str
+        """
+        return self.hostnameEdit.text()

eric ide

mercurial