1
Fork 0
mirror of https://github.com/redstrate/Novus.git synced 2025-04-26 21:57:45 +00:00
novus/parts/exd/exdpart.h
Joshua Goins 57e3cd5fa8 karaku: Finish up definition integration
It now loads some column names correctly, and the links.
2024-02-03 09:18:10 -05:00

36 lines
No EOL
955 B
C++

// SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
// SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
#include <QFormLayout>
#include <QMap>
#include <QTabWidget>
#include <QWidget>
#include <physis.hpp>
// TODO: rename to "EXDH" or "Excel" part or something similar because you cannot preview EXD on it's own
class EXDPart : public QWidget
{
Q_OBJECT
public:
explicit EXDPart(GameData *data, QWidget *parent = nullptr);
void loadSheet(const QString &name, physis_Buffer buffer, const QString &definitionPath = {});
private:
std::pair<QString, int> getColumnData(physis_ColumnData &columnData);
GameData *data = nullptr;
QTabWidget *pageTabWidget = nullptr;
QFormLayout *headerFormLayout = nullptr;
struct CachedExcel {
physis_EXH *exh = nullptr;
physis_EXD exd{};
};
QMap<QString, CachedExcel> cachedExcelSheets;
Language getSuitableLanguage(physis_EXH *pExh);
};