2023-08-06 08:48:11 -04:00
|
|
|
// SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
|
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
|
|
|
#include <QDebug>
|
|
|
|
#include <QFormLayout>
|
2023-04-09 15:32:09 -04:00
|
|
|
#include <QHBoxLayout>
|
|
|
|
#include <QLabel>
|
2023-08-06 08:48:11 -04:00
|
|
|
#include <QTreeWidget>
|
2023-04-09 15:32:09 -04:00
|
|
|
|
|
|
|
#include "filepropertieswindow.h"
|
|
|
|
|
2023-10-10 18:02:13 -04:00
|
|
|
FilePropertiesWindow::FilePropertiesWindow(GameData *data, QString path, QWidget *parent)
|
|
|
|
: QWidget(parent)
|
|
|
|
, data(data)
|
|
|
|
{
|
2023-09-26 00:37:55 -04:00
|
|
|
setWindowTitle(QStringLiteral("Properties for ") + path);
|
2023-04-09 15:32:09 -04:00
|
|
|
|
|
|
|
auto layout = new QFormLayout();
|
|
|
|
setLayout(layout);
|
|
|
|
|
|
|
|
auto pathLabel = new QLabel(path);
|
2023-09-26 00:37:55 -04:00
|
|
|
layout->addRow(QStringLiteral("Path"), pathLabel);
|
2023-04-09 15:32:09 -04:00
|
|
|
|
2023-09-26 00:37:55 -04:00
|
|
|
auto typeLabel = new QLabel(QStringLiteral("Unknown type"));
|
|
|
|
layout->addRow(QStringLiteral("Type"), typeLabel);
|
2023-04-09 15:32:09 -04:00
|
|
|
|
|
|
|
auto file = physis_gamedata_extract_file(data, path.toStdString().c_str());
|
|
|
|
|
|
|
|
auto sizeLabel = new QLabel(QString::number(file.size));
|
2023-09-26 00:37:55 -04:00
|
|
|
layout->addRow(QStringLiteral("Size (in bytes)"), sizeLabel);
|
2023-04-09 15:32:09 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
#include "moc_filepropertieswindow.cpp"
|