2021-07-13 09:27:38 -07:00
|
|
|
#ifndef WIFIDIALOG_H
|
|
|
|
#define WIFIDIALOG_H
|
|
|
|
|
|
|
|
#include <QDialog>
|
2021-07-14 15:23:54 -07:00
|
|
|
#include <QModelIndex>
|
|
|
|
|
|
|
|
#include "generaldialog.h"
|
2021-07-13 09:27:38 -07:00
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class wifiDialog;
|
|
|
|
}
|
|
|
|
|
|
|
|
class wifiDialog : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2022-04-04 21:47:15 -07:00
|
|
|
QString className = this->metaObject()->className();
|
2021-07-13 09:27:38 -07:00
|
|
|
explicit wifiDialog(QWidget *parent = nullptr);
|
|
|
|
~wifiDialog();
|
2021-07-13 22:24:30 -07:00
|
|
|
QString wifiNetworksList;
|
2021-07-14 15:23:54 -07:00
|
|
|
QString itemText;
|
|
|
|
QModelIndex index;
|
2021-07-13 22:24:30 -07:00
|
|
|
void checkWifiNetworks();
|
|
|
|
void printWifiNetworks();
|
|
|
|
void centerDialog();
|
2021-07-13 09:27:38 -07:00
|
|
|
|
|
|
|
private:
|
|
|
|
Ui::wifiDialog *ui;
|
2021-07-13 22:24:30 -07:00
|
|
|
QTimer * wifiListTimer;
|
2021-07-14 15:23:54 -07:00
|
|
|
generalDialog * generalDialogWindow;
|
2021-07-13 22:24:30 -07:00
|
|
|
|
|
|
|
signals:
|
|
|
|
void wifiNetworksListReady(int networksFound);
|
2021-07-14 15:23:54 -07:00
|
|
|
void quit(int exitCode);
|
|
|
|
void refreshScreen();
|
|
|
|
void updateWifiIconSig(int mode);
|
|
|
|
void showToast(QString messageToDisplay);
|
|
|
|
void closeIndefiniteToast();
|
|
|
|
|
2021-07-13 22:24:30 -07:00
|
|
|
private slots:
|
|
|
|
void on_cancelBtn_clicked();
|
2021-07-14 15:23:54 -07:00
|
|
|
void on_connectBtn_clicked();
|
|
|
|
void refreshScreenNative();
|
|
|
|
void updateWifiIcon(int mode);
|
|
|
|
void showToastNative(QString messageToDisplay);
|
|
|
|
void closeIndefiniteToastNative();
|
2021-07-13 09:27:38 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // WIFIDIALOG_H
|