| 204 | } |
| 205 | |
| 206 | void 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 | |
| 231 | void selectionItem::Deselect(){ |
| 232 | if(onSelected){ |
no test coverage detected