Add use scanner.
This commit is contained in:
@@ -27,6 +27,8 @@
|
|||||||
#include "network/GetIPDialog.h"
|
#include "network/GetIPDialog.h"
|
||||||
#include "network/GetRouteDialog.h"
|
#include "network/GetRouteDialog.h"
|
||||||
|
|
||||||
|
#include "dicom/WorkListManager.h"
|
||||||
|
|
||||||
#include "windows/LoginDialog.h"
|
#include "windows/LoginDialog.h"
|
||||||
#include "screensaver/ScreenSaverWindow.h"
|
#include "screensaver/ScreenSaverWindow.h"
|
||||||
|
|
||||||
@@ -46,6 +48,7 @@ DialogManager::DialogManager()
|
|||||||
, mOperationMessageDialog(nullptr)
|
, mOperationMessageDialog(nullptr)
|
||||||
, mSyncDialog(nullptr)
|
, mSyncDialog(nullptr)
|
||||||
, mTopWidget(nullptr)
|
, mTopWidget(nullptr)
|
||||||
|
, mGetWorkListDialog(nullptr)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -57,6 +60,7 @@ void DialogManager::init(QWidget* aParent) {
|
|||||||
connect(EventCenter::Default(), &EventCenter::InvokeOperationProgress,this,&DialogManager::invokeOperationProgress);
|
connect(EventCenter::Default(), &EventCenter::InvokeOperationProgress,this,&DialogManager::invokeOperationProgress);
|
||||||
connect(EventCenter::Default(), &EventCenter::InvokeOperationPending,this,&DialogManager::invokeOperationPending);
|
connect(EventCenter::Default(), &EventCenter::InvokeOperationPending,this,&DialogManager::invokeOperationPending);
|
||||||
connect(EventCenter::Default(), &EventCenter::InvokeOperationEnd,this,&DialogManager::invokeOperationEnd);
|
connect(EventCenter::Default(), &EventCenter::InvokeOperationEnd,this,&DialogManager::invokeOperationEnd);
|
||||||
|
connect(EventCenter::Default(), &EventCenter::InputWorkListSearchValue,this,&DialogManager::receiveWorkListInput);
|
||||||
MultyMessageDialogManager::getInstance()->setDialogParent(aParent);
|
MultyMessageDialogManager::getInstance()->setDialogParent(aParent);
|
||||||
mTopWidget = aParent;
|
mTopWidget = aParent;
|
||||||
mScreenSaverWindow = new ScreenSaverWindow();
|
mScreenSaverWindow = new ScreenSaverWindow();
|
||||||
@@ -342,16 +346,40 @@ int DialogManager::requestPatientConfirm(PatientInformation* patientInf, int typ
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int DialogManager::requestGetWorkList(QSqlTableModel* aModel, QTableView* aTableView)
|
int DialogManager::requestGetWorkList()
|
||||||
{
|
{
|
||||||
GetWorkListDialog dialog(aModel, aTableView, mTopWidget);
|
GetWorkListDialog dialog(WorkListManager::getInstance()->getTableModel(), WorkListManager::getInstance()->getTableView(), mTopWidget);
|
||||||
|
mGetWorkListDialog = &dialog;
|
||||||
setTopWidget(&dialog);
|
setTopWidget(&dialog);
|
||||||
dialog.setWindowModality(Qt::WindowModal);
|
dialog.setWindowModality(Qt::WindowModal);
|
||||||
int ret = dialog.exec();
|
int ret = dialog.exec();
|
||||||
releaseTopWidget(&dialog);
|
releaseTopWidget(&dialog);
|
||||||
|
mGetWorkListDialog = nullptr;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int DialogManager::requestGetWorkList(const QString& aInputValue)
|
||||||
|
{
|
||||||
|
GetWorkListDialog dialog(WorkListManager::getInstance()->getTableModel(), WorkListManager::getInstance()->getTableView(), mTopWidget);
|
||||||
|
mGetWorkListDialog = &dialog;
|
||||||
|
setTopWidget(&dialog);
|
||||||
|
dialog.setWindowModality(Qt::WindowModal);
|
||||||
|
mGetWorkListDialog->search(aInputValue);
|
||||||
|
int ret = dialog.exec();
|
||||||
|
releaseTopWidget(&dialog);
|
||||||
|
mGetWorkListDialog = nullptr;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DialogManager::receiveWorkListInput(QObject *parent, QObject *msg)
|
||||||
|
{
|
||||||
|
QString inputValue = *(QString*)msg;
|
||||||
|
if(mGetWorkListDialog == nullptr)
|
||||||
|
{
|
||||||
|
requestGetWorkList(inputValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void DialogManager::raiseDeviceInfo(QObject* parent, QObject* aInfoData)
|
void DialogManager::raiseDeviceInfo(QObject* parent, QObject* aInfoData)
|
||||||
{
|
{
|
||||||
QPair<QString, unsigned int>* infoData = (QPair<QString, unsigned int>*)(aInfoData);
|
QPair<QString, unsigned int>* infoData = (QPair<QString, unsigned int>*)(aInfoData);
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ class QTableView;
|
|||||||
class PatientInformation;
|
class PatientInformation;
|
||||||
class LoginDialog;
|
class LoginDialog;
|
||||||
class ScreenSaverWindow;
|
class ScreenSaverWindow;
|
||||||
|
class GetWorkListDialog;
|
||||||
|
|
||||||
enum MessageLevel:unsigned int;
|
enum MessageLevel:unsigned int;
|
||||||
|
|
||||||
@@ -62,7 +63,8 @@ public:
|
|||||||
int requestEditDicomConfig();
|
int requestEditDicomConfig();
|
||||||
DialogResult requestInputAdminPasswd();
|
DialogResult requestInputAdminPasswd();
|
||||||
int requestEditNetworkConfig();
|
int requestEditNetworkConfig();
|
||||||
int requestGetWorkList(QSqlTableModel* aModel, QTableView* aTableView);
|
int requestGetWorkList();
|
||||||
|
int requestGetWorkList(const QString& aInputValue);
|
||||||
int requestPatientConfirm(PatientInformation* patientInf, int type);
|
int requestPatientConfirm(PatientInformation* patientInf, int type);
|
||||||
DialogResult requestEditIpAndNetMask();
|
DialogResult requestEditIpAndNetMask();
|
||||||
DialogResult requestEditIpAndNetMask(const QStringList& aEditData);
|
DialogResult requestEditIpAndNetMask(const QStringList& aEditData);
|
||||||
@@ -84,6 +86,7 @@ private:
|
|||||||
void clearMessageDialog();
|
void clearMessageDialog();
|
||||||
void setTopWidget(QWidget* widget);
|
void setTopWidget(QWidget* widget);
|
||||||
void releaseTopWidget(QWidget* expectedTopWidget);
|
void releaseTopWidget(QWidget* expectedTopWidget);
|
||||||
|
void receiveWorkListInput(QObject *parent, QObject *msg);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void loginDialogShown();
|
void loginDialogShown();
|
||||||
@@ -95,6 +98,7 @@ private:
|
|||||||
QPointer<GUIMessageDialog> mSyncDialog;
|
QPointer<GUIMessageDialog> mSyncDialog;
|
||||||
QWidget* mTopWidget;
|
QWidget* mTopWidget;
|
||||||
std::mutex mMutex;
|
std::mutex mMutex;
|
||||||
|
GetWorkListDialog* mGetWorkListDialog;
|
||||||
int mDialogCount = 0;
|
int mDialogCount = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
#include <QSqlRecord>
|
#include <QSqlRecord>
|
||||||
#include <QRadioButton>
|
#include <QRadioButton>
|
||||||
#include <QButtonGroup>
|
#include <QButtonGroup>
|
||||||
|
#include <QKeyEvent>
|
||||||
|
|
||||||
#include "components/ULineEdit.h"
|
#include "components/ULineEdit.h"
|
||||||
#include "action/GetWorkListAction.h"
|
#include "action/GetWorkListAction.h"
|
||||||
@@ -27,11 +28,13 @@ GetWorkListDialog::GetWorkListDialog(QSqlTableModel* aSqlModel, QTableView* aTa
|
|||||||
, mEditEndLine(new QLabel(mContentWidget))
|
, mEditEndLine(new QLabel(mContentWidget))
|
||||||
, mPatientSelectTable(new QTableView(mContentWidget))
|
, mPatientSelectTable(new QTableView(mContentWidget))
|
||||||
, mMode(PatientSearchMode)
|
, mMode(PatientSearchMode)
|
||||||
|
, mSearchMode(ByAccessionNumber)
|
||||||
, mPatientSelectModel(new QStandardItemModel(mContentWidget))
|
, mPatientSelectModel(new QStandardItemModel(mContentWidget))
|
||||||
, mSqlModel(aSqlModel)
|
, mSqlModel(aSqlModel)
|
||||||
, mTableView(aTableView)
|
, mTableView(aTableView)
|
||||||
, mSearchedPatients()
|
, mSearchedPatients()
|
||||||
, mRadioButtonArea(new QWidget(mContentWidget))
|
, mRadioButtonArea(new QWidget(mContentWidget))
|
||||||
|
, mIsAutoSearch(false)
|
||||||
{
|
{
|
||||||
initializeContentWidgets();
|
initializeContentWidgets();
|
||||||
GetWorkListAction* action = qobject_cast<GetWorkListAction*>(getAction());
|
GetWorkListAction* action = qobject_cast<GetWorkListAction*>(getAction());
|
||||||
@@ -70,6 +73,7 @@ void GetWorkListDialog::initializeContentWidgets()
|
|||||||
mPatientId->setVisible(false);
|
mPatientId->setVisible(false);
|
||||||
mAccessionNumText->setVisible(true);
|
mAccessionNumText->setVisible(true);
|
||||||
mAccessionNumber->setVisible(true);
|
mAccessionNumber->setVisible(true);
|
||||||
|
mSearchMode = ByAccessionNumber;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -77,6 +81,7 @@ void GetWorkListDialog::initializeContentWidgets()
|
|||||||
mAccessionNumber->setVisible(false);
|
mAccessionNumber->setVisible(false);
|
||||||
mPatientIDText->setVisible(true);
|
mPatientIDText->setVisible(true);
|
||||||
mPatientId->setVisible(true);
|
mPatientId->setVisible(true);
|
||||||
|
mSearchMode = ByPatientId;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//Accession Nummber
|
//Accession Nummber
|
||||||
@@ -122,6 +127,20 @@ void GetWorkListDialog::initializeContentWidgets()
|
|||||||
mErrorLabel->hide();
|
mErrorLabel->hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GetWorkListDialog::search(const QString& aInput)
|
||||||
|
{
|
||||||
|
switch(mSearchMode)
|
||||||
|
{
|
||||||
|
case ByAccessionNumber:
|
||||||
|
mAccessionNumber->insert(aInput);
|
||||||
|
break;
|
||||||
|
case ByPatientId:
|
||||||
|
mPatientId->insert(aInput);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
mIsAutoSearch = true;
|
||||||
|
}
|
||||||
|
|
||||||
bool GetWorkListDialog::updateReferenceData()
|
bool GetWorkListDialog::updateReferenceData()
|
||||||
{
|
{
|
||||||
if(mMode == PatientSelectMode)
|
if(mMode == PatientSelectMode)
|
||||||
@@ -257,3 +276,13 @@ void GetWorkListDialog::insertPatient(PatientInformationPointer aPatient)
|
|||||||
mTableView->selectRow(0);
|
mTableView->selectRow(0);
|
||||||
LOG_USER_OPERATION(QString("Add Patient, ID:%1").arg(aPatient->ID));
|
LOG_USER_OPERATION(QString("Add Patient, ID:%1").arg(aPatient->ID));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GetWorkListDialog::showEvent(QShowEvent *aEvent)
|
||||||
|
{
|
||||||
|
if(mIsAutoSearch)
|
||||||
|
{
|
||||||
|
mBtnOk->click();
|
||||||
|
}
|
||||||
|
AsyncActionDialog::showEvent(aEvent);
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,11 @@ enum GetWorkListDialogMode
|
|||||||
PatientSearchMode = 0, PatientSelectMode
|
PatientSearchMode = 0, PatientSelectMode
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum WorkListSearchMode
|
||||||
|
{
|
||||||
|
ByAccessionNumber = 0, ByPatientId
|
||||||
|
};
|
||||||
|
|
||||||
class GetWorkListDialog : public AsyncActionDialog
|
class GetWorkListDialog : public AsyncActionDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@@ -22,9 +27,11 @@ class GetWorkListDialog : public AsyncActionDialog
|
|||||||
public:
|
public:
|
||||||
explicit GetWorkListDialog(QSqlTableModel* aSqlModel, QTableView* aTableView, QWidget* aParent = nullptr, Qt::WindowFlags aFlags = Qt::WindowFlags());
|
explicit GetWorkListDialog(QSqlTableModel* aSqlModel, QTableView* aTableView, QWidget* aParent = nullptr, Qt::WindowFlags aFlags = Qt::WindowFlags());
|
||||||
~GetWorkListDialog() override;
|
~GetWorkListDialog() override;
|
||||||
|
void search(const QString& aInput);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool updateReferenceData() override;
|
bool updateReferenceData() override;
|
||||||
|
void showEvent(QShowEvent *aEvent) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void initializeContentWidgets();
|
void initializeContentWidgets();
|
||||||
@@ -42,11 +49,13 @@ private:
|
|||||||
QLabel* mEditEndLine;
|
QLabel* mEditEndLine;
|
||||||
QTableView* mPatientSelectTable;
|
QTableView* mPatientSelectTable;
|
||||||
GetWorkListDialogMode mMode;
|
GetWorkListDialogMode mMode;
|
||||||
|
WorkListSearchMode mSearchMode;
|
||||||
QStandardItemModel* mPatientSelectModel;
|
QStandardItemModel* mPatientSelectModel;
|
||||||
QSqlTableModel* mSqlModel;
|
QSqlTableModel* mSqlModel;
|
||||||
QTableView* mTableView;
|
QTableView* mTableView;
|
||||||
QList<PatientInformationPointer> mSearchedPatients;
|
QList<PatientInformationPointer> mSearchedPatients;
|
||||||
QWidget* mRadioButtonArea;
|
QWidget* mRadioButtonArea;
|
||||||
|
bool mIsAutoSearch;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,44 @@
|
|||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QDate>
|
#include <QDate>
|
||||||
|
|
||||||
|
WorkListManager* WorkListManager::getInstance()
|
||||||
|
{
|
||||||
|
static WorkListManager instance;
|
||||||
|
return &instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
void WorkListManager::setTableModel(QSqlTableModel* aModel)
|
||||||
|
{
|
||||||
|
mTableModel = aModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
void WorkListManager::setTableView(QTableView* aTableView)
|
||||||
|
{
|
||||||
|
mTableView = aTableView;
|
||||||
|
}
|
||||||
|
|
||||||
|
QSqlTableModel* WorkListManager::getTableModel()
|
||||||
|
{
|
||||||
|
return mTableModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
QTableView* WorkListManager::getTableView()
|
||||||
|
{
|
||||||
|
return mTableView;
|
||||||
|
}
|
||||||
|
|
||||||
|
void WorkListManager::setSearchString(const QString& aSearchString)
|
||||||
|
{
|
||||||
|
mSearchString += aSearchString;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString WorkListManager::getSearchString()
|
||||||
|
{
|
||||||
|
QString temp = mSearchString;
|
||||||
|
mSearchString.clear();
|
||||||
|
return temp;
|
||||||
|
}
|
||||||
|
|
||||||
WorkListManager::WorkListManager()
|
WorkListManager::WorkListManager()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,13 +6,31 @@
|
|||||||
|
|
||||||
#include "forms/select/PatientInformation.h"
|
#include "forms/select/PatientInformation.h"
|
||||||
|
|
||||||
|
class QSqlTableModel;
|
||||||
|
class QTableView;
|
||||||
|
|
||||||
class WorkListManager
|
class WorkListManager
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
static WorkListManager* getInstance();
|
||||||
|
static QList<PatientInformationPointer> getPatientFromWorkList(const QString& aAccessionNum, const QString& aPatientId);
|
||||||
|
|
||||||
|
void setTableModel(QSqlTableModel* aModel);
|
||||||
|
void setTableView(QTableView* aTableView);
|
||||||
|
void setSearchString(const QString& aSearchString);
|
||||||
|
QString getSearchString();
|
||||||
|
QSqlTableModel* getTableModel();
|
||||||
|
QTableView* getTableView();
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
WorkListManager();
|
WorkListManager();
|
||||||
~WorkListManager();
|
~WorkListManager();
|
||||||
|
|
||||||
static QList<PatientInformationPointer> getPatientFromWorkList(const QString& aAccessionNum, const QString& aPatientId);
|
private:
|
||||||
|
QSqlTableModel* mTableModel;
|
||||||
|
QTableView* mTableView;
|
||||||
|
QString mSearchString;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,9 @@ ADD_EVENT_VALUE(WarnStateFlagChange)\
|
|||||||
ADD_EVENT_VALUE(GUIErrorRaise)\
|
ADD_EVENT_VALUE(GUIErrorRaise)\
|
||||||
ADD_EVENT_VALUE(DeviceInfoRaise)\
|
ADD_EVENT_VALUE(DeviceInfoRaise)\
|
||||||
ADD_EVENT_VALUE(RequestScreenSaver)\
|
ADD_EVENT_VALUE(RequestScreenSaver)\
|
||||||
ADD_EVENT_VALUE(ReconConnectionUpdated)
|
ADD_EVENT_VALUE(ReconConnectionUpdated)\
|
||||||
|
ADD_EVENT_VALUE(InputWorkListSearchValue)\
|
||||||
|
ADD_EVENT_VALUE(DoWorkListSearch)\
|
||||||
|
|
||||||
enum GUIEvents {
|
enum GUIEvents {
|
||||||
#define ADD_EVENT_VALUE(val) val,
|
#define ADD_EVENT_VALUE(val) val,
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
#include <QKeyEvent>
|
||||||
#include <qdebug.h>
|
#include <qdebug.h>
|
||||||
|
|
||||||
#include "forms/scan/PatientInformationForm.h"
|
#include "forms/scan/PatientInformationForm.h"
|
||||||
@@ -19,6 +20,7 @@
|
|||||||
#include "log/UserOperationLog.h"
|
#include "log/UserOperationLog.h"
|
||||||
#include "json/jsonobject.h"
|
#include "json/jsonobject.h"
|
||||||
#include "device/DeviceManager.h"
|
#include "device/DeviceManager.h"
|
||||||
|
#include "dicom/WorkListManager.h"
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#else
|
#else
|
||||||
@@ -30,7 +32,7 @@ namespace{
|
|||||||
const size_t PREVIEW_COL = 140;
|
const size_t PREVIEW_COL = 140;
|
||||||
const float PIXEL_SPACING = 1.5f;
|
const float PIXEL_SPACING = 1.5f;
|
||||||
const float HALF_ROI_WIDTH = 100.0f;
|
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)
|
ScanFormWidget::ScanFormWidget(QWidget* parent)
|
||||||
@@ -359,4 +361,59 @@ void ScanFormWidget::reloadLanguage(){
|
|||||||
mBtnDrainage->isChecked() ? mBtnDrainage->setText(tr("Drainaging")) : mBtnDrainage->setText(tr("Drainage"));
|
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);
|
||||||
|
}
|
||||||
|
|||||||
@@ -17,6 +17,10 @@ public:
|
|||||||
explicit ScanFormWidget(QWidget *parent = nullptr);
|
explicit ScanFormWidget(QWidget *parent = nullptr);
|
||||||
~ScanFormWidget() override = default;
|
~ScanFormWidget() override = default;
|
||||||
void setPreviewing(bool val);
|
void setPreviewing(bool val);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void keyPressEvent(QKeyEvent *event) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
PatientInformationForm* mPatInf= nullptr;
|
PatientInformationForm* mPatInf= nullptr;
|
||||||
bool mUnInited = true;
|
bool mUnInited = true;
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
#include "log/UserOperationLog.h"
|
#include "log/UserOperationLog.h"
|
||||||
#include "components/VerticalTextToolButton.h"
|
#include "components/VerticalTextToolButton.h"
|
||||||
#include "PatientAddDateDelegate.h"
|
#include "PatientAddDateDelegate.h"
|
||||||
|
#include "dicom/WorkListManager.h"
|
||||||
|
|
||||||
SelectFormWidget::SelectFormWidget(QWidget* parent)
|
SelectFormWidget::SelectFormWidget(QWidget* parent)
|
||||||
: TabFormWidget(parent)
|
: TabFormWidget(parent)
|
||||||
@@ -73,6 +74,9 @@ SelectFormWidget::SelectFormWidget(QWidget* parent)
|
|||||||
|
|
||||||
//first prepare buttons!
|
//first prepare buttons!
|
||||||
prepareButtons(false);
|
prepareButtons(false);
|
||||||
|
|
||||||
|
//init WorkListManager table view
|
||||||
|
WorkListManager::getInstance()->setTableView(mPatTable);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SelectFormWidget::prepareButtons(bool disableALL) {
|
void SelectFormWidget::prepareButtons(bool disableALL) {
|
||||||
@@ -106,7 +110,7 @@ void SelectFormWidget::initGeneralButtons(QHBoxLayout *layout) {
|
|||||||
});
|
});
|
||||||
connect(mBtnWorklist, &QToolButton::clicked, [&]()
|
connect(mBtnWorklist, &QToolButton::clicked, [&]()
|
||||||
{
|
{
|
||||||
DialogManager::Default()->requestGetWorkList(mModel, mPatTable);
|
DialogManager::Default()->requestGetWorkList();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -248,6 +252,7 @@ void SelectFormWidget::initTableView(QHBoxLayout *contentLayout)
|
|||||||
|
|
||||||
void SelectFormWidget::initDataModel() {//TODO:单独初始化预防SQL错误
|
void SelectFormWidget::initDataModel() {//TODO:单独初始化预防SQL错误
|
||||||
mModel = SQLHelper::getTable("Patient");
|
mModel = SQLHelper::getTable("Patient");
|
||||||
|
WorkListManager::getInstance()->setTableModel(mModel);
|
||||||
mModel->sort(mModel->record().indexOf("AddDate"), Qt::DescendingOrder);
|
mModel->sort(mModel->record().indexOf("AddDate"), Qt::DescendingOrder);
|
||||||
mModel->setEditStrategy(QSqlTableModel::OnManualSubmit);
|
mModel->setEditStrategy(QSqlTableModel::OnManualSubmit);
|
||||||
bool anonymousMode = JsonObject::Instance()->getAnonymousMode();
|
bool anonymousMode = JsonObject::Instance()->getAnonymousMode();
|
||||||
|
|||||||
@@ -93,6 +93,14 @@ MainWindow::MainWindow(QWidget* aParent)
|
|||||||
QApplication::processEvents();
|
QApplication::processEvents();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
connect(mTabWidget, &QTabWidget::currentChanged, this, [this](int aIndex)
|
||||||
|
{
|
||||||
|
if(aIndex == 1)
|
||||||
|
{
|
||||||
|
mTabWidget->widget(1)->setFocus();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
GUIErrorHandle::Default()->init();
|
GUIErrorHandle::Default()->init();
|
||||||
QApplication::setActiveWindow(centralWidget());
|
QApplication::setActiveWindow(centralWidget());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user