本文整理汇总了C++中wt::WPushButton::setEnabled方法的典型用法代码示例。如果您正苦于以下问题:C++ WPushButton::setEnabled方法的具体用法?C++ WPushButton::setEnabled怎么用?C++ WPushButton::setEnabled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wt::WPushButton
的用法示例。
在下文中一共展示了WPushButton::setEnabled方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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;
}