From 3768e4b6573ad8ca0aa30d833784e011b6900921 Mon Sep 17 00:00:00 2001 From: Herwig Birke Date: Wed, 23 May 2018 12:47:02 +0200 Subject: [PATCH] . --- cscene.cpp | 40 ++++++++++++++++++++++++++++++++++++++++ cscene.h | 22 ++++++++++++++++++++-- 2 files changed, 60 insertions(+), 2 deletions(-) diff --git a/cscene.cpp b/cscene.cpp index c9b1614..bc88573 100644 --- a/cscene.cpp +++ b/cscene.cpp @@ -296,6 +296,46 @@ QList cSceneList::find(cCharacter* lpCharacter) return(sceneList); } +QList cSceneList::find(cPlace* lpPlace) +{ + QList sceneList; + + for(int x = 0;x < count();x++) + { + QList list = at(x)->placeList(); + + for(int y = 0;y < list.count();y++) + { + if(list.at(y)->place() == lpPlace) + { + sceneList.append(at(x)); + break; + } + } + } + return(sceneList); +} + +QList cSceneList::find(cObject* lpObject) +{ + QList sceneList; + + for(int x = 0;x < count();x++) + { + QList list = at(x)->objectList(); + + for(int y = 0;y < list.count();y++) + { + if(list.at(y)->object() == lpObject) + { + sceneList.append(at(x)); + break; + } + } + } + return(sceneList); +} + qint32 cSceneList::nextSort(cChapter* lpChapter) { qint32 iSort = -1; diff --git a/cscene.h b/cscene.h index 26aeee8..015a324 100644 --- a/cscene.h +++ b/cscene.h @@ -406,9 +406,27 @@ public: \fn find \param lpCharacter - \return QList + \return QList */ - QList find(cCharacter* lpCharacter); + QList find(cCharacter* lpCharacter); + + /*! + \brief + + \fn find + \param lpPlace + \return QList + */ + QList find(cPlace* lpPlace); + + /*! + \brief + + \fn find + \param lpObject + \return QList + */ + QList find(cObject* lpObject); /*! \brief