refactor: move things around so that related things are close together

This also adds some comments around ModModel.cpp and ModPage.cpp to add
some ease of reading the code.

Also move some things from headers to cpp files.
This commit is contained in:
flow
2022-03-07 19:29:59 -03:00
parent b131d3b2ec
commit 9c57b54a81
12 changed files with 200 additions and 165 deletions

View File

@ -35,9 +35,12 @@ class ModPage : public QWidget, public BasePage {
virtual bool shouldDisplay() const override = 0;
virtual bool validateVersion(ModPlatform::IndexedVersion& ver, QString mineVer, QString loaderVer = "") const = 0;
const ModAPI* apiProvider() const { return api.get(); };
virtual void onRequestVersionsSucceeded(QJsonDocument&, QString) = 0;
ModPlatform::IndexedPack& getCurrent() { return current; }
void updateModVersions();
void openedImpl() override;
bool eventFilter(QObject* watched, QEvent* event) override;
@ -45,7 +48,6 @@ class ModPage : public QWidget, public BasePage {
BaseInstance* m_instance;
protected:
void updateSelectionButton();
protected slots: