mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-09 12:22:34 +01:00
6f9c3db52e
- Shared ViewerWidget has been removed. Now multiple instances exist
26 lines
644 B
C++
26 lines
644 B
C++
#include "WorldViewer.hpp"
|
|
#include "ViewerWidget.hpp"
|
|
|
|
#include <QFileDialog>
|
|
|
|
WorldViewer::WorldViewer(QWidget* parent, Qt::WindowFlags f)
|
|
: ViewerInterface(parent, f) {
|
|
mainLayout = new QVBoxLayout;
|
|
|
|
mainLayout->addWidget(QWidget::createWindowContainer(createViewer()));
|
|
|
|
setLayout(mainLayout);
|
|
}
|
|
|
|
void WorldViewer::loadPlacements(const QString& file) {
|
|
world()->placeItems(file.toStdString());
|
|
placementsLoaded(file);
|
|
}
|
|
|
|
void WorldViewer::loadPlacements() {
|
|
QFileDialog dialog(this, "Open Placements", "", "Placement (*.ipl)");
|
|
if (dialog.exec()) {
|
|
loadPlacements(dialog.selectedFiles()[0]);
|
|
}
|
|
}
|