当前位置: 首页>>代码示例>>C++>>正文


C++ VarList::addChild方法代码示例

本文整理汇总了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);
}
开发者ID:AnthonyCAS,项目名称:ssl-vision,代码行数:18,代码来源:camera_calibration.cpp

示例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);
}
开发者ID:AnthonyCAS,项目名称:ssl-vision,代码行数:13,代码来源:camera_calibration.cpp

示例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());

//.........这里部分代码省略.........
开发者ID:EjaadTech,项目名称:ssl-vision,代码行数:101,代码来源:mainwindow.cpp


注:本文中的VarList::addChild方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。