本文整理汇总了C++中QObjectScopedPointer::setDefaultButton方法的典型用法代码示例。如果您正苦于以下问题:C++ QObjectScopedPointer::setDefaultButton方法的具体用法?C++ QObjectScopedPointer::setDefaultButton怎么用?C++ QObjectScopedPointer::setDefaultButton使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QObjectScopedPointer
的用法示例。
在下文中一共展示了QObjectScopedPointer::setDefaultButton方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sl_OK
void SendSelectionDialog::sl_OK() {
QString error = ca_c->validate();
if (!error.isEmpty()) {
QMessageBox::critical(NULL, tr("Error"), error);
return;
}
retries = retrySpinBox->value();
db = dataBase->currentText();
if(db!="cdd") {
requestParameters = "CMD=Put";
addParametr(requestParameters,ReqParams::program,db);
double eValue = evalueSpinBox->value();
if(shortSequenceCheckBox->isChecked())
eValue = 1000;
addParametr(requestParameters,ReqParams::expect,eValue);
if(false == entrezQueryEdit->text().isEmpty())
addParametr(requestParameters, ReqParams::entrezQuery, entrezQueryEdit->text());
int maxHit = quantitySpinBox->value();
addParametr(requestParameters,ReqParams::hits,maxHit);
if(megablastCheckBox->isChecked()) {
addParametr(requestParameters,ReqParams::megablast,"true");
}
addParametr(requestParameters,ReqParams::database,dbComboBox->currentText().split(" ").last());
QString filter="";
if(lowComplexityFilterCheckBox->isChecked()&&!shortSequenceCheckBox->isChecked()) {
filter.append("L");
}
if(repeatsCheckBox->isChecked()) {
filter.append("R");
}
if(lookupMaskCheckBox->isChecked()) {
filter.append("m");
}
if(!filter.isEmpty()) {
addParametr(requestParameters,ReqParams::filter,filter);
}
addParametr(requestParameters,ReqParams::gapCost,costsComboBox->currentText());
if(db == "blastn"){
addParametr(requestParameters,ReqParams::matchScore,scoresComboBox->currentText().split(" ").first());
addParametr(requestParameters,ReqParams::mismatchScore,scoresComboBox->currentText().split(" ").last());
}
if(shortSequenceCheckBox->isChecked()) {
QString wordSize = wordSizeComboBox->currentText().toInt()>7 ? "7" : wordSizeComboBox->currentText();
addParametr(requestParameters,ReqParams::wordSize, wordSize);
}
else {
addParametr(requestParameters,ReqParams::wordSize,wordSizeComboBox->currentText());
}
if(lowerCaseCheckBox->isChecked()) {
addParametr(requestParameters,ReqParams::lowCaseMask,"yes");
}
if(db=="blastp") {
if(!isAminoSeq) {
translateToAmino = true;
}
addParametr(requestParameters,ReqParams::matrix,matrixComboBox->currentText());
addParametr(requestParameters,ReqParams::service,serviceComboBox->currentText());
if(serviceComboBox->currentText()=="phi") {
addParametr(requestParameters,ReqParams::phiPattern,phiPatternEdit->text());
}
}
}
else { //CDD
requestParameters = "CMD=Put";
db = "blastp";
addParametr(requestParameters,ReqParams::program, db);
addParametr(requestParameters,ReqParams::expect, evalueSpinBox->value());
addParametr(requestParameters,ReqParams::hits,quantitySpinBox->value());
QString dbName = dbComboBox->currentText().split(" ").last();
addParametr(requestParameters,ReqParams::database, dbName.toLower());
addParametr(requestParameters,ReqParams::service, "rpsblast");
}
if(translateToAmino) {
QObjectScopedPointer<QMessageBox> msg = new QMessageBox(this);
msg->setText(tr("You chose to search nucleotide sequence in protein database. This sequence will be converted into 6 sequences(3 translations for both strands)."
"Therefore this search may take some time. Continue?"));
msg->setWindowTitle(windowTitle());
msg->setStandardButtons(QMessageBox::Yes | QMessageBox::Cancel);
msg->setDefaultButton(QMessageBox::Yes);
msg->exec();
CHECK(!msg.isNull(), );
if (msg->result() == QMessageBox::Cancel) {
return;
//.........这里部分代码省略.........