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

The top-level window – a QMainWindow hosting the QML UI in a QQuickWidget. More...

#include <mainwindow.h>

Inheritance diagram for MainWindow:
Collaboration diagram for MainWindow:

Public Member Functions

 MainWindow (QWidget *parent=nullptr)
 < The live save controller.
virtual ~MainWindow ()
protected::void fileChanged ()
 The live save was replaced.

Static Public Member Functions

static MainWindowgetInstance ()
 The single MainWindow instance.

Public Attributes

FileManagementfile = nullptr
QShortcut * recentFileShortcuts [5]
 Ctrl+1..5 open-recent shortcuts.
QHash< QString, QShortcut * > otherShortcuts
 Other global keyboard shortcuts by name.

Static Public Attributes

static Bridgebridge = nullptr
 The brg aggregate (created here, injected into QML).
static QQmlEngine * engine = nullptr
 The QML engine behind the hosted QQuickWidget.

Detailed Description

The top-level window – a QMainWindow hosting the QML UI in a QQuickWidget.

Created last in the boot sequence (createApp()), it is where C++ meets QML at runtime: it constructs the bridge, registers the image providers, and injects brg into the QML engine (injectIntoQML()). It also owns the live file (FileManagement), wires global keyboard otherShortcuts and the recent-file shortcuts, and persists window state across runs.

Note
This is the one C++ class living under app/ui (with the QML) rather than app/src; it's included in the docs via a dedicated Doxyfile INPUT entry.
See also
Bridge (the brg aggregate it creates), the boot sequence in the system map.

Definition at line 50 of file mainwindow.h.

Constructor & Destructor Documentation

◆ MainWindow()

MainWindow::MainWindow ( QWidget * parent = nullptr)

< The live save controller.

Definition at line 52 of file mainwindow.cpp.

References file.

Referenced by fileChanged(), and getInstance().

◆ ~MainWindow()

MainWindow::~MainWindow ( )
virtual

Definition at line 110 of file mainwindow.cpp.

References file, MAX_RECENT_FILES, otherShortcuts, and recentFileShortcuts.

Member Function Documentation

◆ fileChanged()

protected::void MainWindow::fileChanged ( )

The live save was replaced.

References MainWindow().

◆ getInstance()

MainWindow * MainWindow::getInstance ( )
static

The single MainWindow instance.

Definition at line 125 of file mainwindow.cpp.

References MainWindow().

Member Data Documentation

◆ bridge

Bridge * MainWindow::bridge = nullptr
static

The brg aggregate (created here, injected into QML).

Definition at line 61 of file mainwindow.h.

◆ engine

QQmlEngine * MainWindow::engine = nullptr
static

The QML engine behind the hosted QQuickWidget.

Definition at line 62 of file mainwindow.h.

◆ file

FileManagement* MainWindow::file = nullptr
See also
file property.

Definition at line 64 of file mainwindow.h.

Referenced by MainWindow(), and ~MainWindow().

◆ otherShortcuts

QHash<QString, QShortcut*> MainWindow::otherShortcuts

Other global keyboard shortcuts by name.

Definition at line 68 of file mainwindow.h.

Referenced by ~MainWindow().

◆ recentFileShortcuts

QShortcut* MainWindow::recentFileShortcuts[5]

Ctrl+1..5 open-recent shortcuts.

Definition at line 67 of file mainwindow.h.

Referenced by ~MainWindow().


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