Showing the changes to interface/src/ui/TestingDialog.cpp (1 of 6 files). Show all
Unified · Split
| @@ -0,0 +1,35 @@ | ||
| 1 | +// | |
| 2 | +// TestingDialog.cpp | |
| 3 | +// interface/src/ui | |
| 4 | +// | |
| 5 | +// Created by Ryan Jones on 12/3/2016. | |
| 6 | +// Copyright 2016 High Fidelity, Inc. | |
| 7 | +// | |
| 8 | +// Distributed under the Apache License, Version 2.0. | |
| 9 | +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html | |
| 10 | +// | |
| 11 | + | |
| 12 | +#include <ScriptEngines.h> | |
| 13 | + | |
| 14 | +#include "ui/TestingDialog.h" | |
| 15 | +#include "Application.h" | |
| 16 | + | |
| 17 | +TestingDialog::TestingDialog(QWidget* parent) : | |
| 18 | + QDialog(parent, Qt::Window | Qt::WindowCloseButtonHint | Qt::WindowStaysOnTopHint) | |
| 19 | +{ | |
| 20 | + DependencyManager::get<ScriptEngines>()->loadOneScript(qApp->applicationDirPath() + testRunnerRelativePath); | |
| 21 | + this->setWindowTitle(windowLabel); | |
| 22 | +} | |
| 23 | + | |
| 24 | +TestingDialog::~TestingDialog() { | |
| 25 | + // TODO: Clean up here? | |
| 26 | +} | |
| 27 | + | |
| 28 | +void TestingDialog::reject() { | |
| 29 | + this->QDialog::close(); | |
| 30 | +} | |
| 31 | + | |
| 32 | +void TestingDialog::closeEvent(QCloseEvent* event) { | |
| 33 | + this->QDialog::closeEvent(event); | |
| 34 | + emit closed(); | |
| 35 | +} | |