本文整理汇总了C++中VarList::addChild方法的典型用法代码示例。如果您正苦于以下问题:C++ VarList::addChild方法的具体用法?C++ VarList::addChild怎么用?C++ VarList::addChild使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VarList
的用法示例。
在下文中一共展示了VarList::addChild方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void CameraParameters::AdditionalCalibrationInformation::addSettingsToList(
VarList& list) {
for (int i = 0; i < kNumControlPoints; ++i) {
list.addChild(control_point_set[i]);
}
list.addChild(initial_distortion);
list.addChild(camera_height);
list.addChild(line_search_corridor_width);
list.addChild(image_boundary);
list.addChild(max_feature_distance);
list.addChild(convergence_timeout);
list.addChild(cov_corner_x);
list.addChild(cov_corner_y);
list.addChild(cov_ls_x);
list.addChild(cov_ls_y);
list.addChild(pointSeparation);
}
示例2: addSettingsToList
void CameraParameters::addSettingsToList(VarList& list) {
list.addChild(focal_length);
list.addChild(principal_point_x);
list.addChild(principal_point_y);
list.addChild(distortion);
list.addChild(q0);
list.addChild(q1);
list.addChild(q2);
list.addChild(q3);
list.addChild(tx);
list.addChild(ty);
list.addChild(tz);
}
示例3: window_settings
MainWindow::MainWindow(bool start_capture, bool enforce_affinity)
{
affinity=0;
if (enforce_affinity) affinity=new AffinityManager();
//opt=new GetOpt();
settings=0;
setupUi((QMainWindow *)this);
tree_view=new VarTreeView();
tmodel=new VarTreeModel();
splitter = new QSplitter(Qt::Horizontal,this);
splitter2 = new QSplitter(Qt::Vertical);
root=new VarList("Vision System");
opts=new RenderOptions();
right_tab=0;
QString stack_id="";
//opt->addArgument("stack",&stack_id);
//opt->parse();
//load RoboCup SSL stack by default:
multi_stack=new MultiStackRoboCupSSL(opts, 2);
VarExternal * stackvar;
root->addChild(stackvar= new VarExternal((multi_stack->getSettingsFileName() + ".xml").c_str(),multi_stack->getName()));
stackvar->addChild(multi_stack->getSettings());
//create tabs, GL visualizations and tool-panes for each capture thread in the multi-stack:
for (unsigned int i=0;i<multi_stack->threads.size();i++) {
VisionStack * s = multi_stack->threads[i]->getStack();
if (affinity!=0) multi_stack->threads[i]->setAffinityManager(affinity);
GLWidget * gl=new GLWidget(0,false);
gl->setRingBuffer(multi_stack->threads[i]->getFrameBuffer());
gl->setVisionStack(s);
QString label = "Camera " + QString::number(i);
VarList * threadvar = new VarList(label.toStdString());
threadvar->addChild(s->getSettings());
//iterate through plugin variables
QSplitter * stack_widget = new QSplitter(Qt::Horizontal);
stack_widgets.push_back(stack_widget);
QSplitter * stack_vis_splitter = new QSplitter(Qt::Vertical);
stack_widget->addWidget(stack_vis_splitter);
QTabWidget * stack_control_tab = new QTabWidget();
stack_control_tab->setTabPosition(QTabWidget::East);
stack_widget->addWidget(stack_control_tab);
VideoWidget * w=new VideoWidget(label,gl);
display_widgets.push_back(gl);
threadvar->addChild(multi_stack->threads[i]->getSettings());
stack_vis_splitter->addWidget(w);
//iterate through all plugins
unsigned int n=s->stack.size();
for (unsigned int j=0;j<n;j++) {
VisionPlugin * p=s->stack[j];
if (p->isSharedAmongStacks()) {
if (i==0) {
//this is a shared global plugin...
//add it to global pane
if (p->getSettings()!=0) stackvar->addChild(p->getSettings());
QWidget * tmp_control = p->getControlWidget();
if (tmp_control!=0) {
if (right_tab==0) {
right_tab=new QTabWidget();
right_tab->setTabPosition(QTabWidget::East);
}
right_tab->addTab(tmp_control,QString::fromStdString(p->getName()));
}
QWidget * tmp_vis = p->getVisualizationWidget();
if (tmp_vis!=0) splitter2->addWidget(tmp_vis);
}
} else {
if (p->getSettings()!=0) threadvar->addChild(p->getSettings());
//this is a local plugin relating only to a single thread
//add it to the context.
QWidget * tmp_control = p->getControlWidget();
if (tmp_control!=0) stack_control_tab->addTab(tmp_control,QString::fromStdString(p->getName()));
QWidget * tmp_vis = p->getVisualizationWidget();
if (tmp_vis!=0) stack_vis_splitter->addWidget(tmp_vis);
}
}
stackvar->addChild(threadvar);
splitter2->addWidget(stack_widget);
}
if (affinity!=0) affinity->demandCore(multi_stack->threads.size());
//.........这里部分代码省略.........