mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-14 11:46:56 +02:00
Added a sweet "busy" window.
This commit is contained in:
parent
9247e8dc16
commit
b72d94e56d
5 changed files with 121 additions and 2 deletions
|
@ -20,6 +20,7 @@
|
|||
#include <QTextStream>
|
||||
|
||||
TestRailInterface::TestRailInterface() {
|
||||
_busyWindow.setModal(true);
|
||||
_testRailSelectorWindow.setModal(true);
|
||||
|
||||
////_testRailSelectorWindow.setURL("https://highfidelity.testrail.net");
|
||||
|
@ -287,12 +288,16 @@ void TestRailInterface::createAddTestCasesPythonScript(const QString& testDirect
|
|||
QProcess* process = new QProcess();
|
||||
connect(
|
||||
process, &QProcess::started,
|
||||
this, []() {QMessageBox::information(0, "Python process started", "TestRail is being updated"); }
|
||||
this, [=]() {
|
||||
_busyWindow.exec();
|
||||
}
|
||||
);
|
||||
|
||||
connect(
|
||||
process, static_cast<void(QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished),
|
||||
this, [](int exitCode, QProcess::ExitStatus exitStatus) {QMessageBox::information(0, "Python process finished", "TestRail tests have been added"); }
|
||||
this, [=](int exitCode, QProcess::ExitStatus exitStatus) {
|
||||
_busyWindow.hide();
|
||||
}
|
||||
);
|
||||
|
||||
process->start(command, parameters);
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#ifndef hifi_test_testrail_interface_h
|
||||
#define hifi_test_testrail_interface_h
|
||||
|
||||
#include "ui/BusyWindow.h"
|
||||
#include "ui/TestRailSelectorWindow.h"
|
||||
#include <QDirIterator>
|
||||
#include <QtXml/QDomDocument>
|
||||
|
@ -67,6 +68,7 @@ public:
|
|||
private:
|
||||
QDomDocument _document;
|
||||
|
||||
BusyWindow _busyWindow;
|
||||
TestRailSelectorWindow _testRailSelectorWindow;
|
||||
|
||||
QString _url;
|
||||
|
|
18
tools/auto-tester/src/ui/BusyWindow.cpp
Normal file
18
tools/auto-tester/src/ui/BusyWindow.cpp
Normal file
|
@ -0,0 +1,18 @@
|
|||
//
|
||||
// BusyWindow.cpp
|
||||
//
|
||||
// Created by Nissim Hadar on 26 Jul 2017.
|
||||
// Copyright 2013 High Fidelity, Inc.
|
||||
//
|
||||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
#include "BusyWindow.h"
|
||||
|
||||
#include <QtCore/QFileInfo>
|
||||
|
||||
#include <cmath>
|
||||
|
||||
BusyWindow::BusyWindow(QWidget *parent) {
|
||||
setupUi(this);
|
||||
}
|
22
tools/auto-tester/src/ui/BusyWindow.h
Normal file
22
tools/auto-tester/src/ui/BusyWindow.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
//
|
||||
// BusyWindow.h
|
||||
//
|
||||
// Created by Nissim Hadar on 29 Jul 2017.
|
||||
// Copyright 2013 High Fidelity, Inc.
|
||||
//
|
||||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
#ifndef hifi_BusyWindow_h
|
||||
#define hifi_BusyWindow_h
|
||||
|
||||
#include "ui_BusyWindow.h"
|
||||
|
||||
class BusyWindow : public QDialog, public Ui::BusyWindow {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
BusyWindow(QWidget* parent = Q_NULLPTR);
|
||||
};
|
||||
|
||||
#endif
|
72
tools/auto-tester/src/ui/BusyWindow.ui
Normal file
72
tools/auto-tester/src/ui/BusyWindow.ui
Normal file
|
@ -0,0 +1,72 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>BusyWindow</class>
|
||||
<widget class="QDialog" name="BusyWindow">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>542</width>
|
||||
<height>189</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Updating TestRail - please wait</string>
|
||||
</property>
|
||||
<widget class="QLabel" name="errorLabel">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>30</x>
|
||||
<y>850</y>
|
||||
<width>500</width>
|
||||
<height>28</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>similarity</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QProgressBar" name="progressBar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>40</x>
|
||||
<y>40</y>
|
||||
<width>481</width>
|
||||
<height>101</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>50</x>
|
||||
<y>60</y>
|
||||
<width>431</width>
|
||||
<height>61</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>20</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Please wait for this window to close</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
Loading…
Reference in a new issue