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


C++ CWizStdStringArray::begin方法代码示例

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


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

示例1: document_downloadFullListEx

BOOL CWizKMDatabaseServer::document_downloadFullListEx(const CWizStdStringArray& arrayDocumentGUID, std::deque<WIZDOCUMENTDATAEX>& arrayRet)
{
    int nCountPerPage = 30;
    //
    CWizStdStringArray::const_iterator it = arrayDocumentGUID.begin();
    //
    while (1)
    {
        //
        CWizStdStringArray subArray;
        //
        for (;
            it != arrayDocumentGUID.end(); )
        {
            subArray.push_back(*it);
            it++;
            //
            if (subArray.size() == nCountPerPage)
                break;
        }
        //
        std::deque<WIZDOCUMENTDATAEX> subRet;
        if (!document_downloadFullList(subArray, subRet))
            return FALSE;
        //
        arrayRet.insert(arrayRet.end(), subRet.begin(), subRet.end());
        //
        if (it == arrayDocumentGUID.end())
            break;
    }
    //
    return TRUE;
}
开发者ID:Onekr,项目名称:WizQTClient,代码行数:33,代码来源:wizkmxmlrpc.cpp

示例2: setUsers

void CWizLoginDialog::setUsers(const QString& strDefault)
{
    CWizStdStringArray usersFolder;
    ::WizEnumFolders(::WizGetDataStorePath(), usersFolder, 0);

    for(CWizStdStringArray::const_iterator it = usersFolder.begin();
        it != usersFolder.end(); it++)
    {
        QString strPath = *it;
        QString strUserId = ::WizFolderNameByPath(strPath);

        QRegExp mailRex("\\b[A-Z0-9._%+-][email protected][A-Z0-9.-]+\\.[A-Z]{2,4}\\b");
        mailRex.setCaseSensitivity(Qt::CaseInsensitive);

        if (!mailRex.exactMatch(strUserId))
            continue;

        if (!QFile::exists(strPath + "data/index.db"))
            continue;

        m_comboUsers->addItem(strUserId);
    }

    // set default user as default login entry.
    int i = m_comboUsers->findText(strDefault);
    if (-1 == i) {
        m_comboUsers->insertItem(0, NULL, strDefault);
        m_comboUsers->setCurrentIndex(0);
    } else {
        m_comboUsers->setCurrentIndex(i);
    }
}
开发者ID:Onekr,项目名称:WizQTClient,代码行数:32,代码来源:wizLoginDialog.cpp

示例3: initFolders

void CWizFolderView::initFolders()
{
    CWizCategoryViewAllFoldersItem* pAllFoldersItem = new CWizCategoryViewAllFoldersItem(m_app, tr("Note Folders"), m_dbMgr.db().kbGUID());
    addTopLevelItem(pAllFoldersItem);

    CWizStdStringArray arrayAllLocation;
    m_dbMgr.db().GetAllLocations(arrayAllLocation);

    // folder cache
    CWizStdStringArray arrayExtLocation;
    m_dbMgr.db().GetExtraFolder(arrayExtLocation);

    if (!arrayExtLocation.empty()) {
        for (CWizStdStringArray::const_iterator it = arrayExtLocation.begin();
             it != arrayExtLocation.end();
             it++) {
            if (-1 == ::WizFindInArray(arrayAllLocation, *it)) {
                arrayAllLocation.push_back(*it);
            }
        }
    }

    if (arrayAllLocation.empty()) {
        arrayAllLocation.push_back(m_dbMgr.db().GetDefaultNoteLocation());
    }

    initFolders(pAllFoldersItem, "", arrayAllLocation);

    pAllFoldersItem->setExpanded(true);
    pAllFoldersItem->sortChildren(0, Qt::AscendingOrder);
}
开发者ID:AlanForeverAi,项目名称:WizQTClient,代码行数:31,代码来源:wizFolderView.cpp

示例4: setStringArray

bool WizXmlRpcArrayValue::setStringArray(const CWizStdStringArray& arrayData)
{
    CWizStdStringArray::const_iterator it;
    for (it = arrayData.begin(); it != arrayData.end(); it++)
	{
		add(new WizXmlRpcStringValue(*it));
    }

    return true;
}
开发者ID:JamesLinus,项目名称:WizQTClient,代码行数:10,代码来源:WizXmlRpc.cpp

示例5: SetStringArray

BOOL CWizXmlRpcArrayValue::SetStringArray(const CWizStdStringArray& arrayData)
{
	for (CWizStdStringArray::const_iterator it = arrayData.begin();
		it != arrayData.end();
		it++)
	{
		Add(new CWizXmlRpcStringValue(*it));
    }

	return TRUE;
}
开发者ID:dwdcth,项目名称:WizQTClient,代码行数:11,代码来源:wizxmlrpc.cpp

示例6: installOnLinux

GenericName[en_US.UTF-8]=WizNote\n\
";


void installOnLinux()
{
    QString appPath = Utils::PathResolve::appPath();
    QString strText = WizFormatString3(g_lpszDesktopFileName,
                                       appPath,
                                       QObject::tr("WizNote"),
                                       QObject::tr("WizNote"));
    //
    QString applicationsPath = QDir::homePath() + "/.local/share/applications/";
    ::WizEnsurePathExists(applicationsPath);
    //
    QString iconsBasePath = QDir::homePath() + "/.local/share/icons/hicolor/";
    ::WizEnsurePathExists(applicationsPath);
    //
    CWizStdStringArray arrayIconSize;
    arrayIconSize.push_back("16");
    arrayIconSize.push_back("32");
    arrayIconSize.push_back("48");
    arrayIconSize.push_back("64");
    arrayIconSize.push_back("128");
    arrayIconSize.push_back("256");
    for (CWizStdStringArray::const_iterator it = arrayIconSize.begin();
            it != arrayIconSize.end();
            it++)
    {
        QString iconSize = *it;
        QString iconPathName = iconSize + "x" + iconSize;
        QString iconFullPath = iconsBasePath + iconPathName + "/apps/";
        WizEnsurePathExists(iconFullPath);
        //
        QString resourceName = ":/logo_" + iconSize + ".png";
        QPixmap pixmap(resourceName);
        if (pixmap.isNull())
            continue;
        //
        pixmap.save(iconFullPath + "wiznote.png");
    }

    QString desktopFileName = applicationsPath + "wiznote.desktop";
    ::WizSaveUnicodeTextToUtf8File(desktopFileName, strText, false);
    //
    chmod(desktopFileName.toUtf8(), ACCESSPERMS);
}
开发者ID:jun-zhang,项目名称:WizQTClient,代码行数:47,代码来源:main.cpp

示例7: WizHtml2Zip

bool WizHtml2Zip(const QString& strHtml, const CWizStdStringArray& arrayResource, \
                 const QString& strMetaText, const QString& strZipFileName)
{
    CWizZipFile zip;
    if (!zip.open(strZipFileName))
        return false;

    QString strHtmlText = strHtml;
    if (strHtmlText.left(2) != " <!")
    {
        strHtmlText = "<!DOCTYPE html>" + strHtmlText;
    }
    CString strIndexFileName = Utils::PathResolve::tempPath() + WizIntToStr(GetTickCount()) + ".html";
    //if (!::WizSaveUnicodeTextToUnicodeFile(strIndexFileName, strHtml))
    if (!::WizSaveUnicodeTextToUtf8File(strIndexFileName, strHtmlText))
        return false;

    CString strMetaFileName = Utils::PathResolve::tempPath() + WizIntToStr(GetTickCount()) + ".xml";
    if (!::WizSaveUnicodeTextToUtf8File(strMetaFileName, strMetaText))
        return false;

    if (!zip.compressFile(strIndexFileName, "index.html"))
        return false;

    int failed = 0;

    if (!zip.compressFile(strMetaFileName, "meta.xml"))
        failed++;

    for (CWizStdStringArray::const_iterator it = arrayResource.begin();
        it != arrayResource.end();
        it++)
    {
        CString strFileName = *it;
        CString strNameInZip = "index_files/" + Utils::Misc::extractFileName(strFileName);
        if (!zip.compressFile(strFileName, strNameInZip))
        {
            failed++;
        }
    }

    return zip.close();
}
开发者ID:AlvaroSacari,项目名称:WizQTClient,代码行数:43,代码来源:wizhtml2zip.cpp

示例8: getUserPasswordPairs

void WelcomeDialog::getUserPasswordPairs()
{
    CWizStdStringArray usersFolder;
    ::WizEnumFolders(::WizGetDataStorePath(), usersFolder, 0);

    for(CWizStdStringArray::const_iterator iter = usersFolder.begin();
        iter != usersFolder.end();
        iter++)
    {
        QString strPath = *iter;
        QString strUserId = ::WizFolderNameByPath(strPath);

        if (strUserId.indexOf("@") == -1) {
            continue;
        }

        CWizUserSettings userSettings(strUserId);
        m_users.insert(strUserId, userSettings.password());
    }
}
开发者ID:badwtg1111,项目名称:WizQTClient,代码行数:20,代码来源:wizwelcomedialog.cpp

示例9: initFolders

void CWizFolderView::initFolders(QTreeWidgetItem* pParent,
                                 const QString& strParentLocation,
                                 const CWizStdStringArray& arrayAllLocation)
{
    CWizStdStringArray arrayLocation;
    CWizDatabase::GetChildLocations(arrayAllLocation, strParentLocation, arrayLocation);

    CWizStdStringArray::const_iterator it;
    for (it = arrayLocation.begin(); it != arrayLocation.end(); it++) {
        QString strLocation = *it;

        if (m_dbMgr.db().IsInDeletedItems(strLocation))
            continue;

        CWizCategoryViewFolderItem* pFolderItem = new CWizCategoryViewFolderItem(m_app, strLocation, m_dbMgr.db().kbGUID());
        pParent->addChild(pFolderItem);

        initFolders(pFolderItem, strLocation, arrayAllLocation);
    }
}
开发者ID:runforprogram,项目名称:WizQTClient,代码行数:20,代码来源:wizFolderView.cpp

示例10:

bool CWizHtmlCollector::Html2Zip(const QString& strExtResourcePath, \
                                 const QString& strMetaText, \
                                 const QString& strZipFileName)
{
    //CString strMainHtml(strHtml);
    //if (!Collect(strUrl, strMainHtml, true))
    //    return false;

    std::deque<WIZHTMLFILEDATA> arrayResource;
    m_files.GetAll(arrayResource);

    std::set<QString> files;
    std::deque<WIZHTMLFILEDATA>::const_iterator it;
    for (it = arrayResource.begin(); it != arrayResource.end(); it++) {
        files.insert(it->strFileName);
    }

    CWizStdStringArray arrayExtResource;
    if (!strExtResourcePath.isEmpty())
    {
        ::WizEnumFiles(strExtResourcePath, "*.*", arrayExtResource, 0);
        for (CWizStdStringArray::const_iterator it = arrayExtResource.begin();
            it != arrayExtResource.end();
            it++)
        {
            files.insert(*it);
        }
    }

    CString strRet;
    ::WizStringArrayToText(m_ret, strRet, "");

    CWizStdStringArray arrayAllResource;
    arrayAllResource.assign(files.begin(), files.end());

    return WizHtml2Zip(strRet, arrayAllResource, strMetaText, strZipFileName);
}
开发者ID:flyfire,项目名称:WizQTClient,代码行数:37,代码来源:wizhtmlcollector.cpp


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