[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdegames/kpat
From: Parker Coates <parker.coates () kdemail ! net>
Date: 2012-02-15 4:44:39
Message-ID: 20120215044439.54C23AC898 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1280157 by coates:
Replace [hint|demo|drop]Possible() signals with gameInProgress() signal.
Since these three signals are always in sync, they can easily be merged
into one more general signal.
M +5 -12 dealer.cpp
M +1 -3 dealer.h
M +3 -3 mainwindow.cpp
--- trunk/KDE/kdegames/kpat/dealer.cpp #1280156:1280157
@@ -696,9 +696,7 @@
}
emit solverStateChanged( QString() );
- emit hintPossible( true );
- emit demoPossible( true );
- emit dropPossible( true );
+ emit gameInProgress( true );
}
QPointF posAlongRect( qreal distOnRect, const QRectF & rect )
@@ -728,11 +726,10 @@
emit solverStateChanged( QString() );
- emit demoPossible( false );
- emit hintPossible( false );
- emit dropPossible( false );
emit newCardsPossible( false );
emit undoPossible( false );
+ emit redoPossible( false );
+ emit gameInProgress( false );
setKeyboardModeActive( false );
@@ -966,9 +963,7 @@
if ( d->toldAboutLostGame ) // everything's possible again
{
- hintPossible( true );
- demoPossible( true );
- dropPossible( true );
+ gameInProgress( true );
d->toldAboutLostGame = false;
d->toldAboutWonGame = false;
}
@@ -1041,9 +1036,7 @@
if ( !d->toldAboutWonGame && !d->toldAboutLostGame && isGameLost() )
{
- emit hintPossible( false );
- emit demoPossible( false );
- emit dropPossible( false );
+ emit gameInProgress( false );
emit solverStateChanged( i18n( "Solver: This game is lost." ) );
d->toldAboutLostGame = true;
stopDemo();
--- trunk/KDE/kdegames/kpat/dealer.h #1280156:1280157
@@ -119,10 +119,8 @@
signals:
void undoPossible(bool poss);
void redoPossible(bool poss);
- void hintPossible(bool poss);
- void demoPossible(bool poss);
- void dropPossible(bool poss);
void newCardsPossible(bool poss);
+ void gameInProgress(bool inProgress);
void demoActive(bool active);
void hintActive(bool active);
--- trunk/KDE/kdegames/kpat/mainwindow.cpp #1280156:1280157
@@ -599,13 +599,13 @@
connect( m_dealer, SIGNAL(redoPossible(bool)), redo, SLOT(setEnabled(bool)) );
connect( m_dealer, SIGNAL(hintActive(bool)), hintaction, SLOT(setChecked(bool)) );
- connect( m_dealer, SIGNAL(hintPossible(bool)), hintaction, SLOT(setEnabled(bool)) );
+ connect( m_dealer, SIGNAL(gameInProgress(bool)), hintaction, SLOT(setEnabled(bool)) );
connect( m_dealer, SIGNAL(demoActive(bool)), this, SLOT(toggleDemoAction(bool)) );
- connect( m_dealer, SIGNAL(demoPossible(bool)), demoaction, SLOT(setEnabled(bool)) );
+ connect( m_dealer, SIGNAL(gameInProgress(bool)), demoaction, SLOT(setEnabled(bool)) );
connect( m_dealer, SIGNAL(dropActive(bool)), dropaction, SLOT(setChecked(bool)) );
- connect( m_dealer, SIGNAL(demoPossible(bool)), dropaction, SLOT(setEnabled(bool)) );
+ connect( m_dealer, SIGNAL(gameInProgress(bool)), dropaction, SLOT(setEnabled(bool)) );
connect( m_leftAction, SIGNAL(triggered(bool)), m_dealer, SLOT(keyboardFocusLeft()) );
connect( m_rightAction, SIGNAL(triggered(bool)), m_dealer, SLOT(keyboardFocusRight()) );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic