|
|
@ -133,6 +133,8 @@ QWidget* nmSubWndDemo::initUiMainWx()
|
|
|
|
|
|
|
|
|
|
|
|
void nmSubWndDemo::initUiDockWxs()
|
|
|
|
void nmSubWndDemo::initUiDockWxs()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
// TODO,本Dock的操作
|
|
|
|
|
|
|
|
return;
|
|
|
|
// 基础参数Dock
|
|
|
|
// 基础参数Dock
|
|
|
|
{
|
|
|
|
{
|
|
|
|
m_pWxDockParas = new iDockBaseWx(tr("Parameters"));
|
|
|
|
m_pWxDockParas = new iDockBaseWx(tr("Parameters"));
|
|
|
@ -202,6 +204,7 @@ void nmSubWndDemo::initUiDockPtys()
|
|
|
|
// 示例:演示增加Dock并且追加至程序主窗口
|
|
|
|
// 示例:演示增加Dock并且追加至程序主窗口
|
|
|
|
void nmSubWndDemo::initUiTop()
|
|
|
|
void nmSubWndDemo::initUiTop()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
return;
|
|
|
|
// 基础参数Dock
|
|
|
|
// 基础参数Dock
|
|
|
|
{
|
|
|
|
{
|
|
|
|
iDockBaseWx* pDockWx = new iDockBaseWx(tr("TODO:Demo"));
|
|
|
|
iDockBaseWx* pDockWx = new iDockBaseWx(tr("TODO:Demo"));
|
|
|
@ -262,7 +265,7 @@ bool nmSubWndDemo::checkCmdEnable(bool &b, \
|
|
|
|
{
|
|
|
|
{
|
|
|
|
bool b1 = (NULL != zxCurProject);
|
|
|
|
bool b1 = (NULL != zxCurProject);
|
|
|
|
bool b2 = (NULL != m_pDataWell);
|
|
|
|
bool b2 = (NULL != m_pDataWell);
|
|
|
|
if (nID == 5102) { //RunGrid
|
|
|
|
if (nID == 5102 || (nID >= 5301 && nID <= 5311)) { //RunGrid
|
|
|
|
b = (b1 && b2 && bLicensed && !isReadonly() && NULL != m_pWxPlot);
|
|
|
|
b = (b1 && b2 && bLicensed && !isReadonly() && NULL != m_pWxPlot);
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -285,14 +288,23 @@ void nmSubWndDemo::finalDeals()
|
|
|
|
#ifdef QT_DEBUG
|
|
|
|
#ifdef QT_DEBUG
|
|
|
|
updatePlots();
|
|
|
|
updatePlots();
|
|
|
|
updateDockWxs();
|
|
|
|
updateDockWxs();
|
|
|
|
|
|
|
|
if (m_pWxDockData1 != NULL) {
|
|
|
|
Q_ASSERT (NULL != m_pWxDockData1);
|
|
|
|
Q_ASSERT (NULL != m_pWxDockData1);
|
|
|
|
m_pWxDockData1->raise();
|
|
|
|
m_pWxDockData1->raise();
|
|
|
|
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void nmSubWndDemo::onActivated()
|
|
|
|
void nmSubWndDemo::onActivated()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
#ifdef QT_DEBUG
|
|
|
|
#ifdef QT_DEBUG
|
|
|
|
|
|
|
|
// TODO,主程序的Dock操作
|
|
|
|
|
|
|
|
// 获取所有 Dock 视图
|
|
|
|
|
|
|
|
QList<QDockWidget*> dockWidgets = m_pMainWindow->findChildren<QDockWidget*>();
|
|
|
|
|
|
|
|
// TODO,遍历所有 Dock 视图并移除位于左侧的
|
|
|
|
|
|
|
|
foreach (QDockWidget* dock, dockWidgets) {
|
|
|
|
|
|
|
|
dock->hide();
|
|
|
|
|
|
|
|
}
|
|
|
|
// 当前窗体激活时,可以做些事情,比如把隐藏的Dock显示出来
|
|
|
|
// 当前窗体激活时,可以做些事情,比如把隐藏的Dock显示出来
|
|
|
|
if (NULL != m_pWxDockTemp) {
|
|
|
|
if (NULL != m_pWxDockTemp) {
|
|
|
|
if (!m_pWxDockTemp->isVisible()) {
|
|
|
|
if (!m_pWxDockTemp->isVisible()) {
|
|
|
@ -356,6 +368,8 @@ ZxDataObject* nmSubWndDemo::getDataObjOf(QString sType, QString sCode /*= ""*/)
|
|
|
|
|
|
|
|
|
|
|
|
void nmSubWndDemo::updateDockWxs()
|
|
|
|
void nmSubWndDemo::updateDockWxs()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
// TODO,刷新Dock内容
|
|
|
|
|
|
|
|
return;
|
|
|
|
// 左侧参数窗体
|
|
|
|
// 左侧参数窗体
|
|
|
|
Q_ASSERT (NULL != m_pWxParas);
|
|
|
|
Q_ASSERT (NULL != m_pWxParas);
|
|
|
|
QStringList listParas;
|
|
|
|
QStringList listParas;
|
|
|
|