?? frm_managetoolsimpl.cpp
字號:
#include "frm_managetoolsimpl.h"#include "frm_restoreImpldialogimpl.h"#include "frm_SysParmimpl.h"#include "frm_driverimpl.h"#include "frm_onlineuserimpl.h"#include "functions.h"#include <QMessageBox>#include <QTextCodec>#include <QPushButton>#include <QString>#include <QFont>//frm_managetoolsImpl::frm_managetoolsImpl( QWidget * parent, Qt::WFlags f) : QWidget(parent, f){ setupUi(this); m_restoreForm = new frm_restoreImpl(); //出廠設置 m_sysParmImpl = new Frm_SysParmImpl(); //系統參數 m_driverImpl = new frm_driverImpl(); //磁盤管理 m_onlineuserimpl = new frm_onlineUserImpl(); //在線用戶 connect(tbtn_sysparm,SIGNAL(clicked()), this, SLOT(tbtn_sysparm_clicked())); connect(m_sysParmImpl->pbtn_ok,SIGNAL(clicked()), this, SLOT(tbtn_sysparm_accept())); connect(tbtn_hardmanage,SIGNAL(clicked()), this, SLOT(tbtn_drive_clicked())); connect(m_driverImpl->pbtn_ok,SIGNAL(clicked()), this, SLOT(tbtn_drive_format())); connect(tbtn_onlineUser,SIGNAL(clicked()), this, SLOT(tbtn_onlneUser_clicked())); connect(tbtn_stopAlarm,SIGNAL(clicked()), this, SLOT(tbtn_clearAlarm_clicked())); connect(m_restoreForm->buttonBox,SIGNAL(accepted()), this, SLOT(tbtn_restore_accept())); connect(m_restoreForm->buttonBox,SIGNAL(rejected()), this, SLOT(tbtn_restore_reject())); connect(tbtn_restore,SIGNAL(clicked()), this, SLOT(tbtn_restore_clicked())); }frm_managetoolsImpl::~frm_managetoolsImpl(){ if (m_restoreForm) { delete(m_restoreForm); } if (m_sysParmImpl) { delete(m_sysParmImpl); } if (m_driverImpl) { delete(m_driverImpl); } if (m_onlineuserimpl) { delete(m_onlineuserimpl); } }void frm_managetoolsImpl::tbtn_sysparm_clicked() //系統參數{ m_sysParmImpl->showNormal(); } void frm_managetoolsImpl::tbtn_sysparm_accept() //系統參數確認{ }void frm_managetoolsImpl::tbtn_drive_clicked() //磁盤管理{ m_driverImpl->showNormal();} void frm_managetoolsImpl::tbtn_drive_format() //磁盤格式化{ }void frm_managetoolsImpl::tbtn_onlneUser_clicked() //在線用戶{ m_onlineuserimpl->showNormal(); } //清除報警void frm_managetoolsImpl::tbtn_clearAlarm_clicked(){ QMessageBox msgBox; char first_str[] ="清除報警"; char second_str[] ="成功清除報警!"; char thread_str[] ="關閉"; QTextCodec* codec = QTextCodec::codecForName("utf8"); QString unicodeString = codec->toUnicode(first_str); msgBox.setWindowTitle(unicodeString); unicodeString = codec->toUnicode(second_str); msgBox.setInformativeText(unicodeString); unicodeString = codec->toUnicode(thread_str); QPushButton *connectButton = msgBox.addButton(unicodeString, QMessageBox::ActionRole); msgBox.setIcon(QMessageBox::Information); msgBox.exec(); delete(connectButton); }//恢復出廠設置void frm_managetoolsImpl::tbtn_restore_clicked(){ m_restoreForm->showNormal();} void frm_managetoolsImpl::tbtn_restore_accept(){ }void frm_managetoolsImpl::tbtn_restore_reject(){ } //
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -