update: 调整数据处理脑电采集系统设置以及支持主窗口逻辑
This commit is contained in:
parent
fb45e0d2b3
commit
9cb6c46903
61
xyylMCWEACSystem/dataprocesswidget.cpp
Normal file
61
xyylMCWEACSystem/dataprocesswidget.cpp
Normal file
@ -0,0 +1,61 @@
|
||||
#include "DataProcessWidget.h"
|
||||
#include <QHBoxLayout>
|
||||
#include <QVBoxLayout>
|
||||
#include <QGridLayout>
|
||||
#include <QDebug>
|
||||
DataProcessWidget::DataProcessWidget(QWidget * parent )
|
||||
{
|
||||
init();
|
||||
initLay();
|
||||
initConnect();
|
||||
|
||||
}
|
||||
DataProcessWidget::~DataProcessWidget()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void DataProcessWidget::init()
|
||||
{
|
||||
m_labDes.setStyleSheet("border-image:url(:/image/dataprocess.png);}");
|
||||
m_btnRet.setStyleSheet("border-image:url(:/image/icon_back_2.png);}");
|
||||
m_labDes.setMaximumSize(QSize(200,30));
|
||||
m_labDes.setMinimumSize(QSize(200,30));
|
||||
m_btnRet.setMaximumSize(QSize(100,30));
|
||||
m_btnRet.setMinimumSize(QSize(100,30));
|
||||
}
|
||||
void DataProcessWidget::initLay()
|
||||
{
|
||||
QHBoxLayout * hlay = new QHBoxLayout;
|
||||
hlay->addWidget(&m_btnRet,1,Qt::AlignLeft);
|
||||
hlay->addWidget(&m_labDes,9, Qt::AlignHCenter);
|
||||
|
||||
|
||||
QVBoxLayout * vlay = new QVBoxLayout;
|
||||
vlay->addLayout(hlay,1);
|
||||
vlay->addWidget(new QWidget,9);
|
||||
setLayout(vlay);
|
||||
|
||||
}
|
||||
bool DataProcessWidget::initConnect()
|
||||
{
|
||||
bool bCon = true;
|
||||
bCon = connect(&m_btnRet,SIGNAL(clicked(bool)),this,SLOT(slotClickedChanged()));
|
||||
if(!bCon)
|
||||
{
|
||||
qDebug()<<"connect failed"<<endl;
|
||||
|
||||
}
|
||||
return bCon;
|
||||
}
|
||||
void DataProcessWidget::slotClickedChanged()
|
||||
{
|
||||
|
||||
QObject * send = static_cast<QObject *>(sender());
|
||||
if(send == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
emit SigClicked(send->objectName());
|
||||
|
||||
}
|
28
xyylMCWEACSystem/dataprocesswidget.h
Normal file
28
xyylMCWEACSystem/dataprocesswidget.h
Normal file
@ -0,0 +1,28 @@
|
||||
#ifndef DataProcessWidget_H
|
||||
#define DataProcessWidget_H
|
||||
#include <QWidget>
|
||||
#include <QLabel>
|
||||
#include <QLineEdit>
|
||||
#include <QPushButton>
|
||||
|
||||
class DataProcessWidget: public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
DataProcessWidget(QWidget * parent = NULL);
|
||||
virtual ~DataProcessWidget();
|
||||
void init();
|
||||
void initLay();
|
||||
bool initConnect();
|
||||
signals:
|
||||
void SigClicked(QString objName);
|
||||
private slots:
|
||||
void slotClickedChanged();
|
||||
private:
|
||||
//< 返回
|
||||
QPushButton m_btnRet;
|
||||
//描述
|
||||
QLabel m_labDes;
|
||||
|
||||
};
|
||||
#endif // DataProcessWidget_H
|
@ -43,5 +43,9 @@
|
||||
<file>image/icon_exit_hover.png</file>
|
||||
<file>image/logo_txt.png</file>
|
||||
<file>image/logo_txt2.png</file>
|
||||
<file>image/dataprocess.png</file>
|
||||
<file>image/egg.png</file>
|
||||
<file>image/systemsetting.png</file>
|
||||
<file>image/icon_back_2.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
65
xyylMCWEACSystem/eggwidget.cpp
Normal file
65
xyylMCWEACSystem/eggwidget.cpp
Normal file
@ -0,0 +1,65 @@
|
||||
#include "eggwidget.h"
|
||||
#include <QHBoxLayout>
|
||||
#include <QVBoxLayout>
|
||||
#include <QGridLayout>
|
||||
#include <QDebug>
|
||||
EggWidget::EggWidget(QWidget * parent )
|
||||
{
|
||||
init();
|
||||
initLay();
|
||||
initConnect();
|
||||
|
||||
}
|
||||
EggWidget::~EggWidget()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void EggWidget::init()
|
||||
{
|
||||
|
||||
m_labDes.setStyleSheet("border-image:url(:/image/egg.png);}");
|
||||
m_labDes.setMaximumSize(QSize(200,30));
|
||||
m_labDes.setMinimumSize(QSize(200,30));
|
||||
|
||||
m_btnRet.setStyleSheet("border-image:url(:/image/icon_back_2.png);}");
|
||||
|
||||
m_btnRet.setMaximumSize(QSize(100,30));
|
||||
m_btnRet.setMinimumSize(QSize(100,30));
|
||||
|
||||
}
|
||||
void EggWidget::initLay()
|
||||
{
|
||||
QHBoxLayout * hlay = new QHBoxLayout;
|
||||
hlay->addWidget(&m_btnRet,1,Qt::AlignLeft);
|
||||
hlay->addWidget(&m_labDes,9, Qt::AlignHCenter);
|
||||
|
||||
|
||||
QVBoxLayout * vlay = new QVBoxLayout;
|
||||
vlay->addLayout(hlay,1);
|
||||
vlay->addWidget(new QWidget,9);
|
||||
setLayout(vlay);
|
||||
|
||||
}
|
||||
bool EggWidget::initConnect()
|
||||
{
|
||||
bool bCon = true;
|
||||
bCon = connect(&m_btnRet,SIGNAL(clicked(bool)),this,SLOT(slotClickedChanged()));
|
||||
if(!bCon)
|
||||
{
|
||||
qDebug()<<"connect failed"<<endl;
|
||||
|
||||
}
|
||||
return bCon;
|
||||
}
|
||||
void EggWidget::slotClickedChanged()
|
||||
{
|
||||
|
||||
QObject * send = static_cast<QObject *>(sender());
|
||||
if(send == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
emit SigClicked(send->objectName());
|
||||
|
||||
}
|
28
xyylMCWEACSystem/eggwidget.h
Normal file
28
xyylMCWEACSystem/eggwidget.h
Normal file
@ -0,0 +1,28 @@
|
||||
#ifndef EggWidget_H
|
||||
#define EggWidget_H
|
||||
#include <QWidget>
|
||||
#include <QLabel>
|
||||
#include <QLineEdit>
|
||||
#include <QPushButton>
|
||||
|
||||
class EggWidget: public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
EggWidget(QWidget * parent = NULL);
|
||||
virtual ~EggWidget();
|
||||
void init();
|
||||
void initLay();
|
||||
bool initConnect();
|
||||
signals:
|
||||
void SigClicked(QString objName);
|
||||
private slots:
|
||||
void slotClickedChanged();
|
||||
private:
|
||||
//< 返回
|
||||
QPushButton m_btnRet;
|
||||
//描述
|
||||
QLabel m_labDes;
|
||||
|
||||
};
|
||||
#endif // EggWidget_H
|
@ -3,6 +3,8 @@
|
||||
#include <QVBoxLayout>
|
||||
#include <QGridLayout>
|
||||
#include <QDebug>
|
||||
|
||||
|
||||
FrameWindow::FrameWindow(QWidget * parent )
|
||||
{
|
||||
init();
|
||||
@ -15,9 +17,12 @@ FrameWindow::~FrameWindow()
|
||||
}
|
||||
void FrameWindow::init()
|
||||
{
|
||||
m_stackWidget.addWidget(&m_MainWindow);
|
||||
m_stackWidget.setCurrentWidget(&m_MainWindow);
|
||||
|
||||
|
||||
|
||||
|
||||
m_stackWidget.addWidget(&m_MainWindow);
|
||||
m_stackWidget.setCurrentWidget(&m_MainWindow);
|
||||
}
|
||||
void FrameWindow::initLay()
|
||||
{
|
||||
@ -28,9 +33,56 @@ void FrameWindow::initLay()
|
||||
}
|
||||
bool FrameWindow::initConnect()
|
||||
{
|
||||
bool bCon = true;
|
||||
bCon = connect(&m_MainWindow,SIGNAL(SigClicked(QString)),this,SLOT(slotClickedChanged(QString)));
|
||||
if(!bCon)
|
||||
{
|
||||
qDebug()<<"connect failed"<<endl;
|
||||
|
||||
}
|
||||
bCon = connect(&m_SystemSetting,SIGNAL(SigClicked(QString)),this,SLOT(slotClickedChanged(QString)));
|
||||
if(!bCon)
|
||||
{
|
||||
qDebug()<<"connect failed"<<endl;
|
||||
|
||||
}
|
||||
bCon = connect(&m_Egg,SIGNAL(SigClicked(QString)),this,SLOT(slotClickedChanged(QString)));
|
||||
if(!bCon)
|
||||
{
|
||||
qDebug()<<"connect failed"<<endl;
|
||||
|
||||
}
|
||||
bCon = connect(&m_DataProcess,SIGNAL(SigClicked(QString)),this,SLOT(slotClickedChanged(QString)));
|
||||
if(!bCon)
|
||||
{
|
||||
qDebug()<<"connect failed"<<endl;
|
||||
|
||||
}
|
||||
return bCon;
|
||||
}
|
||||
void FrameWindow::slotBtnChanged()
|
||||
void FrameWindow::slotClickedChanged(QString btnName)
|
||||
{
|
||||
qDebug()<<btnName <<endl;
|
||||
|
||||
if(btnName.compare("EEG") == 0)
|
||||
{
|
||||
m_stackWidget.addWidget(&m_Egg);
|
||||
m_stackWidget.setCurrentWidget(&m_Egg);
|
||||
|
||||
}
|
||||
else if(btnName.compare("DataProcess") == 0)
|
||||
{
|
||||
m_stackWidget.addWidget(&m_DataProcess);
|
||||
m_stackWidget.setCurrentWidget(&m_DataProcess);
|
||||
}
|
||||
else if(btnName.compare("SystemSetting") == 0)
|
||||
{
|
||||
m_stackWidget.addWidget(&m_SystemSetting);
|
||||
m_stackWidget.setCurrentWidget(&m_SystemSetting);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_stackWidget.addWidget(&m_MainWindow);
|
||||
m_stackWidget.setCurrentWidget(&m_MainWindow);
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,9 @@
|
||||
#define FRAMEWINDOW_H
|
||||
#include "mainwindow.h"
|
||||
#include <QStackedWidget>
|
||||
#include "systemsettingwidget.h"
|
||||
#include "dataprocesswidget.h"
|
||||
#include "eggwidget.h"
|
||||
class FrameWindow:public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
@ -13,11 +16,13 @@ public:
|
||||
void initLay();
|
||||
bool initConnect();
|
||||
private slots:
|
||||
void slotBtnChanged();
|
||||
void slotClickedChanged(QString);
|
||||
private:
|
||||
QStackedWidget m_stackWidget;
|
||||
private:
|
||||
MainWindow m_MainWindow;
|
||||
|
||||
SystemSettingWidget m_SystemSetting;
|
||||
DataProcessWidget m_DataProcess;
|
||||
EggWidget m_Egg;
|
||||
};
|
||||
#endif // FRAMEWINDOW_H
|
||||
|
BIN
xyylMCWEACSystem/image/dataprocess.png
Normal file
BIN
xyylMCWEACSystem/image/dataprocess.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.5 KiB |
BIN
xyylMCWEACSystem/image/egg.png
Normal file
BIN
xyylMCWEACSystem/image/egg.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
BIN
xyylMCWEACSystem/image/icon_back_2.png
Normal file
BIN
xyylMCWEACSystem/image/icon_back_2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
BIN
xyylMCWEACSystem/image/systemsetting.png
Normal file
BIN
xyylMCWEACSystem/image/systemsetting.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.5 KiB |
@ -43,7 +43,7 @@ int main(int argc, char *argv[])
|
||||
mainw.resize(1000,800);
|
||||
mainw.show();
|
||||
|
||||
|
||||
a.setStyleSheet("QWidget{background-color:#ffffff;}");
|
||||
#if 0
|
||||
DevConWidget de;
|
||||
de.show();
|
||||
|
@ -122,6 +122,7 @@ void MainWindow::slotBtn()
|
||||
{
|
||||
return;
|
||||
}
|
||||
qDebug()<< send->objectName()<<endl;
|
||||
emit SigClicked(send->objectName());
|
||||
//qDebug()<< send->objectName()<<endl;
|
||||
|
||||
}
|
||||
|
@ -21,6 +21,8 @@ public:
|
||||
bool initConnect();
|
||||
private slots:
|
||||
void slotBtn();
|
||||
signals:
|
||||
void SigClicked(QString objName);
|
||||
private:
|
||||
TitleWidget m_titleWidget;
|
||||
//系统设置
|
||||
|
62
xyylMCWEACSystem/systemsettingwidget.cpp
Normal file
62
xyylMCWEACSystem/systemsettingwidget.cpp
Normal file
@ -0,0 +1,62 @@
|
||||
#include "systemsettingwidget.h"
|
||||
#include <QHBoxLayout>
|
||||
#include <QVBoxLayout>
|
||||
#include <QGridLayout>
|
||||
#include <QDebug>
|
||||
SystemSettingWidget::SystemSettingWidget(QWidget * parent )
|
||||
{
|
||||
init();
|
||||
initLay();
|
||||
initConnect();
|
||||
|
||||
}
|
||||
SystemSettingWidget::~SystemSettingWidget()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void SystemSettingWidget::init()
|
||||
{
|
||||
|
||||
m_labDes.setStyleSheet("border-image:url(:/image/systemsetting.png);}");
|
||||
m_btnRet.setStyleSheet("border-image:url(:/image/icon_back_2.png);}");
|
||||
m_labDes.setMaximumSize(QSize(200,30));
|
||||
m_labDes.setMinimumSize(QSize(200,30));
|
||||
m_btnRet.setMaximumSize(QSize(100,30));
|
||||
m_btnRet.setMinimumSize(QSize(100,30));
|
||||
}
|
||||
void SystemSettingWidget::initLay()
|
||||
{
|
||||
QHBoxLayout * hlay = new QHBoxLayout;
|
||||
hlay->addWidget(&m_btnRet,1,Qt::AlignLeft);
|
||||
hlay->addWidget(&m_labDes,9, Qt::AlignHCenter);
|
||||
|
||||
|
||||
QVBoxLayout * vlay = new QVBoxLayout;
|
||||
vlay->addLayout(hlay,1);
|
||||
vlay->addWidget(new QWidget,9);
|
||||
setLayout(vlay);
|
||||
|
||||
}
|
||||
bool SystemSettingWidget::initConnect()
|
||||
{
|
||||
bool bCon = true;
|
||||
bCon = connect(&m_btnRet,SIGNAL(clicked(bool)),this,SLOT(slotClickedChanged()));
|
||||
if(!bCon)
|
||||
{
|
||||
qDebug()<<"connect failed"<<endl;
|
||||
|
||||
}
|
||||
return bCon;
|
||||
}
|
||||
void SystemSettingWidget::slotClickedChanged()
|
||||
{
|
||||
|
||||
QObject * send = static_cast<QObject *>(sender());
|
||||
if(send == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
emit SigClicked(send->objectName());
|
||||
|
||||
}
|
28
xyylMCWEACSystem/systemsettingwidget.h
Normal file
28
xyylMCWEACSystem/systemsettingwidget.h
Normal file
@ -0,0 +1,28 @@
|
||||
#ifndef SYSTEMSETTINGWIDGET_H
|
||||
#define SYSTEMSETTINGWIDGET_H
|
||||
#include <QWidget>
|
||||
#include <QLabel>
|
||||
#include <QLineEdit>
|
||||
#include <QPushButton>
|
||||
|
||||
class SystemSettingWidget: public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SystemSettingWidget(QWidget * parent = NULL);
|
||||
virtual ~SystemSettingWidget();
|
||||
void init();
|
||||
void initLay();
|
||||
bool initConnect();
|
||||
signals:
|
||||
void SigClicked(QString objName);
|
||||
private slots:
|
||||
void slotClickedChanged();
|
||||
private:
|
||||
//< 返回
|
||||
QPushButton m_btnRet;
|
||||
//描述
|
||||
QLabel m_labDes;
|
||||
|
||||
};
|
||||
#endif // SYSTEMSETTINGWIDGET_H
|
@ -3,7 +3,7 @@
|
||||
#include <QVBoxLayout>
|
||||
#include <QGridLayout>
|
||||
#include <QDebug>
|
||||
TitleWidget::TitleWidget(QWidget * parent ):QWidget(parent)
|
||||
TitleWidget::TitleWidget(QWidget * parent ):QFrame(parent)
|
||||
{
|
||||
init();
|
||||
initLay();
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include <QPushButton>
|
||||
|
||||
|
||||
class TitleWidget:public QWidget
|
||||
class TitleWidget:public QFrame
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
@ -27,7 +27,9 @@ CONFIG += c++11
|
||||
SOURCES += \
|
||||
btngroupwidget.cpp \
|
||||
curchatwidget.cpp \
|
||||
dataprocesswidget.cpp \
|
||||
devconwidget.cpp \
|
||||
eggwidget.cpp \
|
||||
framewindow.cpp \
|
||||
hospitalinfo.cpp \
|
||||
loginwidget.cpp \
|
||||
@ -36,13 +38,16 @@ SOURCES += \
|
||||
medicalrecordmanager.cpp \
|
||||
medicalrecordwidget.cpp \
|
||||
regwidget.cpp \
|
||||
systemsettingwidget.cpp \
|
||||
titlewidget.cpp \
|
||||
widget.cpp
|
||||
|
||||
HEADERS += \
|
||||
btngroupwidget.h \
|
||||
curchatwidget.h \
|
||||
dataprocesswidget.h \
|
||||
devconwidget.h \
|
||||
eggwidget.h \
|
||||
framewindow.h \
|
||||
hospitalinfo.h \
|
||||
loginwidget.h \
|
||||
@ -51,6 +56,7 @@ HEADERS += \
|
||||
medicalrecordwidget.h \
|
||||
mrmanagement.h \
|
||||
regwidget.h \
|
||||
systemsettingwidget.h \
|
||||
titlewidget.h \
|
||||
widget.h
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user