Lts/Common: drop the 17 submodules excluded from the RELEASE_BUILD branch of Lts/Common/CMakeLists.txt (CodeGen, LtsAppManager, LtsBotan, LtsCoordinate, LtsElevation, LtsLogin, LtsMultiMonitor, LtsPluginManager, LtsPrinting, LtsProjectionWorkstation, LtsScriptTimeline, LtsSession, LtsTimeline, LtsTimelineClassic, LtsVirtualKeyboard, LtsWidgets, TopicEditorBase). Only the 13 subdirectories actually built remain. TrainingAreaBase: drop sources of targets excluded by IF(NOT RELEASE_BUILD) / IF(BUILD_RTI) (svcTabClient, svcTabServer, svcTrainingAreaBase exe, RecordReplayPlugin customization) and the 7 plugin directories not added in the release path (AdlerJson, ApacheHlaJson, DebugJsonDir, HlaJson, Nmea, UAS, WlsTetra). Only tabTelegrams, svcTabCommon and the TetraJson plugin are compiled. Cross-checked: no kept compiled source includes headers from the removed modules (GuiPluginInterface - the only LtsWidgets consumer - is itself NOT RELEASE_BUILD-guarded).
78 lines
2.2 KiB
C++
78 lines
2.2 KiB
C++
/**
|
|
* @RDE_HEADER@
|
|
* Frameless Dialog, modal, exists exactly once per - a global/static wait dlg which counts for all compontens that are waiting for their operation to be done but don't want to own a progress dialog !
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
*
|
|
* Created by Mike Wille, SLSE, 2017-03-17
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "lts_widgets_export.h"
|
|
|
|
#include <QtCore/QObject>
|
|
|
|
|
|
class QTimer;
|
|
class QWidget;
|
|
|
|
|
|
namespace LtsWidgets
|
|
{
|
|
class LtsDialog;
|
|
class LtsOverlayLoading;
|
|
class LtsProgressDialogHelper;
|
|
/**
|
|
* @brief The LtsGlobalWaitDialog class is a global/static wait dlg which counts for all compontens that are waiting for their operation to be done but don't want to own a progress dialog !
|
|
*/
|
|
class LTSWIDGETS_EXPORT LtsGlobalWaitDialog : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
static LtsGlobalWaitDialog* getInstance();
|
|
void wait(QWidget *parent, const QString &customText = QString()); // shows the Progress Dialog
|
|
void wait(const QString &customText = QString()) { wait(nullptr, customText); }
|
|
void done(); // hides the Progress Dialog IF all wait()s were canceled with done() !
|
|
void setVisible(bool visible = true);
|
|
void setCustomText(const QString &customText = QString()); // call with empty string to reset text to default text "waiting for server"
|
|
void unarm(); // deactivate the global wait dialog from showing up (e.g. wait dialog should not be recorded while recording a script in the script editor)
|
|
void rearm(); // undo the unarm (re-activate global wait dialog)
|
|
|
|
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;
|
|
};
|
|
|
|
} // namespace LtsWidgets
|
|
|
|
|
|
|
|
// 'hyper-global' stuff into main namespace
|
|
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 };
|
|
};
|