本文整理汇总了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();
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}