Qt6 Migration: LtsWidgets, BUILD_RTI Guards, externe Dependencies dokumentiert
- LtsWidgets Verzeichnis vollständig migriert (Qt5→Qt6) - BUILD_RTI Guards für RTI-spezifische Module hinzugefügt - Externe Dependencies in EXTERNAL_DEPS.md dokumentiert - Qt6 API-Änderungen: QRegExp→QRegularExpression, enterEvent(QEnterEvent*) - AutoUic-Fehler bei ui_requirement behoben (SKIP_AUTOUIC) - Include-Pfade korrigiert (LtsElevation, LtsMultiMonitor, LtsUtilsCore) - MOC-Fehler behoben (Q_INTERFACES entfernt wo nicht benötigt) - CMakeLists.txt Anpassungen für Qt6 (PUBLIC statt INTERFACE) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
145 files changed
+17700
-14377
No files matched your search
@@ -1,4 +1,12 @@
|
||||
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Helper Class, which manages a progress Dialog with two states.
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*
|
||||
* Created by Mike Wille, SLSE, 2016-06-20
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -14,49 +22,61 @@ namespace LtsWidgets
|
||||
{
|
||||
class LtsFramelessDialog;
|
||||
|
||||
/**
|
||||
* @brief The LtsProgressDialogHelper class is a helper class, which can be used to easily
|
||||
* show a Dialog with eather a wait state (indefinite progress bar), or a default message,
|
||||
* adjusted to the result type (see ReplyResult)
|
||||
*/
|
||||
class LTSWIDGETS_EXPORT LtsProgressDialogHelper : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
enum class ReplyResult {
|
||||
Close = 0,
|
||||
Success,
|
||||
Failure,
|
||||
TimeOut,
|
||||
};
|
||||
public:
|
||||
/**
|
||||
* @brief The ReplyResult enum describes the behaviour of the slotSopWaitForReplyWindow method.
|
||||
*/
|
||||
enum class ReplyResult
|
||||
{
|
||||
Close = 0, // say nothing, just close automatically
|
||||
Success, // dialog with success message, has to be receipted
|
||||
Failure, // dialog with failure message plus reply string, has to be receipted
|
||||
TimeOut, // dialog with timeout message, has to be receipted
|
||||
};
|
||||
|
||||
explicit LtsProgressDialogHelper(QWidget* parent = nullptr);
|
||||
~LtsProgressDialogHelper();
|
||||
explicit LtsProgressDialogHelper(QWidget *parent = nullptr);
|
||||
~LtsProgressDialogHelper();
|
||||
bool isShown() const { return !!m_waitDlg; }
|
||||
void setCustomText(const QString &customText = QString());
|
||||
|
||||
bool isShown() const
|
||||
{
|
||||
return !!m_waitDlg;
|
||||
}
|
||||
void setParentWidget(QWidget *newParent);
|
||||
|
||||
void setCustomText(const QString& customText = QString());
|
||||
public slots:
|
||||
/**
|
||||
* @brief slotShowWaitForReplyWindow shows a centered wait dialog which does not allow the user to interact with the application and cannot be canceled.
|
||||
*/
|
||||
void slotShowWaitForReplyWindow(/*const QString &textToShow*/);
|
||||
|
||||
void setParentWidget(QWidget* newParent);
|
||||
/**
|
||||
* @brief slotStopWaitForReplyWindow closes the wait dialog. Nothing happens when there was no show wait dialog called before.
|
||||
* @param replyResult The wait dialog is closed on ReplyResult::Close. A new centered, modal dialog is shown on ReplyResult::Failure/Success/Timeout with an error message in it.
|
||||
* @param replyString An explanatory string shown on ReplyResult::Failure to tell the user what went wrong on.
|
||||
*/
|
||||
void slotStopWaitForReplyWindow(const LtsWidgets::LtsProgressDialogHelper::ReplyResult &replyResult = ReplyResult::Close /* say nothing, just close */,
|
||||
const QString &replyString = QString());
|
||||
|
||||
public slots:
|
||||
private:
|
||||
QPointer<LtsFramelessDialog> m_waitDlg;
|
||||
QWidget *m_parentWidget;
|
||||
QPointer<QLabel> m_textLabel;
|
||||
|
||||
void slotShowWaitForReplyWindow();
|
||||
signals:
|
||||
/**
|
||||
* @brief accepted is emitted when accept() was called (e.g. by clicking okay)
|
||||
*/
|
||||
void accepted();
|
||||
|
||||
void
|
||||
slotStopWaitForReplyWindow(const LtsWidgets::LtsProgressDialogHelper::ReplyResult& replyResult = ReplyResult::Close,
|
||||
const QString& replyString = QString());
|
||||
|
||||
private:
|
||||
QPointer<LtsFramelessDialog> m_waitDlg;
|
||||
QWidget* m_parentWidget;
|
||||
QPointer<QLabel> m_textLabel;
|
||||
|
||||
signals:
|
||||
|
||||
void accepted();
|
||||
|
||||
private slots:
|
||||
void accept();
|
||||
private slots:
|
||||
void accept();
|
||||
};
|
||||
|
||||
} // namespace LtsWidgets
|
||||
}
|
||||
Reference in new issue
Block a user