Skip to content

Commit 61a0ba7

Browse files
committed
ProjectLoader: Add spriteList method
1 parent 71304e3 commit 61a0ba7

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

ScratchCPPGui/projectloader.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,11 @@ QQmlListProperty<SpriteModel> ProjectLoader::sprites()
104104
return QQmlListProperty<SpriteModel>(this, &m_sprites);
105105
}
106106

107+
const QList<SpriteModel *> &ProjectLoader::spriteList() const
108+
{
109+
return m_sprites;
110+
}
111+
107112
void ProjectLoader::start()
108113
{
109114
if (m_loadThread.isRunning())

ScratchCPPGui/projectloader.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ class ProjectLoader : public QObject
4545
StageModel *stage();
4646

4747
QQmlListProperty<SpriteModel> sprites();
48+
const QList<SpriteModel *> &spriteList() const;
4849

4950
Q_INVOKABLE void start();
5051
Q_INVOKABLE void stop();

0 commit comments

Comments
 (0)