Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cb572f4f10 | ||
|
|
14a1c568d0 | ||
|
|
2da62629a8 | ||
|
|
37bdaec248 | ||
|
|
cb7a142b88 | ||
|
|
08dbdae2a8 | ||
|
|
75fa1a8102 | ||
|
|
0b9642a705 | ||
|
|
88447b6a26 | ||
|
|
57a77b31fb | ||
|
|
0b5ef978f5 | ||
|
|
b99d28fbf8 | ||
|
|
2352f79460 | ||
|
|
3f4219c929 |
No files matched your search
@@ -1,11 +1,24 @@
|
||||
# NEU-Dectect
|
||||
# NEU-Monitor
|
||||
## 使用教程
|
||||
* 注:软件只有托盘中的图标以及单击显示的菜单,并没有主窗口
|
||||
1. 在设置中填好校园网账号和密码
|
||||
1. 在设置中填好校园网账号,密码以及流量(剩余流量过少时发出提醒)
|
||||
|
||||
2. 开始使用
|
||||
|
||||
3. 双击托盘图标可以登录
|
||||
## 自动重连
|
||||
在已经登陆的状态下检测到校园网状态变为断开,此时会进行重新登陆,重新登陆等同于在ipgw网页点击`断开连接`后再进行`连接网络`
|
||||
|
||||

|
||||
|
||||

|
||||
## 自动登陆
|
||||
1. 在已经登陆的状态下检测到校园网状态变为断开,此时会进行重新登陆,重新登陆等同于在ipgw网页点击`断开连接`后再进行`连接网络`
|
||||
2. 首次启动应用时进行登陆
|
||||
3. 手动断开网络的情况下不会自动重新登陆
|
||||
|
||||
## 勿扰模式
|
||||
|
||||
该模式下不会发出系统通知
|
||||
|
||||
## 网络状态检测
|
||||
网络状态分为
|
||||
* 未连接到校园网
|
||||
@@ -14,4 +27,4 @@
|
||||
|
||||
*为了检测网络状态,此工具会持续发送请求,~~可能由于请求频率过高,有很大概率会出现网关登陆被限制的情况(提示请5分钟之后再尝试)~~
|
||||
|
||||
*请不要短时间内频繁的进行登陆,会出现登陆受限的情况
|
||||
*请不要短时间内频繁的进行登陆,否则会出现登陆受限的情况
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "maintray.h"
|
||||
#include <QApplication>
|
||||
#include <QFont>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
@@ -7,6 +8,7 @@ int main(int argc, char *argv[])
|
||||
a.setQuitOnLastWindowClosed(false);
|
||||
a.setApplicationName(QObject::tr("NEU-Monitor"));
|
||||
a.setWindowIcon(QIcon(QObject::tr(":/icon/favicon.ico")));
|
||||
a.setFont(QFont("Microsoft YaHei Light", 9));
|
||||
MainTray *tray = new MainTray("","");
|
||||
QObject::connect(tray, MainTray::exit, &a, QApplication::quit);
|
||||
tray->show();
|
||||
|
||||
+99
-22
@@ -6,9 +6,9 @@ MainTray::MainTray(QByteArray username, QByteArray password, QObject *parent): Q
|
||||
infoMenu(new QMenu()),
|
||||
settingsMenu(new QMenu()),
|
||||
//初始化settings
|
||||
settings(QSettings::IniFormat, QSettings::UserScope, "TurnMeOn", "NEU-Dectect"),
|
||||
settings(QSettings::IniFormat, QSettings::UserScope, "Cai.MY", "NEU-Monitor"),
|
||||
//初始化optionswindow
|
||||
opWindow(settings.value("id", "").toByteArray(), settings.value("password", "").toByteArray()),
|
||||
opWindow(settings.value("id", "").toByteArray(), settings.value("password", "").toByteArray(), settings.value("total traffic", 60).toInt()),
|
||||
user(username),
|
||||
passwd(password)
|
||||
{
|
||||
@@ -16,8 +16,12 @@ MainTray::MainTray(QByteArray username, QByteArray password, QObject *parent): Q
|
||||
setIcon(QIcon(tr(":/icon/favicon.ico")));
|
||||
|
||||
netctrl = new NetController(user,passwd,this);
|
||||
netctrl->setUsername(settings.value("id",0).toByteArray());
|
||||
netctrl->setPassword(settings.value("password", 0).toByteArray());
|
||||
user = settings.value("id",0).toByteArray();
|
||||
passwd = settings.value("password", 0).toByteArray();
|
||||
totalTraffic = settings.value("total traffic", 60).toInt();
|
||||
netctrl->setUsername(user);
|
||||
netctrl->setPassword(passwd);
|
||||
netctrl->setTotalTraffic(totalTraffic);
|
||||
|
||||
connect(&opWindow, OptionsWindow::saveSettings, this, updateUserInfo);
|
||||
//连接controller状态改变信号
|
||||
@@ -32,13 +36,16 @@ MainTray::MainTray(QByteArray username, QByteArray password, QObject *parent): Q
|
||||
logoutAction->setEnabled(true);
|
||||
break;
|
||||
case NetController::Offline:
|
||||
if(!isForceLogin){
|
||||
setIcon(QIcon(tr(":/icon/offline.ico")));
|
||||
if(!muteAction->isChecked())
|
||||
showMessage(tr("网络已断开"),tr("校园网已注销"), this->icon(), msgDur);
|
||||
loginAction->setEnabled(true);
|
||||
logoutAction->setEnabled(true);
|
||||
setIcon(QIcon(tr(":/icon/offline.ico")));
|
||||
if(!muteAction->isChecked())
|
||||
showMessage(tr("网络已断开"),tr("校园网已注销"), this->icon(), msgDur);
|
||||
loginAction->setEnabled(true);
|
||||
logoutAction->setEnabled(true);
|
||||
//自动登陆
|
||||
if(autoLogin->isChecked() && !isForceLogout){
|
||||
loginAction->trigger();
|
||||
}
|
||||
|
||||
break;
|
||||
case NetController::Disconnected:
|
||||
setIcon(QIcon(tr(":/icon/offline.ico")));
|
||||
@@ -47,6 +54,16 @@ MainTray::MainTray(QByteArray username, QByteArray password, QObject *parent): Q
|
||||
loginAction->setDisabled(true);
|
||||
logoutAction->setDisabled(true);
|
||||
break;
|
||||
case NetController::WrongPass:
|
||||
setIcon(QIcon(tr(":/icon/offline.ico")));
|
||||
if(!muteAction->isChecked())
|
||||
showMessage(tr("登陆失败"),tr("密码错误"), this->icon(), msgDur);
|
||||
break;
|
||||
case NetController::Owed:
|
||||
setIcon(QIcon(tr(":/icon/offline.ico")));
|
||||
if(!muteAction->isChecked())
|
||||
showMessage(tr("登陆失败"),tr("已欠费"), this->icon(), msgDur);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -54,12 +71,18 @@ MainTray::MainTray(QByteArray username, QByteArray password, QObject *parent): Q
|
||||
showToolTip(state);
|
||||
});
|
||||
|
||||
|
||||
connect(this, QSystemTrayIcon::messageClicked, this, [this](){
|
||||
if(currentState == NetController::WrongPass)
|
||||
opWindow.show();
|
||||
});
|
||||
|
||||
connect(netctrl, NetController::sendInfo, this, handleInfo);
|
||||
|
||||
//菜单Action
|
||||
loginAction = new QAction(tr("连接网络"),this);
|
||||
logoutAction = new QAction(tr("断开网络"),this);
|
||||
autoLogin = new QAction(tr("自动重连"), this);
|
||||
autoLogin = new QAction(tr("自动登陆"), this);
|
||||
optionsAction = new QAction(tr("选项"), this);
|
||||
bootAction = new QAction(tr("开机启动"), this);
|
||||
muteAction = new QAction(tr("勿扰模式"), this);
|
||||
@@ -80,6 +103,7 @@ MainTray::MainTray(QByteArray username, QByteArray password, QObject *parent): Q
|
||||
connect(loginAction, QAction::triggered, this,[this](){
|
||||
isForceLogin = true;
|
||||
netctrl->sendLogoutRequest();
|
||||
hasWarned = false;
|
||||
netctrl->sendLoginRequest();
|
||||
isForceLogout = false;
|
||||
});
|
||||
@@ -137,11 +161,17 @@ MainTray::MainTray(QByteArray username, QByteArray password, QObject *parent): Q
|
||||
autoLoginTimer->start();
|
||||
connect(autoLoginTimer,QTimer::timeout, this, [this](){
|
||||
netctrl->checkState();
|
||||
//Offline状态下自动重连
|
||||
if(currentState == NetController::Offline && autoLogin->isChecked() && !isForceLogout){
|
||||
loginAction->trigger();
|
||||
}
|
||||
// //Offline状态下自动重连
|
||||
// if(currentState == NetController::Offline && autoLogin->isChecked() && !isForceLogout){
|
||||
// loginAction->trigger();
|
||||
// }
|
||||
});
|
||||
|
||||
showToolTip(currentState);
|
||||
if(settings.value("id").isNull()||settings.value("password").isNull())
|
||||
{
|
||||
opWindow.show();
|
||||
}
|
||||
}
|
||||
|
||||
MainTray::~MainTray()
|
||||
@@ -152,19 +182,44 @@ MainTray::~MainTray()
|
||||
|
||||
void MainTray::showToolTip(NetController::State state)
|
||||
{
|
||||
QString tooltipString;
|
||||
switch (state) {
|
||||
case NetController::Online:
|
||||
setToolTip(tr("当前状态:连接\n自动重连:") + (autoLogin->isChecked()? tr("开启"):tr("关闭")));
|
||||
tooltipString += tr("当前状态:连接");
|
||||
break;
|
||||
case NetController::Offline:
|
||||
setToolTip(tr("当前状态:断开\n自动重连:") + (autoLogin->isChecked()? tr("开启"):tr("关闭"))+tr("\n双击以登陆"));
|
||||
tooltipString += tr("当前状态:断开(双击登陆)");
|
||||
break;
|
||||
case NetController::Disconnected:
|
||||
setToolTip(tr("当前状态:无法连接\n自动重连:") + (autoLogin->isChecked()? tr("开启"):tr("关闭")));
|
||||
tooltipString += tr("当前状态:无法连接");
|
||||
break;
|
||||
case NetController::Unknown:
|
||||
tooltipString += tr("当前状态:正在识别");
|
||||
break;
|
||||
case NetController::Owed:
|
||||
tooltipString += tr("当前状态:已欠费");
|
||||
break;
|
||||
case NetController::WrongPass:
|
||||
tooltipString += tr("当前状态:密码错误");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
tooltipString += tr("\n自动登陆:");
|
||||
tooltipString += autoLogin->isChecked()? tr("开启"):tr("关闭");
|
||||
if(state == NetController::Online){
|
||||
switch (trafficstate) {
|
||||
case Over:
|
||||
tooltipString += tr("\n流量已超额");
|
||||
break;
|
||||
case Nearly:
|
||||
tooltipString += tr("\n剩余流量不足");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
setToolTip(tooltipString);
|
||||
}
|
||||
|
||||
void MainTray::handleActivated(QSystemTrayIcon::ActivationReason reason)
|
||||
@@ -192,7 +247,7 @@ void MainTray::showAbout()
|
||||
QMessageBox *aboutWindow = new QMessageBox();
|
||||
aboutWindow->setStandardButtons(QMessageBox::Ok);
|
||||
aboutWindow->setText(tr("<h1>NEU-Monitor</h1>"
|
||||
"<p>Based on Qt 5.10.1 (MinGW 5.3.0, 32bit)</p>"
|
||||
"<p>Based on Qt 5.11.0 (MinGW 5.3.0, 32bit)</p>"
|
||||
"Source Code: <a href=\"https://github.com/c-my/NEU-Monitor\">https://github.com/c-my/NEU-Monitor</a><br/>"
|
||||
"Email: <address>"
|
||||
"<a href=\"mailto:cmy1113@yeah.net?subject=SerialAsst Feedback\">Cai.MY</a>"
|
||||
@@ -216,19 +271,27 @@ void MainTray::setAutoStart(bool set)
|
||||
delete settings;
|
||||
}
|
||||
|
||||
void MainTray::updateUserInfo(QByteArray id, QByteArray pass)
|
||||
void MainTray::updateUserInfo(QByteArray id, QByteArray pass, int traffic)
|
||||
{
|
||||
netctrl->setUsername(id);
|
||||
netctrl->setPassword(pass);
|
||||
netctrl->setTotalTraffic(traffic);
|
||||
user = id;
|
||||
passwd = pass;
|
||||
totalTraffic = traffic;
|
||||
opWindow.hide();
|
||||
netctrl->sendLoginRequest();
|
||||
hasWarned = false;
|
||||
settings.setValue("id", id);
|
||||
settings.setValue("password", pass);
|
||||
settings.setValue("total traffic", traffic);
|
||||
}
|
||||
|
||||
void MainTray::handleInfo(QString mb, QString sec, QString balance, QString ip)
|
||||
void MainTray::handleInfo(QString byte, QString sec, QString balance, QString ip)
|
||||
{
|
||||
QString mbString = QString::number(mb.toDouble()/1000000.0, 'f', 2);
|
||||
QString mbString = QString::number(byte.toDouble()/1000000.0, 'f', 2);
|
||||
QString gbString = QString::number(byte.toDouble()/1000000000.0, 'f', 2);
|
||||
QString leftoverString = QString::number(totalTraffic - byte.toDouble()/1000000000.0, 'f',2 );
|
||||
int totalSec = sec.toInt();
|
||||
int hour = (totalSec/3600);
|
||||
int min = ((totalSec-hour*3600)/60);
|
||||
@@ -237,5 +300,19 @@ void MainTray::handleInfo(QString mb, QString sec, QString balance, QString ip)
|
||||
timeAction->setText(tr("已用时长:\t") + QString::number(hour) + ":" +QString::number(min) + ":" + second);
|
||||
balanceAction->setText(tr("账户余额:\t") + balance);
|
||||
ipAction->setText(tr("IP地址:\t") + ip);
|
||||
if(!hasWarned){
|
||||
hasWarned = true;
|
||||
if(byte.toDouble() / 1000000.0 > totalTraffic * 1024){//流量已超
|
||||
trafficstate = Over;
|
||||
if(!muteAction->isChecked())
|
||||
showMessage(tr("流量警告"), tr("本月流量已超"), QSystemTrayIcon::Warning);
|
||||
}
|
||||
else if(byte.toDouble() / 1000000.0 + 5000 > totalTraffic * 1024){//流量将超
|
||||
trafficstate = Nearly;
|
||||
if(!muteAction->isChecked())
|
||||
showMessage(tr("流量预警"), tr("剩余流量:") + leftoverString + tr("G"));
|
||||
}
|
||||
showToolTip(currentState);
|
||||
}
|
||||
}
|
||||
|
||||
+5
-1
@@ -18,6 +18,7 @@ class MainTray: public QSystemTrayIcon
|
||||
public:
|
||||
MainTray(QByteArray username, QByteArray password, QObject *parent = Q_NULLPTR);
|
||||
~MainTray();
|
||||
enum TrafficState{Normal, Over, Nearly };
|
||||
|
||||
private:
|
||||
QMenu *menu, *infoMenu, *settingsMenu;
|
||||
@@ -30,8 +31,10 @@ private:
|
||||
|
||||
bool isForceLogout = false;
|
||||
bool isForceLogin = false;
|
||||
bool hasWarned = false;
|
||||
|
||||
NetController::State currentState = NetController::Unknown; //当前状态
|
||||
TrafficState trafficstate = Normal;
|
||||
|
||||
void showToolTip(NetController::State state);
|
||||
void handleActivated(QSystemTrayIcon::ActivationReason reason);//处理左键单击、双击
|
||||
@@ -40,6 +43,7 @@ private:
|
||||
void setAutoStart(bool set);
|
||||
|
||||
QByteArray user, passwd;
|
||||
int totalTraffic;
|
||||
int msgDur = 500; //通知持续时间
|
||||
int checkInterval = 1000; //查询状态定时器周期
|
||||
|
||||
@@ -48,7 +52,7 @@ signals:
|
||||
void exit();
|
||||
|
||||
private slots:
|
||||
void updateUserInfo(QByteArray id, QByteArray pass);
|
||||
void updateUserInfo(QByteArray id, QByteArray pass, int traffic);
|
||||
void handleInfo(QString mb, QString sec, QString balance, QString ip);
|
||||
|
||||
};
|
||||
|
||||
+49
-12
@@ -24,21 +24,30 @@ NetController::NetController(QByteArray id, QByteArray passwd, QObject *parent)
|
||||
void NetController::checkState()
|
||||
{
|
||||
sendCheckRequest();
|
||||
if(NEUState == Offline && lastState != Offline && offlineCount++ > 1)
|
||||
if(NEUState == Offline && lastState != Offline/* && offlineCount++ > 1*/)
|
||||
{
|
||||
offlineCount = 0;
|
||||
lastState = Offline;
|
||||
emit stateChanged(lastState);
|
||||
emit stateChanged(NEUState);
|
||||
}
|
||||
else if(NEUState == Online && lastState != Online)
|
||||
{
|
||||
lastState = Online;
|
||||
emit stateChanged(lastState);
|
||||
emit stateChanged(NEUState);
|
||||
}
|
||||
else if(NEUState == Disconnected && lastState != Disconnected)
|
||||
{
|
||||
lastState = Disconnected;
|
||||
emit stateChanged(lastState);
|
||||
emit stateChanged(NEUState);
|
||||
}
|
||||
else if(NEUState == WrongPass && lastState != WrongPass)
|
||||
{
|
||||
lastState = WrongPass;
|
||||
emit stateChanged(NEUState);
|
||||
}
|
||||
else if(NEUState == Owed && lastState != Owed)
|
||||
{
|
||||
lastState = Owed;
|
||||
emit stateChanged(NEUState);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,24 +103,52 @@ void NetController::handleResponse(QNetworkReply *reply)
|
||||
QString status = reply->readAll();
|
||||
if(status==offlineString)
|
||||
{
|
||||
NEUState = Offline;
|
||||
if(NEUState!=WrongPass && NEUState!=Owed && offlineCount++ > 1)
|
||||
{
|
||||
onlineCount = 0;
|
||||
offlineCount = 0;
|
||||
disconnectCount = 0;
|
||||
lastState = NEUState;
|
||||
NEUState = Offline;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
offlineCount = 0;
|
||||
NEUState = Online;
|
||||
QStringList infoList = status.split(',');
|
||||
emit sendInfo(infoList[0], infoList[1], infoList[2], infoList[5]);
|
||||
if(onlineCount++ > 1)
|
||||
{
|
||||
onlineCount = 0;
|
||||
offlineCount = 0;
|
||||
disconnectCount = 0;
|
||||
lastState = NEUState;
|
||||
NEUState = Online;
|
||||
QStringList infoList = status.split(',');
|
||||
emit sendInfo(infoList[0], infoList[1], infoList[2], infoList[5]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
else if(disconnectCount++ > 1)
|
||||
{
|
||||
onlineCount = 0;
|
||||
offlineCount = 0;
|
||||
disconnectCount = 0;
|
||||
lastState = NEUState;
|
||||
NEUState = Disconnected;
|
||||
}
|
||||
}
|
||||
else if(url==loginUrl)
|
||||
{
|
||||
|
||||
QString loginPage(reply->readAll());
|
||||
if(loginPage.contains(QString("已欠费"))){//欠费
|
||||
lastState = NEUState;
|
||||
NEUState = Owed;
|
||||
}
|
||||
else if(loginPage.contains("Password is error")){//密码错误
|
||||
lastState = NEUState;
|
||||
NEUState = WrongPass;
|
||||
}
|
||||
else if(loginPage.contains("网络已连接")){//登陆成功
|
||||
lastState = NEUState;
|
||||
NEUState = Online;
|
||||
}
|
||||
}
|
||||
}
|
||||
+4
-2
@@ -19,16 +19,18 @@ public:
|
||||
|
||||
void setUsername(QByteArray newName) { username = newName; }
|
||||
void setPassword(QByteArray newPass) { password = newPass; }
|
||||
void setTotalTraffic(int newTraffic) { traffic = newTraffic; }
|
||||
|
||||
enum State {Unknown, Offline, Online, Disconnected};
|
||||
enum State {Unknown, Offline, Online, Disconnected, Owed, WrongPass};
|
||||
|
||||
private:
|
||||
QString checkUrl = "http://ipgw.neu.edu.cn/include/auth_action.php";
|
||||
QString loginUrl = "http://ipgw.neu.edu.cn/srun_portal_pc.php?ac_id=1&";
|
||||
QString offlineString = "not_online";
|
||||
QByteArray checkParam, username, password;
|
||||
int traffic;
|
||||
State NEUState = Unknown, lastState = Unknown;
|
||||
int offlineCount = 0;
|
||||
int onlineCount = 0, offlineCount = 0, disconnectCount = 0;
|
||||
|
||||
QNetworkAccessManager manager;
|
||||
QNetworkRequest request;
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 7.9 KiB |
+12
-2
@@ -1,6 +1,6 @@
|
||||
#include "optionswindow.h"
|
||||
|
||||
OptionsWindow::OptionsWindow(QByteArray id, QByteArray pass, QWidget *parent) : QMainWindow(parent)
|
||||
OptionsWindow::OptionsWindow(QByteArray id, QByteArray pass, int traffic, QWidget *parent) : QMainWindow(parent)
|
||||
{
|
||||
setWindowTitle(tr("选项"));
|
||||
|
||||
@@ -17,12 +17,19 @@ OptionsWindow::OptionsWindow(QByteArray id, QByteArray pass, QWidget *parent) :
|
||||
passwordEdit->setEchoMode(QLineEdit::Password);
|
||||
passwordEdit->setText(pass);
|
||||
|
||||
trafficSpin = new QSpinBox(this);
|
||||
trafficSpin->setValue(traffic);
|
||||
trafficSpin->setToolTip(tr("在流量将要用尽时进行提醒"));
|
||||
|
||||
layout->addRow(tr("用户名"), idEdit);
|
||||
layout->addRow(tr("密码"), passwordEdit);
|
||||
layout->addRow(tr("流量(G)"), trafficSpin);
|
||||
layout->setSpacing(20);
|
||||
|
||||
saveButton = new QPushButton("确定", this);
|
||||
saveButton->setDefault(true);
|
||||
cancleButton = new QPushButton("取消", this);
|
||||
cancleButton->setShortcut(Qt::Key_Escape);
|
||||
hlayout->addWidget(saveButton);
|
||||
hlayout->addWidget(cancleButton);
|
||||
|
||||
@@ -35,6 +42,9 @@ OptionsWindow::OptionsWindow(QByteArray id, QByteArray pass, QWidget *parent) :
|
||||
tabWidget->addTab(page1, tr("常规"));
|
||||
setCentralWidget(tabWidget);
|
||||
|
||||
connect(saveButton, QPushButton::clicked, this, [this](){emit saveSettings(idEdit->text().toUtf8(), passwordEdit->text().toUtf8());});
|
||||
connect(saveButton, QPushButton::clicked, this, [this](){emit saveSettings(idEdit->text().toUtf8(),
|
||||
passwordEdit->text().toUtf8(),
|
||||
trafficSpin->value());
|
||||
});
|
||||
connect(cancleButton, QPushButton::clicked, this, hide);
|
||||
}
|
||||
+4
-2
@@ -5,6 +5,7 @@
|
||||
#include <QWidget>
|
||||
#include <QTabWidget>
|
||||
#include <QLineEdit>
|
||||
#include <QSpinBox>
|
||||
#include <QPushButton>
|
||||
#include <QFormLayout>
|
||||
#include <QVBoxLayout>
|
||||
@@ -14,19 +15,20 @@ class OptionsWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit OptionsWindow(QByteArray id, QByteArray pass, QWidget *parent = nullptr);
|
||||
explicit OptionsWindow(QByteArray id, QByteArray pass, int traffic, QWidget *parent = nullptr);
|
||||
|
||||
private:
|
||||
QTabWidget *tabWidget;
|
||||
QWidget *page1;
|
||||
QLineEdit *idEdit, *passwordEdit;
|
||||
QSpinBox *trafficSpin;
|
||||
QPushButton *saveButton, *cancleButton;
|
||||
QFormLayout *layout;
|
||||
QVBoxLayout *vlayout;
|
||||
QHBoxLayout *hlayout;
|
||||
|
||||
signals:
|
||||
void saveSettings(QByteArray id, QByteArray pass);
|
||||
void saveSettings(QByteArray id, QByteArray pass, int traffic);
|
||||
public slots:
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user