本文整理汇总了C++中TFilePath::getDots方法的典型用法代码示例。如果您正苦于以下问题:C++ TFilePath::getDots方法的具体用法?C++ TFilePath::getDots怎么用?C++ TFilePath::getDots使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TFilePath
的用法示例。
在下文中一共展示了TFilePath::getDots方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: readDirectory
/*! to retrieve the both lists with groupFrames option = on and off.
*/
void TSystem::readDirectory(TFilePathSet &groupFpSet, TFilePathSet &allFpSet,
const TFilePath &path) {
if (!TFileStatus(path).isDirectory())
throw TSystemException(path, " is not a directory");
std::set<TFilePath, CaselessFilepathLess> fileSet_group;
std::set<TFilePath, CaselessFilepathLess> fileSet_all;
QStringList fil =
QDir(toQString(path))
.entryList(QDir::Files | QDir::NoDotAndDotDot | QDir::Readable);
if (fil.size() == 0) return;
for (int i = 0; i < fil.size(); i++) {
QString fi = fil.at(i);
TFilePath son = path + TFilePath(fi.toStdWString());
// store all file paths
fileSet_all.insert(son);
// in case of the sequencial files
if (son.getDots() == "..") son = son.withFrame();
// store the group. insersion avoids duplication of the item
fileSet_group.insert(son);
}
groupFpSet.insert(groupFpSet.end(), fileSet_group.begin(),
fileSet_group.end());
allFpSet.insert(allFpSet.end(), fileSet_all.begin(), fileSet_all.end());
}
示例2: doRender
void RenderCommand::doRender(bool isPreview)
{
bool isWritable = true;
bool isMultiFrame;
/*-- 初期化処理。フレーム範囲の計算や、Renderの場合はOutputSettingsから保存先パスも作る --*/
if (!init(isPreview))
return;
if (m_fp.getDots() == ".") {
isMultiFrame = false;
TFileStatus fs(m_fp);
if (fs.doesExist())
isWritable = fs.isWritable();
} else {
isMultiFrame = true;
TFilePath dir = m_fp.getParentDir();
QDir qDir(QString::fromStdWString(dir.getWideString()));
QString levelName = QRegExp::escape(QString::fromStdWString(m_fp.getWideName()));
QString levelType = QString::fromStdString(m_fp.getType());
QString exp(levelName + ".[0-9]{1,4}." + levelType);
QRegExp regExp(exp);
QStringList list = qDir.entryList(QDir::Files);
QStringList livelFrames = list.filter(regExp);
int i;
for (i = 0; i < livelFrames.size() && isWritable; i++) {
TFilePath frame = dir + TFilePath(livelFrames[i].toStdWString());
if (frame.isEmpty() || !frame.isAbsolute())
continue;
TFileStatus fs(frame);
isWritable = fs.isWritable();
}
}
if (!isWritable) {
string str = "It is not possible to write the output: the file";
str += isMultiFrame ? "s are read only." : " is read only.";
MsgBox(WARNING, QString::fromStdString(str));
return;
}
ToonzScene *scene = 0;
TCamera *camera = 0;
try {
/*-- Xsheetノードに繋がっている各ラインごとに計算するモード。
MultipleRender で Schematic Flows または Fx Schematic Terminal Nodes が選択されている場合
--*/
if (m_multimediaRender && m_fp.getType() != "swf") //swf is not currently supported on multimedia...
multimediaRender();
else if (!isPreview && m_fp.getType() == "swf")
flashRender();
else
/*-- 通常のRendering --*/
rasterRender(isPreview);
} catch (TException &e) {
MsgBox(WARNING, QString::fromStdString(toString(e.getMessage())));
} catch (...) {
MsgBox(WARNING, QObject::tr("It is not possible to complete the rendering."));
}
}