mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-11-25 01:30:34 +01:00
[desktop] Port some QtCommon changes from QML branch (#3703)
- Linker now resolves implementation differences - Remove unneeded ifdefs - Better abstractions overall Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3703 Reviewed-by: Lizzie <lizzie@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
This commit is contained in:
parent
07e3a2aa46
commit
0ff1d215c8
36 changed files with 405 additions and 371 deletions
37
src/yuzu/libqt_common.h
Normal file
37
src/yuzu/libqt_common.h
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "qt_common/abstract/progress.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;
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue