Example #1
0
void FileModel::loadFolder(int fileIndex) {
    File fileToLoad = mFiles[fileIndex];
    if (fileToLoad.type() != "directory")
        return;

    loadFromDir(fileToLoad.path());
}
Example #2
0
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;
      }
Example #3
0
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;
      }