47 lines
815 B
C++
47 lines
815 B
C++
#ifndef NETWORKCFGDIALOG_H
|
|
#define NETWORKCFGDIALOG_H
|
|
|
|
#include <QDialog>
|
|
|
|
namespace Ui {
|
|
class networkCfgDialog;
|
|
}
|
|
|
|
class NetCfgTableModel;
|
|
class GUIMessageDialog;
|
|
class QThread;
|
|
|
|
class networkCfgDialog : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
static void setShadow(QDialog* dialog);
|
|
explicit networkCfgDialog(QWidget* parent = nullptr);
|
|
~networkCfgDialog();
|
|
|
|
void loadData();
|
|
void applyData();
|
|
|
|
|
|
public slots:
|
|
void afterThreadStart();
|
|
void beforeThreadExit();
|
|
|
|
private:
|
|
bool isModified();
|
|
const char* boolToStr(bool b)
|
|
{
|
|
return b ? "sucess" : "failed";
|
|
}
|
|
NetCfgTableModel* model_addr = nullptr;
|
|
NetCfgTableModel* model_route = nullptr;
|
|
GUIMessageDialog* msgDialog = nullptr;
|
|
Ui::networkCfgDialog* ui;
|
|
QThread* myThread = nullptr;
|
|
QString err;
|
|
QString admin_psw;
|
|
};
|
|
|
|
#endif // NetworkCfgDialog_H
|