mirror of
https://github.com/redstrate/Novus.git
synced 2025-04-26 05:37:46 +00:00
Ensure every class has a QWidget or QObject parent parameter
This commit is contained in:
parent
a0626c38da
commit
2023254b7e
12 changed files with 24 additions and 19 deletions
|
@ -14,8 +14,9 @@
|
|||
#include <QVBoxLayout>
|
||||
#include <physis.hpp>
|
||||
|
||||
EXDPart::EXDPart(GameData *data)
|
||||
: data(data)
|
||||
EXDPart::EXDPart(GameData *data, QWidget *parent)
|
||||
: QWidget(parent)
|
||||
, data(data)
|
||||
{
|
||||
auto layout = new QVBoxLayout();
|
||||
setLayout(layout);
|
||||
|
|
|
@ -15,7 +15,7 @@ class EXDPart : public QWidget
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit EXDPart(GameData *data);
|
||||
explicit EXDPart(GameData *data, QWidget *parent = nullptr);
|
||||
|
||||
void loadSheet(const QString &name, physis_Buffer buffer);
|
||||
|
||||
|
|
|
@ -11,8 +11,9 @@
|
|||
#include <QVBoxLayout>
|
||||
#include <physis.hpp>
|
||||
|
||||
EXLPart::EXLPart(GameData *data)
|
||||
: data(data)
|
||||
EXLPart::EXLPart(GameData *data, QWidget *parent)
|
||||
: QWidget(parent)
|
||||
, data(data)
|
||||
{
|
||||
auto layout = new QVBoxLayout();
|
||||
m_tableWidget = new QTableWidget();
|
||||
|
|
|
@ -12,7 +12,7 @@ class EXLPart : public QWidget
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit EXLPart(GameData *data);
|
||||
explicit EXLPart(GameData *data, QWidget *parent = nullptr);
|
||||
|
||||
void load(physis_Buffer file);
|
||||
|
||||
|
|
|
@ -17,8 +17,9 @@
|
|||
#include "filecache.h"
|
||||
#include "vulkanwindow.h"
|
||||
|
||||
MDLPart::MDLPart(GameData *data, FileCache &cache)
|
||||
: data(data)
|
||||
MDLPart::MDLPart(GameData *data, FileCache &cache, QWidget *parent)
|
||||
: QWidget(parent)
|
||||
, data(data)
|
||||
, cache(cache)
|
||||
{
|
||||
auto viewportLayout = new QVBoxLayout();
|
||||
|
|
|
@ -20,7 +20,7 @@ class MDLPart : public QWidget
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MDLPart(GameData *data, FileCache &cache);
|
||||
explicit MDLPart(GameData *data, FileCache &cache, QWidget *parent = nullptr);
|
||||
|
||||
void exportModel(const QString &fileName);
|
||||
RenderModel &getModel(int index);
|
||||
|
|
|
@ -10,8 +10,9 @@
|
|||
|
||||
dxvk::Logger dxvk::Logger::s_instance("dxbc.log");
|
||||
|
||||
SHPKPart::SHPKPart(GameData *data)
|
||||
: data(data)
|
||||
SHPKPart::SHPKPart(GameData *data, QWidget *parent)
|
||||
: QWidget(parent)
|
||||
, data(data)
|
||||
{
|
||||
auto layout = new QVBoxLayout();
|
||||
setLayout(layout);
|
||||
|
|
|
@ -14,7 +14,7 @@ class SHPKPart : public QWidget
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SHPKPart(GameData *data);
|
||||
explicit SHPKPart(GameData *data, QWidget *parent = nullptr);
|
||||
|
||||
void load(physis_Buffer buffer);
|
||||
|
||||
|
|
|
@ -6,8 +6,9 @@
|
|||
#include <QVBoxLayout>
|
||||
#include <physis.hpp>
|
||||
|
||||
TexPart::TexPart(GameData *data)
|
||||
: data(data)
|
||||
TexPart::TexPart(GameData *data, QWidget *parent)
|
||||
: QWidget(parent)
|
||||
, data(data)
|
||||
{
|
||||
auto layout = new QVBoxLayout();
|
||||
setLayout(layout);
|
||||
|
|
|
@ -13,7 +13,7 @@ class TexPart : public QWidget
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit TexPart(GameData *data);
|
||||
explicit TexPart(GameData *data, QWidget *parent = nullptr);
|
||||
|
||||
void load(physis_Buffer file);
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ class FileTreeModel : public QAbstractItemModel
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit FileTreeModel(bool showUnknown, const QString &gamePath, GameData *data);
|
||||
explicit FileTreeModel(bool showUnknown, const QString &gamePath, GameData *data, QObject *parent = nullptr);
|
||||
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
|
||||
#include <QtConcurrent>
|
||||
|
||||
FileTreeModel::FileTreeModel(bool showUnknown, const QString &gamePath, GameData *data)
|
||||
: gameData(data)
|
||||
FileTreeModel::FileTreeModel(bool showUnknown, const QString &gamePath, GameData *data, QObject *parent)
|
||||
: QAbstractItemModel(parent)
|
||||
, gameData(data)
|
||||
, m_showUnknown(showUnknown)
|
||||
, QAbstractItemModel()
|
||||
{
|
||||
rootItem = new TreeInformation();
|
||||
rootItem->type = TreeType::Root;
|
||||
|
|
Loading…
Add table
Reference in a new issue