当前位置: 首页>>代码示例>>C++>>正文


C++ Folder::name方法代码示例

本文整理汇总了C++中Folder::name方法的典型用法代码示例。如果您正苦于以下问题:C++ Folder::name方法的具体用法?C++ Folder::name怎么用?C++ Folder::name使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Folder的用法示例。


在下文中一共展示了Folder::name方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: path

QString Folder::path() {
  QString folderPath = "/" + QString(name()) + "/";
  Folder *parentFolder = static_cast<Folder *>(parent());
  while (parentFolder) {
    folderPath.prepend("/" + QString(parentFolder->name()));
    parentFolder = static_cast<Folder *>(parentFolder->parent());
  }
  return folderPath;
}
开发者ID:narunlifescience,项目名称:AlphaPlot,代码行数:9,代码来源:Folder.cpp

示例2: path

QString Folder::path()
{
    QString s = "/" + QString(name()) + "/";
    Folder *parentFolder = (Folder *)parent();
    while (parentFolder){
        s.prepend("/" + QString(parentFolder->name()));
        parentFolder = (Folder *)parentFolder->parent();
	}
    return s;
}
开发者ID:highperformancecoder,项目名称:scidavis,代码行数:10,代码来源:Folder.cpp

示例3: data

QVariant FoldersModel::data(const QModelIndex &index, int role) const
{
    Folder * item = qobject_cast<Folder *>(get(index.row()));
    if (!item)
        return QVariant();

    switch (role) {
    case Id:
        return item->id();
        break;
    case Name:
        return item->name();
        break;
    case AdditionalData:
        return QVariant::fromValue(item->additionalData());
        break;
    case FilesModel:
        return QVariant::fromValue(item->filesModel());
        break;
    }

    return QVariant();
}
开发者ID:0x6368656174,项目名称:iqTerminal,代码行数:23,代码来源:foldersmodel.cpp

示例4: defined

//
// generate
//
void Export_File_Generator::
generate (const std::string & location, const Project & proj)
{
  // Open the .mpc file for writing.
  Folder root = proj.root_folder ();
  const std::string name = GAME::Utils::normalize (root->name ());
  const std::string filename = location + "/" + name + "/" + name + "_export.h";

  std::string macro_guard = "_" + name + "_EXPORT_H_";
  std::transform (macro_guard.begin (),
                  macro_guard.end (),
                  macro_guard.begin (),
                  &::toupper);

  std::ofstream hfile;
  hfile.open (filename.c_str ());

  std::string export_basename = name;
  std::transform (export_basename.begin (),
                  export_basename.end (),
                  export_basename.begin (),
                  &::toupper);

  const std::string export_name = export_basename + "_Export";

  if (hfile.is_open ())
  {
    // Generate the contents of the .mpc file.
    hfile
      << "// -*- C++ -*-" << std::endl
      << std::endl
      << "#ifndef " << macro_guard << std::endl
      << "#define " << macro_guard << std::endl
      << std::endl
      << include_t ("ace/config.h")
      << std::endl
      << "#if defined (ACE_AS_STATIC_LIBS) && !defined (" << export_basename << "_HAS_DLL)" << std::endl
      << "#  define " << export_basename << "_HAS_DLL 0" << std::endl
      << "#endif /* ACE_AS_STATIC_LIBS && " << export_basename << "_HAS_DLL */" << std::endl
      << std::endl
      << "#if !defined (" << export_basename << "_HAS_DLL)" << std::endl
      << "#  define " << export_basename << "_HAS_DLL 1" << std::endl
      << "#endif /* ! " << export_basename << "_HAS_DLL */" << std::endl
      << std::endl
      << "#if defined (" << export_basename << "_HAS_DLL) && (" << export_basename << "_HAS_DLL == 1)" << std::endl
      << "#  if defined (" << export_basename << "_BUILD_DLL)" << std::endl
      << "#    define " << export_basename << "_Export ACE_Proper_Export_Flag" << std::endl
      << "#    define " << export_basename << "_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)" << std::endl
      << "#    define " << export_basename << "_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)" << std::endl
      << "#  else /* " << export_basename << "_BUILD_DLL */" << std::endl
      << "#    define " << export_basename << "_Export ACE_Proper_Import_Flag" << std::endl
      << "#    define " << export_basename << "_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)" << std::endl
      << "#    define " << export_basename << "_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)" << std::endl
      << "#  endif /* " << export_basename << "_BUILD_DLL */" << std::endl
      << "#else /* " << export_basename << "_HAS_DLL == 1 */" << std::endl
      << "#  define " << export_basename << "_Export" << std::endl
      << "#  define " << export_basename << "_SINGLETON_DECLARATION(T)" << std::endl
      << "#  define " << export_basename << "_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)" << std::endl
      << "#endif /* " << export_basename << "_HAS_DLL == 1 */" << std::endl
      << std::endl
      << "// Set " << export_basename << "_NTRACE = 0 to turn on library specific tracing even if" << std::endl
      << "// tracing is turned off for ACE." << std::endl
      << "#if !defined (" << export_basename << "_NTRACE)" << std::endl
      << "#  if (ACE_NTRACE == 1)" << std::endl
      << "#    define " << export_basename << "_NTRACE 1" << std::endl
      << "#  else /* (ACE_NTRACE == 1) */" << std::endl
      << "#    define " << export_basename << "_NTRACE 0" << std::endl
      << "#  endif /* (ACE_NTRACE == 1) */" << std::endl
      << "#endif /* !" << export_basename << "_NTRACE */" << std::endl
      << std::endl
      << "#if (" << export_basename << "_NTRACE == 1)" << std::endl
      << "#  define " << export_basename << "_TRACE(X)" << std::endl
      << "#else /* (" << export_basename << "_NTRACE == 1) */" << std::endl
      << "#  if !defined (ACE_HAS_TRACE)" << std::endl
      << "#    define ACE_HAS_TRACE" << std::endl
      << "#  endif /* ACE_HAS_TRACE */" << std::endl
      << "#  define " << export_basename << "_TRACE(X) ACE_TRACE_IMPL(X)" << std::endl
      << "#  include \"ace/Trace.h\"" << std::endl
      << "#endif /* (" << export_basename << "_NTRACE == 1) */"
      << std::endl
      << "#endif  // !defined " << macro_guard << std::endl;

    hfile.close ();
  }
}
开发者ID:SEDS,项目名称:GAME,代码行数:88,代码来源:Export_File_Generator.cpp


注:本文中的Folder::name方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。