Skip to content

Commit

Permalink
[UI] refine UI
Browse files Browse the repository at this point in the history
  • Loading branch information
zhang-ray committed Dec 2, 2018
1 parent ae88b32 commit 94d2a9e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions client_qt5/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@ void MainWindow::on_pushButton_connecting_clicked(){
void MainWindow::onNetworkChanged(const NetworkState networkState){
if(mainThreadId_ == std::this_thread::get_id()){
switch(networkState){
case NetworkState::Disconnected:{
case NetworkState::Disconnected: {
ui->groupBox_protocol->setEnabled(true);
ui->lineEdit_serverHost->setEnabled(true);
ui->lineEdit_serverPort->setEnabled(true);
ui->checkBox_needAec->setEnabled(true);
Expand All @@ -226,15 +227,17 @@ void MainWindow::onNetworkChanged(const NetworkState networkState){
QCoreApplication::postEvent(this, new SetDurationEvent(0));
break;
}
case NetworkState::Connecting:{
case NetworkState::Connecting: {
ui->groupBox_protocol->setEnabled(false);
ui->lineEdit_serverHost->setEnabled(false);
ui->lineEdit_serverPort->setEnabled(false);
ui->checkBox_needAec->setEnabled(false);
ui->pushButton_connecting->setEnabled(false);
ui->pushButton_connecting->setText("Connecting...");
break;
}
case NetworkState::Connected:{
case NetworkState::Connected: {
ui->groupBox_protocol->setEnabled(false);
ui->lineEdit_serverHost->setEnabled(false);
ui->lineEdit_serverPort->setEnabled(false);
ui->checkBox_needAec->setEnabled(false);
Expand Down
2 changes: 1 addition & 1 deletion client_qt5/mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@
<x>10</x>
<y>160</y>
<width>270</width>
<height>181</height>
<height>251</height>
</rect>
</property>
</widget>
Expand Down

0 comments on commit 94d2a9e

Please sign in to comment.