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

C++ category函数代码示例

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

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



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

示例1: categoryCount

/*!
    \internal
*/
int QDesignerWidgetBoxInterface::findOrInsertCategory(const QString &categoryName)
{
    int count = categoryCount();
    for (int index=0; index<count; ++index) {
        Category c = category(index);
        if (c.name() == categoryName)
            return index;
    }

    addCategory(Category(categoryName));
    return count;
}
开发者ID:Smarre,项目名称:qtjambi,代码行数:15,代码来源:abstractwidgetbox.cpp


示例2: category

//
//    Save
//    ====
//
//    Save the information for this object to the AuditDataFile
//
bool CLocaleScanner::SaveData	(CAuditDataFile* pAuditDataFile)
{
	CLogFile log;
	log.Write("CLocaleScanner::SaveData Start" ,true);

	CString strValue;

	// Add the Category for memory
	CAuditDataFileCategory category(HARDWARE_CLASS);

	// Each audited item gets added an a CAuditDataFileItem to the category
	CAuditDataFileItem l1(V_LOCALE_CODEPAGE ,m_iCodePage);
	CAuditDataFileItem l2(V_LOCALE_CALENDARTYPE ,m_strCalendarType);
	CAuditDataFileItem l3(V_LOCALE_COUNTRY ,m_strCountry);
	CAuditDataFileItem l4(V_LOCALE_COUNTRYCODE ,m_iCountryCode);
	CAuditDataFileItem l5(V_LOCALE_CURRENCY ,m_strCurrency);
	CAuditDataFileItem l6(V_LOCALE_DATEFORMAT ,m_strDateFormat);
	CAuditDataFileItem l7(V_LOCALE_LANGUAGE ,m_strLanguage);
	CAuditDataFileItem l8(V_LOCALE_LOCALLANGUAGE ,m_strLocaleLocalLanguage);
	CAuditDataFileItem l9(V_LOCALE_OEM_CODEPAGE ,m_iOEMCodePage);
	CAuditDataFileItem l10(V_LOCALE_TIMEFORMAT ,m_strTimeFormat);
	CAuditDataFileItem l11(V_LOCALE_TIMEFORMATSPECIFIER ,m_strTimeFormatSpecifier);
	CAuditDataFileItem l12(V_LOCALE_TIMEZONE ,m_strLocaleTimeZone);

	// Add the items to the category
	category.AddItem(l1);
	category.AddItem(l2);
	category.AddItem(l3);
	category.AddItem(l4);
	category.AddItem(l5);
	category.AddItem(l6);
	category.AddItem(l7);
	category.AddItem(l8);
	category.AddItem(l9);
	category.AddItem(l10);
	category.AddItem(l11);
	category.AddItem(l12);

	// ...and add the category to the AuditDataFile
	pAuditDataFile->AddAuditDataFileItem(category);

	// we always need to get the default browser details so do here
	CAuditDataFileCategory browserCategory("Internet|Browsers|Default Browser", FALSE, TRUE);
	CAuditDataFileItem b1("Path", GetRegValue("HKEY_CLASSES_ROOT\\http\\shell\\open\\command", ""));
	browserCategory.AddItem(b1);

	pAuditDataFile->AddInternetItem(browserCategory);


	log.Write("CLocaleScanner::SaveData End" ,true);
	return true;
}
开发者ID:sambasivarao,项目名称:AW-master,代码行数:58,代码来源:LocaleScanner.cpp


示例3: zeus

void MainController::newMedia(QString name)
{
    if(!medias().contains(qMakePair(m_mw->currentCategory(),name)))
    {
        MediaSPointer zeus(new Media);
        zeus->setName(name);
        zeus->setCategory(AbstractController::category(m_mw->currentCategory()).data());
        category(m_mw->currentCategory())->addAssociations(zeus);
        addMedia(zeus);
        setCurrentTable(m_mw->currentCategory());
        m_mw->setCurrentMedia(name);
    }
}
开发者ID:Chewnonobelix,项目名称:ProduitMedia,代码行数:13,代码来源:maincontroller.cpp


示例4: category

void TTSStyleActions::generateActions(QVector<int> & styles, const int current)
{
    category()->setText(QCoreApplication::tr("Style"));
    actions_.clear();

    QVector<int>::const_iterator begin = styles.begin();
    QVector<int>::const_iterator end   = styles.end();
    for(QVector<int>::const_iterator iter = begin; iter != end; ++iter)
    {
        // The text
        QString text;
        QString icon_name(":/images/style_item.png");
        switch ( *iter )
        {
        case SPEAK_STYLE_CLEAR:
            text = QCoreApplication::tr("Clear");
            icon_name = ":/images/tts_clear.png";
            break;
        case SPEAK_STYLE_NORMAL:
            text = QCoreApplication::tr("Normal");
            icon_name = ":/images/tts_normal.png";
            break;
        case SPEAK_STYLE_PLAIN:
            text = QCoreApplication::tr("Plain");
            icon_name = ":/images/tts_plain.png";
            break;
        case SPEAK_STYLE_VIVID:
            text = QCoreApplication::tr("Vivid");
            icon_name = ":/images/tts_vivid.png";
            break;
        default:
            text = QCoreApplication::tr("Invalid Speed");
            break;
        }

        // Add to category automatically.
        shared_ptr<QAction> act(new QAction(text, exclusiveGroup()));

        // Change font and make it as checkable.
        act->setCheckable(true);
        act->setData(*iter);
        act->setIcon(QIcon(QPixmap(icon_name)));

        if ( *iter == current )
        {
            act->setChecked(true);
        }

        actions_.push_back(act);
    }
}
开发者ID:HeryLong,项目名称:booxsdk,代码行数:51,代码来源:tts_actions.cpp


示例5: tokenizer

/// Function to return all of the categories that contain this algorithm
const std::vector<std::string> AlgorithmProxy::categories() const {
  Poco::StringTokenizer tokenizer(category(), categorySeparator(),
                                  Poco::StringTokenizer::TOK_TRIM |
                                      Poco::StringTokenizer::TOK_IGNORE_EMPTY);

  std::vector<std::string> res(tokenizer.begin(), tokenizer.end());

  const DeprecatedAlgorithm *depo =
      dynamic_cast<const DeprecatedAlgorithm *>(this);
  if (depo != nullptr) {
    res.emplace_back("Deprecated");
  }
  return res;
}
开发者ID:Mantid-Test-Account,项目名称:mantid,代码行数:15,代码来源:AlgorithmProxy.cpp


示例6: iswspace_l

int
iswspace_l (wint_t c, struct __locale_t *locale)
{
#ifdef _MB_CAPABLE
  c = _jp2uc_l (c, locale);
  enum category cat = category (c);
  // exclude "<noBreak>"?
  return cat == CAT_Zs
      || cat == CAT_Zl || cat == CAT_Zp // Line/Paragraph Separator
      || (c >= 0x9 && c <= 0xD);
#else
  return c < 0x100 ? isspace (c) : 0;
#endif /* _MB_CAPABLE */
}
开发者ID:Alexpux,项目名称:Cygwin,代码行数:14,代码来源:iswspace_l.c


示例7: tokenizer

/// Function to return all of the categories that contain this function
const std::vector<std::string> IFunction::categories() const
{
  std::vector < std::string > res;
  Poco::StringTokenizer tokenizer(category(), categorySeparator(),
      Poco::StringTokenizer::TOK_TRIM | Poco::StringTokenizer::TOK_IGNORE_EMPTY);
  Poco::StringTokenizer::Iterator h = tokenizer.begin();

  for (; h != tokenizer.end(); ++h)
  {
    res.push_back(*h);
  }

  return res;
}
开发者ID:jkrueger1,项目名称:mantid,代码行数:15,代码来源:IFunction.cpp


示例8: render_contact_method

static void
render_contact_method(G_GNUC_UNUSED GtkCellLayout *cell_layout,
                     GtkCellRenderer *cell,
                     GtkTreeModel *model,
                     GtkTreeIter *iter,
                     G_GNUC_UNUSED gpointer data)
{
    GValue value = G_VALUE_INIT;
    gtk_tree_model_get_value(model, iter, 0, &value);
    auto cm = (ContactMethod *)g_value_get_pointer(&value);

    gchar *number = nullptr;
    if (cm && cm->category()) {
        // try to get the number category, eg: "home"
        number = g_strdup_printf("(%s) %s", cm->category()->name().toUtf8().constData(),
                                            cm->uri().toUtf8().constData());
    } else if (cm) {
        number = g_strdup_printf("%s", cm->uri().toUtf8().constData());
    }

    g_object_set(G_OBJECT(cell), "text", number, NULL);
    g_free(number);
}
开发者ID:savoirfairelinux,项目名称:ring-client-gnome,代码行数:23,代码来源:chatview.cpp


示例9: TRACE_FUN

         void CIniImpl::parse()
         {
            TRACE_FUN( Routine, "CIniImpl::parse" );

            CLexScaner scaner( &stream() );
            CCategoryParserDriver driver( file(),
                                          scaner,
                                          category(),
                                          synchronization(),
                                          errorRepository() );

            parser theParser( driver );
            theParser.parse();
         }
开发者ID:L2-Max,项目名称:l2ChipTuner,代码行数:14,代码来源:l2TextIniDrv.cpp


示例10: MessageReceived

		void
		MessageReceived(BMessage* msg)
		{
			switch(msg->what)
			{
				case SAVE_TASK:
				{
					BString category("ALL");
					int32 selection=categories->CurrentSelection();
					if(selection>=0)
					{
						Category* cat=dynamic_cast<Category*>(categories->ItemAt(selection));
						category=cat->GetName();
					}
					bool rc=manager->AddTask(title->Text(),description->Text(),category);
					if(!rc)
					{
						BAlert* error=new BAlert("SAVING ERROR",
							"Oops, we can't save that in database",
							"OK",NULL,NULL,B_WIDTH_AS_USUAL, B_OFFSET_SPACING,
							 B_STOP_ALERT);
						error->Go();
					}
					//SEND RELOAD MESSAGE
					int32 count=be_app->CountWindows();
					for(int32 i=0;i<count;i++)
					{
						be_app->WindowAt(i)->PostMessage(new BMessage(RELOAD));
					}
				}
				case CANCEL:
				{
					Quit();
				}
				case CREATE_CATEGORY:
				{
					CreateCategory* create=new CreateCategory(manager);
					create->Show();
					PostMessage(new BMessage(RELOAD));
				}
				case RELOAD_CATEGORIES:
				{
					categories->MakeEmpty();
					manager->LoadCategories(categories);
				}
				default:
					BWindow::MessageReceived(msg);
			}
		}
开发者ID:AdrianArroyoCalle,项目名称:haiku-todo,代码行数:49,代码来源:AddTask.hpp


示例11: value

 JNIEXPORT jint JNICALL Java_org_geuz_onelab_Gmsh_setStringOption
 (JNIEnv *env, jobject obj, jstring c, jstring n, jstring v)
 {
   const char* tmp;
   tmp = env->GetStringUTFChars(v, NULL);
   const std::string value(tmp, strlen(tmp));
   env->ReleaseStringUTFChars(v, tmp);
   tmp = env->GetStringUTFChars(n, NULL);
   const std::string name(tmp, strlen(tmp));
   env->ReleaseStringUTFChars(n, tmp);
   tmp = env->GetStringUTFChars(c, NULL);
   std::string category(tmp, strlen(tmp));
   env->ReleaseStringUTFChars(c, tmp);
   GmshSetOption(category, name, value, 0);
 }
开发者ID:feelpp,项目名称:debian-gmsh,代码行数:15,代码来源:androidGModel.cpp


示例12: category

/// Generate all supported font family here.
void FontFamilyActions::generateActions(const QString &font_family,
                                        bool scan_others)
{
    category()->setFont(actionFont());
    category()->setText(QCoreApplication::tr("Font Family"));
    actions_.clear();

    QFontDatabase fdb;
    if (scan_others)
    {
        // Scan both internal flash and sd card.
        loadExternalFonts(&fonts_);
    }

    QStringList list;
    list =  fdb.families();

    foreach (QString family, list)
    {
        // Add to category automatically.
        shared_ptr<QAction> act(new QAction(family, exclusiveGroup()));

        // Change font and set it as checkable.
        act->setFont(QFont(family));
        act->setCheckable(true);
        act->setData(family);
        act->setIcon(QIcon(QPixmap(":/images/font_family_item.png")));

        if (family == font_family)
        {
            act->setChecked(true);
            font_family_ = font_family;
        }

        actions_.push_back(act);
    }
开发者ID:HeryLong,项目名称:booxsdk,代码行数:37,代码来源:font_family_actions.cpp


示例13: equal

bool internal_node::equal(const node& other) const
{
    if (other.is_leaf() || category() != other.category())
        return false;

    const auto& internal = other.as<internal_node>();

    if (num_children() != internal.num_children())
        return false;

    bool ret = true;
    for (size_t i = 0; i < num_children(); ++i)
        ret &= children_[i]->equal(*internal.children_[i]);
    return ret;
}
开发者ID:MGKhKhD,项目名称:meta,代码行数:15,代码来源:internal_node.cpp


示例14: day

void SatellitesMSCItem::setDescription()
{
    QString description =
      QObject::tr( "Object name: %1 <br />"
                   "Category: %2 <br />"
                   "Pericentre: %3 km<br />"
                   "Apocentre: %4 km<br />"
                   "Inclination: %5 Degree<br />"
                   "Revolutions per day (24h): %6" )
        .arg( name(), category(), QString::number( m_perc, 'f', 2 ),
                                  QString::number( m_apoc, 'f', 2 ),
                                  QString::number( m_inc, 'f', 2 ),
                                  QString::number( m_n0, 'f', 2 ) );
     placemark()->setDescription( description );
}
开发者ID:ashish173,项目名称:marble,代码行数:15,代码来源:SatellitesMSCItem.cpp


示例15: category

IseServerInspector::CommandItems PredefinedInspector::getItems() const
{
    typedef IseServerInspector::CommandItem CommandItem;
    typedef IseServerInspector::CommandItems CommandItems;

    string category("proc");
    CommandItems items;

    items.push_back(CommandItem(category, "basic_info", PredefinedInspector::getBasicInfo, "show the basic info."));
    items.push_back(CommandItem(category, "status", PredefinedInspector::getProcStatus, "print /proc/self/status."));
    items.push_back(CommandItem(category, "opened_file_count", PredefinedInspector::getOpenedFileCount, "count /proc/self/fd."));
    items.push_back(CommandItem(category, "thread_count", PredefinedInspector::getThreadCount, "count /proc/self/task."));

    return items;
}
开发者ID:Elvins,项目名称:ise,代码行数:15,代码来源:ise_inspector.cpp


示例16: tokenizer

/// Function to return all of the categories that contain this algorithm
const std::vector<std::string> AlgorithmProxy::categories() const {
    Mantid::Kernel::StringTokenizer tokenizer(
        category(), categorySeparator(),
        Mantid::Kernel::StringTokenizer::TOK_TRIM |
        Mantid::Kernel::StringTokenizer::TOK_IGNORE_EMPTY);

    auto res = tokenizer.asVector();

    const DeprecatedAlgorithm *depo =
        dynamic_cast<const DeprecatedAlgorithm *>(this);
    if (depo != nullptr) {
        res.emplace_back("Deprecated");
    }
    return res;
}
开发者ID:mducle,项目名称:mantid,代码行数:16,代码来源:AlgorithmProxy.cpp


示例17: loadAllAvailableActions

void KviActionManager::listActionsByCategory(const QString &szCatName,KviPointerList<KviAction> * pBuffer)
{
	loadAllAvailableActions();
	KviActionCategory * pCat = category(szCatName);
	pBuffer->setAutoDelete(false);
	pBuffer->clear();
	if(!pCat)return;
	KviPointerHashTableIterator<QString,KviAction> it(*m_pActions);
	while(KviAction * a = it.current())
	{
		if(a->category() == pCat)
			pBuffer->append(a);
		++it;
	}
}
开发者ID:DINKIN,项目名称:KVIrc,代码行数:15,代码来源:KviActionManager.cpp


示例18: foreach

void MainController::editMedia()
{
    QString ares; //category name
    QString athena; //media name
    MediaSPointer gaia;

    if(m_mw->currentCategory() == tr("Search..."))
    {
        ares = m_mw->currentMedia().split("/").last();
        athena = m_mw->currentMedia().split("/").first();

        foreach(auto artemis, m_search.results())
            if(artemis->name() == athena && artemis->category()->name() == ares)
                gaia = artemis;
    }
开发者ID:Chewnonobelix,项目名称:ProduitMedia,代码行数:15,代码来源:maincontroller.cpp


示例19: category

QMap<int, QVariant> Package::itemData() const {
    QMap<int, QVariant> map = TransferItem::itemData();
    map[CategoryRole] = category();
    map[CreateSubfolderRole] = createSubfolder();
    map[ErrorStringRole] = errorString();
    map[IdRole] = id();
    map[NameRole] = name();
    map[PriorityRole] = priority();
    map[PriorityStringRole] = priorityString();
    map[ProgressRole] = progress();
    map[ProgressStringRole] = progressString();
    map[StatusRole] = status();
    map[StatusStringRole] = statusString();
    map[SuffixRole] = suffix();
    return map;
}
开发者ID:marxoft,项目名称:qdl2,代码行数:16,代码来源:package.cpp


示例20: category

  SmartPointer<CommandCategory> CommandManager::GetCategory(const std::string& categoryId) {
    if (categoryId.empty()) {
      return this->GetCategory(AUTOGENERATED_CATEGORY_ID);
    }

    this->CheckId(categoryId);

    CommandCategory::Pointer category(categoriesById[categoryId]);
    if (!category) {
      category = new CommandCategory(categoryId);
      categoriesById[categoryId] = category;
      category->AddCategoryListener(categoryListener);
    }

    return category;
  }
开发者ID:test-fd301,项目名称:MITK,代码行数:16,代码来源:berryCommandManager.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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