本文整理汇总了C++中QMdiSubWindow::isHidden方法的典型用法代码示例。如果您正苦于以下问题:C++ QMdiSubWindow::isHidden方法的具体用法?C++ QMdiSubWindow::isHidden怎么用?C++ QMdiSubWindow::isHidden使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QMdiSubWindow
的用法示例。
在下文中一共展示了QMdiSubWindow::isHidden方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: clickItem
//点击
void CprogManage::clickItem(QTreeWidgetItem *item, int column)
{
int type;
QString QStr;
QTreeWidgetItem *lastItem,*screenItem;
QMdiSubWindow *subWin;
int index;
lastItem = getCurItem();
/*
qDebug("lastItem str:%s,\r\ncurItem str:%s", \
(lastItem == 0)?"null":(const char *)lastItem->data(0, Qt::UserRole).toString().toLocal8Bit(),\
(const char *)item->data(0, Qt::UserRole).toString().toLocal8Bit());
*/
if(lastItem == item) //同一个项目点击
{
if(item != (QTreeWidgetItem *)0)
{
index = treeWidget->indexOfTopLevelItem(w->screenArea->screenItem);
subWin= getSubWinByIndex(w->mdiArea, index);
if(subWin != (QMdiSubWindow *)0)
subWin->show();
}
return;
}
if(lastItem != (QTreeWidgetItem *)0)
{
//w->property->getSettingsFromWidget(lastItem);
}
if(item EQ (QTreeWidgetItem *)0)
{
qDebug("no item left");
w->actionEnProc(NULL_PROPERTY);
return;
}
saveCurItem(item);
type = checkItemType(item);
//w->actionEnProc(type);
//更新当前屏幕
if(type EQ SCREEN_PROPERTY)
{
screenItem = item;
}
else if(type EQ PROG_PROPERTY)
{
screenItem = item->parent();
}
else if(type EQ AREA_PROPERTY)
{
screenItem = item->parent()->parent();
}
else
{
screenItem = item->parent()->parent()->parent();
}
index = treeWidget->indexOfTopLevelItem(screenItem);
if(index >= 0)
{
subWin= getSubWinByIndex(w->mdiArea, index);
QTreeWidgetItem *oldScreenItem = w->screenArea->screenItem;
if((CscreenArea *)subWin->widget() != w->screenArea)
{
w->screenArea = (CscreenArea *)subWin->widget();
//w->screenArea->screenSettingsInit(screenItem);
}
if(subWin->isHidden())
subWin->show();
QObject::disconnect(w->mdiArea, SIGNAL(subWindowActivated(QMdiSubWindow*)),
w, SLOT(updateTreeWidget(QMdiSubWindow*)));
if(w->mdiArea->activeSubWindow()!=subWin)
w->mdiArea->setActiveSubWindow(subWin);
QObject::connect(w->mdiArea, SIGNAL(subWindowActivated(QMdiSubWindow*)),
w, SLOT(updateTreeWidget(QMdiSubWindow*)));
w->MDISubWinClickFlag = 0;
//更新当前显示屏参数
QString screenStr = screenItem->data(0, Qt::UserRole).toString();
getScreenCardParaFromSettings(screenStr, Screen_Para, Card_Para);
w->setActonsEnable(); //设置所有图标
if(oldScreenItem != w->screenArea->screenItem)
{
mainObj->emitScreenChangeSignal();
//w->screenCardParaChangeProc();
}
}