Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
Loading...
Searching...
No Matches
ExamplesPokemon Class Reference

Example Pokemon-value source (an AbstractRandomString of presets). More...

#include <examplespokemon.h>

Inheritance diagram for ExamplesPokemon:
Collaboration diagram for ExamplesPokemon:

Static Public Member Functions

static ExamplesPokemoninst ()
 The process-wide ExamplesPokemon singleton.

Protected Member Functions

 ExamplesPokemon ()
 Private – use inst(); loads the example-pokemon asset.
virtual void qmlRegister () const
 Register ExamplesPokemon with QML.
Protected Member Functions inherited from AbstractRandomString
 AbstractRandomString (const QString fileName)

Additional Inherited Members

Public Member Functions inherited from AbstractRandomString
const QVector< QString > getStore () const
 All strings.
int getStoreSize () const
 String count.
const QString getStoreAt (const int ind) const
 String at ind (for QML).
QString randomExample ()
 A random string from the list.
void load ()
 Load the strings from fileName.
void qmlProtect (const QQmlEngine *const engine) const
 Pin to C++ ownership.
Protected Attributes inherited from AbstractRandomString
 : void listChanged()
 < Number of strings.
QVector< QString > store
 The loaded strings.
const QString fileName
 Asset path (set by the subclass).

Detailed Description

Example Pokemon-value source (an AbstractRandomString of presets).

All behaviour inherited; provides the singleton + QML registration. Reached via db.examples.pokemon.

See also
AbstractRandomString, Examples.

Definition at line 33 of file examplespokemon.h.

Constructor & Destructor Documentation

◆ ExamplesPokemon()

ExamplesPokemon::ExamplesPokemon ( )
protected

Private – use inst(); loads the example-pokemon asset.

Definition at line 42 of file examplespokemon.cpp.

References AbstractRandomString::AbstractRandomString(), and qmlRegister().

Referenced by inst().

Member Function Documentation

◆ inst()

ExamplesPokemon * ExamplesPokemon::inst ( )
static

The process-wide ExamplesPokemon singleton.

Definition at line 48 of file examplespokemon.cpp.

References ExamplesPokemon().

Referenced by Examples::pokemon(), and Examples::qmlProtect().

◆ qmlRegister()

void ExamplesPokemon::qmlRegister ( ) const
protectedvirtual

Register ExamplesPokemon with QML.

Implements AbstractRandomString.

Definition at line 32 of file examplespokemon.cpp.

Referenced by ExamplesPokemon().


The documentation for this class was generated from the following files: