|
|
|
@ -1,11 +1,13 @@
|
|
|
|
// SPDX-FileCopyrightText: 2019-2022 Connor McLaughlin <stenzek@gmail.com>
|
|
|
|
// SPDX-FileCopyrightText: 2019-2023 Connor McLaughlin <stenzek@gmail.com>
|
|
|
|
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
|
|
|
|
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
|
|
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
|
|
#include "common/progress_callback.h"
|
|
|
|
#include "common/progress_callback.h"
|
|
|
|
#include "common/timer.h"
|
|
|
|
#include "common/timer.h"
|
|
|
|
#include <QtCore/QThread>
|
|
|
|
|
|
|
|
#include <QtCore/QSemaphore>
|
|
|
|
#include <QtCore/QSemaphore>
|
|
|
|
|
|
|
|
#include <QtCore/QThread>
|
|
|
|
#include <QtWidgets/QProgressDialog>
|
|
|
|
#include <QtWidgets/QProgressDialog>
|
|
|
|
#include <atomic>
|
|
|
|
#include <atomic>
|
|
|
|
|
|
|
|
|
|
|
|
@ -17,7 +19,7 @@ public:
|
|
|
|
QtModalProgressCallback(QWidget* parent_widget, float show_delay = 0.0f);
|
|
|
|
QtModalProgressCallback(QWidget* parent_widget, float show_delay = 0.0f);
|
|
|
|
~QtModalProgressCallback();
|
|
|
|
~QtModalProgressCallback();
|
|
|
|
|
|
|
|
|
|
|
|
bool IsCancelled() const override;
|
|
|
|
QProgressDialog& GetDialog() { return m_dialog; }
|
|
|
|
|
|
|
|
|
|
|
|
void SetCancellable(bool cancellable) override;
|
|
|
|
void SetCancellable(bool cancellable) override;
|
|
|
|
void SetTitle(const char* title) override;
|
|
|
|
void SetTitle(const char* title) override;
|
|
|
|
@ -34,6 +36,9 @@ public:
|
|
|
|
bool ModalConfirmation(const char* message) override;
|
|
|
|
bool ModalConfirmation(const char* message) override;
|
|
|
|
void ModalInformation(const char* message) override;
|
|
|
|
void ModalInformation(const char* message) override;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private Q_SLOTS:
|
|
|
|
|
|
|
|
void dialogCancelled();
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
private:
|
|
|
|
void checkForDelayedShow();
|
|
|
|
void checkForDelayedShow();
|
|
|
|
|
|
|
|
|
|
|
|
|