HGGitLab

Commit 5a06d2a8 authored by yangjiaxuan's avatar yangjiaxuan

增加状态栏显示设备连接状态

parent c23dff55
This diff is collapsed.
......@@ -212,6 +212,7 @@ MainWindow::MainWindow(QWidget *parent)
m_saneNoDevAction = new QAction(tr("nodevice"), this);
m_saneNoDevAction->setEnabled(false);
ui->menu_device->addAction(m_saneNoDevAction);
m_wndStatusBar->setDeviceStatusInfo(m_saneNoDevAction->text());
m_saneDeviceAction = nullptr;
m_saneDeviceHandle = nullptr;
......@@ -653,6 +654,7 @@ void MainWindow::on_sane_dev_arrive(QString devName)
{
m_saneDeviceAction = action_dev;
action_dev->setChecked(true);
m_wndStatusBar->setDeviceStatusInfo(devName + tr(" already connected"));
}
}
}
......@@ -690,6 +692,8 @@ void MainWindow::on_sane_dev_remove(QString devName)
{
ui->menu_device->addAction(m_saneNoDevAction);
}
m_wndStatusBar->setDeviceStatusInfo(m_saneNoDevAction->text());
}
}
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment