本文整理汇总了C++中qfileinfolist::const_iterator::filePath方法的典型用法代码示例。如果您正苦于以下问题:C++ const_iterator::filePath方法的具体用法?C++ const_iterator::filePath怎么用?C++ const_iterator::filePath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类qfileinfolist::const_iterator
的用法示例。
在下文中一共展示了const_iterator::filePath方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: loadFromImages
void LoadVideoThread::loadFromImages()
{
qDebug() << "Start loading frames...";
QDir dirImages(filePath);
QFileInfoList listImages = dirImages.entryInfoList(QStringList() << "*.tif" << "*.tiff" << "*.jpg" << "*.png");
if (0 == listImages.count())
{
emit completeLoading(false);
}
else
{
QFileInfoList::const_iterator it = listImages.begin();
while(it != listImages.end())
{
cv::Mat frame = cv::imread(it->filePath().toStdString());
cv::Mat rgbFrame;
cv::cvtColor(frame, rgbFrame, CV_BGR2RGB);
gtv->appendFrame(rgbFrame);
it++;
}
emit completeLoading(true);
}
exit(0);
}
示例2: dir
// find default skins (resources)
static const Skins &defaultSkins() {
static Skins rc;
if (rc.empty()) {
const QString skinPath = QLatin1String(skinResourcePathC);
QString pattern = QLatin1String("*.");
pattern += QLatin1String(skinExtensionC);
const QDir dir(skinPath, pattern);
const QFileInfoList list = dir.entryInfoList(QDir::Dirs|QDir::NoDotAndDotDot, QDir::Name);
if (list.empty())
return rc;
const QFileInfoList::const_iterator lcend = list.constEnd();
for (QFileInfoList::const_iterator it = list.constBegin(); it != lcend; ++it)
rc.push_back(SkinNamePath(it->baseName(), it->filePath()));
}
return rc;
}
示例3: fileList
bool File::fileList(const String& dir, const String& file_pattern, StringList& output, bool full_path)
{
QDir d(dir.toQString(), file_pattern.toQString(), QDir::Name, QDir::Files);
QFileInfoList list = d.entryInfoList();
//clear and check if empty
output.clear();
if (list.empty())
{
return false;
}
//resize output
output.resize(list.size());
//fill output
UInt i = 0;
for (QFileInfoList::const_iterator it = list.constBegin(); it != list.constEnd(); ++it)
{
output[i++] = full_path ? it->filePath() : it->fileName();
}
return true;
}
示例4: dir
// find default skins (resources)
static const Skins &defaultSkins() {
static Skins rc;
if (rc.empty()) {
#ifdef DEFAULT_SKINS_FROM_RESOURCE
const QString skinPath = QLatin1String(skinResourcePathC);
#else
QString skinPath = QLibraryInfo::location(QLibraryInfo::PrefixPath);
skinPath += QDir::separator();
skinPath += QLatin1String("tools");
skinPath += QDir::separator();
skinPath += QLatin1String("qvfb");
#endif
QString pattern = QLatin1String("*.");
pattern += QLatin1String(skinExtensionC);
const QDir dir(skinPath, pattern);
const QFileInfoList list = dir.entryInfoList();
if (list.empty())
return rc;
const QFileInfoList::const_iterator lcend = list.constEnd();
for (QFileInfoList::const_iterator it = list.constBegin(); it != lcend; ++it)
rc.push_back(SkinNamePath(it->baseName(), it->filePath()));
}
return rc;
}