本文整理汇总了C++中TFilePathSet::push_back方法的典型用法代码示例。如果您正苦于以下问题:C++ TFilePathSet::push_back方法的具体用法?C++ TFilePathSet::push_back怎么用?C++ TFilePathSet::push_back使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TFilePathSet
的用法示例。
在下文中一共展示了TFilePathSet::push_back方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getBrushesDirs
TFilePathSet TMyPaintBrushStyle::getBrushesDirs() {
TFilePathSet paths;
paths.push_back(m_libraryDir + "mypaint brushes");
QStringList genericLocations = QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation);
for(QStringList::iterator i = genericLocations.begin(); i != genericLocations.end(); ++i)
paths.push_back(TFilePath(*i) + "mypaint" + "brushes");
return paths;
}
示例2: getSystemVarPathSetValue
TFilePathSet TEnv::getSystemVarPathSetValue(std::string varName) {
TFilePathSet lst;
std::string value = EnvGlobals::instance()->getSystemVarValue(varName);
int len = (int)value.size();
int i = 0;
int j = value.find(';');
while (j != std::string::npos) {
std::string s = value.substr(i, j - i);
lst.push_back(TFilePath(s));
i = j + 1;
if (i >= len) return lst;
j = value.find(';', i);
}
if (i < len) lst.push_back(TFilePath(value.substr(i)));
return lst;
}
示例3: getDisks
TFilePathSet TSystem::getDisks() {
TFilePathSet filePathSet;
QFileInfoList fil = QDir::drives();
int i;
for (i = 0; i < fil.size(); i++)
filePathSet.push_back(TFilePath(fil.at(i).filePath().toStdWString()));
return filePathSet;
}
示例4: getSystemVarPathSetValue
TFilePathSet TEnv::getSystemVarPathSetValue(std::string varName) {
TFilePathSet lst;
EnvGlobals *eg = EnvGlobals::instance();
// if the path is registered by command line argument, then use it
std::string value = eg->getArgPathValue(varName);
if (value == "") value = eg->getSystemVarValue(varName);
int len = (int)value.size();
int i = 0;
int j = value.find(';');
while (j != std::string::npos) {
std::string s = value.substr(i, j - i);
lst.push_back(TFilePath(s));
i = j + 1;
if (i >= len) return lst;
j = value.find(';', i);
}
if (i < len) lst.push_back(TFilePath(value.substr(i)));
return lst;
}
示例5: readDirectoryTree
void TSystem::readDirectoryTree(TFilePathSet &dst, const TFilePath &path,
bool groupFrames, bool onlyFiles) {
if (!TFileStatus(path).isDirectory())
throw TSystemException(path, " is not a directory");
QFileInfoList fil = QDir(toQString(path)).entryInfoList();
int i;
for (i = 0; i < fil.size(); i++) {
QFileInfo fi = fil.at(i);
if (fi.fileName() == QString(".") || fi.fileName() == QString(".."))
continue;
TFilePath son = TFilePath(fi.filePath().toStdWString());
if (TFileStatus(son).isDirectory()) {
if (!onlyFiles) dst.push_back(son);
readDirectoryTree(dst, son, groupFrames, onlyFiles);
} else
dst.push_back(son);
}
}