2023-08-06 08:48:11 -04:00
|
|
|
// SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
|
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
2023-04-09 15:31:19 -04:00
|
|
|
#pragma once
|
|
|
|
|
2023-07-09 10:54:27 -04:00
|
|
|
#include "filecache.h"
|
2023-04-09 15:31:19 -04:00
|
|
|
#include "gearview.h"
|
2023-07-07 16:16:21 -04:00
|
|
|
#include <QPushButton>
|
|
|
|
#include <QWidget>
|
2023-04-09 15:31:19 -04:00
|
|
|
|
|
|
|
struct GameData;
|
|
|
|
|
2023-10-12 23:44:48 -04:00
|
|
|
class SingleGearView : public QWidget
|
|
|
|
{
|
2023-04-09 15:31:19 -04:00
|
|
|
Q_OBJECT
|
2023-09-26 20:21:06 -04:00
|
|
|
|
2023-04-09 15:31:19 -04:00
|
|
|
public:
|
2023-10-12 23:44:48 -04:00
|
|
|
explicit SingleGearView(GameData *data, FileCache &cache, QWidget *parent = nullptr);
|
2023-04-09 15:31:19 -04:00
|
|
|
|
2023-09-26 20:21:06 -04:00
|
|
|
QString getLoadedGearPath() const;
|
|
|
|
|
2023-04-09 15:31:19 -04:00
|
|
|
Q_SIGNALS:
|
|
|
|
void gearChanged();
|
2023-09-26 20:21:06 -04:00
|
|
|
void gotMDLPath();
|
2023-04-09 15:31:19 -04:00
|
|
|
|
|
|
|
void raceChanged();
|
2023-07-07 16:02:28 -04:00
|
|
|
void subraceChanged();
|
2023-04-09 15:31:19 -04:00
|
|
|
void genderChanged();
|
|
|
|
void levelOfDetailChanged();
|
|
|
|
|
2023-10-12 23:44:48 -04:00
|
|
|
void addToFullModelViewer(GearInfo &info);
|
2023-04-09 15:31:19 -04:00
|
|
|
|
|
|
|
public Q_SLOTS:
|
|
|
|
void clear();
|
2023-10-12 23:44:48 -04:00
|
|
|
void setGear(const GearInfo &info);
|
2023-04-09 15:31:19 -04:00
|
|
|
|
|
|
|
void setRace(Race race);
|
2023-07-07 16:02:28 -04:00
|
|
|
void setSubrace(Subrace subrace);
|
2023-04-09 15:31:19 -04:00
|
|
|
void setGender(Gender gender);
|
|
|
|
void setLevelOfDetail(int lod);
|
|
|
|
|
2023-09-25 23:48:03 -04:00
|
|
|
void setFMVAvailable(bool available);
|
|
|
|
|
2023-04-09 15:31:19 -04:00
|
|
|
private Q_SLOTS:
|
|
|
|
void reloadGear();
|
|
|
|
|
|
|
|
private:
|
2023-12-09 14:49:31 -05:00
|
|
|
void importModel(const QString &filename);
|
|
|
|
|
2023-04-09 15:31:19 -04:00
|
|
|
std::optional<GearInfo> currentGear;
|
|
|
|
|
|
|
|
Race currentRace = Race::Hyur;
|
2023-07-07 16:02:28 -04:00
|
|
|
Subrace currentSubrace = Subrace::Midlander;
|
2023-09-23 14:09:25 -04:00
|
|
|
Gender currentGender = Gender::Male;
|
2023-04-09 15:31:19 -04:00
|
|
|
int currentLod = 0;
|
|
|
|
|
2023-10-12 23:44:48 -04:00
|
|
|
GearView *gearView = nullptr;
|
2023-07-07 16:02:28 -04:00
|
|
|
QComboBox *raceCombo, *subraceCombo, *genderCombo, *lodCombo;
|
2023-09-26 20:21:06 -04:00
|
|
|
QPushButton *addToFMVButton, *importButton, *exportButton;
|
2023-04-09 15:31:19 -04:00
|
|
|
|
|
|
|
bool loadingComboData = false;
|
2023-09-25 23:48:03 -04:00
|
|
|
bool fmvAvailable = false;
|
2023-04-09 15:31:19 -04:00
|
|
|
|
2023-10-12 23:44:48 -04:00
|
|
|
GameData *data = nullptr;
|
2023-04-09 15:31:19 -04:00
|
|
|
};
|