コード例 #1
0
ファイル: filemodel.cpp プロジェクト: rstanislav/brummbeere
void FileModel::loadFolder(int fileIndex) {
    File fileToLoad = mFiles[fileIndex];
    if (fileToLoad.type() != "directory")
        return;

    loadFromDir(fileToLoad.path());
}
コード例 #2
0
ファイル: instrument.cpp プロジェクト: AdrianShe/MuseScore
bool ZInstrument::load(const QString& path)
      {
      instrumentPath = path;
      QFileInfo fi(path);
      _name = fi.baseName();
      if (fi.isFile())
            return loadFromFile(path);
      if (fi.isDir())
            return loadFromDir(path);
      return false;
      }
コード例 #3
0
ファイル: instrument.cpp プロジェクト: AntonioBL/MuseScore
bool ZInstrument::load(const QString& path)
      {
      instrumentPath = path;
      QFileInfo fi(path);
      _name = fi.completeBaseName();
      if (fi.isFile())
            return loadFromFile(path);
      if (fi.isDir())
            return loadFromDir(path);
      qDebug("not file nor dir %s", qPrintable(path));
      return false;
      }