@ -144,9 +144,9 @@ void Arrow::setZ(double newz)
void Arrow : : setVisible ( bool yes )
void Arrow : : setVisible ( bool yes )
{
{
TQCanvasLine : : tq setVisible( yes ) ;
TQCanvasLine : : setVisible( yes ) ;
line1 - > tq setVisible( yes ) ;
line1 - > setVisible( yes ) ;
line2 - > tq setVisible( yes ) ;
line2 - > setVisible( yes ) ;
}
}
void Arrow : : moveBy ( double dx , double dy )
void Arrow : : moveBy ( double dx , double dy )
@ -264,10 +264,10 @@ Bridge::Bridge(TQRect rect, TQCanvas *canvas)
setWallZ ( z ( ) + 0.01 ) ;
setWallZ ( z ( ) + 0.01 ) ;
setWallColor ( color ) ;
setWallColor ( color ) ;
topWall - > tq setVisible( false ) ;
topWall - > setVisible( false ) ;
botWall - > tq setVisible( false ) ;
botWall - > setVisible( false ) ;
leftWall - > tq setVisible( false ) ;
leftWall - > setVisible( false ) ;
rightWall - > tq setVisible( false ) ;
rightWall - > setVisible( false ) ;
point = new RectPoint ( color , this , canvas ) ;
point = new RectPoint ( color , this , canvas ) ;
editModeChanged ( false ) ;
editModeChanged ( false ) ;
@ -321,7 +321,7 @@ void Bridge::aboutToDie()
void Bridge : : editModeChanged ( bool changed )
void Bridge : : editModeChanged ( bool changed )
{
{
point - > tq setVisible( changed ) ;
point - > setVisible( changed ) ;
moveBy ( 0 , 0 ) ;
moveBy ( 0 , 0 ) ;
}
}
@ -454,7 +454,7 @@ Windmill::Windmill(TQRect rect, TQCanvas *canvas)
{
{
guard = new WindmillGuard ( canvas ) ;
guard = new WindmillGuard ( canvas ) ;
guard - > setPen ( TQPen ( black , 5 ) ) ;
guard - > setPen ( TQPen ( black , 5 ) ) ;
guard - > tq setVisible( true ) ;
guard - > setVisible( true ) ;
guard - > setAlwaysShow ( true ) ;
guard - > setAlwaysShow ( true ) ;
setSpeed ( 5 ) ;
setSpeed ( 5 ) ;
guard - > setZ ( wallZ ( ) + .1 ) ;
guard - > setZ ( wallZ ( ) + .1 ) ;
@ -467,8 +467,8 @@ Windmill::Windmill(TQRect rect, TQCanvas *canvas)
right - > setAlwaysShow ( true ) ;
right - > setAlwaysShow ( true ) ;
left - > setZ ( wallZ ( ) ) ;
left - > setZ ( wallZ ( ) ) ;
right - > setZ ( wallZ ( ) ) ;
right - > setZ ( wallZ ( ) ) ;
left - > tq setVisible( true ) ;
left - > setVisible( true ) ;
right - > tq setVisible( true ) ;
right - > setVisible( true ) ;
setTopWallVisible ( false ) ;
setTopWallVisible ( false ) ;
setBotWallVisible ( false ) ;
setBotWallVisible ( false ) ;
@ -629,12 +629,12 @@ void Sign::draw(TQPainter &painter)
TQSimpleRichText txt ( m_text , kapp - > font ( ) ) ;
TQSimpleRichText txt ( m_text , kapp - > font ( ) ) ;
const int indent = wallPen ( ) . width ( ) + 3 ;
const int indent = wallPen ( ) . width ( ) + 3 ;
txt . setWidth ( width ( ) - 2 * indent ) ;
txt . setWidth ( width ( ) - 2 * indent ) ;
TQColorGroup tq colorGroup;
TQColorGroup colorGroup;
tq colorGroup. setColor ( TQColorGroup : : Foreground , black ) ;
colorGroup. setColor ( TQColorGroup : : Foreground , black ) ;
tq colorGroup. setColor ( TQColorGroup : : Text , black ) ;
colorGroup. setColor ( TQColorGroup : : Text , black ) ;
tq colorGroup. setColor ( TQColorGroup : : Background , black ) ;
colorGroup. setColor ( TQColorGroup : : Background , black ) ;
tq colorGroup. setColor ( TQColorGroup : : Base , black ) ;
colorGroup. setColor ( TQColorGroup : : Base , black ) ;
txt . draw ( & painter , x ( ) + indent , y ( ) , TQRect ( x ( ) + indent , y ( ) , width ( ) - indent , height ( ) - indent ) , tq colorGroup) ;
txt . draw ( & painter , x ( ) + indent , y ( ) , TQRect ( x ( ) + indent , y ( ) , width ( ) - indent , height ( ) - indent ) , colorGroup) ;
}
}
/////////////////////////
/////////////////////////
@ -733,7 +733,7 @@ Ellipse::Ellipse(TQCanvas *canvas)
setChangeEnabled ( false ) ;
setChangeEnabled ( false ) ;
setChangeEvery ( 50 ) ;
setChangeEvery ( 50 ) ;
count = 0 ;
count = 0 ;
tq setVisible( true ) ;
setVisible( true ) ;
point = new RectPoint ( black , this , canvas ) ;
point = new RectPoint ( black , this , canvas ) ;
point - > setSizeFactor ( 2.0 ) ;
point - > setSizeFactor ( 2.0 ) ;
@ -750,7 +750,7 @@ void Ellipse::setChangeEnabled(bool changeEnabled)
setAnimated ( m_changeEnabled ) ;
setAnimated ( m_changeEnabled ) ;
if ( ! m_changeEnabled )
if ( ! m_changeEnabled )
tq setVisible( true ) ;
setVisible( true ) ;
}
}
TQPtrList < TQCanvasItem > Ellipse : : moveableItems ( ) const
TQPtrList < TQCanvasItem > Ellipse : : moveableItems ( ) const
@ -775,7 +775,7 @@ void Ellipse::moveBy(double dx, double dy)
void Ellipse : : editModeChanged ( bool changed )
void Ellipse : : editModeChanged ( bool changed )
{
{
point - > tq setVisible( changed ) ;
point - > setVisible( changed ) ;
moveBy ( 0 , 0 ) ;
moveBy ( 0 , 0 ) ;
}
}
@ -788,7 +788,7 @@ void Ellipse::advance(int phase)
if ( count > ( m_changeEvery + 10 ) * 1.8 )
if ( count > ( m_changeEvery + 10 ) * 1.8 )
count = 0 ;
count = 0 ;
if ( count = = 0 )
if ( count = = 0 )
tq setVisible( ! isVisible ( ) ) ;
setVisible( ! isVisible ( ) ) ;
count + + ;
count + + ;
}
}
@ -819,7 +819,7 @@ Config *Ellipse::config(TQWidget *parent)
void Ellipse : : aboutToSave ( )
void Ellipse : : aboutToSave ( )
{
{
tq setVisible( true ) ;
setVisible( true ) ;
dontHide = true ;
dontHide = true ;
}
}
@ -860,7 +860,7 @@ bool Puddle::collision(Ball *ball, long int /*id*/)
if ( ball - > isVisible ( ) )
if ( ball - > isVisible ( ) )
{
{
TQCanvasRectangle i ( TQRect ( ball - > x ( ) , ball - > y ( ) , 1 , 1 ) , canvas ( ) ) ;
TQCanvasRectangle i ( TQRect ( ball - > x ( ) , ball - > y ( ) , 1 , 1 ) , canvas ( ) ) ;
i . tq setVisible( true ) ;
i . setVisible( true ) ;
// is center of ball in?
// is center of ball in?
if ( i . collidesWith ( this ) /* && ball->curVector().magnitude() < 4*/ )
if ( i . collidesWith ( this ) /* && ball->curVector().magnitude() < 4*/ )
@ -868,7 +868,7 @@ bool Puddle::collision(Ball *ball, long int /*id*/)
playSound ( " puddle " ) ;
playSound ( " puddle " ) ;
ball - > setAddStroke ( ball - > addStroke ( ) + 1 ) ;
ball - > setAddStroke ( ball - > addStroke ( ) + 1 ) ;
ball - > setPlaceOnGround ( true ) ;
ball - > setPlaceOnGround ( true ) ;
ball - > tq setVisible( false ) ;
ball - > setVisible( false ) ;
ball - > setState ( Stopped ) ;
ball - > setState ( Stopped ) ;
ball - > setVelocity ( 0 , 0 ) ;
ball - > setVelocity ( 0 , 0 ) ;
if ( game & & game - > curBall ( ) = = ball )
if ( game & & game - > curBall ( ) = = ball )
@ -911,7 +911,7 @@ Sand::Sand(TQCanvas *canvas)
bool Sand : : collision ( Ball * ball , long int /*id*/ )
bool Sand : : collision ( Ball * ball , long int /*id*/ )
{
{
TQCanvasRectangle i ( TQRect ( ball - > x ( ) , ball - > y ( ) , 1 , 1 ) , canvas ( ) ) ;
TQCanvasRectangle i ( TQRect ( ball - > x ( ) , ball - > y ( ) , 1 , 1 ) , canvas ( ) ) ;
i . tq setVisible( true ) ;
i . setVisible( true ) ;
// is center of ball in?
// is center of ball in?
if ( i . collidesWith ( this ) /* && ball->curVector().magnitude() < 4*/ )
if ( i . collidesWith ( this ) /* && ball->curVector().magnitude() < 4*/ )
@ -954,12 +954,12 @@ Putter::Putter(TQCanvas *canvas)
void Putter : : showInfo ( )
void Putter : : showInfo ( )
{
{
guideLine - > tq setVisible( isVisible ( ) ) ;
guideLine - > setVisible( isVisible ( ) ) ;
}
}
void Putter : : hideInfo ( )
void Putter : : hideInfo ( )
{
{
guideLine - > tq setVisible( m_showGuideLine ? isVisible ( ) : false ) ;
guideLine - > setVisible( m_showGuideLine ? isVisible ( ) : false ) ;
}
}
void Putter : : moveBy ( double dx , double dy )
void Putter : : moveBy ( double dx , double dy )
@ -976,8 +976,8 @@ void Putter::setShowGuideLine(bool yes)
void Putter : : setVisible ( bool yes )
void Putter : : setVisible ( bool yes )
{
{
TQCanvasLine : : tq setVisible( yes ) ;
TQCanvasLine : : setVisible( yes ) ;
guideLine - > tq setVisible( m_showGuideLine ? yes : false ) ;
guideLine - > setVisible( m_showGuideLine ? yes : false ) ;
}
}
void Putter : : setOrigin ( int _x , int _y )
void Putter : : setOrigin ( int _x , int _y )
@ -1002,11 +1002,11 @@ void Putter::go(Direction d, Amount amount)
{
{
case Forwards :
case Forwards :
len - = 1 ;
len - = 1 ;
guideLine - > tq setVisible( false ) ;
guideLine - > setVisible( false ) ;
break ;
break ;
case Backwards :
case Backwards :
len + = 1 ;
len + = 1 ;
guideLine - > tq setVisible( false ) ;
guideLine - > setVisible( false ) ;
break ;
break ;
case D_Left :
case D_Left :
angle + = addition ;
angle + = addition ;
@ -1085,7 +1085,7 @@ void Bumper::moveBy(double dx, double dy)
void Bumper : : editModeChanged ( bool changed )
void Bumper : : editModeChanged ( bool changed )
{
{
inside - > tq setVisible( ! changed ) ;
inside - > setVisible( ! changed ) ;
}
}
void Bumper : : advance ( int phase )
void Bumper : : advance ( int phase )
@ -1166,7 +1166,7 @@ HoleResult Hole::result(TQPoint p, double s, bool * /*wasCenter*/)
return Result_Miss ;
return Result_Miss ;
TQCanvasRectangle i ( TQRect ( p , TQSize ( 1 , 1 ) ) , canvas ( ) ) ;
TQCanvasRectangle i ( TQRect ( p , TQSize ( 1 , 1 ) ) , canvas ( ) ) ;
i . tq setVisible( true ) ;
i . setVisible( true ) ;
// is center of ball in cup?
// is center of ball in cup?
if ( i . collidesWith ( this ) )
if ( i . collidesWith ( this ) )
@ -1238,7 +1238,7 @@ BlackHole::BlackHole(TQCanvas *canvas)
setSize ( width ( ) , width ( ) / .8 ) ;
setSize ( width ( ) , width ( ) / .8 ) ;
const float factor = 1.3 ;
const float factor = 1.3 ;
outside - > setSize ( width ( ) * factor , height ( ) * factor ) ;
outside - > setSize ( width ( ) * factor , height ( ) * factor ) ;
outside - > tq setVisible( true ) ;
outside - > setVisible( true ) ;
moveBy ( 0 , 0 ) ;
moveBy ( 0 , 0 ) ;
@ -1249,7 +1249,7 @@ void BlackHole::showInfo()
{
{
delete infoLine ;
delete infoLine ;
infoLine = new TQCanvasLine ( canvas ( ) ) ;
infoLine = new TQCanvasLine ( canvas ( ) ) ;
infoLine - > tq setVisible( true ) ;
infoLine - > setVisible( true ) ;
infoLine - > setPen ( TQPen ( exitItem - > pen ( ) . color ( ) , 2 ) ) ;
infoLine - > setPen ( TQPen ( exitItem - > pen ( ) . color ( ) , 2 ) ) ;
infoLine - > setZ ( 10000 ) ;
infoLine - > setZ ( 10000 ) ;
infoLine - > setPoints ( x ( ) , y ( ) , exitItem - > x ( ) , exitItem - > y ( ) ) ;
infoLine - > setPoints ( x ( ) , y ( ) , exitItem - > x ( ) , exitItem - > y ( ) ) ;
@ -1277,7 +1277,7 @@ void BlackHole::updateInfo()
{
{
if ( infoLine )
if ( infoLine )
{
{
infoLine - > tq setVisible( true ) ;
infoLine - > setVisible( true ) ;
infoLine - > setPoints ( x ( ) , y ( ) , exitItem - > x ( ) , exitItem - > y ( ) ) ;
infoLine - > setPoints ( x ( ) , y ( ) , exitItem - > x ( ) , exitItem - > y ( ) ) ;
exitItem - > showInfo ( ) ;
exitItem - > showInfo ( ) ;
}
}
@ -1338,7 +1338,7 @@ bool BlackHole::place(Ball *ball, bool /*wasCenter*/)
ball - > setVelocity ( 0 , 0 ) ;
ball - > setVelocity ( 0 , 0 ) ;
ball - > setState ( Stopped ) ;
ball - > setState ( Stopped ) ;
ball - > tq setVisible( false ) ;
ball - > setVisible( false ) ;
ball - > setForceStillGoing ( true ) ;
ball - > setForceStillGoing ( true ) ;
double magnitude = Vector ( TQPoint ( x ( ) , y ( ) ) , TQPoint ( exitItem - > x ( ) , exitItem - > y ( ) ) ) . magnitude ( ) ;
double magnitude = Vector ( TQPoint ( x ( ) , y ( ) ) , TQPoint ( exitItem - > x ( ) , exitItem - > y ( ) ) ) . magnitude ( ) ;
@ -1367,7 +1367,7 @@ void BlackHole::eject(Ball *ball, double speed)
ball - > setVector ( v ) ;
ball - > setVector ( v ) ;
ball - > setForceStillGoing ( false ) ;
ball - > setForceStillGoing ( false ) ;
ball - > tq setVisible( true ) ;
ball - > setVisible( true ) ;
ball - > setState ( Rolling ) ;
ball - > setState ( Rolling ) ;
runs + + ;
runs + + ;
@ -1418,7 +1418,7 @@ void BlackHole::finishMe()
}
}
exitItem - > setPoints ( start . x ( ) , start . y ( ) , end . x ( ) , end . y ( ) ) ;
exitItem - > setPoints ( start . x ( ) , start . y ( ) , end . x ( ) , end . y ( ) ) ;
exitItem - > tq setVisible( true ) ;
exitItem - > setVisible( true ) ;
}
}
void BlackHole : : save ( KConfig * cfg )
void BlackHole : : save ( KConfig * cfg )
@ -1439,7 +1439,7 @@ BlackHoleExit::BlackHoleExit(BlackHole *blackHole, TQCanvas *canvas)
setZ ( blackHole - > z ( ) ) ;
setZ ( blackHole - > z ( ) ) ;
arrow - > setZ ( z ( ) - .00001 ) ;
arrow - > setZ ( z ( ) - .00001 ) ;
updateArrowLength ( ) ;
updateArrowLength ( ) ;
arrow - > tq setVisible( false ) ;
arrow - > setVisible( false ) ;
}
}
void BlackHoleExit : : aboutToDie ( )
void BlackHoleExit : : aboutToDie ( )
@ -1484,12 +1484,12 @@ void BlackHoleExit::editModeChanged(bool editing)
void BlackHoleExit : : showInfo ( )
void BlackHoleExit : : showInfo ( )
{
{
arrow - > tq setVisible( true ) ;
arrow - > setVisible( true ) ;
}
}
void BlackHoleExit : : hideInfo ( )
void BlackHoleExit : : hideInfo ( )
{
{
arrow - > tq setVisible( false ) ;
arrow - > setVisible( false ) ;
}
}
Config * BlackHoleExit : : config ( TQWidget * parent )
Config * BlackHoleExit : : config ( TQWidget * parent )
@ -1639,7 +1639,7 @@ void WallPoint::updateVisible()
void WallPoint : : editModeChanged ( bool changed )
void WallPoint : : editModeChanged ( bool changed )
{
{
editing = changed ;
editing = changed ;
tq setVisible( true ) ;
setVisible( true ) ;
if ( ! editing )
if ( ! editing )
updateVisible ( ) ;
updateVisible ( ) ;
}
}
@ -1741,8 +1741,8 @@ Wall::Wall(TQCanvas *canvas)
startItem = new WallPoint ( true , this , canvas ) ;
startItem = new WallPoint ( true , this , canvas ) ;
endItem = new WallPoint ( false , this , canvas ) ;
endItem = new WallPoint ( false , this , canvas ) ;
startItem - > tq setVisible( true ) ;
startItem - > setVisible( true ) ;
endItem - > tq setVisible( true ) ;
endItem - > setVisible( true ) ;
setPen ( TQPen ( darkRed , 3 ) ) ;
setPen ( TQPen ( darkRed , 3 ) ) ;
setPoints ( - 15 , 10 , 15 , - 5 ) ;
setPoints ( - 15 , 10 , 15 , - 5 ) ;
@ -1777,10 +1777,10 @@ void Wall::setAlwaysShow(bool yes)
void Wall : : setVisible ( bool yes )
void Wall : : setVisible ( bool yes )
{
{
TQCanvasLine : : tq setVisible( yes ) ;
TQCanvasLine : : setVisible( yes ) ;
startItem - > tq setVisible( yes ) ;
startItem - > setVisible( yes ) ;
endItem - > tq setVisible( yes ) ;
endItem - > setVisible( yes ) ;
startItem - > updateVisible ( ) ;
startItem - > updateVisible ( ) ;
endItem - > updateVisible ( ) ;
endItem - > updateVisible ( ) ;
}
}
@ -2212,7 +2212,7 @@ KolfGame::KolfGame(ObjectList *obj, PlayerList *players, TQString filename, TQWi
pic . load ( locate ( " appdata " , " pics/grass.png " ) ) ;
pic . load ( locate ( " appdata " , " pics/grass.png " ) ) ;
TQPixmapCache : : insert ( " grass " , pic ) ;
TQPixmapCache : : insert ( " grass " , pic ) ;
}
}
course - > tq setBackgroundPixmap( pic ) ;
course - > setBackgroundPixmap( pic ) ;
setCanvas ( course ) ;
setCanvas ( course ) ;
move ( 0 , 0 ) ;
move ( 0 , 0 ) ;
@ -2225,7 +2225,7 @@ KolfGame::KolfGame(ObjectList *obj, PlayerList *players, TQString filename, TQWi
highlighter = new TQCanvasRectangle ( course ) ;
highlighter = new TQCanvasRectangle ( course ) ;
highlighter - > setPen ( TQPen ( yellow , 1 ) ) ;
highlighter - > setPen ( TQPen ( yellow , 1 ) ) ;
highlighter - > setBrush ( TQBrush ( NoBrush ) ) ;
highlighter - > setBrush ( TQBrush ( NoBrush ) ) ;
highlighter - > tq setVisible( false ) ;
highlighter - > setVisible( false ) ;
highlighter - > setZ ( 10000 ) ;
highlighter - > setZ ( 10000 ) ;
// shows some info about hole
// shows some info about hole
@ -2237,14 +2237,14 @@ KolfGame::KolfGame(ObjectList *obj, PlayerList *players, TQString filename, TQWi
infoText - > move ( 15 , width / 2 ) ;
infoText - > move ( 15 , width / 2 ) ;
infoText - > setZ ( 10001 ) ;
infoText - > setZ ( 10001 ) ;
infoText - > setFont ( font ) ;
infoText - > setFont ( font ) ;
infoText - > tq setVisible( false ) ;
infoText - > setVisible( false ) ;
// create the advanced putting indicator
// create the advanced putting indicator
strokeCircle = new StrokeCircle ( course ) ;
strokeCircle = new StrokeCircle ( course ) ;
strokeCircle - > move ( width - 90 , height - 90 ) ;
strokeCircle - > move ( width - 90 , height - 90 ) ;
strokeCircle - > setSize ( 80 , 80 ) ;
strokeCircle - > setSize ( 80 , 80 ) ;
strokeCircle - > setThickness ( 8 ) ;
strokeCircle - > setThickness ( 8 ) ;
strokeCircle - > tq setVisible( false ) ;
strokeCircle - > setVisible( false ) ;
strokeCircle - > setValue ( 0 ) ;
strokeCircle - > setValue ( 0 ) ;
strokeCircle - > setMaxValue ( 360 ) ;
strokeCircle - > setMaxValue ( 360 ) ;
@ -2252,7 +2252,7 @@ KolfGame::KolfGame(ObjectList *obj, PlayerList *players, TQString filename, TQWi
whiteBall = new Ball ( course ) ;
whiteBall = new Ball ( course ) ;
whiteBall - > setGame ( this ) ;
whiteBall - > setGame ( this ) ;
whiteBall - > setColor ( white ) ;
whiteBall - > setColor ( white ) ;
whiteBall - > tq setVisible( false ) ;
whiteBall - > setVisible( false ) ;
whiteBall - > setDoDetect ( false ) ;
whiteBall - > setDoDetect ( false ) ;
int highestLog = 0 ;
int highestLog = 0 ;
@ -2382,7 +2382,7 @@ void KolfGame::addBorderWall(TQPoint start, TQPoint end)
{
{
Wall * wall = new Wall ( course ) ;
Wall * wall = new Wall ( course ) ;
wall - > setPoints ( start . x ( ) , start . y ( ) , end . x ( ) , end . y ( ) ) ;
wall - > setPoints ( start . x ( ) , start . y ( ) , end . x ( ) , end . y ( ) ) ;
wall - > tq setVisible( true ) ;
wall - > setVisible( true ) ;
wall - > setGame ( this ) ;
wall - > setGame ( this ) ;
wall - > setZ ( 998.7 ) ;
wall - > setZ ( 998.7 ) ;
borderWalls . append ( wall ) ;
borderWalls . append ( wall ) ;
@ -2420,7 +2420,7 @@ void KolfGame::handleMousePressEvent(TQMouseEvent *e)
list . pop_front ( ) ;
list . pop_front ( ) ;
moving = false ;
moving = false ;
highlighter - > tq setVisible( false ) ;
highlighter - > setVisible( false ) ;
selectedItem = 0 ;
selectedItem = 0 ;
movingItem = 0 ;
movingItem = 0 ;
@ -2458,7 +2458,7 @@ void KolfGame::handleMousePressEvent(TQMouseEvent *e)
setCursor ( KCursor : : sizeAllCursor ( ) ) ;
setCursor ( KCursor : : sizeAllCursor ( ) ) ;
emit newSelectedItem ( citem ) ;
emit newSelectedItem ( citem ) ;
highlighter - > tq setVisible( true ) ;
highlighter - > setVisible( true ) ;
TQRect rect = selectedItem - > boundingRect ( ) ;
TQRect rect = selectedItem - > boundingRect ( ) ;
highlighter - > move ( rect . x ( ) + 1 , rect . y ( ) + 1 ) ;
highlighter - > move ( rect . x ( ) + 1 , rect . y ( ) + 1 ) ;
highlighter - > setSize ( rect . width ( ) , rect . height ( ) ) ;
highlighter - > setSize ( rect . width ( ) , rect . height ( ) ) ;
@ -2608,7 +2608,7 @@ void KolfGame::keyPressEvent(TQKeyEvent *e)
putting = false ;
putting = false ;
stroking = false ;
stroking = false ;
finishStroking = false ;
finishStroking = false ;
strokeCircle - > tq setVisible( false ) ;
strokeCircle - > setVisible( false ) ;
putterTimer - > stop ( ) ;
putterTimer - > stop ( ) ;
putter - > setOrigin ( ( * curPlayer ) . ball ( ) - > x ( ) , ( * curPlayer ) . ball ( ) - > y ( ) ) ;
putter - > setOrigin ( ( * curPlayer ) . ball ( ) - > x ( ) , ( * curPlayer ) . ball ( ) - > y ( ) ) ;
break ;
break ;
@ -2701,7 +2701,7 @@ void KolfGame::puttPress()
strokeCircle - > move ( px + pw / 2 + 10 , py + 10 ) ;
strokeCircle - > move ( px + pw / 2 + 10 , py + 10 ) ;
else
else
strokeCircle - > move ( px + pw / 2 + 10 , py - 10 - strokeCircle - > height ( ) ) ;
strokeCircle - > move ( px + pw / 2 + 10 , py - 10 - strokeCircle - > height ( ) ) ;
strokeCircle - > tq setVisible( true ) ;
strokeCircle - > setVisible( true ) ;
}
}
putterTimer - > start ( putterTimerMsec ) ;
putterTimer - > start ( putterTimerMsec ) ;
}
}
@ -2741,7 +2741,7 @@ void KolfGame::keyReleaseEvent(TQKeyEvent *e)
{
{
lastDelId = citem - > curId ( ) ;
lastDelId = citem - > curId ( ) ;
highlighter - > tq setVisible( false ) ;
highlighter - > setVisible( false ) ;
items . removeRef ( item ) ;
items . removeRef ( item ) ;
citem - > hideInfo ( ) ;
citem - > hideInfo ( ) ;
citem - > aboutToDelete ( ) ;
citem - > aboutToDelete ( ) ;
@ -2907,7 +2907,7 @@ void KolfGame::putterTimeout()
{
{
// aborted
// aborted
putting = false ;
putting = false ;
strokeCircle - > tq setVisible( false ) ;
strokeCircle - > setVisible( false ) ;
}
}
else if ( strength > maxStrength | | puttReverse )
else if ( strength > maxStrength | | puttReverse )
{
{
@ -2950,7 +2950,7 @@ void KolfGame::putterTimeout()
putter - > go ( Forwards ) ;
putter - > go ( Forwards ) ;
else
else
{
{
strokeCircle - > tq setVisible( false ) ;
strokeCircle - > setVisible( false ) ;
finishStroking = false ;
finishStroking = false ;
putterTimer - > stop ( ) ;
putterTimer - > stop ( ) ;
putting = false ;
putting = false ;
@ -3084,7 +3084,7 @@ void KolfGame::loadStateList()
if ( ( * curPlayer ) . id ( ) = = info . id )
if ( ( * curPlayer ) . id ( ) = = info . id )
ballMoved ( ) ;
ballMoved ( ) ;
else
else
player . ball ( ) - > tq setVisible( ! info . beginningOfHole ) ;
player . ball ( ) - > setVisible( ! info . beginningOfHole ) ;
player . setScoreForHole ( info . score , curHole ) ;
player . setScoreForHole ( info . score , curHole ) ;
player . ball ( ) - > setState ( info . state ) ;
player . ball ( ) - > setState ( info . state ) ;
emit scoreChanged ( info . id , curHole , info . score ) ;
emit scoreChanged ( info . id , curHole , info . score ) ;
@ -3186,7 +3186,7 @@ void KolfGame::shotDone()
}
}
}
}
ball - > tq setVisible( true ) ;
ball - > setVisible( true ) ;
ball - > setState ( Stopped ) ;
ball - > setState ( Stopped ) ;
( * it ) . ball ( ) - > setDoDetect ( true ) ;
( * it ) . ball ( ) - > setDoDetect ( true ) ;
@ -3207,7 +3207,7 @@ void KolfGame::shotDone()
if ( curStrokes > = holeInfo . maxStrokes ( ) & & holeInfo . hasMaxStrokes ( ) )
if ( curStrokes > = holeInfo . maxStrokes ( ) & & holeInfo . hasMaxStrokes ( ) )
{
{
ball - > setState ( Holed ) ;
ball - > setState ( Holed ) ;
ball - > tq setVisible( false ) ;
ball - > setVisible( false ) ;
// move to center in case he/she hit out
// move to center in case he/she hit out
ball - > move ( width / 2 , height / 2 ) ;
ball - > move ( width / 2 , height / 2 ) ;
@ -3236,7 +3236,7 @@ void KolfGame::shotDone()
emit newPlayersTurn ( & ( * curPlayer ) ) ;
emit newPlayersTurn ( & ( * curPlayer ) ) ;
( * curPlayer ) . ball ( ) - > tq setVisible( true ) ;
( * curPlayer ) . ball ( ) - > setVisible( true ) ;
putter - > setAngle ( ( * curPlayer ) . ball ( ) ) ;
putter - > setAngle ( ( * curPlayer ) . ball ( ) ) ;
putter - > setOrigin ( ( * curPlayer ) . ball ( ) - > x ( ) , ( * curPlayer ) . ball ( ) - > y ( ) ) ;
putter - > setOrigin ( ( * curPlayer ) . ball ( ) - > x ( ) , ( * curPlayer ) . ball ( ) - > y ( ) ) ;
@ -3256,7 +3256,7 @@ void KolfGame::startBall(const Vector &vector)
playSound ( " hit " ) ;
playSound ( " hit " ) ;
emit inPlayStart ( ) ;
emit inPlayStart ( ) ;
putter - > tq setVisible( false ) ;
putter - > setVisible( false ) ;
( * curPlayer ) . ball ( ) - > setState ( Rolling ) ;
( * curPlayer ) . ball ( ) - > setState ( Rolling ) ;
( * curPlayer ) . ball ( ) - > setVector ( vector ) ;
( * curPlayer ) . ball ( ) - > setVector ( vector ) ;
@ -3310,7 +3310,7 @@ void KolfGame::sayWhosGoing()
void KolfGame : : holeDone ( )
void KolfGame : : holeDone ( )
{
{
for ( PlayerList : : Iterator it = players - > begin ( ) ; it ! = players - > end ( ) ; + + it )
for ( PlayerList : : Iterator it = players - > begin ( ) ; it ! = players - > end ( ) ; + + it )
( * it ) . ball ( ) - > tq setVisible( false ) ;
( * it ) . ball ( ) - > setVisible( false ) ;
startNextHole ( ) ;
startNextHole ( ) ;
sayWhosGoing ( ) ;
sayWhosGoing ( ) ;
}
}
@ -3407,7 +3407,7 @@ void KolfGame::startNextHole()
if ( ( int ) ( * it ) . scores ( ) . count ( ) < curHole )
if ( ( int ) ( * it ) . scores ( ) . count ( ) < curHole )
( * it ) . addHole ( ) ;
( * it ) . addHole ( ) ;
( * it ) . ball ( ) - > setVelocity ( 0 , 0 ) ;
( * it ) . ball ( ) - > setVelocity ( 0 , 0 ) ;
( * it ) . ball ( ) - > tq setVisible( false ) ;
( * it ) . ball ( ) - > setVisible( false ) ;
}
}
emit newPlayersTurn ( & ( * curPlayer ) ) ;
emit newPlayersTurn ( & ( * curPlayer ) ) ;
@ -3437,7 +3437,7 @@ void KolfGame::startNextHole()
updateShowInfo ( ) ;
updateShowInfo ( ) ;
// this is from shotDone()
// this is from shotDone()
( * curPlayer ) . ball ( ) - > tq setVisible( true ) ;
( * curPlayer ) . ball ( ) - > setVisible( true ) ;
putter - > setOrigin ( ( * curPlayer ) . ball ( ) - > x ( ) , ( * curPlayer ) . ball ( ) - > y ( ) ) ;
putter - > setOrigin ( ( * curPlayer ) . ball ( ) - > x ( ) , ( * curPlayer ) . ball ( ) - > y ( ) ) ;
updateMouse ( ) ;
updateMouse ( ) ;
@ -3455,7 +3455,7 @@ void KolfGame::showInfo()
infoText - > move ( ( width - TQFontMetrics ( infoText - > font ( ) ) . width ( text ) ) / 2 , infoText - > y ( ) ) ;
infoText - > move ( ( width - TQFontMetrics ( infoText - > font ( ) ) . width ( text ) ) / 2 , infoText - > y ( ) ) ;
infoText - > setText ( text ) ;
infoText - > setText ( text ) ;
// I hate this text! Let's not show it
// I hate this text! Let's not show it
//infoText-> tq setVisible(true);
//infoText-> setVisible(true);
emit newStatusText ( text ) ;
emit newStatusText ( text ) ;
}
}
@ -3473,7 +3473,7 @@ void KolfGame::showInfoDlg(bool addDontShowAgain)
void KolfGame : : hideInfo ( )
void KolfGame : : hideInfo ( )
{
{
infoText - > setText ( " " ) ;
infoText - > setText ( " " ) ;
infoText - > tq setVisible( false ) ;
infoText - > setVisible( false ) ;
emit newStatusText ( TQString ( ) ) ;
emit newStatusText ( TQString ( ) ) ;
}
}
@ -3593,7 +3593,7 @@ void KolfGame::openFile()
newItem - > move ( x , y ) ;
newItem - > move ( x , y ) ;
canvasItem - > firstMove ( x , y ) ;
canvasItem - > firstMove ( x , y ) ;
newItem - > tq setVisible( true ) ;
newItem - > setVisible( true ) ;
// make things actually show
// make things actually show
if ( ! hasFinalLoad )
if ( ! hasFinalLoad )
@ -3634,7 +3634,7 @@ void KolfGame::openFile()
clearHole ( ) ;
clearHole ( ) ;
setModified ( false ) ;
setModified ( false ) ;
for ( PlayerList : : Iterator it = players - > begin ( ) ; it ! = players - > end ( ) ; + + it )
for ( PlayerList : : Iterator it = players - > begin ( ) ; it ! = players - > end ( ) ; + + it )
( * it ) . ball ( ) - > tq setVisible( false ) ;
( * it ) . ball ( ) - > setVisible( false ) ;
return ;
return ;
}
}
@ -3719,7 +3719,7 @@ void KolfGame::addNewObject(Object *newObj)
{
{
TQCanvasItem * newItem = newObj - > newObject ( course ) ;
TQCanvasItem * newItem = newObj - > newObject ( course ) ;
items . append ( newItem ) ;
items . append ( newItem ) ;
newItem - > tq setVisible( true ) ;
newItem - > setVisible( true ) ;
CanvasItem * canvasItem = dynamic_cast < CanvasItem * > ( newItem ) ;
CanvasItem * canvasItem = dynamic_cast < CanvasItem * > ( newItem ) ;
if ( ! canvasItem )
if ( ! canvasItem )
@ -3826,11 +3826,11 @@ void KolfGame::addNewHole()
// make sure even the current player isn't showing
// make sure even the current player isn't showing
for ( PlayerList : : Iterator it = players - > begin ( ) ; it ! = players - > end ( ) ; + + it )
for ( PlayerList : : Iterator it = players - > begin ( ) ; it ! = players - > end ( ) ; + + it )
( * it ) . ball ( ) - > tq setVisible( false ) ;
( * it ) . ball ( ) - > setVisible( false ) ;
whiteBall - > tq setVisible( editing ) ;
whiteBall - > setVisible( editing ) ;
highlighter - > tq setVisible( false ) ;
highlighter - > setVisible( false ) ;
putter - > tq setVisible( ! editing ) ;
putter - > setVisible( ! editing ) ;
inPlay = false ;
inPlay = false ;
// add default objects
// add default objects
@ -4066,16 +4066,16 @@ void KolfGame::toggleEditMode()
{
{
// curplayer shouldn't be hidden no matter what
// curplayer shouldn't be hidden no matter what
if ( ( * it ) . ball ( ) - > beginningOfHole ( ) & & it ! = curPlayer )
if ( ( * it ) . ball ( ) - > beginningOfHole ( ) & & it ! = curPlayer )
( * it ) . ball ( ) - > tq setVisible( false ) ;
( * it ) . ball ( ) - > setVisible( false ) ;
else
else
( * it ) . ball ( ) - > tq setVisible( ! editing ) ;
( * it ) . ball ( ) - > setVisible( ! editing ) ;
}
}
whiteBall - > tq setVisible( editing ) ;
whiteBall - > setVisible( editing ) ;
highlighter - > tq setVisible( false ) ;
highlighter - > setVisible( false ) ;
// shouldn't see putter whilst editing
// shouldn't see putter whilst editing
putter - > tq setVisible( ! editing ) ;
putter - > setVisible( ! editing ) ;
if ( editing )
if ( editing )
autoSaveTimer - > start ( autoSaveMsec ) ;
autoSaveTimer - > start ( autoSaveMsec ) ;
@ -4103,7 +4103,7 @@ void KolfGame::playSound(TQString file, double vol)
}
}
}
}
file = soundDir + file + TQString : : tq fromLatin1( " .wav " ) ;
file = soundDir + file + TQString : : fromLatin1( " .wav " ) ;
// not needed when all of the files are in the distribution
// not needed when all of the files are in the distribution
//if (!TQFile::exists(file))
//if (!TQFile::exists(file))
@ -4183,7 +4183,7 @@ void KolfGame::setBorderWalls(bool showing)
{
{
Wall * wall = 0 ;
Wall * wall = 0 ;
for ( wall = borderWalls . first ( ) ; wall ; wall = borderWalls . next ( ) )
for ( wall = borderWalls . first ( ) ; wall ; wall = borderWalls . next ( ) )
wall - > tq setVisible( showing ) ;
wall - > setVisible( showing ) ;
}
}
void KolfGame : : setUseAdvancedPutting ( bool yes )
void KolfGame : : setUseAdvancedPutting ( bool yes )