本文整理汇总了C++中CWizStdStringArray::end方法的典型用法代码示例。如果您正苦于以下问题:C++ CWizStdStringArray::end方法的具体用法?C++ CWizStdStringArray::end怎么用?C++ CWizStdStringArray::end使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CWizStdStringArray
的用法示例。
在下文中一共展示了CWizStdStringArray::end方法的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;
}
示例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);
}
}
示例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);
}
示例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;
}
示例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;
}
示例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);
}
示例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();
}
示例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());
}
}
示例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);
}
}
示例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);
}