- 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>
74 lines
1.6 KiB
C++
74 lines
1.6 KiB
C++
#include "indicator.h"
|
|
|
|
#include "ui_indicator.h"
|
|
|
|
#include <QTimer>
|
|
|
|
namespace LtsScriptTimeline
|
|
{
|
|
|
|
Indicator::Indicator(QWidget* parent) : QWidget(parent), ui(new Ui::Indicator)
|
|
{
|
|
ui->setupUi(this);
|
|
|
|
connect(ui->splitter, &QSplitter::splitterMoved, this, &Indicator::slotSplitterMoved);
|
|
|
|
connect(ui->m_widgetTrackHeader, &TrackHeader::signalHeaderIndicatorTimeChanged, this,
|
|
&Indicator::signalHeaderIndicatorTimeChanged);
|
|
connect(ui->m_widgetTrackHeader, &TrackHeader::signalHeaderIndicatorTimeUserChanged, this,
|
|
&Indicator::signalHeaderIndicatorTimeUserChanged);
|
|
|
|
QList<int> sizes;
|
|
sizes << 100 << 900;
|
|
ui->splitter->setSizes(sizes);
|
|
|
|
QTimer::singleShot(500, this, [this]() {
|
|
slotSplitterMoved();
|
|
emit signalHeaderIndicatorTimeUserChanged(ui->m_widgetTrackHeader->indicatorTime());
|
|
ui->m_widgetTrackHeader->recreatePositionLabels();
|
|
});
|
|
}
|
|
|
|
Indicator::~Indicator()
|
|
{
|
|
delete ui;
|
|
}
|
|
|
|
void Indicator::setTools(Tools* tools)
|
|
{
|
|
ui->m_widgetTrackHeader->setTools(tools);
|
|
}
|
|
|
|
void Indicator::lockIndicator(bool lock)
|
|
{
|
|
ui->m_widgetTrackHeader->lockIndicator(lock);
|
|
}
|
|
|
|
void Indicator::setIndicatorTime(int time)
|
|
{
|
|
ui->m_widgetTrackHeader->setIndicatorTime(time);
|
|
}
|
|
|
|
void Indicator::updateMe()
|
|
{
|
|
ui->m_widgetTrackHeader->updateMe();
|
|
update();
|
|
}
|
|
|
|
void Indicator::resizeEvent(QResizeEvent*)
|
|
{
|
|
slotSplitterMoved();
|
|
}
|
|
|
|
void Indicator::slotSplitterMoved()
|
|
{
|
|
int newSize = ui->m_widgetTrackLabel->width() + ui->splitter->handleWidth();
|
|
|
|
if (newSize < 0)
|
|
newSize = 0;
|
|
|
|
emit signalHandleResized(newSize);
|
|
}
|
|
|
|
} // namespace LtsScriptTimeline
|