• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ displayName函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中displayName函数的典型用法代码示例。如果您正苦于以下问题:C++ displayName函数的具体用法?C++ displayName怎么用?C++ displayName使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: displayName

void SmileyCategoryListType::AddAccountAsCategory(PROTOACCOUNT *acc, const CMString &defaultFile)
{
	if (Proto_IsAccountEnabled(acc) && acc->szProtoName && IsSmileyProto(acc->szModuleName)) {
		CMString displayName(acc->tszAccountName ? acc->tszAccountName : _A2T(acc->szModuleName));
		CMString PhysProtoName, paths;
		DBVARIANT dbv;

		if (db_get_ts(NULL, acc->szModuleName, "AM_BaseProto", &dbv) == 0) {
			PhysProtoName = _T("AllProto");
			PhysProtoName += dbv.ptszVal;
			db_free(&dbv);
		}

		if (!PhysProtoName.IsEmpty())
			paths = g_SmileyCategories.GetSmileyCategory(PhysProtoName) ? g_SmileyCategories.GetSmileyCategory(PhysProtoName)->GetFilename() : _T("");

		if (paths.IsEmpty()) {
			const char *packnam = acc->szProtoName;
			if (mir_strcmp(packnam, "JABBER") == 0)
				packnam = "JGMail";
			else if (strstr(packnam, "SIP") != NULL)
				packnam = "MSN";

			char path[MAX_PATH];
			mir_snprintf(path, "Smileys\\nova\\%s.msl", packnam);

			paths = _A2T(path);
			CMString patha;
			pathToAbsolute(paths, patha);

			if (_taccess(patha.c_str(), 0) != 0)
				paths = defaultFile;
		}

		CMString tname(_A2T(acc->szModuleName));
		AddCategory(tname, displayName, acc->bIsVirtual ? smcVirtualProto : smcProto, paths);
	}
}
开发者ID:wyrover,项目名称:miranda-ng,代码行数:38,代码来源:smileys.cpp


示例2: Q_UNUSED

void BaseCheckoutWizard::runWizard(const QString &path, QWidget *parent, const QString & /*platform*/, const QVariantMap &extraValues)
{
    Q_UNUSED(extraValues)
    // Create dialog and launch
    d->parameterPages = createParameterPages(path);
    Internal::CheckoutWizardDialog dialog(d->parameterPages, parent);
    d->dialog = &dialog;
    connect(&dialog, SIGNAL(progressPageShown()), this, SLOT(slotProgressPageShown()));
    dialog.setWindowTitle(displayName());
    if (dialog.exec() != QDialog::Accepted)
        return;
    // Now try to find the project file and open
    const QString checkoutPath = d->checkoutPath;
    d->clear();
    QString errorMessage;
    const QString projectFile = openProject(checkoutPath, &errorMessage);
    if (projectFile.isEmpty()) {
        QMessageBox msgBox(QMessageBox::Warning, tr("Cannot Open Project"),
                           tr("Failed to open project in '%1'.").arg(QDir::toNativeSeparators(checkoutPath)));
        msgBox.setDetailedText(errorMessage);
        msgBox.exec();
    }
}
开发者ID:mornelon,项目名称:QtCreator_compliments,代码行数:23,代码来源:basecheckoutwizard.cpp


示例3: foreach

void DeadCodeFinder::dumpResults()
{
    for (int i = 0; i < m_fileSet->size(); ++i) {
        auto file = m_fileSet->file(i);
        // this only makes sense for libraries
        if (file->header()->type() == ET_EXEC)
            continue;

        bool skip = false;
        foreach (const auto &excludePrefix, m_excludePrefixes) {
            if (file->fileName().startsWith(excludePrefix)) {
                skip = true;
                break;
            }
        }
        if (skip)
            continue;

        std::cout << "Unreferenced exported symbols in " << qPrintable(file->displayName()) << ":" << std::endl;
        dumpResultsForFile(file);
        std::cout << std::endl;
    }
}
开发者ID:KDE,项目名称:elf-dissector,代码行数:23,代码来源:deadcodefinder.cpp


示例4: fopen

bool CursorInfo::isValid(const Location &location) const
{
    const Path p = location.path();
    bool ret = false;
    FILE *f = fopen(p.constData(), "r");
    if (f && fseek(f, location.offset(), SEEK_SET) != -1) {
        const String display = displayName();
        // int paren = symbolName.indexOf('(');
        // int bracket = symbolName.indexOf('<');
        // int end = symbolName.size();
        // if (paren != -1) {
        //     if (bracket != -1) {
        //         end = std::min(paren, bracket);
        //     } else {
        //         end = paren;
        //     }
        // } else if (bracket != -1) {
        //     end = bracket;
        // }
        // int start = end;
        // while (start > 0 && RTags::isSymbol(symbolName.at(start - 1)))
        //     --start;

        char buf[1024];
        const int length = display.size();
        if (length && length < static_cast<int>(sizeof(buf)) - 1 && fread(buf, std::min<int>(length, sizeof(buf) - 1), 1, f)) {
            buf[length] = '\0';
            ret = display == buf;
            if (!ret) {
                error("Different:\n[%s]\n[%s]", buf, display.constData());
            }
        }
    }
    if (f)
        fclose(f);
    return ret;
}
开发者ID:xinsuiyuer,项目名称:rtags,代码行数:37,代码来源:CursorInfo.cpp


示例5: opts

  analysis::SamplingAlgorithm SamplingAlgorithmRecord_Impl::samplingAlgorithm() const {
    analysis::SamplingAlgorithmOptions opts(m_sampleType,
                                            m_rngType,
                                            options());
    OptionalFileReference restartFile, outFile;
    OptionalFileReferenceRecord ofr = restartFileReferenceRecord();
    if (ofr) {
      restartFile = ofr->fileReference();
    }
    ofr = outFileReferenceRecord();
    if (ofr) {
      outFile = ofr->fileReference();
    }

    boost::optional<runmanager::Job> job;
    if (this->jobUUID()){
      try {
        job = this->projectDatabase().runManager().getJob(this->jobUUID().get());
      }
      catch (const std::exception& e) {
        LOG(Error, "Job " << toString(this->jobUUID().get()) << " not found in RunManager. "
            << e.what());
      }
    }

    return analysis::SamplingAlgorithm(handle(),
                                    uuidLast(),
                                    displayName(),
                                    description(),
                                    complete(),
                                    failed(),
                                    iter(),
                                    opts,
                                    restartFile,
                                    outFile,
                                    job);
  }
开发者ID:Anto-F,项目名称:OpenStudio,代码行数:37,代码来源:SamplingAlgorithmRecord.cpp


示例6: webFinger

QString QASActor::displayNameOrWebFinger() const {
  if (displayName().isEmpty())
    return webFinger();
  return displayName();
}
开发者ID:msjoberg,项目名称:pumpa,代码行数:5,代码来源:qasactor.cpp


示例7: startFile

void DirDef::writeDocumentation(OutputList &ol)
{
  ol.pushGeneratorState();
  
  QCString shortTitle=theTranslator->trDirReference(m_shortName);
  QCString title=theTranslator->trDirReference(m_dispName);
  startFile(ol,getOutputFileBase(),name(),title,HLI_None,TRUE);

  // write navigation path
  writeNavigationPath(ol);

  ol.endQuickIndices();
  ol.startContents();

  startTitle(ol,getOutputFileBase());
  ol.pushGeneratorState();
    ol.disableAllBut(OutputGenerator::Html);
    ol.parseText(shortTitle);
    ol.enableAll();
    ol.disable(OutputGenerator::Html);
    ol.parseText(title);
  ol.popGeneratorState();
  endTitle(ol,getOutputFileBase(),title);

  if (!Config_getString("GENERATE_TAGFILE").isEmpty()) 
  {
    Doxygen::tagFile << "  <compound kind=\"dir\">" << endl;
    Doxygen::tagFile << "    <name>" << convertToXML(displayName()) << "</name>" << endl;
    Doxygen::tagFile << "    <path>" << convertToXML(name()) << "</path>" << endl;
    Doxygen::tagFile << "    <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>" << endl;
  }
  
  //---------------------------------------- start flexible part -------------------------------

  QListIterator<LayoutDocEntry> eli(
      LayoutDocManager::instance().docEntries(LayoutDocManager::Directory));
  LayoutDocEntry *lde;
  for (eli.toFirst();(lde=eli.current());++eli)
  {
    switch (lde->kind())
    {
      case LayoutDocEntry::BriefDesc: 
        writeBriefDescription(ol);
        break; 
      case LayoutDocEntry::DirGraph: 
        writeDirectoryGraph(ol);
        break; 
      case LayoutDocEntry::MemberDeclStart: 
        startMemberDeclarations(ol);
        break; 
      case LayoutDocEntry::DirSubDirs: 
        writeSubDirList(ol);
        break; 
      case LayoutDocEntry::DirFiles: 
        writeFileList(ol);
        break; 
      case LayoutDocEntry::MemberDeclEnd: 
        endMemberDeclarations(ol);
        break;
      case LayoutDocEntry::DetailedDesc: 
        {
          LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde;
          writeDetailedDescription(ol,ls->title);
        }
        break;
      case LayoutDocEntry::ClassIncludes:
      case LayoutDocEntry::ClassInheritanceGraph:
      case LayoutDocEntry::ClassNestedClasses:
      case LayoutDocEntry::ClassCollaborationGraph:
      case LayoutDocEntry::ClassAllMembersLink:
      case LayoutDocEntry::ClassUsedFiles:
      case LayoutDocEntry::NamespaceNestedNamespaces:
      case LayoutDocEntry::NamespaceClasses:
      case LayoutDocEntry::FileClasses:
      case LayoutDocEntry::FileNamespaces:
      case LayoutDocEntry::FileIncludes:
      case LayoutDocEntry::FileIncludeGraph:
      case LayoutDocEntry::FileIncludedByGraph: 
      case LayoutDocEntry::FileSourceLink:
      case LayoutDocEntry::GroupClasses: 
      case LayoutDocEntry::GroupNamespaces:
      case LayoutDocEntry::GroupDirs: 
      case LayoutDocEntry::GroupNestedGroups: 
      case LayoutDocEntry::GroupFiles:
      case LayoutDocEntry::GroupGraph: 
      case LayoutDocEntry::GroupPageDocs:
      case LayoutDocEntry::AuthorSection:
      case LayoutDocEntry::MemberGroups:
      case LayoutDocEntry::MemberDecl:
      case LayoutDocEntry::MemberDef:
      case LayoutDocEntry::MemberDefStart:
      case LayoutDocEntry::MemberDefEnd:
        err("Internal inconsistency: member %d should not be part of "
            "LayoutDocManager::Directory entry list\n",lde->kind());
        break;
    }
  }

  //---------------------------------------- end flexible part -------------------------------

//.........这里部分代码省略.........
开发者ID:terceiro,项目名称:doxyparse,代码行数:101,代码来源:dirdef.cpp


示例8: Q_ASSERT

void AccountsListDelegate::updateItemWidgets(const QList<QWidget *> widgets, const QStyleOptionViewItem &option, const QPersistentModelIndex &index) const
{
    // draws:
    //                   AccountName
    // Checkbox | Icon |              | ConnectionIcon | ConnectionState
    //                   errorMessage

    if (!index.isValid()) {
        return;
    }

    Q_ASSERT(widgets.size() == 6);

    // Get the widgets
    QCheckBox* checkbox = qobject_cast<QCheckBox*>(widgets.at(0));
    ChangeIconButton* changeIconButton = qobject_cast<ChangeIconButton*>(widgets.at(1));
    QLabel *statusTextLabel = qobject_cast<QLabel*>(widgets.at(2));
    QLabel *statusIconLabel = qobject_cast<QLabel*>(widgets.at(3));
    EditDisplayNameButton *displayNameButton = qobject_cast<EditDisplayNameButton*>(widgets.at(4));
    QLabel *connectionErrorLabel = qobject_cast<QLabel*>(widgets.at(5));

    Q_ASSERT(checkbox);
    Q_ASSERT(changeIconButton);
    Q_ASSERT(statusTextLabel);
    Q_ASSERT(statusIconLabel);
    Q_ASSERT(displayNameButton);
    Q_ASSERT(connectionErrorLabel);


    bool isSelected(itemView()->selectionModel()->isSelected(index) && itemView()->hasFocus());
    bool isEnabled(index.data(KTp::AccountsListModel::EnabledRole).toBool());
    KIcon accountIcon(index.data(Qt::DecorationRole).value<QIcon>());
    KIcon statusIcon(index.data(KTp::AccountsListModel::ConnectionStateIconRole).value<QIcon>());
    QString statusText(index.data(KTp::AccountsListModel::ConnectionStateDisplayRole).toString());
    QString displayName(index.data(Qt::DisplayRole).toString());
    QString connectionError(index.data(KTp::AccountsListModel::ConnectionErrorMessageDisplayRole).toString());
    Tp::AccountPtr account(index.data(KTp::AccountsListModel::AccountRole).value<Tp::AccountPtr>());

    if (!account->isEnabled()) {
      connectionError = i18n("Click checkbox to enable");
    }

    QRect outerRect(0, 0, option.rect.width(), option.rect.height());
    QRect contentRect = outerRect.adjusted(m_hpadding,m_vpadding,-m_hpadding,-m_vpadding); //add some padding


    // checkbox
    if (isEnabled) {
        checkbox->setChecked(true);;
        checkbox->setToolTip(i18n("Disable account"));
    } else {
        checkbox->setChecked(false);
        checkbox->setToolTip(i18n("Enable account"));
    }

    int checkboxLeftMargin = contentRect.left();
    int checkboxTopMargin = (outerRect.height() - checkbox->height()) / 2;
    checkbox->move(checkboxLeftMargin, checkboxTopMargin);


    // changeIconButton
    changeIconButton->setIcon(accountIcon);
    changeIconButton->setAccount(account);
    // At the moment (KDE 4.8.1) decorationSize is not passed from KWidgetItemDelegate
    // through the QStyleOptionViewItem, therefore we leave default size unless
    // the user has a more recent version.
    if (option.decorationSize.width() > -1) {
        changeIconButton->setButtonIconSize(option.decorationSize.width());
    }

    int changeIconButtonLeftMargin = checkboxLeftMargin + checkbox->width();
    int changeIconButtonTopMargin = (outerRect.height() - changeIconButton->height()) / 2;
    changeIconButton->move(changeIconButtonLeftMargin, changeIconButtonTopMargin);


    // statusTextLabel
    QFont statusTextFont = option.font;
    QPalette statusTextLabelPalette = option.palette;
    if (isEnabled) {
        statusTextLabel->setEnabled(true);
        statusTextFont.setItalic(false);
    } else {
        statusTextLabel->setDisabled(true);
        statusTextFont.setItalic(true);
    }
    if (isSelected) {
        statusTextLabelPalette.setColor(QPalette::Text, statusTextLabelPalette.color(QPalette::Active, QPalette::HighlightedText));
    }
    statusTextLabel->setPalette(statusTextLabelPalette);
    statusTextLabel->setFont(statusTextFont);
    statusTextLabel->setText(statusText);
    statusTextLabel->setFixedSize(statusTextLabel->fontMetrics().boundingRect(statusText).width(),
                                  statusTextLabel->height());
    int statusTextLabelLeftMargin = contentRect.right() - statusTextLabel->width();
    int statusTextLabelTopMargin = (outerRect.height() - statusTextLabel->height()) / 2;
    statusTextLabel->move(statusTextLabelLeftMargin, statusTextLabelTopMargin);


    // statusIconLabel
    statusIconLabel->setPixmap(statusIcon.pixmap(KIconLoader::SizeSmall));
//.........这里部分代码省略.........
开发者ID:KDE,项目名称:ktp-accounts-kcm,代码行数:101,代码来源:accounts-list-delegate.cpp


示例9: displayName

void TypeConstraint::verifyFail(const Func* func, TypedValue* tv,
                                int id, bool useStrictTypes) const {
  VMRegAnchor _;
  std::string name = displayName(func);
  auto const givenType = describe_actual_type(tv, isHHType());

  if (UNLIKELY(!useStrictTypes)) {
    if (auto dt = underlyingDataType()) {
      // In non-strict mode we may be able to coerce a type failure. For object
      // typehints there is no possible coercion in the failure case, but HNI
      // builtins currently only guard on kind not class so the following wil
      // generate false positives for objects.
      if (*dt != KindOfObject) {
        // HNI conversions implicitly unbox references, this behavior is wrong,
        // in particular it breaks the way type conversion works for PHP 7
        // scalar type hints
        if (tv->m_type == KindOfRef) {
          auto inner = tv->m_data.pref->var()->asTypedValue();
          if (tvCoerceParamInPlace(inner, *dt)) {
            tvAsVariant(tv) = tvAsVariant(inner);
            return;
          }
        } else {
          if (tvCoerceParamInPlace(tv, *dt)) return;
        }
      }
    }
  } else if (UNLIKELY(!func->unit()->isHHFile() &&
                      !RuntimeOption::EnableHipHopSyntax)) {
    // PHP 7 allows for a widening conversion from Int to Float. We still ban
    // this in HH files.
    if (auto dt = underlyingDataType()) {
      if (*dt == KindOfDouble && tv->m_type == KindOfInt64 &&
          tvCoerceParamToDoubleInPlace(tv)) {
        return;
      }
    }
  }

  // Handle return type constraint failures
  if (id == ReturnId) {
    std::string msg;
    if (func->isClosureBody()) {
      msg =
        folly::format(
          "Value returned from {}closure must be of type {}, {} given",
          func->isAsync() ? "async " : "",
          name,
          givenType
        ).str();
    } else {
      msg =
        folly::format(
          "Value returned from {}{} {}() must be of type {}, {} given",
          func->isAsync() ? "async " : "",
          func->preClass() ? "method" : "function",
          func->fullName(),
          name,
          givenType
        ).str();
    }
    if (RuntimeOption::EvalCheckReturnTypeHints >= 2 && !isSoft()) {
      raise_return_typehint_error(msg);
    } else {
      raise_warning_unsampled(msg);
    }
    return;
  }

  // Handle implicit collection->array conversion for array parameter type
  // constraints
  auto c = tvToCell(tv);
  if (isArray() && !isSoft() && !func->mustBeRef(id) &&
      c->m_type == KindOfObject && c->m_data.pobj->isCollection()) {
    // To ease migration, the 'array' type constraint will implicitly cast
    // collections to arrays, provided the type constraint is not soft and
    // the parameter is not by reference. We raise a notice to let the user
    // know that there was a type mismatch and that an implicit conversion
    // was performed.
    raise_notice(
      folly::format(
        "Argument {} to {}() must be of type {}, {} given; argument {} was "
        "implicitly cast to array",
        id + 1, func->fullName(), name, givenType, id + 1
      ).str()
    );
    tvCastToArrayInPlace(tv);
    return;
  }

  // Handle parameter type constraint failures
  if (isExtended() && isSoft()) {
    // Soft extended type hints raise warnings instead of recoverable
    // errors, to ease migration.
    raise_warning_unsampled(
      folly::format(
        "Argument {} to {}() must be of type {}, {} given",
        id + 1, func->fullName(), name, givenType
      ).str()
    );
//.........这里部分代码省略.........
开发者ID:292388900,项目名称:hhvm,代码行数:101,代码来源:type-constraint.cpp


示例10: displayName

QString BareMetalGdbCommandsDeployStepWidget::summaryText() const
{
    return displayName();
}
开发者ID:C-sjia,项目名称:qt-creator,代码行数:4,代码来源:baremetalgdbcommandsdeploystep.cpp


示例11: openCtrl

void
openCtrl(struct display *d)
{
    CtrlRec *cr;
    const char *dname;
    char *sockdir;
    struct sockaddr_un sa;

    if (!*fifoDir)
        return;
    if (d)
        cr = &d->ctrl, dname = displayName(d);
    else
        cr = &ctrl, dname = 0;
    if (cr->fd < 0) {
        if (mkdir(fifoDir, 0755)) {
            if (errno != EEXIST) {
                logError("mkdir %\"s failed: %m; no control sockets will be available\n",
                         fifoDir);
                return;
            }
        } else {
            chmod(fifoDir, 0755); /* override umask */
        }
        sockdir = 0;
        strApp(&sockdir, fifoDir, dname ? "/dmctl-" : "/dmctl",
               dname, (char *)0);
        if (sockdir) {
            strApp(&cr->path, sockdir, "/socket", (char *)0);
            if (cr->path) {
                if (strlen(cr->path) >= sizeof(sa.sun_path)) {
                    logError("path %\"s too long; control socket will not be available\n",
                             cr->path);
#ifdef HONORS_SOCKET_PERMS
                } else if (mkdir(sockdir, 0700) && errno != EEXIST) {
                    logError("mkdir %\"s failed: %m; control socket will not be available\n",
                             sockdir);
                } else if (unlink(cr->path) && errno != ENOENT) {
                    logError("unlink %\"s failed: %m; control socket will not be available\n",
                             cr->path);
                } else {
#else
                } else if (unlink(sockdir) && errno != ENOENT) {
                    logError("unlink %\"s failed: %m; control socket will not be available\n",
                             sockdir);
                } else if (!strApp(&cr->realdir, sockdir, "-XXXXXX", (char *)0)) {
                } else if (!mkTempDir(cr->realdir)) {
                    logError("mkdir %\"s failed: %m; control socket will not be available\n",
                             cr->realdir);
                    free(cr->realdir);
                    cr->realdir = 0;
                } else if (symlink(cr->realdir, sockdir)) {
                    logError("symlink %\"s => %\"s failed: %m; control socket will not be available\n",
                             sockdir, cr->realdir);
                    rmdir(cr->realdir);
                    free(cr->realdir);
                    cr->realdir = 0;
                } else {
                    chown(sockdir, 0, d ? 0 : fifoGroup);
                    chmod(sockdir, 0750);
#endif
                    if ((cr->fd = socket(PF_UNIX, SOCK_STREAM, 0)) < 0) {
                        logError("Cannot create control socket: %m\n");
                    } else {
                        sa.sun_family = AF_UNIX;
                        strcpy(sa.sun_path, cr->path);
                        if (!bind(cr->fd, (struct sockaddr *)&sa, sizeof(sa))) {
                            if (!listen(cr->fd, 5)) {
#ifdef HONORS_SOCKET_PERMS
                                chmod(cr->path, 0660);
                                if (!d)
                                    chown(cr->path, -1, fifoGroup);
                                chmod(sockdir, 0755);
#else
                                chmod(cr->path, 0666);
#endif
                                registerCloseOnFork(cr->fd);
                                registerInput(cr->fd);
                                free(sockdir);
                                return;
                            }
                            unlink(cr->path);
                            logError("Cannot listen on control socket %\"s: %m\n",
                                     cr->path);
                        } else {
                            logError("Cannot bind control socket %\"s: %m\n",
                                     cr->path);
                        }
                        close(cr->fd);
                        cr->fd = -1;
                    }
#ifdef HONORS_SOCKET_PERMS
                    rmdir(sockdir);
#else
                    unlink(sockdir);
                    rmdir(cr->realdir);
                    free(cr->realdir);
                    cr->realdir = 0;
#endif
                }
//.........这里部分代码省略.........
开发者ID:mleduque,项目名称:kwin-tiling,代码行数:101,代码来源:ctrl.c


示例12: getMemberList

void NamespaceDef::writeMemberDocumentation(OutputList &ol,MemberListType lt,const QCString &title)
{
    MemberList * ml = getMemberList(lt);
    if (ml) ml->writeDocumentation(ol,displayName(),this,title);
}
开发者ID:LianYangCn,项目名称:doxygen,代码行数:5,代码来源:namespacedef.cpp


示例13: fileLoading

void sf2Instrument::openFile( const QString & _sf2File, bool updateTrackName )
{
	emit fileLoading();

	// Used for loading file
	char * sf2Ascii = qstrdup( qPrintable( SampleBuffer::tryToMakeAbsolute( _sf2File ) ) );
	QString relativePath = SampleBuffer::tryToMakeRelative( _sf2File );

	// free reference to soundfont if one is selected
	freeFont();

	m_synthMutex.lock();
	s_fontsMutex.lock();

	// Increment Reference
	if( s_fonts.contains( relativePath ) )
	{
		qDebug() << "Using existing reference to " << relativePath;

		m_font = s_fonts[ relativePath ];

		m_font->refCount++;

		m_fontId = fluid_synth_add_sfont( m_synth, m_font->fluidFont );
	}

	// Add to map, if doesn't exist.
	else
	{
		m_fontId = fluid_synth_sfload( m_synth, sf2Ascii, true );

		if( fluid_synth_sfcount( m_synth ) > 0 )
		{
			// Grab this sf from the top of the stack and add to list
			m_font = new sf2Font( fluid_synth_get_sfont( m_synth, 0 ) );
			s_fonts.insert( relativePath, m_font );
		}
		else
		{
			collectErrorForUI( sf2Instrument::tr( "A soundfont %1 could not be loaded." ).arg( QFileInfo( _sf2File ).baseName() ) );
			// TODO: Why is the filename missing when the file does not exist?
		}
	}

	s_fontsMutex.unlock();
	m_synthMutex.unlock();

	if( m_fontId >= 0 )
	{
		// Don't reset patch/bank, so that it isn't cleared when
		// someone resolves a missing file
		//m_patchNum.setValue( 0 );
		//m_bankNum.setValue( 0 );
		m_filename = relativePath;

		emit fileChanged();
	}

	delete[] sf2Ascii;

	if( updateTrackName || instrumentTrack()->displayName() == displayName() )
	{
		instrumentTrack()->setName( QFileInfo( _sf2File ).baseName() );
	}
}
开发者ID:Lukas-W,项目名称:lmms,代码行数:65,代码来源:sf2_player.cpp


示例14: DatabaseDetails

DatabaseDetails DatabaseBackendBase::details() const
{
    // This code path is only used for database quota delegate calls, so file dates are irrelevant and left uninitialized.
    return DatabaseDetails(stringIdentifier(), displayName(), estimatedSize(), 0, 0, 0);
}
开发者ID:AndriyKalashnykov,项目名称:webkit,代码行数:5,代码来源:DatabaseBackendBase.cpp


示例15: BuildStep

BareMetalGdbCommandsDeployStep::BareMetalGdbCommandsDeployStep(BuildStepList *bsl)
    : BuildStep(bsl, stepId())
{
    setDefaultDisplayName(displayName());
}
开发者ID:choenig,项目名称:qt-creator,代码行数:5,代码来源:baremetalgdbcommandsdeploystep.cpp


示例16: displayName

QString WinRtPackageDeploymentStepWidget::summaryText() const
{
    return displayName();
}
开发者ID:AgnosticPope,项目名称:qt-creator,代码行数:4,代码来源:winrtpackagedeploymentstepwidget.cpp


示例17: target

QString QmakeBuildConfiguration::defaultShadowBuildDirectory() const
{
    // todo displayName isn't ideal
    return QmakeProject::shadowBuildDirectory(target()->project()->projectFilePath().toString(),
                                              target()->kit(), displayName());
}
开发者ID:OnlineCop,项目名称:qt-creator,代码行数:6,代码来源:qmakebuildconfiguration.cpp


示例18: ARRAYSIZE

void AGOSEngine_Waxworks::boxController(uint x, uint y, uint mode) {
	HitArea *best_ha;
	HitArea *ha = _hitAreas;
	uint count = ARRAYSIZE(_hitAreas);
	uint16 priority = 0;
	uint16 x_ = x;
	uint16 y_ = y;

	if (getGameType() == GType_FF || getGameType() == GType_PP) {
		x_ += _scrollX;
		y_ += _scrollY;
	} else if (getGameType() == GType_SIMON2) {
		if (getBitFlag(79) || y < 134) {
			x_ += _scrollX * 8;
		}
	}

	best_ha = NULL;

	do {
		if (ha->flags & kBFBoxInUse) {
			if (!(ha->flags & kBFBoxDead)) {
				if (x_ >= ha->x && y_ >= ha->y &&
						x_ - ha->x < ha->width && y_ - ha->y < ha->height && priority <= ha->priority) {
					priority = ha->priority;
					best_ha = ha;
				} else {
					if (ha->flags & kBFBoxSelected) {
						hitarea_leave(ha , true);
						ha->flags &= ~kBFBoxSelected;
					}
				}
			} else {
				ha->flags &= ~kBFBoxSelected;
			}
		}
	} while (ha++, --count);

	_currentBoxNum = 0;
	_currentBox = best_ha;

	if (best_ha == NULL) {
		clearName();
		if (getGameType() == GType_WW && _mouseCursor >= 4) {
			_mouseCursor = 0;
			_needHitAreaRecalc++;
		}
		return;
	}

	_currentBoxNum = best_ha->id;

	if (mode != 0) {
		if (mode == 3) {
			if (best_ha->flags & kBFDragBox) {
				_lastClickRem = best_ha;
			}
		} else {
			_lastHitArea = best_ha;
			if (getGameType() == GType_PP) {
				_variableArray[400] = x;
				_variableArray[401] = y;
			} else if (getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2 ||
				getGameType() == GType_FF) {
				_variableArray[1] = x;
				_variableArray[2] = y;
			}
		}
	}

	if ((getGameType() == GType_WW) && (_mouseCursor == 0 || _mouseCursor >= 4)) {
		uint verb = best_ha->verb & 0x3FFF;
		if (verb >= 239 && verb <= 242) {
			uint cursor = verb - 235;
			if (_mouseCursor != cursor) {
				_mouseCursor = cursor;
				_needHitAreaRecalc++;
			}
		}
	}

	if (getGameType() != GType_WW || !_nameLocked) {
		if (best_ha->flags & kBFNoTouchName) {
			clearName();
		} else if (best_ha != _lastNameOn) {
			displayName(best_ha);
		}
	}

	if (best_ha->flags & kBFInvertTouch && !(best_ha->flags & kBFBoxSelected)) {
		hitarea_leave(best_ha, false);
		best_ha->flags |= kBFBoxSelected;
	}
}
开发者ID:AdamRi,项目名称:scummvm-pink,代码行数:94,代码来源:verb.cpp


示例19: maxSamplerate

void LadspaEffect::pluginInstantiation()
{
	m_maxSampleRate = maxSamplerate( displayName() );

	ladspa2LMMS * manager = engine::getLADSPAManager();

	// Calculate how many processing units are needed.
	const ch_cnt_t lmms_chnls = engine::mixer()->audioDev()->channels();
	int effect_channels = manager->getDescription( m_key )->inputChannels;
	setProcessorCount( lmms_chnls / effect_channels );

	// Categorize the ports, and create the buffers.
	m_portCount = manager->getPortCount( m_key );

	for( ch_cnt_t proc = 0; proc < processorCount(); proc++ )
	{
		multi_proc_t ports;
		for( int port = 0; port < m_portCount; port++ )
		{
			port_desc_t * p = new PortDescription;

			p->name = manager->getPortName( m_key, port );
			p->proc = proc;
			p->port_id = port;
			p->control = NULL;

			// Determine the port's category.
			if( manager->isPortAudio( m_key, port ) )
			{
				// Nasty manual memory management--was having difficulty
				// with some prepackaged plugins that were segfaulting
				// during cleanup.  It was easier to troubleshoot with the
				// memory management all taking place in one file.
				p->buffer = 
					new LADSPA_Data[engine::mixer()->framesPerPeriod()];

				if( p->name.toUpper().contains( "IN" ) &&
					manager->isPortInput( m_key, port ) )
				{
					p->rate = CHANNEL_IN;
				}
				else if( p->name.toUpper().contains( "OUT" ) &&
					manager->isPortOutput( m_key, port ) )
				{
					p->rate = CHANNEL_OUT;
				}
				else if( manager->isPortInput( m_key, port ) )
				{
					p->rate = AUDIO_RATE_INPUT;
				}
				else
				{
					p->rate = AUDIO_RATE_OUTPUT;
				}
			}
			else
			{
				p->buffer = new LADSPA_Data[1];

				if( manager->isPortInput( m_key, port ) )
				{
					p->rate = CONTROL_RATE_INPUT;
				}
				else
				{
					p->rate = CONTROL_RATE_OUTPUT;
				}
			}

			p->scale = 1.0f;
			if( manager->isPortToggled( m_key, port ) )
			{
				p->data_type = TOGGLED;
			}
			else if( manager->isInteger( m_key, port ) )
			{
				p->data_type = INTEGER;
			}
			else if( p->name.toUpper().contains( "(SECONDS)" ) )
			{
				p->data_type = TIME;
				p->scale = 1000.0f;
				int loc = p->name.toUpper().indexOf(
								"(SECONDS)" );
				p->name.replace( loc, 9, "(ms)" );
			}
			else if( p->name.toUpper().contains( "(S)" ) )
			{
				p->data_type = TIME;
				p->scale = 1000.0f;
				int loc = p->name.toUpper().indexOf( "(S)" );
				p->name.replace( loc, 3, "(ms)" );
			}
			else if( p->name.toUpper().contains( "(MS)" ) )
			{
				p->data_type = TIME;
				int loc = p->name.toUpper().indexOf( "(MS)" );
				p->name.replace( loc, 4, "(ms)" );
			}
			else
//.........这里部分代码省略.........
开发者ID:CallisteHanriat,项目名称:lmms,代码行数:101,代码来源:LadspaEffect.cpp


示例20: qDebug

Account::~Account()
{
    qDebug() << "Account" << displayName() << "deleted";
    delete _credentials;
    delete _am;
}
开发者ID:ronynksoft,项目名称:client,代码行数:6,代码来源:account.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ displayText函数代码示例发布时间:2022-05-31
下一篇:
C++ displayMessage函数代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap