summaryrefslogtreecommitdiff
path: root/noncore/games/oyatzee/oyatzee.cpp
Side-by-side diff
Diffstat (limited to 'noncore/games/oyatzee/oyatzee.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/oyatzee/oyatzee.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/games/oyatzee/oyatzee.cpp b/noncore/games/oyatzee/oyatzee.cpp
index 86318db..a55aa73 100644
--- a/noncore/games/oyatzee/oyatzee.cpp
+++ b/noncore/games/oyatzee/oyatzee.cpp
@@ -8,49 +8,49 @@
#include <stdlib.h>
OYatzee::OYatzee( QWidget *parent , const char *name, WFlags fl ) : QMainWindow( parent , name , fl )
{
QWidget *thing = new QWidget( this );
setCentralWidget( thing );
setCaption( tr( "OYatzee" ) );
setPlayerNumber( 4 );
setRoundsNumber( 1 );
lastPlayerFinished = false;
currentPlayer = 1;
ps.append( new Player( "Carsten" ) );
ps.append( new Player( "Julia" ) );
ps.append( new Player( "Christine" ) );
ps.append( new Player( "Stephan" ) );
QVBoxLayout *vbox = new QVBoxLayout( thing );
sb = new Scoreboard( ps, thing , "sb" );
- connect( sb->pb , SIGNAL( item( int ) ), this , SLOT( slotEndRound( int ) ) );
+ connect( sb->pb , SIGNAL( item(int) ), this , SLOT( slotEndRound(int) ) );
dw = new DiceWidget( thing , "dw" );
dw->setMaximumHeight( this->height()/4 );
connect( dw->rollButton, SIGNAL( clicked() ), this , SLOT( slotRollDices() ) );
vbox->addWidget( sb );
vbox->addWidget( dw );
}
void OYatzee::slotEndRound( int item )
{
qDebug( "Der User hat Nummer %d ausgewählt" , item );
/*
* if the user clicked on Total, Bonus or Score and thus not on a
* selectable item return and do nothing
*/
if ( item == 7 || item == 8 || item == 16 ) return;
/*
* check if the user can really click on that item
*/
if ( posibilities.find( item ) == posibilities.end() ) return;
@@ -625,49 +625,49 @@ void Resultboard::updateMap( int item , int points )
/*
* Possibilityboard
*/
Possibilityboard::Possibilityboard( QWidget *parent , const char* name ) : Board ( parent , name )
{
begriffe.append( "1er" );
begriffe.append( "2er" );
begriffe.append( "3er" );
begriffe.append( "4er" );
begriffe.append( "5er" );
begriffe.append( "6er" );
begriffe.append( "Total" );
begriffe.append( "Bonus" );
begriffe.append( "3oaK" );
begriffe.append( "4oaK" );
begriffe.append( "Full House" );
begriffe.append( "Short S" );
begriffe.append( "Long S" );
begriffe.append( "Yatzee!" );
begriffe.append( "Chance" );
begriffe.append( "Score" );
- connect( this , SIGNAL( clicked( QPoint ) ), this , SLOT( slotClicked( QPoint ) ) );
+ connect( this , SIGNAL( clicked(QPoint) ), this , SLOT( slotClicked(QPoint) ) );
}
void Possibilityboard::slotClicked( QPoint p)
{
emit item( p.y()/(this->height()/17) );
}
void Possibilityboard::paintEvent( QPaintEvent* )
{
QPainter p;
p.begin( this );
const int cell_width = this->width();
const int cell_height = this->height()/17;
p.setBrush( Qt::blue );
QValueListInt::Iterator listIt = list.begin();
for ( ; listIt != list.end() ; ++listIt )
{
p.drawRect( 0 , (*listIt) * cell_height , cell_width , cell_height );
}
p.setBrush( Qt::black );