src/eric7/MicroPython/EthernetDialogs/HostnameDialog.py

branch
eric7
changeset 10153
ffe7432f716b
child 10439
21c28b0f9e41
equal deleted inserted replaced
10152:33e7b9d3f91c 10153:ffe7432f716b
1 # -*- coding: utf-8 -*-
2
3 # Copyright (c) 2023 Detlev Offenbach <detlev@die-offenbachs.de>
4 #
5
6 """
7 Module implementing a dialog to enter a host name for the device.
8 """
9
10 from PyQt6.QtWidgets import QDialog
11
12 from .Ui_HostnameDialog import Ui_HostnameDialog
13
14
15 class HostnameDialog(QDialog, Ui_HostnameDialog):
16 """
17 Class implementing a dialog to enter a host name for the device.
18 """
19
20 def __init__(self, parent=None):
21 """
22 Constructor
23
24 @param parent reference to the parent widget (defaults to None)
25 @type QWidget (optional)
26 """
27 super().__init__(parent)
28 self.setupUi(self)
29
30 def getHostname(self):
31 """
32 Public method to get the entered host name.
33
34 @return host name for the device
35 @rtype str
36 """
37 return self.hostnameEdit.text()

eric ide

mercurial