- 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>
43 lines
849 B
C++
43 lines
849 B
C++
/**
|
|
* @RDE_HEADER@
|
|
* LtsWidget - a QLabel which elides the text if necessary
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Christian Ehrlicher, NLE, 2018-12-17
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <QLabel>
|
|
#include <LtsWidgets/lts_widgets_export.h>
|
|
|
|
namespace LtsWidgets
|
|
{
|
|
|
|
class LTSWIDGETS_EXPORT LtsElidedLabel : public QLabel
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
Q_PROPERTY(Qt::TextElideMode ElideMode READ elideMode WRITE setElideMode)
|
|
|
|
using QLabel::QLabel;
|
|
|
|
void setElideMode(Qt::TextElideMode elideMode);
|
|
Qt::TextElideMode elideMode() const { return m_elideMode; }
|
|
|
|
protected:
|
|
void paintEvent(QPaintEvent *e) override;
|
|
void resizeEvent(QResizeEvent *e) override;
|
|
|
|
private:
|
|
void updateCachedTexts();
|
|
|
|
private:
|
|
Qt::TextElideMode m_elideMode = Qt::ElideRight;
|
|
QString m_cachedElidedText;
|
|
QString m_cachedText;
|
|
};
|
|
|
|
} // namespace LtsWidgets
|