Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
Toggle main menu visibility
Loading...
Searching...
No Matches
examplesplayer.cpp
Go to the documentation of this file.
1
/*
2
* Copyright 2020 Twilight
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
16
21
22
#include <QVector>
23
#include <QJsonArray>
24
#include <QtMath>
25
#include <QQmlEngine>
26
27
#include "
./examplesplayer.h
"
28
#include "
../util/gamedata.h
"
29
#include <
pse-common/random.h
>
30
#include <
pse-common/utility.h
>
31
32
void
ExamplesPlayer::qmlRegister
()
const
33
{
34
static
bool
once =
false
;
35
if
(once)
36
return
;
37
38
qmlRegisterUncreatableType<ExamplesPlayer>(
"PSE.DB.ExamplesPlayer"
, 1, 0,
"ExamplesPlayer"
,
"Can't instantiate in QML"
);
39
once =
true
;
40
}
41
42
ExamplesPlayer::ExamplesPlayer
()
43
:
AbstractRandomString
(
"playerExamples"
)
44
{
45
qmlRegister
();
46
}
47
48
ExamplesPlayer
*
ExamplesPlayer::inst
()
49
{
50
static
ExamplesPlayer
* _inst =
new
ExamplesPlayer
;
51
return
_inst;
52
}
AbstractRandomString::AbstractRandomString
AbstractRandomString(const QString fileName)
Definition
abstractrandomstring.cpp:54
ExamplesPlayer::ExamplesPlayer
ExamplesPlayer()
Private – use inst(); loads the example-player asset.
Definition
examplesplayer.cpp:42
ExamplesPlayer::inst
static ExamplesPlayer * inst()
The process-wide ExamplesPlayer singleton.
Definition
examplesplayer.cpp:48
ExamplesPlayer::qmlRegister
virtual void qmlRegister() const
Register ExamplesPlayer with QML.
Definition
examplesplayer.cpp:32
examplesplayer.h
gamedata.h
random.h
utility.h
projects
db
src
pse-db
entries
examplesplayer.cpp
Generated by
1.17.0