Files
qt-migration-legatus/qt6-after/qt6-migrated-legatus/Lts/Common/LtsWidgets/lts_tab_sequence_widget.cpp
T
berrux-dev 855b0a6101 Remove modules not compiled by this branch's release build
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).
2026-10-13 19:19:55 +02:00

66 lines
1.6 KiB
C++

/**
* @RDE_HEADER@
* widget for creating a tab view of dds sequences
* $Id$
* $HeadURL$
* $Author$
* Created by Verena Eberlein , SPMO, 2023-08-03
*/
#include "lts_tab_sequence_widget.h"
#include <QTabBar>
#include <QtWidgets/QTabWidget>
#include <QtWidgets/QToolButton>
#include <QtWidgets/QHBoxLayout>
namespace LtsWidgets
{
LtsTabSequenceWidget::LtsTabSequenceWidget(QWidget *parent)
: LtsAbstractSequenceWidget(parent)
, m_twSequences(new QTabWidget(this))
{
QHBoxLayout *gridLayout = new QHBoxLayout(this);
gridLayout->addWidget(m_twSequences);
gridLayout->addWidget(pbAddMember(), Qt::AlignTop);
m_twSequences->setCornerWidget(pbAddMember());
pbAddMember()->setFixedSize(m_twSequences->tabBar()->size());
pbAddMember()->setIconSize(m_twSequences->tabBar()->size());
}
LtsTabSequenceWidget::~LtsTabSequenceWidget()
{
delete pbAddMember();
delete m_twSequences;
}
void LtsTabSequenceWidget::setupMemberWidget(QWidget *child, QToolButton *pbChild, const QString &objectName, bool isButtonVisible)
{
int index = m_twSequences->addTab(child, objectName);
if(isButtonVisible)
m_twSequences->tabBar()->setTabButton(index, QTabBar::RightSide, pbChild);
}
QWidget* LtsTabSequenceWidget::getWidget(int index)
{
return m_twSequences->widget(index);
}
QWidget* LtsTabSequenceWidget::getCurrentWidget()
{
return m_twSequences->currentWidget();
}
int LtsTabSequenceWidget::getCurrentTabIndex()
{
return m_twSequences->currentIndex();
}
void LtsTabSequenceWidget::changeTabName(const QString &name)
{
m_twSequences->setTabText(m_twSequences->currentIndex(), name);
}
} // namespace LtsWidgets