MCPcopy Create free account
hub / github.com/Linloir/GraphBuilder / Select

Method Select

customWidgets.cpp:206–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

204}
205
206void selectionItem::Select(){
207 if(!onSelected){
208 onSelected = true;
209 title->setStyleSheet("color:#005FB8");
210 description->setStyleSheet("color:#3a8fb7");
211 indicator->setGeometry(4, 0.5 * this->height(), 6, 0);
212
213 QParallelAnimationGroup *sel = new QParallelAnimationGroup(this);
214 QPropertyAnimation *longer = new QPropertyAnimation(indicator, "geometry", this);
215 longer->setStartValue(indicator->geometry());
216 longer->setEndValue(QRectF(4, 0.3 * this->height(), 6, this->height() * 0.4));
217 longer->setDuration(150);
218 longer->setEasingCurve(QEasingCurve::OutBack);
219 QPropertyAnimation *fadeIn = new QPropertyAnimation(opac, "opacity", this);
220 fadeIn->setStartValue(opac->opacity());
221 fadeIn->setEndValue(0.99);
222 fadeIn->setDuration(100);
223 sel->addAnimation(longer);
224 sel->addAnimation(fadeIn);
225 sel->start();
226
227 emit selected(this);
228 }
229}
230
231void selectionItem::Deselect(){
232 if(onSelected){

Callers 3

AddItemMethod · 0.80
RemoveItemMethod · 0.80
SetSelectionMethod · 0.80

Calls 1

addAnimationMethod · 0.80

Tested by

no test coverage detected