- 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>
54 lines
1.0 KiB
C++
54 lines
1.0 KiB
C++
|
|
|
|
#include "lts_splitter.h"
|
|
|
|
#include "lts_splitter_handle.h"
|
|
|
|
namespace LtsWidgets
|
|
{
|
|
|
|
LtsSplitter::LtsSplitter(QWidget* parent) : QSplitter(parent)
|
|
{
|
|
connect(this, &LtsSplitter::sizesChanged, this, &LtsSplitter::changeSizes);
|
|
}
|
|
|
|
LtsSplitter::~LtsSplitter() {}
|
|
|
|
QSplitterHandle* LtsSplitter::createHandle()
|
|
{
|
|
LtsSplitterHandle* hand = new LtsSplitterHandle(orientation(), this);
|
|
#ifdef TABLET_MODE
|
|
setHandleWidth(25);
|
|
#else
|
|
setHandleWidth(10);
|
|
#endif
|
|
return hand;
|
|
}
|
|
|
|
void LtsSplitter::collapseChild(const int index)
|
|
{
|
|
if (children().size() > index)
|
|
{
|
|
QWidget* widget = static_cast<QWidget*>(children().at(index));
|
|
if (widget)
|
|
{
|
|
QList<int> s = sizes();
|
|
s[index] = 0;
|
|
setSizes(s);
|
|
}
|
|
}
|
|
}
|
|
|
|
void LtsSplitter::animate(int handleId)
|
|
{
|
|
LtsSplitterHandle* handle = dynamic_cast<LtsSplitterHandle*>(this->handle(handleId));
|
|
handle->animate();
|
|
}
|
|
|
|
void LtsSplitter::changeSizes(const QList<int>& list)
|
|
{
|
|
QSplitter::setSizes(list);
|
|
}
|
|
|
|
} // namespace LtsWidgets
|