From kde-commits Tue Apr 29 06:45:24 2008 From: Anne-Marie Mahfouf Date: Tue, 29 Apr 2008 06:45:24 +0000 To: kde-commits Subject: extragear/plasma/applets/fifteenPuzzle/src Message-Id: <1209451524.030040.23659.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=120945154104739 SVN commit 802328 by annma: some ports to new API still to do: fix resize and config dialog shows nothing M +1 -1 fifteen.cpp M +1 -1 fifteenPuzzle.cpp M +1 -1 fifteenPuzzle.h M +1 -12 piece.cpp M +0 -1 piece.h --- trunk/extragear/plasma/applets/fifteenPuzzle/src/fifteen.cpp #802327:802328 @@ -191,7 +191,7 @@ { if (isAdjacent(item, m_blank)) { QPointF pos = item->pos(); - Plasma::Phase::self()->moveItem(item, Plasma::Phase::FastSlideIn, m_blank->pos().toPoint()); + Plasma::Animator::self()->moveItem(item, Plasma::Animator::FastSlideInMovement, m_blank->pos().toPoint()); m_blank->setPos(pos); } } --- trunk/extragear/plasma/applets/fifteenPuzzle/src/fifteenPuzzle.cpp #802327:802328 @@ -66,7 +66,7 @@ return actions; } -void FifteenPuzzle::showConfigurationInterface() +void FifteenPuzzle::createConfigurationInterface() { if (configDialog == 0) { configDialog = new FifteenPuzzleConfig(); --- trunk/extragear/plasma/applets/fifteenPuzzle/src/fifteenPuzzle.h #802327:802328 @@ -50,7 +50,7 @@ bool showNumerals; private slots: - void showConfigurationInterface(); + void createConfigurationInterface(); }; K_EXPORT_PLASMA_APPLET(fifteenPuzzle, FifteenPuzzle) --- trunk/extragear/plasma/applets/fifteenPuzzle/src/piece.cpp #802327:802328 @@ -29,8 +29,6 @@ #include -#include - Piece::Piece(int size, int id, QGraphicsItem *parent) : QGraphicsPixmapItem(parent) { @@ -97,14 +95,5 @@ emit pressed(this); } -void Piece::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) -{ - // HACK: QGraphicsItem's documentation says that the event will be passed - // to the parent if it's not handled, but it isn't passed. This can be - // removed when Qt4.4 becomes a requirement. See Qt bug #176902. - Plasma::Widget *parentWidget = Plasma::Widget::parent(this); - if (parentWidget) { - parentWidget->contextMenuEvent(event); - } -} + --- trunk/extragear/plasma/applets/fifteenPuzzle/src/piece.h #802327:802328 @@ -42,7 +42,6 @@ protected: void mousePressEvent(QGraphicsSceneMouseEvent *event); - void contextMenuEvent(QGraphicsSceneContextMenuEvent *event); signals: void pressed(QGraphicsItem *item);