Beispiel #1
0
void HelpWidget2::dealPressed(QPointF mousePos, Qt::MouseButton button)
{
  // Choose the correct item at press position
  if (distanceOfTwoPoints(mousePos,
                          toScene(exitItem->getPos().x(),
                                  exitItem->getPos().y())) < 50)
    itemAtPressPos = exitItem;

  for (int i = 0;i < HelpItem::totalItems();++i)
    if (helpThemeItems[i]->in(mousePos, LOGICAL_WIDTH, LOGICAL_HEIGHT))
    {
      if (currentItemIndex != i)
      {
        mainPartFrameCount = 0;
        currentItemIndex = i;
      }
      break;
    }
}
Beispiel #2
0
KReportPosition::KReportPosition(const KReportUnit& unit)
{
    m_unit = unit;
    m_property = new KProperty("position", toScene(), QCoreApplication::translate("KReportPosition", "Position"));
}