本文整理汇总了C++中QCStringList::count方法的典型用法代码示例。如果您正苦于以下问题:C++ QCStringList::count方法的具体用法?C++ QCStringList::count怎么用?C++ QCStringList::count使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QCStringList
的用法示例。
在下文中一共展示了QCStringList::count方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: commaSeparatedList
TQCString StubProcess::commaSeparatedList(QCStringList lst)
{
if (lst.count() == 0)
return TQCString("");
QCStringList::Iterator it = lst.begin();
TQCString str = *it;
for (it++; it!=lst.end(); it++)
{
str += ',';
str += *it;
}
return str;
}
示例2: initialize
void Qhp::initialize()
{
/*
<QtHelpProject version="1.0">
<namespace>mycompany.com.myapplication.1_0</namespace>
<virtualFolder>doc</virtualFolder>
<customFilter name="My Application 1.0">
<filterAttribute>myapp</filterAttribute>
<filterAttribute>1.0</filterAttribute>
</customFilter>
<filterSection>
<filterAttribute>myapp</filterAttribute>
<filterAttribute>1.0</filterAttribute>
..
*/
QCString nameSpace = Config_getString(QHP_NAMESPACE);
QCString virtualFolder = Config_getString(QHP_VIRTUAL_FOLDER);
m_doc.declaration("1.0", "UTF-8");
const char * rootAttributes[] =
{ "version", "1.0", 0 };
m_doc.open("QtHelpProject", rootAttributes);
m_doc.openCloseContent("namespace", nameSpace);
m_doc.openCloseContent("virtualFolder", virtualFolder);
// Add custom filter
QCString filterName = Config_getString(QHP_CUST_FILTER_NAME);
if (!filterName.isEmpty())
{
const char * tagAttributes[] =
{ "name", filterName, 0 };
m_doc.open("customFilter", tagAttributes);
QCStringList customFilterAttributes = QCStringList::split(' ', Config_getString(QHP_CUST_FILTER_ATTRS));
for (int i = 0; i < (int)customFilterAttributes.count(); i++)
{
m_doc.openCloseContent("filterAttribute", customFilterAttributes[i]);
}
m_doc.close("customFilter");
}
m_doc.open("filterSection");
// Add section attributes
QCStringList sectionFilterAttributes = QCStringList::split(' ',
Config_getString(QHP_SECT_FILTER_ATTRS));
if (!sectionFilterAttributes.contains("doxygen"))
{
sectionFilterAttributes << "doxygen";
}
for (int i = 0; i < (int)sectionFilterAttributes.count(); i++)
{
m_doc.openCloseContent("filterAttribute", sectionFilterAttributes[i]);
}
m_toc.open("toc");
// Add extra root node
QCString fullProjectname = getFullProjectName();
QCString indexFile = "index"+Doxygen::htmlFileExtension;
const char * const attributes[] =
{ "title", fullProjectname,
"ref", indexFile,
NULL
};
m_toc.open("section", attributes);
m_prevSectionTitle = getFullProjectName();
m_prevSectionLevel = 1;
m_sectionLevel = 1;
m_index.open("keywords");
m_files.open("files");
}
示例3: main
//.........这里部分代码省略.........
int n_y = 0;
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
CheckForCMDErrors(args);
QString wizardfile = args->getOption("w");
QString printfile = args->getOption("print");
QString pngfile = args->getOption("png");
bool print_and_exit = false;
if (printfile != "<none>") {
print_and_exit = true;
}
if (pngfile != "<none>") {
print_and_exit = true;
}
if (!print_and_exit) {
app.setMainWidget(kst);
QRect rect = KGlobalSettings::desktopGeometry(kst);
kst->resize(5 * rect.width() / 6, 5 * rect.height() / 6);
kst->show();
}
// get Y axis columns
ycolList = args->getOptionList("y");
matrixList = args->getOptionList("z");
yEqList = args->getOptionList("ye");
psdList = args->getOptionList("p");
hsList = args->getOptionList("h");
errorList = args->getOptionList("e");
// y axis or PSD specified, so the files are data files, not kst files.
n_y = ycolList.count() + psdList.count() + hsList.count() + yEqList.count() + matrixList.count();
if (n_y > 0) {
QString creatingEquations = i18n("Creating equations");
QString creatingCurves = i18n("Creating curves");
QString creatingPlots = i18n("Creating plots");
int count;
int handled;
kst->slotUpdateProgress( 0, 0, QString::null );
SetCMDOptions(args, in, n_y);
KstTopLevelViewPtr tlv = kst->activeView();
if (!tlv) {
// if there was no active view then we create one...
kst->newWindow(false);
tlv = kst->activeView();
}
if (!tlv) {
kstdError() << i18n("Can't create a view.") << endl;
return 0;
}
CreatePlots(in, tlv);
Kst2DPlotList plist = kstObjectSubList<KstViewObject, Kst2DPlot>(tlv->children());
i_plot = 0;
Kst2DPlotPtr plot = *plist.at(i_plot);
KstVCurveList vcurves = kstObjectSubList<KstBaseCurve,KstVCurve>(plot->Curves);