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


C++ WPushButton::setDefault方法代码示例

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


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

示例1: openEditDialog

void ProfileList::openEditDialog(db::Preset preset)
{
  _dialog = new Wt::WDialog("Edit Preset", this);
  _dialog->setClosable(true);
  ProfileEditor * editor = new ProfileEditor(preset,_dialog->contents());

  Wt::WPushButton *ok = new Wt::WPushButton("Analyze & Save", _dialog->footer());
  ok->setDefault(true);
  ok->clicked().connect(editor, &ProfileEditor::saveProfile);

  Wt::WPushButton *cancel = new Wt::WPushButton("Cancel", _dialog->footer());
  cancel->clicked().connect(_dialog, &Wt::WDialog::reject);
  editor->_presetSaved.connect(this, &ProfileList::dialogSave);

  _dialog->show();
}
开发者ID:psychobob666,项目名称:MediaEncodingCluster,代码行数:16,代码来源:ProfileList.cpp

示例2: checkJsonProfile

std::string ProfileEditor::checkJsonProfile(JSONNode&root) {
  std::string result;
  /*check the root conatins required data*/
  if (!root.contains("name")) {
    result = "no profile name given!";
  } else if (!root.contains("format")) {
    result = "no format attribute found!";
  } else if (!root.contains("video")) {
    result = "no video attribute found!";
  } else if (!root.contains("audio")) {
    result = "no audio attribute found!";
  } else if (!root["format"].contains("id")) {
    result = "no id attribute found in attribute \"format\"!";
  } else if (!root["video"].contains("id")) {
    result = "no id attribute found in attribute \"video\"!";
  } else if (!root["audio"].contains("id")) {
    result = "no id attribute found in attribute \"audio\"!";
  }else{
    //Wt::WApplication::instance()->attachThread(true);

    analyzerDialog=new Wt::WDialog(this);
    analyzerDialog->setWidth(800);
    analyzerDialog->setHeight(500);
    progressBar=new Wt::WProgressBar();
    progressBar->setMinimum(0);
    progressBar->setMaximum(250);

    fpsText=new Wt::WText("FPS");
    psnrText=new Wt::WText("PSNR");
    Wt::WVBoxLayout *vbox = new Wt::WVBoxLayout();
    analyzerDialog->contents()->setLayout(vbox);

    chart=new Wt::Chart::WCartesianChart();
    chart->resize(700,350);
    //chart->setHidden(true);
    vbox->addWidget(progressBar);
    vbox->addWidget(fpsText);
    vbox->addWidget(psnrText);
    vbox->addWidget(chart);


    analyzerDialog->show();


    //app->enableUpdates();
    LOGDEBUG("thread attached");
    _verifier=new org::esb::plugin::PresetVerifier();
    _verifier->progress=boost::bind(&ProfileEditor::progress, this, _1);
    _verifier->completed=boost::bind(&ProfileEditor::completed, this, _1);

    Wt::WPushButton *ok = new Wt::WPushButton("Close", analyzerDialog->footer());
    ok->setDefault(true);
    ok->setEnabled(false);
    ok->clicked().connect(this, &ProfileEditor::closeAnalyzer);

    _selfApp=Wt::WApplication::instance();
    _selfApp->enableUpdates();
    a=0;
    go(org::esb::plugin::PresetVerifier::verify, _verifier, root, true, true);

    //verifier.verify(root);
    //analyzerDialog->reject();
    //go(ProfileEditor::startAnalyzeThread, this, root, Wt::WApplication::instance());
  }
  return result;
}
开发者ID:psychobob666,项目名称:MediaEncodingCluster,代码行数:66,代码来源:ProfileEditor.cpp


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