Continues migration with DDS, Common
This commit is contained in:
1 parent
9b15cee841
commit
fa48db111e
668 files changed
+111841
-2
No files matched your search
+69
@@ -0,0 +1,69 @@
|
||||
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "lts_widgets_export.h"
|
||||
|
||||
#include <QObject>
|
||||
|
||||
|
||||
class QTimer;
|
||||
class QWidget;
|
||||
|
||||
|
||||
namespace LtsWidgets
|
||||
{
|
||||
class LtsDialog;
|
||||
class LtsOverlayLoading;
|
||||
class LtsProgressDialogHelper;
|
||||
|
||||
|
||||
class LTSWIDGETS_EXPORT LtsGlobalWaitDialog : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static LtsGlobalWaitDialog* getInstance();
|
||||
void wait(QWidget *parent, const QString &customText = QString());
|
||||
void wait(const QString &customText = QString()) { wait(nullptr, customText); }
|
||||
void done();
|
||||
void setVisible(bool visible = true);
|
||||
void setCustomText(const QString &customText = QString());
|
||||
void unarm();
|
||||
void rearm();
|
||||
|
||||
private:
|
||||
friend struct LtsGlobalWaitDialogHandler;
|
||||
|
||||
LtsGlobalWaitDialog();
|
||||
~LtsGlobalWaitDialog();
|
||||
static void cleanupGwdInstance();
|
||||
|
||||
void showIt();
|
||||
void hideIt();
|
||||
|
||||
int m_waitingCount;
|
||||
bool m_visible;
|
||||
bool m_armed { true };
|
||||
LtsProgressDialogHelper *m_progressDialog;
|
||||
QTimer *m_hideTimer;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
class LTSWIDGETS_EXPORT Waiter
|
||||
{
|
||||
public:
|
||||
explicit Waiter(const QString &customText = {});
|
||||
explicit Waiter(LtsWidgets::LtsDialog *parent, const QString &customText = {});
|
||||
~Waiter();
|
||||
|
||||
private:
|
||||
LtsWidgets::LtsOverlayLoading *m_loadingOverlay { nullptr };
|
||||
LtsWidgets::LtsDialog *m_parent { nullptr };
|
||||
bool m_oldClosableState { false };
|
||||
};
|
||||
Reference in new issue
Block a user