本文整理汇总了C++中QObjectScopedPointer::exec方法的典型用法代码示例。如果您正苦于以下问题:C++ QObjectScopedPointer::exec方法的具体用法?C++ QObjectScopedPointer::exec怎么用?C++ QObjectScopedPointer::exec使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QObjectScopedPointer
的用法示例。
在下文中一共展示了QObjectScopedPointer::exec方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sl_editClicked
void SharedConnectionsDialog::sl_editClicked() {
const QString dbiUrl = ui->lwConnections->currentItem()->data(UrlRole).toString();
const QString userName = ui->lwConnections->currentItem()->data(LoginRole).toString();
const QString connectionName = ui->lwConnections->currentItem()->text();
QObjectScopedPointer<EditConnectionDialog> editDialog = new EditConnectionDialog(this, dbiUrl, userName, connectionName);
editDialog->setReadOnly(U2DbiUtils::PUBLIC_DATABASE_URL == U2DbiUtils::createFullDbiUrl(userName, dbiUrl));
const int dialogResult = editDialog->exec();
CHECK(!editDialog.isNull(), );
if (QDialog::Accepted == dialogResult) {
QListWidgetItem* item = ui->lwConnections->currentItem();
const QString login = editDialog->getUserName();
const QString shortDbUrl = editDialog->getShortDbiUrl();
checkDbConnectionDuplicate(shortDbUrl, login, item->data(Qt::DisplayRole).toString());
if (connectionName != editDialog->getName()) {
removeRecentConnection(item);
}
item->setText(editDialog->getName());
item->setData(UrlRole, shortDbUrl);
item->setData(LoginRole, login);
connectionTasks.remove(item);
findUpgradeTasks();
saveRecentConnection(item);
updateState();
}
}
示例2: sl_showDnaAssemblyDialog
void DnaAssemblySupport::sl_showDnaAssemblyDialog()
{
DnaAssemblyAlgRegistry* registry = AppContext::getDnaAssemblyAlgRegistry();
if (registry->getRegisteredAlgorithmIds().isEmpty()) {
QMessageBox::information(QApplication::activeWindow(), tr("DNA Assembly"),
tr("There are no algorithms for DNA assembly available.\nPlease, check your plugin list.") );
return;
}
QObjectScopedPointer<DnaAssemblyDialog> dlg = new DnaAssemblyDialog(QApplication::activeWindow());
dlg->exec();
CHECK(!dlg.isNull(), );
if (QDialog::Accepted == dlg->result()) {
DnaAssemblyToRefTaskSettings s;
s.samOutput = dlg->isSamOutput();
s.refSeqUrl = dlg->getRefSeqUrl();
s.algName = dlg->getAlgorithmName();
s.resultFileName = dlg->getResultFileName();
s.setCustomSettings(dlg->getCustomSettings());
s.shortReadSets = dlg->getShortReadSets();
s.pairedReads = dlg->isPaired();
s.openView = true;
s.prebuiltIndex = dlg->isPrebuiltIndex();
Task* assemblyTask = new DnaAssemblyTaskWithConversions(s, true);
AppContext::getTaskScheduler()->registerTopLevelTask(assemblyTask);
}
}
示例3: sl_onEditButtonClicked
void EditMarkerGroupDialog::sl_onEditButtonClicked() {
QItemSelectionModel *m = table->selectionModel();
QModelIndexList selected = m->selectedRows();
if (1 != selected.size()) {
return;
}
QMap<QString, QString>::iterator i = marker->getValues().begin();
i += selected.first().row();
QVariantList values;
MarkerUtils::stringToValue(MarkerTypes::getDataTypeById(marker->getType()),marker->getValues().key(*i), values);
QObjectScopedPointer<EditMarkerDialog> dlg = new EditMarkerDialog(false, marker->getType(), *i, values, this);
const int dialogResult = dlg->exec();
CHECK(!dlg.isNull(), );
if (QDialog::Accepted == dialogResult) {
QString newValueString;
QString newName = dlg->getName();
MarkerUtils::valueToString(MarkerTypes::getDataTypeById(marker->getType()), dlg->getValues(), newValueString);
markerModel->removeRows(selected.first().row(), 1, selected.first());
markerModel->addMarker(newValueString, newName);
}
}
示例4: sl_onOpenDigestSequenceDialog
void EnzymesPlugin::sl_onOpenDigestSequenceDialog() {
GObjectViewWindow* w = GObjectViewUtils::getActiveObjectViewWindow();
if (w == NULL) {
QMessageBox::information(QApplication::activeWindow(), openDigestSequenceDialog->text(),
tr("There is no active sequence object.\nTo start partition open sequence document."));
return;
}
AnnotatedDNAView* view = qobject_cast<AnnotatedDNAView*>(w->getObjectView());
if (view == NULL) {
QMessageBox::information(QApplication::activeWindow(), openDigestSequenceDialog->text(),
tr("There is no active sequence object.\nTo start partition open sequence document."));
return;
}
if (!view->getSequenceInFocus()->getSequenceObject()->getAlphabet()->isNucleic()) {
QMessageBox::information(QApplication::activeWindow(), openDigestSequenceDialog->text(),
tr("Can not digest into fragments non-nucleic sequence."));
return;
}
QObjectScopedPointer<DigestSequenceDialog> dlg = new DigestSequenceDialog(view->getSequenceInFocus(), QApplication::activeWindow());
dlg->exec();
}
示例5: sl_execute
void SecStructPredictViewAction::sl_execute() {
QAction *a = dynamic_cast<QAction*>(sender());
GObjectViewAction *viewAction = dynamic_cast<GObjectViewAction*>(a);
SAFE_POINT(NULL != viewAction, "NULL action",);
AnnotatedDNAView *av = qobject_cast<AnnotatedDNAView*>(viewAction->getObjectView());
SAFE_POINT(NULL != av, "NULL dna view",);
SecStructPredictAlgRegistry *sspar = AppContext::getSecStructPredictAlgRegistry();
SAFE_POINT(NULL != sspar, "NULL SecStructPredictAlgRegistry",);
if (sspar->getAlgNameList().isEmpty()) {
QMessageBox::information(av->getWidget(),
tr("Secondary Structure Prediction"),
tr("No algorithms for secondary structure prediction are available.\nPlease, load the corresponding plugins."));
return;
}
ADVSequenceObjectContext *seqCtx = av->getSequenceInFocus();
SAFE_POINT(NULL != seqCtx, "NULL sequence context",);
SAFE_POINT(NULL != seqCtx->getAlphabet(), "NULL alphabet",);
SAFE_POINT(seqCtx->getAlphabet()->isAmino(), "Wrong alphabet",);
QObjectScopedPointer<SecStructDialog> secStructDialog = new SecStructDialog(seqCtx, av->getWidget());
secStructDialog->exec();
}
示例6: sl_saveClicked
void CollocationsDialogController::sl_saveClicked() {
assert(resultsList->count() > 0);
CreateAnnotationModel m;
m.sequenceObjectRef = ctx->getSequenceGObject();
m.hideLocation = true;
m.useAminoAnnotationTypes = ctx->getAlphabet()->isAmino();
m.sequenceLen = ctx->getSequenceObject()->getSequenceLength();
QObjectScopedPointer<CreateAnnotationDialog> d = new CreateAnnotationDialog(this, m);
const int rc = d->exec();
CHECK(!d.isNull(), );
if (rc != QDialog::Accepted) {
return;
}
QList<SharedAnnotationData> list;
for (int i=0, n = resultsList->count(); i<n; ++i) {
CDCResultItem* item = static_cast<CDCResultItem*>(resultsList->item(i));
SharedAnnotationData data = m.data;
data->location->regions.append(item->r);
data->setStrand(U2Strand::Direct);
U1AnnotationUtils::addDescriptionQualifier(data, m.description);
list.append(data);
}
ADVCreateAnnotationsTask* t = new ADVCreateAnnotationsTask(ctx->getAnnotatedDNAView(), m.getAnnotationObject(), m.groupName, list);
AppContext::getTaskScheduler()->registerTopLevelTask(t);
}
示例7: sl_onOpenCreateFragmentDialog
void EnzymesPlugin::sl_onOpenCreateFragmentDialog() {
GObjectViewWindow* w = GObjectViewUtils::getActiveObjectViewWindow();
if (w == NULL) {
QMessageBox::information(QApplication::activeWindow(), openCreateFragmentDialog->text(),
tr("There is no active sequence object.\nTo create fragment open sequence document."));
return;
}
AnnotatedDNAView* view = qobject_cast<AnnotatedDNAView*>(w->getObjectView());
if (view == NULL) {
QMessageBox::information(QApplication::activeWindow(), openCreateFragmentDialog->text(),
tr("There is no active sequence object.\nTo create fragment open sequence document."));
return;
}
U2SequenceObject* dnaObj = view->getSequenceInFocus()->getSequenceObject();
assert(dnaObj != NULL);
if (!dnaObj->getAlphabet()->isNucleic()) {
QMessageBox::information(QApplication::activeWindow(), openCreateFragmentDialog->text(),
tr("The sequence doesn't have nucleic alphabet, it can not be used in cloning."));
return;
}
QObjectScopedPointer<CreateFragmentDialog> dlg = new CreateFragmentDialog(view->getSequenceInFocus(), QApplication::activeWindow());
dlg->exec();
}
示例8: sl_showDialog
void TrimmomaticPropertyWidget::sl_showDialog() {
QObjectScopedPointer<TrimmomaticPropertyDialog> dialog
(new TrimmomaticPropertyDialog(lineEdit->text(), this));
if (QDialog::Accepted == dialog->exec()) {
CHECK(!dialog.isNull(), );
lineEdit->setText(dialog->getValue());
emit si_valueChanged(value());
}
示例9: sl_browse
void PrimerGroupBox::sl_browse() {
QObjectScopedPointer<PrimerLibrarySelector> dlg = new PrimerLibrarySelector(AppContext::getMainWindow()->getQMainWindow());
dlg->exec();
CHECK(!dlg.isNull(), );
CHECK(QDialog::Accepted == dlg->result(), );
Primer result = dlg->getResult();
primerEdit->setInvalidatedText(result.sequence);
}
示例10: sl_showConvertToSamDialog
void DnaAssemblySupport::sl_showConvertToSamDialog() {
QObjectScopedPointer<ConvertAssemblyToSamDialog> dlg = new ConvertAssemblyToSamDialog(QApplication::activeWindow());
dlg->exec();
CHECK(!dlg.isNull(), );
if (QDialog::Accepted == dlg->result()) {
Task *convertTask = new ConvertAssemblyToSamTask(dlg->getDbFileUrl(), dlg->getSamFileUrl());
AppContext::getTaskScheduler()->registerTopLevelTask(convertTask);
}
}
示例11: sl_search
void EnzymesADVContext::sl_search() {
GObjectViewAction* action = qobject_cast<GObjectViewAction*>(sender());
assert(action!=NULL);
AnnotatedDNAView* av = qobject_cast<AnnotatedDNAView*>(action->getObjectView());
assert(av!=NULL);
ADVSequenceObjectContext* seqCtx = av->getSequenceInFocus();
assert(seqCtx->getAlphabet()->isNucleic());
QObjectScopedPointer<FindEnzymesDialog> d = new FindEnzymesDialog(seqCtx);
d->exec();
}
示例12: configureColumn
void ImportAnnotationsFromCSVDialog::configureColumn(int column) {
assert(column >= 0 && column < columnsConfig.size());
const ColumnConfig& config = columnsConfig.at(column);
QObjectScopedPointer<CSVColumnConfigurationDialog> d = new CSVColumnConfigurationDialog(this, config);
int rc = d->exec(); // TODO: set dialog position close to the header item
CHECK(!d.isNull(), );
if (rc == QDialog::Accepted) {
columnsConfig[column] = d->config;
}
previewTable->horizontalHeaderItem(column)->setText(getHeaderItemText(column));
}
示例13: sl_invertedColorButton
void DotPlotDialog::sl_invertedColorButton() {
QObjectScopedPointer<QColorDialog> d = new QColorDialog(invertedColor, this);
d->exec();
CHECK(!d.isNull(), );
if (QDialog::Accepted == d->result()) {
invertedColor = d->selectedColor();
invertedCheckBox->setChecked(true);
}
updateColors();
}
示例14: sl_build
void HMMMSAEditorContext::sl_build() {
GObjectViewAction* action = qobject_cast<GObjectViewAction*>(sender());
assert(action!=NULL);
MSAEditor* ed = qobject_cast<MSAEditor*>(action->getObjectView());
assert(ed!=NULL);
MAlignmentObject* obj = ed->getMSAObject();
if (obj) {
QString profileName = obj->getGObjectName() == MA_OBJECT_NAME ? obj->getDocument()->getName() : obj->getGObjectName();
QObjectScopedPointer<HMMBuildDialogController> d = new HMMBuildDialogController(profileName, obj->getMAlignment());
d->exec();
CHECK(!d.isNull(), );
}
}
示例15: sl_onOpenConstructMoleculeDialog
void EnzymesPlugin::sl_onOpenConstructMoleculeDialog() {
Project* p = AppContext::getProject();
if (p == NULL) {
QMessageBox::information(QApplication::activeWindow(), openConstructMoleculeDialog->text(),
tr("There is no active project.\nTo start ligation create a project or open an existing."));
return;
}
QList<DNAFragment> fragments = DNAFragment::findAvailableFragments();
QObjectScopedPointer<ConstructMoleculeDialog> dlg = new ConstructMoleculeDialog(fragments, QApplication::activeWindow());
dlg->exec();
}