mainwindowimpl.cpp

来自「qt4.4.3下编写的嵌入式UI界面」· C++ 代码 · 共 126 行

CPP
126
字号
#include "mainwindowimpl.h"#include "frm_managetoolsimpl.h"#include "frm_querylogimpl.h"#include "frm_usermanagerimpl.h"#include "frm_netsettingsimpl.h"#include "frm_imagesettingsimpl.h"#include "frm_recordsettingsimpl.h"#include "frm_yuntaisettingsimpl.h"#include "frm_alarmsettingsimpl.h"#include "frm_excepthandleimpl.h"#include <QTextCodec>#include <QString>//主窗体的构造函数MainWindowImpl::MainWindowImpl( QWidget * parent, Qt::WFlags f) 	: QMainWindow(parent, f){	setupUi(this);	m_managetoolform     = new frm_managetoolsImpl();	m_querylogimpl       = new frm_queryLogImpl();	m_userManagerImpl    = new frm_userManagerImpl() ;	m_netSettingsImpl    = new frm_netSettingsImpl() ;	m_imageSettingsImpl  = new frm_imageSettingsImpl();	m_recordsettingsImpl = new frm_recordsettingsImpl();	m_yuntaisettingsImpl = new frm_yuntaisettingsImpl();	m_alarmsettingsImpl  = new frm_alarmsettingsImpl();	m_excepthandleImpl   = new frm_excepthandleImpl();	 		connect(tbtn_managetools,SIGNAL(clicked()), this, SLOT(tbtn_managetools_clicked()) );	connect(tbtn_querylog,SIGNAL(clicked()), this, SLOT(tbtn_querylog_clicked()));	connect(tbtn_userManage,SIGNAL(clicked()), this, SLOT(tbtn_userManage_clicked()));	connect(tbtn_netSettings,SIGNAL(clicked()), this, SLOT(tbtn_netSettings_clicked()));	connect(tbtn_imageSettings,SIGNAL(clicked()), this, SLOT(tbtn_imageSettings_clicked()));	connect(tbtn_moveSettings,SIGNAL(clicked()), this, SLOT(tbtn_moveSettings_clicked()));	connect(tbtn_yuntaiSettings,SIGNAL(clicked()), this, SLOT(tbtn_yuntaiSettings_clicked()));	connect(tbtn_alarmSettings,SIGNAL(clicked()), this, SLOT(tbtn_alarmSettings_clicked()));	connect(tbtn_except,SIGNAL(clicked()), this, SLOT(tbtn_except_clicked()));	}//析构函数MainWindowImpl::~MainWindowImpl(){	delete(m_managetoolform);	delete(m_managetoolform);	delete(m_querylogimpl);	delete(m_userManagerImpl);	delete(m_netSettingsImpl);	delete(m_imageSettingsImpl);	delete(m_recordsettingsImpl);	delete(m_yuntaisettingsImpl);	delete(m_alarmsettingsImpl);	delete(m_excepthandleImpl);	}//显示管理工具void MainWindowImpl::tbtn_managetools_clicked(){	if (m_managetoolform) 	{		m_managetoolform->showNormal();	}}void MainWindowImpl::tbtn_querylog_clicked(){	if (m_querylogimpl)	{		m_querylogimpl->showNormal();	}	}void MainWindowImpl::tbtn_userManage_clicked(){	if (m_userManagerImpl)	{		m_userManagerImpl->showNormal();	}		}void MainWindowImpl::tbtn_netSettings_clicked(){	if (m_netSettingsImpl)	{		m_netSettingsImpl->showNormal();	}		}void MainWindowImpl::tbtn_imageSettings_clicked(){	if (m_imageSettingsImpl)	{		m_imageSettingsImpl->showNormal();	}		}void MainWindowImpl::tbtn_moveSettings_clicked(){	if (m_recordsettingsImpl)	{		m_recordsettingsImpl->showNormal();	}		}void MainWindowImpl::tbtn_yuntaiSettings_clicked(){	if (m_yuntaisettingsImpl)	{		m_yuntaisettingsImpl->showNormal();	}		}void MainWindowImpl::tbtn_alarmSettings_clicked(){	if (m_alarmsettingsImpl)	{		m_alarmsettingsImpl->showNormal();	}		}void MainWindowImpl::tbtn_except_clicked(){	if (m_excepthandleImpl)	{		m_excepthandleImpl->showNormal();	}		}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?