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