|
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() |