本文整理汇总了C++中TupScene::setSceneName方法的典型用法代码示例。如果您正苦于以下问题:C++ TupScene::setSceneName方法的具体用法?C++ TupScene::setSceneName怎么用?C++ TupScene::setSceneName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TupScene
的用法示例。
在下文中一共展示了TupScene::setSceneName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: resetScene
bool TupProject::resetScene(int pos, const QString &newName)
{
#ifdef K_DEBUG
#ifdef Q_OS_WIN
qDebug() << "[TupProject::resetScene()]";
#else
T_FUNCINFO;
#endif
#endif
TupScene *scene = sceneAt(pos);
if (scene) {
k->undoScenes << k->scenes.takeAt(pos);
TupScene *basic = new TupScene(this, k->dimension, "#ffffff");
basic->setSceneName(newName);
basic->setBasicStructure();
k->scenes.insert(pos, basic);
return true;
} else {
#ifdef K_DEBUG
QString msg = "TupProject::resetScene() - No scene at index -> " + QString::number(pos);
#ifdef Q_OS_WIN
qDebug() << msg;
#else
tError() << msg;
#endif
#endif
}
return false;
}
示例2: renameScene
bool TupCommandExecutor::renameScene(TupSceneResponse *response)
{
int position = response->sceneIndex();
QString newName = response->arg().toString();
TupScene *scene = m_project->scene(position);
if (!scene)
return false;
// TupProjectRequest request = TupRequestBuilder::createSceneRequest(position, TupProjectRequest::Rename, newName);
scene->setSceneName(newName);
emit responsed(response);
return true;
}
示例3: qDebug
TupScene *TupProject::createScene(QString name, int position, bool loaded)
{
#ifdef K_DEBUG
#ifdef Q_OS_WIN
qDebug() << "[TupProject::createScene()]";
#else
T_FUNCINFO;
#endif
#endif
if (position < 0 || position > k->scenes.count())
return 0;
TupScene *scene = new TupScene(this, k->dimension, k->bgColor);
k->scenes.insert(position, scene);
k->sceneCounter++;
scene->setSceneName(name);
if (loaded)
TupProjectLoader::createScene(scene->sceneName(), position, this);
return scene;
}