10 TabWidget::TabWidget(QWidget *aParent)
14 mInfoImage = QImage(":/icons/info.png");
17 void TabWidget::paintEvent(QPaintEvent *event)
19 QPainter painter(this);
20 painter.drawImage(rect().topRight()-QPoint(mInfoImage.width()+SPACER,-SPACER),mInfoImage);
23 void TabWidget::mousePressEvent(QMouseEvent *event)
25 mPressPoint = event->pos();
28 void TabWidget::mouseReleaseEvent(QMouseEvent *event)
30 QPoint topLeft = rect().topRight()-QPoint(mInfoImage.width()+SPACER,-SPACER);
31 QRect infoRect = QRect(topLeft, topLeft+QPoint(mInfoImage.width(),mInfoImage.height()));
32 if( (infoRect.contains(event->pos())) && (infoRect.contains(mPressPoint)) )
34 emit(infoIconClicked());