本文整理汇总了C++中QSharedPointer::SetBridgePinsInVisible方法的典型用法代码示例。如果您正苦于以下问题:C++ QSharedPointer::SetBridgePinsInVisible方法的具体用法?C++ QSharedPointer::SetBridgePinsInVisible怎么用?C++ QSharedPointer::SetBridgePinsInVisible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QSharedPointer
的用法示例。
在下文中一共展示了QSharedPointer::SetBridgePinsInVisible方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetupGroupContainer
void MainHost::SetupGroupContainer()
{
if(!groupContainer.isNull()) {
mainContainer->ParkObject( groupContainer );
groupContainer.clear();
UpdateSolver(true);
if(mainWindow)
mainWindow->mySceneView->viewGroup->ClearViewPrograms();
}
ObjectInfo info;
info.nodeType = NodeType::container;
info.objType = ObjType::Container;
info.name = "groupContainer";
info.forcedObjId = FixedObjId::groupContainer;
groupContainer = objFactory->NewObject(info).staticCast<Connectables::Container>();
if(groupContainer.isNull())
return;
groupContainer->SetLoadingMode(true);
groupContainer->LoadProgram(0);
mainContainer->AddObject(groupContainer);
QSharedPointer<Connectables::Object> bridge;
//bridge in
ObjectInfo in;
in.name="in";
in.nodeType = NodeType::bridge;
in.objType = ObjType::BridgeIn;
in.forcedObjId = FixedObjId::groupContainerIn;
bridge = objFactory->NewObject(in);
groupContainer->AddObject( bridge );
bridge->SetBridgePinsInVisible(false);
groupContainer->bridgeIn = bridge;
//bridge out
ObjectInfo out;
out.name="out";
out.nodeType = NodeType::bridge;
out.objType = ObjType::BridgeOut;
out.forcedObjId = FixedObjId::groupContainerOut;
bridge = objFactory->NewObject(out);
groupContainer->AddObject( bridge );
bridge->SetBridgePinsOutVisible(false);
groupContainer->bridgeOut = bridge;
//connect with programContainer
if(!programContainer.isNull()) {
mainContainer->ConnectObjects(programContainer->bridgeSend, groupContainer->bridgeIn,true);
mainContainer->ConnectObjects(groupContainer->bridgeOut, programContainer->bridgeReturn,true);
}
//bridge send
ObjectInfo send;
send.name="send";
send.nodeType = NodeType::bridge;
send.objType = ObjType::BridgeSend;
send.forcedObjId = FixedObjId::groupContainerSend;
bridge = objFactory->NewObject(send);
groupContainer->AddObject( bridge );
bridge->SetBridgePinsOutVisible(false);
groupContainer->bridgeSend = bridge;
//bridge return
ObjectInfo retrn;
retrn.name="return";
retrn.nodeType = NodeType::bridge;
retrn.objType = ObjType::BridgeReturn;
retrn.forcedObjId = FixedObjId::groupContainerReturn;
bridge = objFactory->NewObject(retrn);
groupContainer->AddObject( bridge );
bridge->SetBridgePinsInVisible(false);
groupContainer->bridgeReturn = bridge;
//connect with hostContainer
if(!hostContainer.isNull()) {
mainContainer->ConnectObjects(groupContainer->bridgeSend, hostContainer->bridgeIn,true);
mainContainer->ConnectObjects(hostContainer->bridgeOut, groupContainer->bridgeReturn,true);
}
connect(programsModel, SIGNAL(GroupChanged(QModelIndex)),
groupContainer.data(), SLOT(SetProgram(QModelIndex)));
connect(programsModel, SIGNAL(GroupDelete(QModelIndex)),
groupContainer.data(), SLOT(RemoveProgram(QModelIndex)));
connect(this,SIGNAL(Rendered()),
groupContainer.data(), SLOT(PostRender()));
emit groupParkingModelChanged(&groupContainer->parkModel);
if(projectContainer)
projectContainer->childContainer=groupContainer;
if(programContainer) {
groupContainer->childContainer=programContainer;
//.........这里部分代码省略.........
示例2: SetupProjectContainer
void MainHost::SetupProjectContainer()
{
if(!projectContainer.isNull()) {
mainContainer->ParkObject( projectContainer );
projectContainer.clear();
UpdateSolver(true);
if(mainWindow)
mainWindow->mySceneView->viewProject->ClearViewPrograms();
}
timeFromStart.restart();
ObjectInfo info;
info.nodeType = NodeType::container;
info.objType = ObjType::Container;
info.name = "projectContainer";
info.forcedObjId = FixedObjId::projectContainer;
projectContainer = objFactory->NewObject(info).staticCast<Connectables::Container>();
if(projectContainer.isNull())
return;
projectContainer->SetLoadingMode(true);
projectContainer->LoadProgram(0);
mainContainer->AddObject(projectContainer);
QSharedPointer<Connectables::Object> bridge;
//bridge in
ObjectInfo in;
in.name="in";
in.nodeType = NodeType::bridge;
in.objType = ObjType::BridgeIn;
in.forcedObjId = FixedObjId::projectContainerIn;
bridge = objFactory->NewObject(in);
projectContainer->AddObject( bridge );
bridge->SetBridgePinsInVisible(false);
projectContainer->bridgeIn = bridge;
//bridge out
ObjectInfo out;
out.name="out";
out.nodeType = NodeType::bridge;
out.objType = ObjType::BridgeOut;
out.forcedObjId = FixedObjId::projectContainerOut;
bridge = objFactory->NewObject(out);
projectContainer->AddObject( bridge );
bridge->SetBridgePinsOutVisible(false);
projectContainer->bridgeOut = bridge;
//connect with hostContainer
if(!hostContainer.isNull()) {
mainContainer->ConnectObjects(hostContainer->bridgeSend, projectContainer->bridgeIn,true);
mainContainer->ConnectObjects(projectContainer->bridgeOut, hostContainer->bridgeReturn,true);
}
//bridge send
ObjectInfo send;
send.name="send";
send.nodeType = NodeType::bridge;
send.objType = ObjType::BridgeSend;
send.forcedObjId = FixedObjId::projectContainerSend;
bridge = objFactory->NewObject(send);
projectContainer->AddObject( bridge );
bridge->SetBridgePinsOutVisible(false);
projectContainer->bridgeSend = bridge;
//bridge return
ObjectInfo retrn;
retrn.name="return";
retrn.nodeType = NodeType::bridge;
retrn.objType = ObjType::BridgeReturn;
retrn.forcedObjId = FixedObjId::projectContainerReturn;
bridge = objFactory->NewObject(retrn);
projectContainer->AddObject( bridge );
bridge->SetBridgePinsInVisible(false);
projectContainer->bridgeReturn = bridge;
//connect with programContainer
if(!programContainer.isNull()) {
mainContainer->ConnectObjects(projectContainer->bridgeSend, programContainer->bridgeIn,true);
mainContainer->ConnectObjects(programContainer->bridgeOut, projectContainer->bridgeReturn,true);
}
//connect with itself (pass-though cables)
projectContainer->ConnectObjects(projectContainer->bridgeIn, projectContainer->bridgeSend,false);
projectContainer->ConnectObjects(projectContainer->bridgeReturn, projectContainer->bridgeOut,false);
projectContainer->listenProgramChanges=false;
if(hostContainer)
hostContainer->childContainer=projectContainer;
if(groupContainer)
projectContainer->childContainer=groupContainer;
//.........这里部分代码省略.........