1 # -*- coding: utf-8 -*- |
1 # -*- coding: utf-8 -*- |
2 |
2 |
|
3 # Copyright (c) 2023 Detlev Offenbach <detlev@die-offenbachs.de> |
|
4 # |
|
5 |
3 """ |
6 """ |
4 Module implementing WifiConnectionDialog. |
7 Module implementing a dialog to enter the parameters needed to connect to a WiFi |
|
8 network. |
5 """ |
9 """ |
6 |
10 |
7 from PyQt6.QtCore import pyqtSlot |
11 from PyQt6.QtCore import pyqtSlot |
8 from PyQt6.QtWidgets import QDialog, QDialogButtonBox, QLineEdit |
12 from PyQt6.QtWidgets import QDialog, QDialogButtonBox, QLineEdit |
9 |
13 |
13 from .Ui_WifiConnectionDialog import Ui_WifiConnectionDialog |
17 from .Ui_WifiConnectionDialog import Ui_WifiConnectionDialog |
14 |
18 |
15 |
19 |
16 class WifiConnectionDialog(QDialog, Ui_WifiConnectionDialog): |
20 class WifiConnectionDialog(QDialog, Ui_WifiConnectionDialog): |
17 """ |
21 """ |
18 Class documentation goes here. |
22 Class implementing a dialog to enter the parameters needed to connect to a WiFi |
|
23 network. |
19 """ |
24 """ |
20 |
25 |
21 def __init__(self, parent=None): |
26 def __init__(self, parent=None): |
22 """ |
27 """ |
23 Constructor |
28 Constructor |
40 self.resize(max(self.width(), msh.width()), msh.height()) |
45 self.resize(max(self.width(), msh.width()), msh.height()) |
41 |
46 |
42 @pyqtSlot(str) |
47 @pyqtSlot(str) |
43 def on_ssidEdit_textChanged(self, ssid): |
48 def on_ssidEdit_textChanged(self, ssid): |
44 """ |
49 """ |
45 Private slot handling a change of the SSID |
50 Private slot handling a change of the SSID. |
46 |
51 |
47 @param ssid entered SSID |
52 @param ssid entered SSID |
48 @type str |
53 @type str |
49 """ |
54 """ |
50 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(bool(ssid)) |
55 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(bool(ssid)) |