- 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>
55 lines
1.1 KiB
C++
55 lines
1.1 KiB
C++
/**
|
|
* @RDE_HEADER@
|
|
* An overlay for LtsDialog's setOverlay(..) which shows a 'loading bar'
|
|
* (a progress bar in a special state) and a default label "Loading ...", which
|
|
* can be altered
|
|
* $Id: $
|
|
* $HeadURL: $
|
|
* $Author: $
|
|
*
|
|
* Created by Mike Lennart Wille, SLTE, 2022-07-07
|
|
*/
|
|
|
|
#include "lts_overlay_loading.h"
|
|
#include "ui_lts_overlay_loading.h"
|
|
|
|
#include <QHBoxLayout>
|
|
#include <QLabel>
|
|
#include <QProgressBar>
|
|
#include <QPushButton>
|
|
|
|
|
|
namespace LtsWidgets
|
|
{
|
|
LtsOverlayLoading::LtsOverlayLoading(QWidget *parent)
|
|
: QWidget(parent)
|
|
, m_ui(new Ui::LtsOverlayLoading)
|
|
{
|
|
m_ui->setupUi(this);
|
|
setCancelButtonVisible(false);
|
|
connect(m_ui->pbCancel, &QPushButton::clicked,
|
|
this, [this](){ setCancelButtonEnabled(false); });
|
|
connect(m_ui->pbCancel, &QPushButton::clicked,
|
|
this, &LtsOverlayLoading::cancel);
|
|
}
|
|
|
|
|
|
void LtsOverlayLoading::setText(const QString &text)
|
|
{
|
|
m_ui->label->setText(text);
|
|
}
|
|
|
|
|
|
void LtsOverlayLoading::setCancelButtonVisible(bool visible)
|
|
{
|
|
m_ui->pbCancel->setVisible(visible);
|
|
}
|
|
|
|
|
|
void LtsOverlayLoading::setCancelButtonEnabled(bool enabled)
|
|
{
|
|
m_ui->pbCancel->setEnabled(enabled);
|
|
}
|
|
|
|
} // namespace LtsWidgets
|