Browse Source
improved Quick/Widgets abstractor; Quick progress dialogs
improved Quick/Widgets abstractor; Quick progress dialogs
Signed-off-by: crueter <crueter@eden-emu.dev>pull/3016/head
No known key found for this signature in database
GPG Key ID: 425ACD2D4830EBC6
15 changed files with 324 additions and 103 deletions
-
2src/Eden/Native/CMakeLists.txt
-
6src/Eden/Native/EdenApplication.cpp
-
73src/Eden/Native/LibQtCommon.cpp
-
33src/Eden/Native/LibQtCommon.h
-
5src/qt_common/CMakeLists.txt
-
17src/qt_common/abstract/qt_progress_dialog.cpp
-
51src/qt_common/abstract/qt_progress_dialog.h
-
4src/qt_common/externals/cpmfile.json
-
17src/qt_common/qt_common.cpp
-
1src/qt_common/qt_common.h
-
100src/qt_common/util/content.cpp
-
1src/yuzu/CMakeLists.txt
-
77src/yuzu/libqt_common.cpp
-
33src/yuzu/libqt_common.h
-
5src/yuzu/main_window.cpp
@ -0,0 +1,33 @@ |
|||
#pragma once |
|||
|
|||
#include "qt_common/abstract/qt_progress_dialog.h" |
|||
|
|||
#include <CarboxylProgressDialog.h> |
|||
|
|||
namespace QtCommon::Frontend { |
|||
class QuickProgressDialog : public QtProgressDialog { |
|||
Q_OBJECT |
|||
public: |
|||
QuickProgressDialog(const QString& labelText, const QString& cancelButtonText, int minimum, |
|||
int maximum, QObject* parent = nullptr, Qt::WindowFlags f = {}); |
|||
|
|||
bool wasCanceled() const override; |
|||
void setWindowModality(Qt::WindowModality modality) override; |
|||
void setMinimumDuration(int durationMs) override; |
|||
void setAutoClose(bool autoClose) override; |
|||
void setAutoReset(bool autoReset) override; |
|||
|
|||
public slots: |
|||
void setTitle(QString title) override; |
|||
void setLabelText(QString text) override; |
|||
void setMinimum(int min) override; |
|||
void setMaximum(int max) override; |
|||
void setValue(int value) override; |
|||
bool close() override; |
|||
void show() override; |
|||
|
|||
private: |
|||
CarboxylProgressDialog* m_dialog; |
|||
}; |
|||
|
|||
} |
|||
@ -1,4 +1,15 @@ |
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
|||
|
|||
#include "qt_progress_dialog.h"
|
|||
|
|||
namespace QtCommon::Frontend { |
|||
|
|||
QtProgressDialog::QtProgressDialog(const QString&, |
|||
const QString&, |
|||
int, |
|||
int, |
|||
QObject* parent, |
|||
Qt::WindowFlags) |
|||
: QObject(parent) |
|||
{} |
|||
|
|||
QtProgressDialog::~QtProgressDialog() {} |
|||
} |
|||
@ -0,0 +1,33 @@ |
|||
#pragma once |
|||
|
|||
#include "qt_common/abstract/qt_progress_dialog.h" |
|||
|
|||
#include <QProgressDialog> |
|||
|
|||
namespace QtCommon::Frontend { |
|||
class WidgetsProgressDialog : public QtProgressDialog { |
|||
Q_OBJECT |
|||
public: |
|||
WidgetsProgressDialog(const QString& labelText, const QString& cancelButtonText, int minimum, |
|||
int maximum, QWidget* parent = nullptr, Qt::WindowFlags f = {}); |
|||
|
|||
bool wasCanceled() const override; |
|||
void setWindowModality(Qt::WindowModality modality) override; |
|||
void setMinimumDuration(int durationMs) override; |
|||
void setAutoClose(bool autoClose) override; |
|||
void setAutoReset(bool autoReset) override; |
|||
|
|||
public slots: |
|||
void setTitle(QString title) override; |
|||
void setLabelText(QString text) override; |
|||
void setMinimum(int min) override; |
|||
void setMaximum(int max) override; |
|||
void setValue(int value) override; |
|||
bool close() override; |
|||
void show() override; |
|||
|
|||
private: |
|||
QProgressDialog* m_dialog; |
|||
}; |
|||
|
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue