all repos — mgba @ 91fd2c6b4768fbeb58c74d2f119e7d55685a9800

mGBA Game Boy Advance Emulator

src/platform/qt/ArchiveInspector.cpp (view raw)

 1/* Copyright (c) 2013-2017 Jeffrey Pfau
 2 *
 3 * This Source Code Form is subject to the terms of the Mozilla Public
 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 6#include "ArchiveInspector.h"
 7
 8#include <mgba-util/vfs.h>
 9
10using namespace QGBA;
11
12ArchiveInspector::ArchiveInspector(const QString& filename, QWidget* parent)
13	: QDialog(parent)
14{
15	m_ui.setupUi(this);
16	connect(m_ui.archiveView, &LibraryView::doneLoading, [this]() {
17		m_ui.loading->hide();
18	});
19	connect(m_ui.archiveView, SIGNAL(accepted()), this, SIGNAL(accepted()));
20	m_ui.archiveView->setDirectory(filename);
21}
22
23VFile* ArchiveInspector::selectedVFile() const {
24	return m_ui.archiveView->selectedVFile();
25}
26
27QPair<QString, QString> ArchiveInspector::selectedPath() const {
28	return m_ui.archiveView->selectedPath();
29}