1
Fork 0
mirror of https://github.com/redstrate/Novus.git synced 2025-04-23 12:37:45 +00:00
novus/sagasu/src/filepropertieswindow.cpp

33 lines
No EOL
974 B
C++

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