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

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

#include <examplesplayer.h>

Inheritance diagram for ExamplesPlayer:
Collaboration diagram for ExamplesPlayer:

Static Public Member Functions

static ExamplesPlayerinst ()
 The process-wide ExamplesPlayer singleton.

Protected Member Functions

 ExamplesPlayer ()
 Private – use inst(); loads the example-player asset.
virtual void qmlRegister () const
 Register ExamplesPlayer 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 player-value source (an AbstractRandomString of presets).

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

See also
AbstractRandomString, Examples.

Definition at line 33 of file examplesplayer.h.

Constructor & Destructor Documentation

◆ ExamplesPlayer()

ExamplesPlayer::ExamplesPlayer ( )
protected

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

Definition at line 42 of file examplesplayer.cpp.

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

Referenced by inst().

Member Function Documentation

◆ inst()

ExamplesPlayer * ExamplesPlayer::inst ( )
static

The process-wide ExamplesPlayer singleton.

Definition at line 48 of file examplesplayer.cpp.

References ExamplesPlayer().

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

◆ qmlRegister()

void ExamplesPlayer::qmlRegister ( ) const
protectedvirtual

Register ExamplesPlayer with QML.

Implements AbstractRandomString.

Definition at line 32 of file examplesplayer.cpp.

Referenced by ExamplesPlayer().


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