Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
Loading...
Searching...
No Matches
names.h
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#pragma once
17#include <QObject>
18
19#include "./db_autoport.h"
22
23class QQmlEngine;
24
34class DB_AUTOPORT Names : public QObject
35{
36 Q_OBJECT
37 Q_PROPERTY(NamesPlayer* player READ player CONSTANT)
38 Q_PROPERTY(NamesPokemon* pokemon READ pokemon CONSTANT)
39
40public:
41 static Names* inst();
42
43 NamesPlayer* player() const;
44 NamesPokemon* pokemon() const;
45
46public slots:
47 void qmlProtect(const QQmlEngine* const engine) const;
48
49private slots:
50 void qmlRegister() const;
51
52private:
53 Names();
54};
Random player-name source (an AbstractRandomString of player names).
Definition namesplayer.h:34
Random Pokemon-nickname source (an AbstractRandomString of names).
NamesPlayer * player() const
The player-name source (backs player).
Definition names.cpp:35
NamesPokemon * pokemon() const
The Pokemon-name source (backs pokemon).
Definition names.cpp:40
static Names * inst()
< Random player-name source.
Definition names.cpp:29
void qmlProtect(const QQmlEngine *const engine) const
Pin to C++ ownership.
Definition names.cpp:45
Import/export macro for the db library, plus the central list of DB entry pointer types declared opaq...
#define DB_AUTOPORT
Expands to the correct dllexport/dllimport decoration for this library.
Definition db_autoport.h:37