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


C++ ToonzScene::isUntitled方法代码示例

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


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

示例1: dragMoveEvent

void CastTreeViewer::dragMoveEvent(QDragMoveEvent *event) {
  if (!event->mimeData()->hasFormat("application/vnd.toonz.levels") ||
      m_dropFilePath != TFilePath())
    return;

  m_dropTargetItem  = itemAt(event->pos());
  ToonzScene *scene = TApp::instance()->getCurrentScene()->getScene();
  QString rootName  = QString("Root");
  if (scene) {
    std::wstring name =
        (scene->isUntitled()) ? L"Untitled" : scene->getSceneName();
    rootName = rootName.fromStdWString(name);
  }
  if (m_dropTargetItem &&
          m_dropTargetItem->data(0, Qt::DisplayRole).toString() ==
              AudioFolderName ||
      m_dropFilePath != TFilePath() &&
          m_dropTargetItem->data(0, Qt::DisplayRole).toString() == rootName)
    m_dropTargetItem = 0;

  if (!m_dropTargetItem)
    event->ignore();
  else
    event->acceptProposedAction();
  viewport()->update();
}
开发者ID:SaierMe,项目名称:opentoonz,代码行数:26,代码来源:castviewer.cpp

示例2: refreshModel

void FunctionViewer::refreshModel() {
  TXsheet *xsh = m_xshHandle ? m_xshHandle->getXsheet() : 0;

  m_functionGraph->getModel()->refreshData(xsh);

  if (xsh) {
    int rowCount = xsh->getFrameCount();
    m_numericalColumns->setRowCount(rowCount);
    m_numericalColumns->updateAll();

    ToonzScene *scene = xsh->getScene();
    if (!scene)  // This seems wrong. It should rather be
      return;    // asserted - though I'm not touching it now...

    TFilePath scenePath = scene->getScenePath().getParentDir();
    if (scene->isUntitled())
      scenePath =
          TProjectManager::instance()->getCurrentProject()->getScenesPath();

    m_treeView->setCurrentScenePath(scenePath);

    int distance, offset;
    scene->getProperties()->getMarkers(distance, offset);
    m_numericalColumns->setMarkRow(distance, offset);
  }

  m_treeView->updateAll();
  m_toolbar->setCurve(0);
}
开发者ID:SaierMe,项目名称:opentoonz,代码行数:29,代码来源:functionviewer.cpp

示例3: onSceneNameChanged

void CastTreeViewer::onSceneNameChanged() {
  QTreeWidgetItem *root = topLevelItem(0);
  if (!root) return;
  ToonzScene *scene = TApp::instance()->getCurrentScene()->getScene();
  QString rootName  = QString("Root");
  if (scene) {
    std::wstring name =
        (scene->isUntitled()) ? L"Untitled" : scene->getSceneName();
    rootName = rootName.fromStdWString(name);
  }
  root->setText(0, rootName);
}
开发者ID:SaierMe,项目名称:opentoonz,代码行数:12,代码来源:castviewer.cpp

示例4: rebuildCastTree

void CastTreeViewer::rebuildCastTree()
{
	clear();
	ToonzScene *scene = TApp::instance()->getCurrentScene()->getScene();
	QString rootName = QString("Root");
	if (scene) {
		wstring name = (scene->isUntitled()) ? L"Untitled" : scene->getSceneName();
		rootName = rootName.fromStdWString(name);
	}

	QTreeWidgetItem *root = new QTreeWidgetItem((QTreeWidgetItem *)0, QStringList(rootName));
	static QPixmap clapboard(":Resources/clapboard.png");
	root->setIcon(0, clapboard);
	insertTopLevelItem(0, root);
	populateFolder(root);
}
开发者ID:ArseniyShestakov,项目名称:opentoonz,代码行数:16,代码来源:castviewer.cpp

示例5: autosave

void TApp::autosave() {
  ToonzScene *scene = getCurrentScene()->getScene();

  if (!getCurrentScene()->getDirtyFlag()) return;

  if (getCurrentTool()->isToolBusy()) {
    m_autosaveSuspended = true;
    return;
  } else
    m_autosaveSuspended = false;

  if (scene->isUntitled()) {
    DVGui::warning(
        tr("It is not possible to save automatically an untitled scene."));
    return;
  }

  DVGui::ProgressDialog pb(
      "Autosaving scene..." + toQString(scene->getScenePath()), 0, 0, 1);
  pb.show();
  IoCmd::saveScene();
  pb.setValue(1);
}
开发者ID:SaierMe,项目名称:opentoonz,代码行数:23,代码来源:tapp.cpp


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