Skip to content

Commit

Permalink
V2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
CHN-STUDENT committed Jan 10, 2019
1 parent 2c0f557 commit fa46732
Show file tree
Hide file tree
Showing 15 changed files with 96 additions and 13 deletions.
Binary file added srun-3k-ui/Resouces/titleButtons/about_alert.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added srun-3k-ui/Resouces/titleButtons/about_info.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added srun-3k-ui/Resouces/titleButtons/setting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified srun-3k-ui/Resouces/titleButtons/setting_press_128px.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
78 changes: 77 additions & 1 deletion srun-3k-ui/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ MainWindow::MainWindow(QWidget *parent) :
isServerinfoExist=s->readServerConfigFromFile(serverConfig);
if(isServerinfoExist)
{

ui->saveButtonInadvanceSettingsPage->setGeometry(170,200,150,40);
ui->Ladvanced->setText("高级设置:");
ui->loginServerLineEdit->setText(serverConfig.at(0));
ui->serviceServerLineEdit->setText(serverConfig.at(1));
Expand Down Expand Up @@ -286,6 +286,49 @@ void MainWindow::on_SERVICE_clicked()
ui->widgetBottom->setStyleSheet("QLabel#statusBar{color:white;padding:5px 0px 5px;}"
"QWidget#widgetBottom{background:#3498DB;}");
QString url=serverConfig.at(1)+":"+serverConfig.at(4);
//qDebug()<<url;

/**
if(loginStatus == 'online')
{
if (typeof username != "undefined" && username != "") {
var ALPHA = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
base64 = $.base64;
base64.setAlpha(ALPHA);
var data = "";
if (typeof password != "undefined" && password != "") {
var pwd = md5(password);
data = base64.encode(username+":"+pwd);
}
data = base64.encode(username+":"+username);
if (data != "") {
window.open(""+data);
$("pre").css("background","#1aad18");
$("#statusbar").text("正在打开自服务...成功!")
return;
}
$("pre").css("background","#1aad18");
$("#statusbar").text("正在打开自服务...成功!")
window.open("http://172.16.154.130:8800");
return;
}
}
*/

QString username=logoutname;
if(isOnline)
{
if(username!=""&&!username.isEmpty())
{
QString data=username+":"+username;
data=data.toUtf8().toBase64();
if(!data.isEmpty()&&data!="")
{
url=url+"/site/sso?data="+data;
}
}
}

//qDebug()<<url;
QDesktopServices::openUrl(QUrl(url));
ui->statusBar->setText("打开自服务中...成功!");
Expand Down Expand Up @@ -508,6 +551,7 @@ void MainWindow::on_saveButtonInadvanceSettingsPage_clicked()
getServerInfo();
ui->Ladvanced->setText("高级设置:");
ui->backButtonInadvanceSettingsPage->show();
ui->saveButtonInadvanceSettingsPage->setGeometry(170,200,150,40);
}
else
{
Expand Down Expand Up @@ -564,6 +608,10 @@ void MainWindow::on_logoutButton_clicked()
else if(status==6)
{
isOnline=false;
ui->statusBar->setText("注销中...您不在线无法注销!");
setStyleSheet("QWidget#centralWidget{color:black;background:white;border:1px solid #E05D6F;}");
ui->widgetBottom->setStyleSheet("QLabel#statusBar{color:white;padding:5px 0px 5px;}"
"QWidget#widgetBottom{background:#E05D6F;}");
ui->stackedWidget->setCurrentIndex(2);
}
else
Expand Down Expand Up @@ -689,6 +737,34 @@ void MainWindow::on_loginButton_clicked(bool showmode)
}
ui->stackedWidget->setCurrentIndex(3);
getUserInfo(false);
QStringList list;
int c=checkVersion(list,n);
if(c==1)
{

/**
list[0] version
list[1] date
list[2] author
list[3] sha1
list[4] url
*/

QString s="当前版本";
QString v;
v.sprintf("%s",version);
QString ehaut=ui->eHautIco->text();
QString url=QString("<a href = \"%1\">%2</a>").arg(list.at(4)).arg(ehaut);
s=s+" "+v+" 。最新版本 "+list.at(0)+" ,发布于 "+list.at(1)+" 。<br><br> &#60;===================== <br>&nbsp;&nbsp;&nbsp;&nbsp;点击左边蜗牛下载最新版!<br><br>备用地址:"+QString("<a href = \"%1\">%2</a>").arg(list.at(4)).arg("点我下载!");

AboutButton->setStyleSheet("QPushButton {border-image: url(:/titleButtons/about_alert);}"
"QPushButton:hover {border-image: url(:/titleButtons/about_alert_hover);}"
"QPushButton:pressed {border-image: url(:/titleButtons/about_alert_pressed);}");
ui->eHautIco->setText(url);
ui->eHautIco->setOpenExternalLinks(true);
ui->aboutBox->setHtml(s);
}

}
else if(status==5)
{
Expand Down
21 changes: 14 additions & 7 deletions srun-3k-ui/mainwindow.qrc
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
<RCC>
<qresource prefix="/titleButtons">

<file alias="min">Resouces/titleButtons/min.png</file>
<file alias="min_hover">Resouces/titleButtons/min_hover.png</file>
<file alias="min_pressed">Resouces/titleButtons/min_pressed.png</file>

<file alias="close">Resouces/titleButtons/close.png</file>
<file alias="close_hover">Resouces/titleButtons/close_hover.png</file>
<file alias="close_pressed">Resouces/titleButtons/close_pressed.png</file>
<file alias="about">Resouces/titleButtons/about.png</file>
<file alias="about_hover">Resouces/titleButtons/about_hover.png</file>
<file alias="about_pressed">Resouces/titleButtons/about_pressed.png</file>
<file alias="advanced">Resouces/titleButtons/advanced.png</file>
<file alias="advanced_hover">Resouces/titleButtons/advanced_hover.png</file>
<file alias="advanced_pressed">Resouces/titleButtons/advanced_pressed.png</file>
<file alias="boxshadow">Resouces/titleButtons/boxshadow.png</file>

<file alias="about">Resouces/titleButtons/about_info.png</file>
<file alias="about_hover">Resouces/titleButtons/about_info_horver.png</file>
<file alias="about_pressed">Resouces/titleButtons/about_info_press.png</file>

<file alias="about_alert">Resouces/titleButtons/about_alert.png</file>
<file alias="about_alert_hover">Resouces/titleButtons/about_alert_horver.png</file>
<file alias="about_alert_pressed">Resouces/titleButtons/about_alert_press.png</file>

<file alias="advanced">Resouces/titleButtons/setting.png</file>
<file alias="advanced_hover">Resouces/titleButtons/setting_horver.png</file>
<file alias="advanced_pressed">Resouces/titleButtons/setting_press.png</file>
</qresource>
<qresource prefix="/Ico">
<file alias="R">Resouces/Ico/new.png</file>
Expand Down
6 changes: 3 additions & 3 deletions srun-3k-ui/mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -1344,7 +1344,7 @@ QMenu::indicator {width: 13px;height: 13px;} </string>
<rect>
<x>170</x>
<y>200</y>
<width>150</width>
<width>281</width>
<height>40</height>
</rect>
</property>
Expand Down Expand Up @@ -1518,10 +1518,10 @@ background:#0b4a73;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'微软雅黑'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:10px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;&quot;&gt;&lt;span style=&quot; font-size:16pt; background-color:#ffffff;&quot;&gt;E-HAUT &lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:10px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;&quot;&gt;&lt;span style=&quot; background-color:#ffffff;&quot;&gt;Easy Internet In HAUT V2.0.0&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:10px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;&quot;&gt;&lt;span style=&quot; background-color:#ffffff;&quot;&gt;Easy Internet In HAUT V2.0.1&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:10px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;&quot;&gt;&lt;span style=&quot; background-color:#ffffff;&quot;&gt;-------------------------------------------------&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:10px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;&quot;&gt;&lt;span style=&quot; background-color:#ffffff;&quot;&gt;新河南工业大学校园登陆器 Qt 版&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:10px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;&quot;&gt;&lt;span style=&quot; font-family:'Arial,Helvetica'; font-size:13px; color:#666666; background-color:#ffffff;&quot;&gt;©2018 E-haut Team&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:10px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;&quot;&gt;&lt;span style=&quot; font-family:'Arial,Helvetica'; font-size:13px; color:#666666; background-color:#ffffff;&quot;&gt;©2019 E-haut Team&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:10px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;&quot;&gt;&lt;a href=&quot;https://github.com/CHN-STUDENT/srun3k-client-ui&quot;&gt;&lt;span style=&quot; font-family:'SimSun'; text-decoration: underline; color:#0000ff;&quot;&gt;GitHub&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'SimSun';&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
Expand Down
2 changes: 1 addition & 1 deletion srun-3k-ui/network.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef NETWORK_H
#define NETWORK_H
#include "curl/curl.h"
#include <curl/curl.h>
#include "string.h"
#include "QString"
#include "QStringList"
Expand Down
2 changes: 1 addition & 1 deletion srun-3k-ui/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define VERSION_H
#include "network.h"

static char * version="V2.0.0";
static char * version="V2.0.1";
static char * checkUpdateURL="https://pc.ehaut.cn/download/checkupdate.json";
int checkVersion(QStringList &list,network *n);

Expand Down

0 comments on commit fa46732

Please sign in to comment.