Files
qt-migration-legatus/qt6-after/qt6-migrated-legatus/Lts/Common/LtsWidgets/lts_tab_bar.h
T
torstenandCopilot d890b11c5f 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>
2026-08-21 10:29:34 +02:00

52 lines
1.2 KiB
C++

/**
* @RDE_HEADER@
* TabBar with special stylesheet settings
* $Id$
* $HeadURL$
* $Author$
*/
#pragma once
#include <QTabBar>
#include "lts_widgets_export.h"
namespace LtsWidgets
{
/**
* @brief The LtsTabBar class provides a QTabBar with the ability to be a master tab or a secondary tab inside a master tab. This allows tabs to be sorted
* into a group of a whole, which promotes better overview.
*/
class LTSWIDGETS_EXPORT LtsTabBar : public QTabBar
{
Q_OBJECT
Q_PROPERTY(bool secondary MEMBER m_secondary)
public:
/**
* @brief LtsTabBar creates a QTabBar
* @param isSecondary true if this is a secondary tab bar, false if this is a master tab bar
* @param width Debug value - do not use
* @param parent The parent.
*/
explicit LtsTabBar(bool isSecondary = false, QWidget *parent = nullptr);
/**
* @brief Do not use.
*/
void _internal_closeTab();
protected:
void onCustomContextMenuRequested(const QPoint pos);
void onSaveCurrentWidgetAsImage(const QPoint pos);
private:
bool m_secondary;
public slots:
void updateCloseButtonColors(int newIndex = -1); // has to be called AFTER a new Close Button was added, to set his initial status (selected yes/no) - as this does not happen automatically
};
}