mirror of
https://github.com/redstrate/Novus.git
synced 2025-04-30 07:27:46 +00:00
armoury: Add empty tabs for future material and metadata usage
This commit is contained in:
parent
537a8f57e5
commit
75b63fcc3f
7 changed files with 90 additions and 0 deletions
|
@ -11,6 +11,8 @@ target_sources(novus-armoury
|
|||
include/gearlistwidget.h
|
||||
include/gearview.h
|
||||
include/mainwindow.h
|
||||
include/materialview.h
|
||||
include/metadataview.h
|
||||
include/penumbraapi.h
|
||||
include/settingswindow.h
|
||||
include/singlegearview.h
|
||||
|
@ -23,6 +25,8 @@ target_sources(novus-armoury
|
|||
src/gearview.cpp
|
||||
src/main.cpp
|
||||
src/mainwindow.cpp
|
||||
src/materialview.cpp
|
||||
src/metadataview.cpp
|
||||
src/penumbraapi.cpp
|
||||
src/settingswindow.cpp
|
||||
src/singlegearview.cpp)
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
|
||||
#include "fullmodelviewer.h"
|
||||
#include "gearview.h"
|
||||
#include "materialview.h"
|
||||
#include "metadataview.h"
|
||||
#include "novusmainwindow.h"
|
||||
#include "singlegearview.h"
|
||||
|
||||
|
@ -29,6 +31,8 @@ protected:
|
|||
private:
|
||||
SingleGearView *gearView = nullptr;
|
||||
FullModelViewer *fullModelViewer = nullptr;
|
||||
MaterialView *materialView = nullptr;
|
||||
MetadataView *metadataView = nullptr;
|
||||
|
||||
GameData &data;
|
||||
FileCache cache;
|
||||
|
|
22
armoury/include/materialview.h
Normal file
22
armoury/include/materialview.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
// SPDX-FileCopyrightText: 2024 Joshua Goins <josh@redstrate.com>
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "filecache.h"
|
||||
#include "gearview.h"
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
struct GameData;
|
||||
|
||||
class MaterialView : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MaterialView(GameData *data, QWidget *parent = nullptr);
|
||||
|
||||
private:
|
||||
GameData *data = nullptr;
|
||||
};
|
22
armoury/include/metadataview.h
Normal file
22
armoury/include/metadataview.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
// SPDX-FileCopyrightText: 2024 Joshua Goins <josh@redstrate.com>
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "filecache.h"
|
||||
#include "gearview.h"
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
struct GameData;
|
||||
|
||||
class MetadataView : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MetadataView(GameData *data, QWidget *parent = nullptr);
|
||||
|
||||
private:
|
||||
GameData *data = nullptr;
|
||||
};
|
|
@ -47,8 +47,14 @@ MainWindow::MainWindow(GameData *in_data)
|
|||
});
|
||||
connect(gearView, &SingleGearView::importedModel, m_api, &PenumbraApi::redrawAll);
|
||||
|
||||
materialView = new MaterialView(&data);
|
||||
|
||||
metadataView = new MetadataView(&data);
|
||||
|
||||
auto tabWidget = new QTabWidget();
|
||||
tabWidget->addTab(gearView, QStringLiteral("Models"));
|
||||
tabWidget->addTab(materialView, QStringLiteral("Materials"));
|
||||
tabWidget->addTab(metadataView, QStringLiteral("Metadata"));
|
||||
tabWidget->setDocumentMode(true); // Don't draw the borders
|
||||
tabWidget->tabBar()->setExpanding(true);
|
||||
dummyWidget->addWidget(tabWidget);
|
||||
|
|
16
armoury/src/materialview.cpp
Normal file
16
armoury/src/materialview.cpp
Normal file
|
@ -0,0 +1,16 @@
|
|||
// SPDX-FileCopyrightText: 2024 Joshua Goins <josh@redstrate.com>
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#include "materialview.h"
|
||||
|
||||
#include <QVBoxLayout>
|
||||
|
||||
MaterialView::MaterialView(GameData *data, QWidget *parent)
|
||||
: QWidget(parent)
|
||||
, data(data)
|
||||
{
|
||||
auto layout = new QVBoxLayout();
|
||||
setLayout(layout);
|
||||
}
|
||||
|
||||
#include "moc_materialview.cpp"
|
16
armoury/src/metadataview.cpp
Normal file
16
armoury/src/metadataview.cpp
Normal file
|
@ -0,0 +1,16 @@
|
|||
// SPDX-FileCopyrightText: 2024 Joshua Goins <josh@redstrate.com>
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#include "metadataview.h"
|
||||
|
||||
#include <QVBoxLayout>
|
||||
|
||||
MetadataView::MetadataView(GameData *data, QWidget *parent)
|
||||
: QWidget(parent)
|
||||
, data(data)
|
||||
{
|
||||
auto layout = new QVBoxLayout();
|
||||
setLayout(layout);
|
||||
}
|
||||
|
||||
#include "moc_metadataview.cpp"
|
Loading…
Add table
Reference in a new issue