Hello community,

here is the log from the commit of package kreversi for openSUSE:Factory 
checked in at 2013-12-11 14:36:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kreversi (Old)
 and      /work/SRC/openSUSE:Factory/.kreversi.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kreversi"

Changes:
--------
--- /work/SRC/openSUSE:Factory/kreversi/kreversi.changes        2013-12-02 
12:35:15.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.kreversi.new/kreversi.changes   2013-12-11 
14:36:23.000000000 +0100
@@ -1,0 +2,14 @@
+Fri Nov 29 07:42:58 UTC 2013 - [email protected]
+
+- Update to 4.11.97
+   * KDE 4.12 RC 1 release
+   * See http://www.kde.org/announcements/announce-4.12-rc.php
+
+-------------------------------------------------------------------
+Sat Nov 23 22:57:24 UTC 2013 - [email protected]
+
+- Update to 4.11.95
+   * KDE 4.12 Beta 3 release
+   * See http://www.kde.org/announcements/announce-4.12-beta3.php
+
+-------------------------------------------------------------------

Old:
----
  kreversi-4.11.90.tar.xz

New:
----
  kreversi-4.11.97.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kreversi.spec ++++++
--- /var/tmp/diff_new_pack.DBOMR8/_old  2013-12-11 14:36:25.000000000 +0100
+++ /var/tmp/diff_new_pack.DBOMR8/_new  2013-12-11 14:36:25.000000000 +0100
@@ -23,7 +23,7 @@
 License:        GPL-2.0+
 Group:          Amusements/Games/Board/Other
 Url:            http://www.kde.org
-Version:        4.11.90
+Version:        4.11.97
 Release:        0
 Source0:        kreversi-%{version}.tar.xz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ kreversi-4.11.90.tar.xz -> kreversi-4.11.97.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kreversi-4.11.90/kreversiview.cpp 
new/kreversi-4.11.97/kreversiview.cpp
--- old/kreversi-4.11.90/kreversiview.cpp       2013-10-25 21:28:55.000000000 
+0200
+++ new/kreversi-4.11.97/kreversiview.cpp       2013-11-05 17:53:11.000000000 
+0100
@@ -22,8 +22,11 @@
 KReversiView::KReversiView(KReversiGame* game, QWidget *parent) :
     KgDeclarativeView(parent), m_delay(ANIMATION_SPEED_NORMAL), m_game(0),
     m_demoMode(false), m_showLastMove(false), m_showLegalMoves(false),
-    m_showLabels(false)
+    m_showLabels(false), m_maxDelay(0)
 {
+    m_delayTimer.setSingleShot(true);
+    connect(&m_delayTimer, SIGNAL(timeout()), this, SLOT(slotOnDelay()));
+    
     qmlRegisterType<ColorScheme>("ColorScheme", 1, 0, "ColorScheme");
 
     m_provider = new KgThemeProvider();
@@ -113,6 +116,26 @@
 {
     for (int i = 0; i < 8; i++)
         for (int j = 0; j < 8; j++) {
+            QMetaObject::invokeMethod(m_qml_root, "setPreAnimationTicks",
+                                    Q_ARG(QVariant, i),
+                                    Q_ARG(QVariant, j),
+                                    Q_ARG(QVariant, 0));
+        }
+        
+    m_maxDelay = 0;
+    if (m_game) {
+        PosList changed_chips = m_game->changedChips();
+        for (int i = 1; i < changed_chips.size(); i++) { //i == 0 is new chip 
it don't need animation time
+            QMetaObject::invokeMethod(m_qml_root, "setPreAnimationTicks",
+                                    Q_ARG(QVariant, changed_chips[i].row),
+                                    Q_ARG(QVariant, changed_chips[i].col),
+                                    Q_ARG(QVariant, i - 1));
+        }
+        m_maxDelay = qMax(0, (int)(changed_chips.size()) - 2);
+    }
+        
+    for (int i = 0; i < 8; i++)
+        for (int j = 0; j < 8; j++) {
             QString new_state = "";
             if (m_game) // showing empty board if has no game
                 switch (m_game->chipColorAt(i, j)) {
@@ -228,6 +251,9 @@
     // user moves not allowed in demo mode
     if (m_demoMode)
         return;
+    
+    if (m_delayTimer.isActive())
+        return;
 
     if (m_game->isComputersTurn())
         return;
@@ -235,13 +261,13 @@
     m_game->makePlayerMove(row, col, false);
 }
 
-
 void KReversiView::slotGameMoveFinished()
 {
     m_hint = KReversiPos();
     updateBoard();
     emit moveFinished();
-    m_delayTimer.singleShot(m_delay, this, SLOT(slotOnDelay()));
+    m_delayTimer.setInterval(m_delay * (m_maxDelay + 1));
+    m_delayTimer.start();
 }
 
 void KReversiView::slotGameOver()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kreversi-4.11.90/kreversiview.h 
new/kreversi-4.11.97/kreversiview.h
--- old/kreversi-4.11.90/kreversiview.h 2013-10-25 21:28:55.000000000 +0200
+++ new/kreversi-4.11.97/kreversiview.h 2013-11-05 17:53:11.000000000 +0100
@@ -225,5 +225,10 @@
      *  If true board labels will be rendered
      */
     bool m_showLabels;
+    
+    /**
+     *  Used to handle animation duration due to sequental turning of chips
+     */
+    int m_maxDelay;
 };
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kreversi-4.11.90/qml/Board.qml 
new/kreversi-4.11.97/qml/Board.qml
--- old/kreversi-4.11.90/qml/Board.qml  2013-10-25 21:28:55.000000000 +0200
+++ new/kreversi-4.11.97/qml/Board.qml  2013-11-05 17:53:11.000000000 +0100
@@ -41,6 +41,10 @@
     function setLastMove(row, column, value) {
         cells.itemAt(row * Globals.COLUMN_COUNT + column).isLastMove = value
     }
+    
+    function setPreAnimationTicks(row, column, value) {
+        cells.itemAt(row * Globals.COLUMN_COUNT + 
column).chipPreAnimationTicks = value
+    }
 
     CanvasItem {
         id: boardBackground
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kreversi-4.11.90/qml/Cell.qml 
new/kreversi-4.11.97/qml/Cell.qml
--- old/kreversi-4.11.90/qml/Cell.qml   2013-10-25 21:28:55.000000000 +0200
+++ new/kreversi-4.11.97/qml/Cell.qml   2013-11-05 17:53:11.000000000 +0100
@@ -25,6 +25,7 @@
     property bool isHint: false
     property string chipImagePrefix: "chip_bw"
     property int chipAnimationTime: 25 * 12
+    property int chipPreAnimationTicks: 0
     property string chipState: ""
 
     CanvasItem {
@@ -49,6 +50,7 @@
 
         imagePrefix: parent.chipImagePrefix + "_"
         animationTime: parent.chipAnimationTime
+        preAnimationTicks: parent.chipPreAnimationTicks
 
         onClicked: cellContainer.clicked()
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kreversi-4.11.90/qml/Chip.qml 
new/kreversi-4.11.97/qml/Chip.qml
--- old/kreversi-4.11.90/qml/Chip.qml   2013-10-25 21:28:55.000000000 +0200
+++ new/kreversi-4.11.97/qml/Chip.qml   2013-11-05 17:53:11.000000000 +0100
@@ -23,6 +23,7 @@
     property int currentFrame: 1
     property string imagePrefix: "chip_bw_"
     property int animationTime: 25 * 12
+    property int preAnimationTicks: 0
 
     signal clicked
 
@@ -50,12 +51,12 @@
     states: [
         State {
             name: "Black"
-
+            
             PropertyChanges {
                 target: chipImage
                 visible: true
             }
-
+            
             PropertyChanges {
                 target: chipContainer
                 currentFrame: 1
@@ -69,12 +70,12 @@
 
         State {
             name: "Black_blinking"
-
+            
             PropertyChanges {
                 target: chipImage
                 visible: true
             }
-
+            
             PropertyChanges {
                 target: chipContainer
                 currentFrame: 1
@@ -88,12 +89,12 @@
 
         State {
             name: "White"
-
+            
             PropertyChanges {
                 target: chipImage
                 visible: true
             }
-
+            
             PropertyChanges {
                 target: chipContainer
                 currentFrame: framesCount
@@ -107,7 +108,7 @@
 
         State {
             name: "White_blinking"
-
+            
             PropertyChanges {
                 target: chipImage
                 visible: true
@@ -126,9 +127,28 @@
     ]
 
     Behavior on currentFrame {
-        NumberAnimation {
-            duration: animationTime
-            easing.type: Easing.InOutQuad
+        SequentialAnimation {
+            PauseAnimation {
+                duration: preAnimationTicks * animationTime
+            }
+            
+            NumberAnimation {
+                duration: animationTime
+                easing.type: Easing.InOutQuad
+            }
         }
     }
+    
+    transitions: [
+        Transition {
+            from: ""
+            to: "*"
+            reversible: false
+            
+            NumberAnimation {
+                property: "currentFrame"
+                duration: 0
+            }
+        }
+    ]
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kreversi-4.11.90/qml/Table.qml 
new/kreversi-4.11.97/qml/Table.qml
--- old/kreversi-4.11.90/qml/Table.qml  2013-10-25 21:28:55.000000000 +0200
+++ new/kreversi-4.11.97/qml/Table.qml  2013-11-05 17:53:11.000000000 +0100
@@ -43,6 +43,10 @@
     function setLastMove(row, column, value) {
         board.setLastMove(row, column, value)
     }
+    
+    function setPreAnimationTicks(row, column, value) {
+        board.setPreAnimationTicks(row, column, value);
+    }
 
     function showPopup(text) {
         popup.show(text, "SHOWING");

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to