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


C++ QObjectScopedPointer::isNull方法代码示例

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


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

示例1: 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);
    }
}
开发者ID:m-angelov,项目名称:ugene,代码行数:28,代码来源:DnaAssemblyUtils.cpp

示例2: 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();
    }
}
开发者ID:m-angelov,项目名称:ugene,代码行数:32,代码来源:SharedConnectionsDialog.cpp

示例3: 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);
}
开发者ID:ugeneunipro,项目名称:ugene-old,代码行数:29,代码来源:CollocationsDialogController.cpp

示例4: 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);
    }
}
开发者ID:neuroidss,项目名称:ugene,代码行数:25,代码来源:EditMarkerGroupDialog.cpp

示例5: 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);
}
开发者ID:ugeneunipro,项目名称:ugene-old,代码行数:8,代码来源:PrimerGroupBox.cpp

示例6: 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());
    }
开发者ID:ugeneunipro,项目名称:ugene,代码行数:8,代码来源:TrimmomaticDelegate.cpp

示例7: 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);
    }
}
开发者ID:m-angelov,项目名称:ugene,代码行数:10,代码来源:DnaAssemblyUtils.cpp

示例8: 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));
}
开发者ID:ugeneunipro,项目名称:ugene-old,代码行数:12,代码来源:ImportAnnotationsFromCSVDialog.cpp

示例9: 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();
}
开发者ID:ugeneunipro,项目名称:ugene-old,代码行数:12,代码来源:DotPlotDialog.cpp

示例10: 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(), );
    }
}
开发者ID:ugeneunipro,项目名称:ugene-old,代码行数:13,代码来源:uHMMPlugin.cpp

示例11: checkLicense

bool CreatePhyTreeDialogController::checkLicense() {
    if (settings.algorithmId == "PHYLIP Neighbor Joining") { // This is a bad hack :(
        QList<Plugin *> plugins = AppContext::getPluginSupport()->getPlugins();
        foreach (Plugin *plugin, plugins) {
            if (plugin->getName() == "PHYLIP") {
                if (!plugin->isLicenseAccepted()) {
                    QObjectScopedPointer<LicenseDialog> licenseDialog = new LicenseDialog(plugin);
                    const int ret = licenseDialog->exec();
                    CHECK(!licenseDialog.isNull(), false);
                    return (ret == QDialog::Accepted);
                }
            }
        }
    }
开发者ID:neuroidss,项目名称:ugene,代码行数:14,代码来源:CreatePhyTreeDialogController.cpp

示例12: sl_addClicked

void SharedConnectionsDialog::sl_addClicked() {
    QObjectScopedPointer<EditConnectionDialog> editDialog = new EditConnectionDialog(this);
    const int dialogResult = editDialog->exec();
    CHECK(!editDialog.isNull(), );

    if (QDialog::Accepted == dialogResult) {
        checkDbConnectionDuplicate(editDialog->getShortDbiUrl(), editDialog->getUserName());
        QListWidgetItem* item = insertConnection(editDialog->getName(), editDialog->getShortDbiUrl(), editDialog->getUserName());
        CHECK(NULL != item, );
        ui->lwConnections->setCurrentItem(item);
        saveRecentConnection(item);
        findUpgradeTasks();
        updateState();
    }
开发者ID:m-angelov,项目名称:ugene,代码行数:14,代码来源:SharedConnectionsDialog.cpp

示例13: sl_onAddButtonClicked

void EditMarkerGroupDialog::sl_onAddButtonClicked() {
    QObjectScopedPointer<EditMarkerDialog> dlg = new EditMarkerDialog(true, marker->getType(), "", QVariantList(), this);

    const int dialogResult = dlg->exec();
    CHECK(!dlg.isNull(), );

    if (QDialog::Accepted == dialogResult) {
        QString valueString;
        QString name = dlg->getName();

        MarkerUtils::valueToString(MarkerTypes::getDataTypeById(marker->getType()), dlg->getValues(), valueString);
        markerModel->addMarker(valueString, name);
    }
}
开发者ID:neuroidss,项目名称:ugene,代码行数:14,代码来源:EditMarkerGroupDialog.cpp

示例14: run

void AddNewDocumentDialogController::run(QWidget* p, AddNewDocumentDialogModel& m, const DocumentFormatConstraints& c) {
    Project* proj = AppContext::getProject();
    if (proj->isStateLocked()) {
        QMessageBox::critical(NULL, L10N::errorTitle(), AddNewDocumentDialogImpl::tr("Project is locked"));
        m.successful = false;
        return;
    }

    QObjectScopedPointer<AddNewDocumentDialogImpl> d = new AddNewDocumentDialogImpl(p, m, c);
    d->exec();
    CHECK(!d.isNull(), );

    m = d->model;
    assert(proj->findDocumentByURL(m.url) == NULL);
}
开发者ID:neuroidss,项目名称:ugene,代码行数:15,代码来源:AddNewDocumentDialogImpl.cpp

示例15: sl_colorActionTriggered

void MSAOverviewContextMenu::sl_colorActionTriggered() {
    QObjectScopedPointer<QColorDialog> colorDialog = new QColorDialog(graphOverview->getCurrentColor(), this);
#ifdef Q_OS_MAC
    if (qgetenv("UGENE_GUI_TEST").toInt() == 1 && qgetenv("UGENE_USE_NATIVE_DIALOGS").toInt() == 0) {
        colorDialog->setOption(QColorDialog::DontUseNativeDialog);
    }
#endif

    colorDialog->exec();
    CHECK(!colorDialog.isNull(), );

    if (QDialog::Accepted == colorDialog->result()) {
        emit si_colorSelected(colorDialog->selectedColor());
    }
}
开发者ID:neuroidss,项目名称:ugene,代码行数:15,代码来源:MSAOverviewContextMenu.cpp


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