- Formatted all CodeGen module files (9 files) - Formatted LtsAppDescriptor module files - Formatted LtsAppManager/AppChooser files - Applied clang-format to all DTC and enum headers across modules - Removed coordTransTests from CommonUnitTestsPlaceholder (moved to tests/) Cosmetic changes only, no functional modifications. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
60 lines
1.5 KiB
C++
60 lines
1.5 KiB
C++
|
|
|
|
#include "lts_tab_sequence_widget.h"
|
|
|
|
#include <QHBoxLayout>
|
|
#include <QTabBar>
|
|
#include <QTabWidget>
|
|
#include <QToolButton>
|
|
|
|
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
|