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

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

#include <examplesrival.h>

Inheritance diagram for ExamplesRival:
Collaboration diagram for ExamplesRival:

Static Public Member Functions

static ExamplesRivalinst ()
 The process-wide ExamplesRival singleton.

Protected Member Functions

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

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

See also
AbstractRandomString, Examples.

Definition at line 33 of file examplesrival.h.

Constructor & Destructor Documentation

◆ ExamplesRival()

ExamplesRival::ExamplesRival ( )
protected

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

Definition at line 42 of file examplesrival.cpp.

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

Referenced by inst().

Member Function Documentation

◆ inst()

ExamplesRival * ExamplesRival::inst ( )
static

The process-wide ExamplesRival singleton.

Definition at line 48 of file examplesrival.cpp.

References ExamplesRival().

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

◆ qmlRegister()

void ExamplesRival::qmlRegister ( ) const
protectedvirtual

Register ExamplesRival with QML.

Implements AbstractRandomString.

Definition at line 32 of file examplesrival.cpp.

Referenced by ExamplesRival().


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