update: 更新主窗口
This commit is contained in:
parent
176dc22ad6
commit
fb45e0d2b3
@ -41,5 +41,7 @@
|
||||
<file>image/sunnyou_logo.png</file>
|
||||
<file>image/icon_exit_checked.png</file>
|
||||
<file>image/icon_exit_hover.png</file>
|
||||
<file>image/logo_txt.png</file>
|
||||
<file>image/logo_txt2.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
36
xyylMCWEACSystem/framewindow.cpp
Normal file
36
xyylMCWEACSystem/framewindow.cpp
Normal file
@ -0,0 +1,36 @@
|
||||
#include "framewindow.h"
|
||||
#include <QHBoxLayout>
|
||||
#include <QVBoxLayout>
|
||||
#include <QGridLayout>
|
||||
#include <QDebug>
|
||||
FrameWindow::FrameWindow(QWidget * parent )
|
||||
{
|
||||
init();
|
||||
initLay();
|
||||
initConnect();
|
||||
}
|
||||
FrameWindow::~FrameWindow()
|
||||
{
|
||||
|
||||
}
|
||||
void FrameWindow::init()
|
||||
{
|
||||
|
||||
m_stackWidget.addWidget(&m_MainWindow);
|
||||
m_stackWidget.setCurrentWidget(&m_MainWindow);
|
||||
}
|
||||
void FrameWindow::initLay()
|
||||
{
|
||||
QVBoxLayout * vlay = new QVBoxLayout;
|
||||
vlay->addWidget(&m_stackWidget);
|
||||
setLayout(vlay);
|
||||
|
||||
}
|
||||
bool FrameWindow::initConnect()
|
||||
{
|
||||
|
||||
}
|
||||
void FrameWindow::slotBtnChanged()
|
||||
{
|
||||
|
||||
}
|
23
xyylMCWEACSystem/framewindow.h
Normal file
23
xyylMCWEACSystem/framewindow.h
Normal file
@ -0,0 +1,23 @@
|
||||
#ifndef FRAMEWINDOW_H
|
||||
#define FRAMEWINDOW_H
|
||||
#include "mainwindow.h"
|
||||
#include <QStackedWidget>
|
||||
class FrameWindow:public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
FrameWindow(QWidget * parent = NULL);
|
||||
virtual ~FrameWindow();
|
||||
|
||||
void init();
|
||||
void initLay();
|
||||
bool initConnect();
|
||||
private slots:
|
||||
void slotBtnChanged();
|
||||
private:
|
||||
QStackedWidget m_stackWidget;
|
||||
private:
|
||||
MainWindow m_MainWindow;
|
||||
|
||||
};
|
||||
#endif // FRAMEWINDOW_H
|
BIN
xyylMCWEACSystem/image/logo_txt.png
Normal file
BIN
xyylMCWEACSystem/image/logo_txt.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 6.4 KiB |
BIN
xyylMCWEACSystem/image/logo_txt2.png
Normal file
BIN
xyylMCWEACSystem/image/logo_txt2.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 9.5 KiB |
@ -30,7 +30,8 @@
|
||||
#include <qmath.h>
|
||||
#include "curchatwidget.h"
|
||||
#include "DevConWidget.h"
|
||||
#include <mainwindow.h>
|
||||
#include "framewindow.h"
|
||||
#include <QStackedWidget>
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
@ -38,10 +39,11 @@ int main(int argc, char *argv[])
|
||||
w.show();
|
||||
RegWidget re;
|
||||
re.show();
|
||||
MainWindow mainw;
|
||||
FrameWindow mainw;
|
||||
mainw.resize(1000,800);
|
||||
mainw.show();
|
||||
|
||||
|
||||
#if 0
|
||||
DevConWidget de;
|
||||
de.show();
|
||||
|
@ -17,9 +17,17 @@ MainWindow::~MainWindow()
|
||||
|
||||
void MainWindow::init()
|
||||
{
|
||||
setWindowTitle(" ");
|
||||
m_btnSystemSetting.setObjectName("SystemSetting");
|
||||
m_btnEEG.setObjectName("EEG");
|
||||
m_btnDataProcess.setObjectName("DataProcess");
|
||||
m_CompanyDes.setText("河南翔宇医疗设备股份有限公司");
|
||||
QFont font ("Microsoft YaHei", 10, 85);
|
||||
m_CompanyDes.setFont(font);
|
||||
|
||||
m_CompanyDes.setStyleSheet("color:Gray;");
|
||||
|
||||
|
||||
}
|
||||
void MainWindow::initLay()
|
||||
{
|
||||
@ -48,27 +56,38 @@ void MainWindow::initLay()
|
||||
m_btnEEG.setMaximumSize(QSize(400,300));
|
||||
m_btnDataProcess.setMaximumSize(QSize(400,300));
|
||||
|
||||
|
||||
m_btnSystemSetting.setMinimumSize(QSize(300,200));
|
||||
m_btnEEG.setMinimumSize(QSize(300,300));
|
||||
m_btnDataProcess.setMinimumSize(QSize(300,300));
|
||||
|
||||
m_btnSystemSetting.setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
m_btnEEG.setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
m_btnDataProcess.setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
|
||||
|
||||
hlay->addSpacing(150);
|
||||
hlay->addWidget(&m_btnSystemSetting);
|
||||
hlay->addSpacing(50);
|
||||
hlay->addWidget(&m_btnEEG);
|
||||
hlay->addSpacing(50);
|
||||
hlay->addWidget(&m_btnDataProcess);
|
||||
hlay->addSpacing(150);
|
||||
|
||||
|
||||
QVBoxLayout *vLay = new QVBoxLayout;
|
||||
|
||||
m_titleWidget.setFixedHeight(100);
|
||||
hlay->setContentsMargins(150,100,150,100);
|
||||
//hlay->setContentsMargins(150,100,150,100);
|
||||
hlay->setSpacing(1);
|
||||
|
||||
vLay->addWidget(&m_titleWidget,1,Qt::AlignTop);
|
||||
vLay->addSpacing(3);
|
||||
vLay->addLayout(hlay,9);
|
||||
|
||||
vLay->addLayout(hlay,15);
|
||||
|
||||
|
||||
vLay->addWidget(&m_CompanyDes,1,Qt::AlignBottom | Qt::AlignHCenter);//,
|
||||
vLay->addSpacing(30);
|
||||
setLayout(vLay);
|
||||
}
|
||||
bool MainWindow::initConnect()
|
||||
|
@ -29,6 +29,8 @@ private:
|
||||
QPushButton m_btnEEG;
|
||||
//数据处理Datarocessing
|
||||
QPushButton m_btnDataProcess;
|
||||
//河南翔宇医疗设备股份有限公司
|
||||
QLabel m_CompanyDes;
|
||||
};
|
||||
|
||||
|
||||
|
@ -18,7 +18,8 @@ void TitleWidget::init()
|
||||
{
|
||||
m_labDes.setStyleSheet("border-image:url(:/image/sunnyou_logo.png);}");
|
||||
// m_labSystemName.setStyleSheet("border-image:url(:/image/index_bg_EEG_char.png);}");
|
||||
m_labSystemName.setText(tr("Multi-channel wireless EEG acquisition system"));
|
||||
//m_labSystemName.setText(tr("Multi-channel wireless EEG acquisition system"));
|
||||
m_labSystemName.setStyleSheet("border-image:url(:/image/logo_txt.png);}");
|
||||
m_btnRet.setStyleSheet("background-image:url(:/image/icon_exit.png);}");
|
||||
|
||||
|
||||
@ -27,13 +28,15 @@ void TitleWidget::init()
|
||||
"QPushButton:hover{border-image:url(:/image/icon_exit_hover.png);}"
|
||||
"QPushButton:pressed{border-image:url(:/image/icon_exit_checked.png);}"
|
||||
);
|
||||
m_labDes.setMaximumSize(QSize(250,80));
|
||||
// m_labSystemName.setMaximumSize(QSize(100,300));
|
||||
m_btnRet.setMaximumSize(QSize(250,80));
|
||||
|
||||
//m_labDes.setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
//m_labSystemName.setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
//m_btnRet.setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
|
||||
m_labDes.setMaximumSize(QSize(300,40));
|
||||
m_labSystemName.setFixedSize(QSize(500,40));
|
||||
m_btnRet.setMaximumSize(QSize(60,60));
|
||||
|
||||
m_labDes.setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
m_labSystemName.setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
m_btnRet.setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
|
||||
}
|
||||
void TitleWidget::initLay()
|
||||
|
@ -28,6 +28,7 @@ SOURCES += \
|
||||
btngroupwidget.cpp \
|
||||
curchatwidget.cpp \
|
||||
devconwidget.cpp \
|
||||
framewindow.cpp \
|
||||
hospitalinfo.cpp \
|
||||
loginwidget.cpp \
|
||||
main.cpp \
|
||||
@ -42,6 +43,7 @@ HEADERS += \
|
||||
btngroupwidget.h \
|
||||
curchatwidget.h \
|
||||
devconwidget.h \
|
||||
framewindow.h \
|
||||
hospitalinfo.h \
|
||||
loginwidget.h \
|
||||
mainwindow.h \
|
||||
|
Loading…
x
Reference in New Issue
Block a user