Add use scanner.

This commit is contained in:
sunwen
2024-04-01 16:02:40 +08:00
parent c2fbcf0c02
commit b27dc320f7
11 changed files with 214 additions and 12 deletions

View File

@@ -11,6 +11,7 @@
#include <QPainter>
#include <QLabel>
#include <QTimer>
#include <QKeyEvent>
#include <qdebug.h>
#include "forms/scan/PatientInformationForm.h"
@@ -19,6 +20,7 @@
#include "log/UserOperationLog.h"
#include "json/jsonobject.h"
#include "device/DeviceManager.h"
#include "dicom/WorkListManager.h"
#ifdef WIN32
#else
@@ -30,7 +32,7 @@ namespace{
const size_t PREVIEW_COL = 140;
const float PIXEL_SPACING = 1.5f;
const float HALF_ROI_WIDTH = 100.0f;
const unsigned int DRAINAGE_TIME = 30000;
const unsigned int DRAINAGE_TIME = 180000; //3 minitues
}
ScanFormWidget::ScanFormWidget(QWidget* parent)
@@ -359,4 +361,59 @@ void ScanFormWidget::reloadLanguage(){
mBtnDrainage->isChecked() ? mBtnDrainage->setText(tr("Drainaging")) : mBtnDrainage->setText(tr("Drainage"));
}
void ScanFormWidget::keyPressEvent(QKeyEvent* aEvent)
{
switch (aEvent->key())
{
case Qt::Key_0:
case Qt::Key_1:
case Qt::Key_2:
case Qt::Key_3:
case Qt::Key_4:
case Qt::Key_5:
case Qt::Key_6:
case Qt::Key_7:
case Qt::Key_8:
case Qt::Key_9:
case Qt::Key_A:
case Qt::Key_B:
case Qt::Key_C:
case Qt::Key_D:
case Qt::Key_E:
case Qt::Key_F:
case Qt::Key_G:
case Qt::Key_H:
case Qt::Key_I:
case Qt::Key_J:
case Qt::Key_K:
case Qt::Key_L:
case Qt::Key_M:
case Qt::Key_N:
case Qt::Key_O:
case Qt::Key_P:
case Qt::Key_Q:
case Qt::Key_R:
case Qt::Key_S:
case Qt::Key_T:
case Qt::Key_U:
case Qt::Key_V:
case Qt::Key_W:
case Qt::Key_X:
case Qt::Key_Y:
case Qt::Key_Z:
{
WorkListManager::getInstance()->setSearchString(aEvent->text());
break;
}
case Qt::Key_Enter:
case Qt::Key_Return:
{
QString text = WorkListManager::getInstance()->getSearchString();
EventCenter::Default()->triggerEvent(InputWorkListSearchValue, nullptr, (QObject*)&text);
break;
}
default:
break;
}
QWidget::keyPressEvent(aEvent);
}