6#ifndef ATLASGAMEMANAGER_PROGRESSNOTIFICATION_HPP
7#define ATLASGAMEMANAGER_PROGRESSNOTIFICATION_HPP
10#include <QFutureWatcher>
39 Ui::ProgressNotification*
ui;
48 std::uint64_t
max { 0 };
57 template <
typename T >
58 requires std::is_integral_v< T >
61 if constexpr ( std::is_same_v< T, int > )
68 if constexpr ( std::is_same_v< T,
decltype(
counter ) > )
98template <
typename T >
120 &Watcher::progressValueChanged,
121 [
this ](
const int progress ) {
m_signaler.setProgress( progress ); } ) );
125 &Watcher::progressRangeChanged,
126 [
this ]( [[maybe_unused]]
const int min,
const int max ) {
m_signaler.setMax( max ); } ) );
138 connect( &
m_watcher, &Watcher::started, [
this ]() {
m_signaler.setSubMessage(
"Started" ); } ) );
std::vector< QMetaObject::Connection > m_signals
Definition ProgressNotification.hpp:110
FutureWatcherSignaler(QFuture< T > future)
Definition ProgressNotification.hpp:116
QFuture< T > Future
Definition ProgressNotification.hpp:103
~FutureWatcherSignaler()
Definition ProgressNotification.hpp:143
Watcher m_watcher
Definition ProgressNotification.hpp:107
FutureWatcherSignaler()=delete
QFutureWatcher< T > Watcher
Definition ProgressNotification.hpp:104
Future m_future
Definition ProgressNotification.hpp:106
ProgressSignaler m_signaler
Definition ProgressNotification.hpp:108
Notification(QWidget *parent=nullptr)
Definition Notification.cpp:22
Definition ProgressNotification.hpp:26
friend class ProgressSignaler
Definition ProgressNotification.hpp:35
ProgressNotification(QWidget *parent=nullptr)
Definition ProgressNotification.cpp:17
~ProgressNotification() override
Definition ProgressNotification.cpp:24
Ui::ProgressNotification * ui
Definition ProgressNotification.hpp:39
Definition ProgressNotification.hpp:43
void subMessageChanged(const QString str)
ProgressSignaler()
Definition ProgressNotification.cpp:56
void setMessage(const QString str)
Definition ProgressNotification.cpp:51
void hookSignaler(ProgressNotification *notif)
Definition ProgressNotification.cpp:29
void setProgress(T i)
Definition ProgressNotification.hpp:59
std::uint64_t max
Definition ProgressNotification.hpp:48
void messageChanged(const QString str)
std::uint64_t counter
Definition ProgressNotification.hpp:47
void triggerSelfClose()
Definition ProgressNotification.hpp:85
void setSubMessage(const QString str)
Definition ProgressNotification.cpp:46
void setMax(int i)
Definition ProgressNotification.cpp:40
void progressChanged(int i)
~ProgressSignaler()
Definition ProgressNotification.cpp:74
Definition NotificationSignalers.hpp:15
Definition AboutAtlas.hpp:9