DynExp
Highly flexible laboratory automation for dynamically changing experiments.
Loading...
Searching...
No Matches
BusyDialog.h
Go to the documentation of this file.
1// This file is part of DynExp.
2
8#pragma once
9
10#include <QWidget>
11#include "ui_BusyDialog.h"
12
13class BusyDialog : public QDialog
14{
15 Q_OBJECT
16
17public:
18 using CheckFinishedFunctionType = std::function<bool(void)>;
19
20 BusyDialog(QWidget* parent);
21 ~BusyDialog() = default;
22
23 auto GetException() const noexcept { return Exception; }
24
25 void SetDescriptionText(QString Text);
27
28private:
29 virtual void showEvent(QShowEvent* event) override;
30 virtual void closeEvent(QCloseEvent* event) override;
31 virtual void reject() override;
32
33 Ui::BusyDialog ui;
35
37 std::exception_ptr Exception;
38
39private slots:
40 void OnCheckFinished();
41};
~BusyDialog()=default
CheckFinishedFunctionType CheckFinishedFunction
Definition BusyDialog.h:36
virtual void closeEvent(QCloseEvent *event) override
void SetDescriptionText(QString Text)
std::exception_ptr Exception
Definition BusyDialog.h:37
std::function< bool(void)> CheckFinishedFunctionType
Definition BusyDialog.h:18
void SetCheckFinishedFunction(const CheckFinishedFunctionType CheckFinishedFunction)
void OnCheckFinished()
virtual void showEvent(QShowEvent *event) override
QTimer * CheckFinishedTimer
Definition BusyDialog.h:34
Ui::BusyDialog ui
Definition BusyDialog.h:33
auto GetException() const noexcept
Definition BusyDialog.h:23
virtual void reject() override