NDEVR
API Documentation
WifiConnectDialog

A dialog widget for selecting and connecting to a Wi-Fi network. More...

Public Member Functions

 WifiConnectDialog (QWidget *parent=nullptr)
 Constructs the Wi-Fi connect dialog.
void acceptedSignal ()
 Emitted when the user accepts the dialog.
void canceledSignal ()
 Emitted when the user cancels the dialog.
PasswordString currentPassword () const
 Returns the currently entered password.
String currentSsid () const
 Returns the currently selected or entered SSID, trimmed of whitespace.
void scanAndPopulate ()
 Triggers a Wi-Fi scan and populates the SSID combo box with the results.
void setPassword (const PasswordString &p)
 Sets the password field value.
void setShowPassword (bool on)
 Sets whether the password field shows its contents in plain text.
void setSsid (const StringView &s)
 Sets the currently displayed SSID in the combo box.
void setSSIDs (const Buffer< String > &ssids, const Buffer< int > &strengths)
 Populates the SSID combo box with available networks and their signal strengths.
QSize sizeHint () const override
 Returns the recommended size for this dialog.
void startAutoScan (int interval_ms=10000)
 Starts a periodic timer that automatically scans for Wi-Fi networks.
void stopAutoScan ()
 Stops the automatic Wi-Fi scan timer.

Detailed Description

A dialog widget for selecting and connecting to a Wi-Fi network.


Provides an SSID combo box, password field, scan button, and accept/cancel buttons. Supports periodic automatic scanning for available networks.

Definition at line 23 of file WifiConnectDialog.h.

Constructor & Destructor Documentation

◆ WifiConnectDialog()

WifiConnectDialog::WifiConnectDialog ( QWidget * parent = nullptr)
explicit

Constructs the Wi-Fi connect dialog.

Parameters
[in]parentOptional parent widget.

Member Function Documentation

◆ currentPassword()

PasswordString WifiConnectDialog::currentPassword ( ) const

Returns the currently entered password.

Returns
The current password as a PasswordString.

◆ currentSsid()

String WifiConnectDialog::currentSsid ( ) const
inline

Returns the currently selected or entered SSID, trimmed of whitespace.

Returns
The current SSID string.

Definition at line 67 of file WifiConnectDialog.h.

References String::getAs().

◆ setPassword()

void WifiConnectDialog::setPassword ( const PasswordString & p)

Sets the password field value.

Parameters
[in]pThe password to set.

◆ setShowPassword()

void WifiConnectDialog::setShowPassword ( bool on)
inline

Sets whether the password field shows its contents in plain text.

Parameters
[in]onTrue to show the password, false to mask it.

Definition at line 47 of file WifiConnectDialog.h.

◆ setSsid()

void WifiConnectDialog::setSsid ( const StringView & s)
inline

Sets the currently displayed SSID in the combo box.

Parameters
[in]sThe SSID to display.

Definition at line 52 of file WifiConnectDialog.h.

◆ setSSIDs()

void WifiConnectDialog::setSSIDs ( const Buffer< String > & ssids,
const Buffer< int > & strengths )

Populates the SSID combo box with available networks and their signal strengths.

Parameters
[in]ssidsThe list of network SSIDs.
[in]strengthsThe corresponding signal strengths for each SSID.

◆ sizeHint()

QSize WifiConnectDialog::sizeHint ( ) const
override

Returns the recommended size for this dialog.

Returns
The preferred size hint.

◆ startAutoScan()

void WifiConnectDialog::startAutoScan ( int interval_ms = 10000)

Starts a periodic timer that automatically scans for Wi-Fi networks.

Parameters
[in]interval_msThe scan interval in milliseconds (default 10000).

The documentation for this class was generated from the following file: