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


C++ QDialogButtonBox::show方法代码示例

本文整理汇总了C++中QDialogButtonBox::show方法的典型用法代码示例。如果您正苦于以下问题:C++ QDialogButtonBox::show方法的具体用法?C++ QDialogButtonBox::show怎么用?C++ QDialogButtonBox::show使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QDialogButtonBox的用法示例。


在下文中一共展示了QDialogButtonBox::show方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: init

void BCIService::init(BCIControlWindow *bciControlWindow)
{
    ROS_INFO("Initing BCI Service");
    bciRenderArea = bciControlWindow->bciWorldView->renderArea;

    QPushButton * slowButton = new QPushButton("Flex Medium (Next)");
    QPushButton * fastButton = new QPushButton("Flex Hard (Select)");

    slowButton->setDefault(true);
    fastButton->setDefault(true);

    QDialogButtonBox *cursorControlBox = new QDialogButtonBox(Qt::Vertical);
    cursorControlBox->setCaption(QString("Cursor Control Box"));

    cursorControlBox->addButton(slowButton, QDialogButtonBox::ActionRole);
    cursorControlBox->addButton(fastButton, QDialogButtonBox::ActionRole);
    cursorControlBox->setWindowFlags(Qt::WindowStaysOnTopHint);
    cursorControlBox->resize(QSize(200,100));
    cursorControlBox->show();

    QObject::connect(slowButton, SIGNAL(clicked()), this, SLOT(updateControlSceneState1()));
    QObject::connect(fastButton, SIGNAL(clicked()), this, SLOT(updateControlSceneState2()));


    endOfExperimentFormat = new QFormLayout();

    successFailure = new QComboBox();
    successFailure->insertItem("Success");
    successFailure->insertItem("Failure");

    finalComments = new QTextEdit();

    finishedButton = new QPushButton("FINISHED");


    endOfExperimentFormat->addRow(tr("&Success or failure: "), successFailure);
    endOfExperimentFormat->addRow(tr("&Comments: "), finalComments);
    endOfExperimentFormat->addRow(tr(""), finishedButton);

    endOfExperiment = new QGroupBox();
    endOfExperiment->setLayout(endOfExperimentFormat);



    QObject::connect(finishedButton, SIGNAL(clicked()), this, SLOT(onFinishedFinalLog()));

    endOfExperiment->show();

    timer = new QTimer;
    QObject::connect(timer, SIGNAL(timeout()), this, SLOT(updateControlScene()));
    timer->start(1000 / 30);

    QObject::connect(this, SIGNAL(goToStateLow()), this, SLOT(updateControlSceneState0()));
    QObject::connect(this, SIGNAL(goToStateMedium()), this, SLOT(updateControlSceneState1()));
    QObject::connect(this, SIGNAL(goToStateHigh()), this, SLOT(updateControlSceneState2()));

    SoAnnotation *hudSeparator = new SoAnnotation;
    hudSeparator->renderCaching = SoSeparator::OFF;
    hudSeparator->setName("hud");
    graspitCore->getWorld()->getIVRoot()->addChild(hudSeparator);
    pcam = new SoOrthographicCamera;
    pcam->position = SbVec3f(0, 0, 10);
    pcam->nearDistance = 0.1;
    pcam->farDistance = 11;

    hudSeparator->addChild(pcam);
    SoLightModel * hudLightModel = new SoLightModel;
    hudLightModel->model=SoLightModel::BASE_COLOR;
    hudSeparator->addChild(hudLightModel);
    SoCallback * disableZTestNode = new SoCallback();
    disableZTestNode->setCallback(ui_tools::disableZCulling);
    hudSeparator->addChild(disableZTestNode);
    csm = new ControllerSceneManager(hudSeparator);

    BCIStateMachine *bciStateMachine = new BCIStateMachine(bciControlWindow,this);
    connect(this, SIGNAL(plannerUpdated()), bciControlWindow, SLOT(redraw()));
    connect(GraspManager::getInstance(), SIGNAL(render()), bciControlWindow, SLOT(redraw()));
    bciStateMachine->start();

    ROS_INFO("Finished initing BCI Service");
}
开发者ID:CURG-BCI,项目名称:graspit_bci_plugin,代码行数:81,代码来源:bciService.cpp


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