2023-08-06 08:48:11 -04:00
|
|
|
// SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
|
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
2022-04-14 08:24:06 -04:00
|
|
|
#pragma once
|
|
|
|
|
2024-05-27 18:18:54 -04:00
|
|
|
#include <KXmlGuiWindow>
|
2022-04-14 08:24:06 -04:00
|
|
|
#include <QMap>
|
2023-04-09 15:32:09 -04:00
|
|
|
#include <QMdiArea>
|
2024-02-03 10:23:41 -05:00
|
|
|
#include <QNetworkAccessManager>
|
2023-08-06 08:48:11 -04:00
|
|
|
#include <QTreeWidget>
|
2022-04-14 08:24:06 -04:00
|
|
|
|
2023-10-12 21:33:32 -04:00
|
|
|
#include "filecache.h"
|
2024-02-03 10:23:41 -05:00
|
|
|
#include "filetreewindow.h"
|
2024-02-02 14:25:32 -05:00
|
|
|
#include "hashdatabase.h"
|
2023-10-10 18:22:38 -04:00
|
|
|
|
2024-05-25 10:57:43 -04:00
|
|
|
#include <QLabel>
|
|
|
|
|
2023-04-09 15:32:09 -04:00
|
|
|
struct GameData;
|
2022-04-14 08:24:06 -04:00
|
|
|
|
2024-05-27 18:18:54 -04:00
|
|
|
class MainWindow : public KXmlGuiWindow
|
2023-10-10 18:02:13 -04:00
|
|
|
{
|
2022-04-14 08:24:06 -04:00
|
|
|
public:
|
2023-12-09 15:24:54 -05:00
|
|
|
MainWindow(const QString &gamePath, GameData *data);
|
2022-04-14 08:24:06 -04:00
|
|
|
|
|
|
|
private:
|
2024-05-27 18:18:54 -04:00
|
|
|
void setupActions();
|
|
|
|
|
2023-10-12 19:46:58 -04:00
|
|
|
GameData *data = nullptr;
|
|
|
|
QTabWidget *partHolder = nullptr;
|
2023-10-12 21:33:32 -04:00
|
|
|
FileCache fileCache;
|
2024-02-02 14:25:32 -05:00
|
|
|
HashDatabase m_database;
|
2024-02-03 10:23:41 -05:00
|
|
|
QNetworkAccessManager *m_mgr = nullptr;
|
|
|
|
FileTreeWindow *m_tree = nullptr;
|
2024-05-25 10:57:43 -04:00
|
|
|
QLabel *m_offsetLabel = nullptr;
|
|
|
|
QLabel *m_hashLabel = nullptr;
|
|
|
|
QLabel *m_fileTypeLabel = nullptr;
|
2023-10-12 21:33:32 -04:00
|
|
|
|
2023-12-09 15:24:54 -05:00
|
|
|
void refreshParts(const QString &path);
|
2022-04-14 08:24:06 -04:00
|
|
|
};
|