MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / doChecked

Method doChecked

src/common/widget/collapsewidget.cpp:192–207  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

190}
191
192void CollapseWidget::doChecked(bool checked)
193{
194 //默认展开状态, 点击时首先隐藏
195 if (d->widget) {
196 if (checked){
197 d->widget->hide();
198 d->animation.setStartValue(d->maxHeight);
199 d->animation.setEndValue(d->minHeight);
200 } else{
201 d->widget->show();
202 d->animation.setStartValue(d->minHeight);
203 d->animation.setEndValue(qMax(d->maxHeight, d->minHeight));
204 }
205 d->animation.start();
206 }
207}
208
209void CollapseWidget::resetHeight(const QVariant &value)
210{

Callers 1

setCheckedMethod · 0.95

Calls 3

hideMethod · 0.45
showMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected