。。。
This commit is contained in:
@@ -5,4 +5,30 @@ QMainFrame::QMainFrame(QWidget* parent)
|
||||
: QMainWindow(parent)
|
||||
{
|
||||
ui.setupUi(this);
|
||||
|
||||
init();
|
||||
}
|
||||
|
||||
void QMainFrame::init()
|
||||
{
|
||||
initData();
|
||||
initWidgets();
|
||||
initSignal();
|
||||
}
|
||||
|
||||
void QMainFrame::initData()
|
||||
{
|
||||
pStackedWidget = new QStackedWidget(this);
|
||||
pWidgetDataManagement = new QDataManagementWidget(pStackedWidget);
|
||||
}
|
||||
|
||||
void QMainFrame::initWidgets()
|
||||
{
|
||||
pStackedWidget->addWidget(pWidgetDataManagement);
|
||||
|
||||
setCentralWidget(pStackedWidget);
|
||||
}
|
||||
|
||||
void QMainFrame::initSignal()
|
||||
{
|
||||
}
|
||||
|
@@ -1,15 +1,25 @@
|
||||
#pragma once
|
||||
|
||||
#include <QtWidgets/QMainWindow>
|
||||
#include <QtWidgets/QStackedWidget>
|
||||
#include "QDataManagementWidget.h"
|
||||
#include "ui_QMainFrame.h"
|
||||
|
||||
class QMainFrame : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QMainFrame(QWidget* parent = Q_NULLPTR);
|
||||
QMainFrame( QWidget * parent = Q_NULLPTR );
|
||||
|
||||
private:
|
||||
Ui::QMainFrameClass ui;
|
||||
void init();
|
||||
void initData();
|
||||
void initWidgets();
|
||||
void initSignal();
|
||||
|
||||
private:
|
||||
Ui::QMainFrameClass ui;
|
||||
QStackedWidget * pStackedWidget;
|
||||
QDataManagementWidget * pWidgetDataManagement;
|
||||
};
|
||||
|
@@ -1,29 +1,100 @@
|
||||
<UI version="4.0" >
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>QMainFrameClass</class>
|
||||
<widget class="QMainWindow" name="QMainFrameClass" >
|
||||
<property name="objectName" >
|
||||
<string notr="true">QMainFrameClass</string>
|
||||
</property>
|
||||
<property name="geometry" >
|
||||
<widget class="QMainWindow" name="QMainFrameClass">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>600</width>
|
||||
<height>400</height>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>796</width>
|
||||
<height>558</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<property name="windowTitle">
|
||||
<string>QMainFrame</string>
|
||||
</property>
|
||||
<widget class="QMenuBar" name="menuBar" />
|
||||
<widget class="QToolBar" name="mainToolBar" />
|
||||
<widget class="QWidget" name="centralWidget" />
|
||||
<widget class="QStatusBar" name="statusBar" />
|
||||
<widget class="QWidget" name="centralWidget"/>
|
||||
<widget class="QMenuBar" name="menuBar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>796</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menu">
|
||||
<property name="title">
|
||||
<string>系统</string>
|
||||
</property>
|
||||
<addaction name="pActionExit"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menu_2">
|
||||
<property name="title">
|
||||
<string>帮助</string>
|
||||
</property>
|
||||
<addaction name="pActionAbout"/>
|
||||
</widget>
|
||||
<addaction name="menu"/>
|
||||
<addaction name="menu_2"/>
|
||||
</widget>
|
||||
<widget class="QToolBar" name="mainToolBar">
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>36</width>
|
||||
<height>36</height>
|
||||
</size>
|
||||
</property>
|
||||
<attribute name="toolBarArea">
|
||||
<enum>TopToolBarArea</enum>
|
||||
</attribute>
|
||||
<attribute name="toolBarBreak">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<addaction name="pActionDataManagement"/>
|
||||
<addaction name="pActionParamentersManagement"/>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusBar"/>
|
||||
<action name="pActionExit">
|
||||
<property name="icon">
|
||||
<iconset resource="../../resource.qrc">
|
||||
<normaloff>:/QMainFrame/Resources/quit.png</normaloff>:/QMainFrame/Resources/quit.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>退出</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="pActionAbout">
|
||||
<property name="icon">
|
||||
<iconset resource="../../resource.qrc">
|
||||
<normaloff>:/QMainFrame/Resources/cat.png</normaloff>:/QMainFrame/Resources/cat.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>关于</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="pActionDataManagement">
|
||||
<property name="icon">
|
||||
<iconset resource="../../resource.qrc">
|
||||
<normaloff>:/QMainFrame/Resources/excel.png</normaloff>:/QMainFrame/Resources/excel.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>数据管理</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="pActionParamentersManagement">
|
||||
<property name="icon">
|
||||
<iconset resource="../../resource.qrc">
|
||||
<normaloff>:/QMainFrame/Resources/option.png</normaloff>:/QMainFrame/Resources/option.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>参数管理</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<layoutDefault spacing="6" margin="11" />
|
||||
<pixmapfunction></pixmapfunction>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources>
|
||||
<include location="resource.qrc"/>
|
||||
<include location="../../resource.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</UI>
|
||||
</ui>
|
||||
|
Reference in New Issue
Block a user