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

Method initConnection

src/plugins/recent/mainframe/sessionitemwidget.cpp:203–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201}
202
203void SessionItemWidgetPrivate::initConnection()
204{
205 connect(headerLine, &ArrowHeaderLine::expandChanged, this, [this] {
206 q->setExpand(!q->expand());
207 });
208 connect(boxWidget, &DVBoxWidget::sizeChanged, this, [this] {
209 if (expand) {
210 int endHeight = 0;
211 endHeight = boxWidget->height();
212
213 animation->setStartValue(contentLoader->height());
214 animation->setEndValue(endHeight);
215 animation->stop();
216 animation->start();
217 }
218 });
219 connect(animation, &QPropertyAnimation::valueChanged, this, [this] {
220 q->setFixedHeight(q->sizeHint().height());
221 });
222 connect(headerLine, &ArrowHeaderLine::itemClicked, this, &SessionItemWidgetPrivate::openSession);
223 connect(cloneBtn, &DIconButton::clicked, this, &SessionItemWidgetPrivate::cloneSession);
224 connect(renameBtn, &DIconButton::clicked, this, &SessionItemWidgetPrivate::renameSession);
225 connect(removeBtn, &DIconButton::clicked, this, &SessionItemWidgetPrivate::removeSession);
226}
227
228QWidget *SessionItemWidgetPrivate::createContent()
229{

Callers 1

SessionItemWidgetMethod · 0.45

Calls 6

connectFunction · 0.85
setExpandMethod · 0.80
expandMethod · 0.45
stopMethod · 0.45
startMethod · 0.45
sizeHintMethod · 0.45

Tested by

no test coverage detected