2022-04-14 08:24:06 -04:00
|
|
|
#include "mainwindow.h"
|
2023-04-09 15:32:09 -04:00
|
|
|
#include "filetreewindow.h"
|
|
|
|
#include "filepropertieswindow.h"
|
2022-04-14 08:24:06 -04:00
|
|
|
|
|
|
|
#include <QHBoxLayout>
|
|
|
|
#include <QTableWidget>
|
|
|
|
#include <QTreeWidget>
|
|
|
|
#include <QDebug>
|
|
|
|
|
2023-04-09 15:32:09 -04:00
|
|
|
MainWindow::MainWindow(GameData* data) : data(data) {
|
2022-04-14 08:24:06 -04:00
|
|
|
setWindowTitle("explorer");
|
|
|
|
|
2023-04-09 15:32:09 -04:00
|
|
|
mdiArea = new QMdiArea();
|
|
|
|
setCentralWidget(mdiArea);
|
2022-04-14 08:24:06 -04:00
|
|
|
|
2023-04-09 15:32:09 -04:00
|
|
|
auto tree = new FileTreeWindow(data);
|
|
|
|
connect(tree, &FileTreeWindow::openFileProperties, this, [=](QString path) {
|
|
|
|
qInfo() << "opening properties window for " << path;
|
|
|
|
auto window = mdiArea->addSubWindow(new FilePropertiesWindow(data, path));
|
|
|
|
window->show();
|
|
|
|
});
|
2022-04-14 08:24:06 -04:00
|
|
|
|
2023-04-09 15:32:09 -04:00
|
|
|
mdiArea->addSubWindow(tree);
|
2022-04-14 08:24:06 -04:00
|
|
|
}
|
|
|
|
|