MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / Collapse

Method Collapse

lib/utils/section.cpp:45–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45void Section::Collapse(bool collapse)
46{
47 if (_contentHeight != _content->sizeHint().height()) {
48 _contentHeight = _content->sizeHint().height();
49 }
50 SetupAnimations();
51
52 _toggleButton->setChecked(collapse);
53 _toggleButton->setArrowType(collapse ? Qt::ArrowType::RightArrow
54 : Qt::ArrowType::DownArrow);
55 if (!_toggleAnimation) {
56 _collapsed = collapse;
57 emit Collapsed(collapse);
58 return;
59 }
60
61 _toggleAnimation->setDirection(collapse ? QAbstractAnimation::Backward
62 : QAbstractAnimation::Forward);
63 _transitioning = true;
64 _collapsed = collapse;
65 _toggleAnimation->start();
66 emit Collapsed(collapse);
67}
68
69void Section::SetContent(QWidget *w)
70{

Callers

nothing calls this directly

Calls 3

setCheckedMethod · 0.80
sizeHintMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected