@ -197,23 +197,23 @@ BridgeConfig::BridgeConfig(Bridge *bridge, TQWidget *parent)
{
{
this - > bridge = bridge ;
this - > bridge = bridge ;
m_v tq layout = new TQVBoxLayout ( this , marginHint ( ) , spacingHint ( ) ) ;
m_v layout = new TQVBoxLayout ( this , marginHint ( ) , spacingHint ( ) ) ;
TQGridLayout * tq layout = new TQGridLayout ( m_v tq layout, 2 , 3 , spacingHint ( ) ) ;
TQGridLayout * layout = new TQGridLayout ( m_v layout, 2 , 3 , spacingHint ( ) ) ;
tq layout- > addWidget ( new TQLabel ( i18n ( " Walls on: " ) , this ) , 0 , 0 ) ;
layout- > addWidget ( new TQLabel ( i18n ( " Walls on: " ) , this ) , 0 , 0 ) ;
top = new TQCheckBox ( i18n ( " &Top " ) , this ) ;
top = new TQCheckBox ( i18n ( " &Top " ) , this ) ;
tq layout- > addWidget ( top , 0 , 1 ) ;
layout- > addWidget ( top , 0 , 1 ) ;
connect ( top , TQT_SIGNAL ( toggled ( bool ) ) , this , TQT_SLOT ( topWallChanged ( bool ) ) ) ;
connect ( top , TQT_SIGNAL ( toggled ( bool ) ) , this , TQT_SLOT ( topWallChanged ( bool ) ) ) ;
top - > setChecked ( bridge - > topWallVisible ( ) ) ;
top - > setChecked ( bridge - > topWallVisible ( ) ) ;
bot = new TQCheckBox ( i18n ( " &Bottom " ) , this ) ;
bot = new TQCheckBox ( i18n ( " &Bottom " ) , this ) ;
tq layout- > addWidget ( bot , 1 , 1 ) ;
layout- > addWidget ( bot , 1 , 1 ) ;
connect ( bot , TQT_SIGNAL ( toggled ( bool ) ) , this , TQT_SLOT ( botWallChanged ( bool ) ) ) ;
connect ( bot , TQT_SIGNAL ( toggled ( bool ) ) , this , TQT_SLOT ( botWallChanged ( bool ) ) ) ;
bot - > setChecked ( bridge - > botWallVisible ( ) ) ;
bot - > setChecked ( bridge - > botWallVisible ( ) ) ;
left = new TQCheckBox ( i18n ( " &Left " ) , this ) ;
left = new TQCheckBox ( i18n ( " &Left " ) , this ) ;
tq layout- > addWidget ( left , 1 , 0 ) ;
layout- > addWidget ( left , 1 , 0 ) ;
connect ( left , TQT_SIGNAL ( toggled ( bool ) ) , this , TQT_SLOT ( leftWallChanged ( bool ) ) ) ;
connect ( left , TQT_SIGNAL ( toggled ( bool ) ) , this , TQT_SLOT ( leftWallChanged ( bool ) ) ) ;
left - > setChecked ( bridge - > leftWallVisible ( ) ) ;
left - > setChecked ( bridge - > leftWallVisible ( ) ) ;
right = new TQCheckBox ( i18n ( " &Right " ) , this ) ;
right = new TQCheckBox ( i18n ( " &Right " ) , this ) ;
tq layout- > addWidget ( right , 1 , 2 ) ;
layout- > addWidget ( right , 1 , 2 ) ;
connect ( right , TQT_SIGNAL ( toggled ( bool ) ) , this , TQT_SLOT ( rightWallChanged ( bool ) ) ) ;
connect ( right , TQT_SIGNAL ( toggled ( bool ) ) , this , TQT_SLOT ( rightWallChanged ( bool ) ) ) ;
right - > setChecked ( bridge - > rightWallVisible ( ) ) ;
right - > setChecked ( bridge - > rightWallVisible ( ) ) ;
}
}
@ -405,18 +405,18 @@ WindmillConfig::WindmillConfig(Windmill *windmill, TQWidget *parent)
: BridgeConfig ( windmill , parent )
: BridgeConfig ( windmill , parent )
{
{
this - > windmill = windmill ;
this - > windmill = windmill ;
m_v tq layout- > addStretch ( ) ;
m_v layout- > addStretch ( ) ;
TQCheckBox * check = new TQCheckBox ( i18n ( " Windmill on bottom " ) , this ) ;
TQCheckBox * check = new TQCheckBox ( i18n ( " Windmill on bottom " ) , this ) ;
check - > setChecked ( windmill - > bottom ( ) ) ;
check - > setChecked ( windmill - > bottom ( ) ) ;
connect ( check , TQT_SIGNAL ( toggled ( bool ) ) , this , TQT_SLOT ( endChanged ( bool ) ) ) ;
connect ( check , TQT_SIGNAL ( toggled ( bool ) ) , this , TQT_SLOT ( endChanged ( bool ) ) ) ;
m_v tq layout- > addWidget ( check ) ;
m_v layout- > addWidget ( check ) ;
TQHBoxLayout * h tq layout = new TQHBoxLayout ( m_v tq layout, spacingHint ( ) ) ;
TQHBoxLayout * h layout = new TQHBoxLayout ( m_v layout, spacingHint ( ) ) ;
h tq layout- > addWidget ( new TQLabel ( i18n ( " Slow " ) , this ) ) ;
h layout- > addWidget ( new TQLabel ( i18n ( " Slow " ) , this ) ) ;
TQSlider * slider = new TQSlider ( 1 , 10 , 1 , windmill - > curSpeed ( ) , Qt : : Horizontal , this ) ;
TQSlider * slider = new TQSlider ( 1 , 10 , 1 , windmill - > curSpeed ( ) , Qt : : Horizontal , this ) ;
h tq layout- > addWidget ( slider ) ;
h layout- > addWidget ( slider ) ;
h tq layout- > addWidget ( new TQLabel ( i18n ( " Fast " ) , this ) ) ;
h layout- > addWidget ( new TQLabel ( i18n ( " Fast " ) , this ) ) ;
connect ( slider , TQT_SIGNAL ( valueChanged ( int ) ) , this , TQT_SLOT ( speedChanged ( int ) ) ) ;
connect ( slider , TQT_SIGNAL ( valueChanged ( int ) ) , this , TQT_SLOT ( speedChanged ( int ) ) ) ;
endChanged ( check - > isChecked ( ) ) ;
endChanged ( check - > isChecked ( ) ) ;
@ -643,10 +643,10 @@ SignConfig::SignConfig(Sign *sign, TQWidget *parent)
: BridgeConfig ( sign , parent )
: BridgeConfig ( sign , parent )
{
{
this - > sign = sign ;
this - > sign = sign ;
m_v tq layout- > addStretch ( ) ;
m_v layout- > addStretch ( ) ;
m_v tq layout- > addWidget ( new TQLabel ( i18n ( " Sign HTML: " ) , this ) ) ;
m_v layout- > addWidget ( new TQLabel ( i18n ( " Sign HTML: " ) , this ) ) ;
KLineEdit * name = new KLineEdit ( sign - > text ( ) , this ) ;
KLineEdit * name = new KLineEdit ( sign - > text ( ) , this ) ;
m_v tq layout- > addWidget ( name ) ;
m_v layout- > addWidget ( name ) ;
connect ( name , TQT_SIGNAL ( textChanged ( const TQString & ) ) , this , TQT_SLOT ( textChanged ( const TQString & ) ) ) ;
connect ( name , TQT_SIGNAL ( textChanged ( const TQString & ) ) , this , TQT_SLOT ( textChanged ( const TQString & ) ) ) ;
}
}
@ -663,20 +663,20 @@ EllipseConfig::EllipseConfig(Ellipse *ellipse, TQWidget *parent)
{
{
this - > ellipse = ellipse ;
this - > ellipse = ellipse ;
m_v tq layout = new TQVBoxLayout ( this , marginHint ( ) , spacingHint ( ) ) ;
m_v layout = new TQVBoxLayout ( this , marginHint ( ) , spacingHint ( ) ) ;
TQCheckBox * check = new TQCheckBox ( i18n ( " Enable show/hide " ) , this ) ;
TQCheckBox * check = new TQCheckBox ( i18n ( " Enable show/hide " ) , this ) ;
m_v tq layout- > addWidget ( check ) ;
m_v layout- > addWidget ( check ) ;
connect ( check , TQT_SIGNAL ( toggled ( bool ) ) , this , TQT_SLOT ( check1Changed ( bool ) ) ) ;
connect ( check , TQT_SIGNAL ( toggled ( bool ) ) , this , TQT_SLOT ( check1Changed ( bool ) ) ) ;
check - > setChecked ( ellipse - > changeEnabled ( ) ) ;
check - > setChecked ( ellipse - > changeEnabled ( ) ) ;
TQHBoxLayout * h tq layout = new TQHBoxLayout ( m_v tq layout, spacingHint ( ) ) ;
TQHBoxLayout * h layout = new TQHBoxLayout ( m_v layout, spacingHint ( ) ) ;
slow1 = new TQLabel ( i18n ( " Slow " ) , this ) ;
slow1 = new TQLabel ( i18n ( " Slow " ) , this ) ;
h tq layout- > addWidget ( slow1 ) ;
h layout- > addWidget ( slow1 ) ;
slider1 = new TQSlider ( 1 , 100 , 5 , 100 - ellipse - > changeEvery ( ) , Qt : : Horizontal , this ) ;
slider1 = new TQSlider ( 1 , 100 , 5 , 100 - ellipse - > changeEvery ( ) , Qt : : Horizontal , this ) ;
h tq layout- > addWidget ( slider1 ) ;
h layout- > addWidget ( slider1 ) ;
fast1 = new TQLabel ( i18n ( " Fast " ) , this ) ;
fast1 = new TQLabel ( i18n ( " Fast " ) , this ) ;
h tq layout- > addWidget ( fast1 ) ;
h layout- > addWidget ( fast1 ) ;
connect ( slider1 , TQT_SIGNAL ( valueChanged ( int ) ) , this , TQT_SLOT ( value1Changed ( int ) ) ) ;
connect ( slider1 , TQT_SIGNAL ( valueChanged ( int ) ) , this , TQT_SLOT ( value1Changed ( int ) ) ) ;
@ -684,7 +684,7 @@ EllipseConfig::EllipseConfig(Ellipse *ellipse, TQWidget *parent)
// TODO add slider2 and friends and make it possible for ellipses to grow and contract
// TODO add slider2 and friends and make it possible for ellipses to grow and contract
m_v tq layout- > addStretch ( ) ;
m_v layout- > addStretch ( ) ;
}
}
void EllipseConfig : : value1Changed ( int news )
void EllipseConfig : : value1Changed ( int news )
@ -1503,30 +1503,30 @@ BlackHoleConfig::BlackHoleConfig(BlackHole *blackHole, TQWidget *parent)
: Config ( parent )
: Config ( parent )
{
{
this - > blackHole = blackHole ;
this - > blackHole = blackHole ;
TQVBoxLayout * tq layout = new TQVBoxLayout ( this , marginHint ( ) , spacingHint ( ) ) ;
TQVBoxLayout * layout = new TQVBoxLayout ( this , marginHint ( ) , spacingHint ( ) ) ;
tq layout- > addWidget ( new TQLabel ( i18n ( " Exiting ball angle: " ) , this ) ) ;
layout- > addWidget ( new TQLabel ( i18n ( " Exiting ball angle: " ) , this ) ) ;
TQSpinBox * deg = new TQSpinBox ( 0 , 359 , 10 , this ) ;
TQSpinBox * deg = new TQSpinBox ( 0 , 359 , 10 , this ) ;
deg - > setSuffix ( TQString ( " " ) + i18n ( " degrees " ) ) ;
deg - > setSuffix ( TQString ( " " ) + i18n ( " degrees " ) ) ;
deg - > setValue ( blackHole - > curExitDeg ( ) ) ;
deg - > setValue ( blackHole - > curExitDeg ( ) ) ;
deg - > setWrapping ( true ) ;
deg - > setWrapping ( true ) ;
tq layout- > addWidget ( deg ) ;
layout- > addWidget ( deg ) ;
connect ( deg , TQT_SIGNAL ( valueChanged ( int ) ) , this , TQT_SLOT ( degChanged ( int ) ) ) ;
connect ( deg , TQT_SIGNAL ( valueChanged ( int ) ) , this , TQT_SLOT ( degChanged ( int ) ) ) ;
tq layout- > addStretch ( ) ;
layout- > addStretch ( ) ;
TQHBoxLayout * h tq layout = new TQHBoxLayout ( tq layout, spacingHint ( ) ) ;
TQHBoxLayout * h layout = new TQHBoxLayout ( layout, spacingHint ( ) ) ;
h tq layout- > addWidget ( new TQLabel ( i18n ( " Minimum exit speed: " ) , this ) ) ;
h layout- > addWidget ( new TQLabel ( i18n ( " Minimum exit speed: " ) , this ) ) ;
KDoubleNumInput * min = new KDoubleNumInput ( this ) ;
KDoubleNumInput * min = new KDoubleNumInput ( this ) ;
min - > setRange ( 0 , 8 , 1 , true ) ;
min - > setRange ( 0 , 8 , 1 , true ) ;
h tq layout- > addWidget ( min ) ;
h layout- > addWidget ( min ) ;
connect ( min , TQT_SIGNAL ( valueChanged ( double ) ) , this , TQT_SLOT ( minChanged ( double ) ) ) ;
connect ( min , TQT_SIGNAL ( valueChanged ( double ) ) , this , TQT_SLOT ( minChanged ( double ) ) ) ;
min - > setValue ( blackHole - > minSpeed ( ) ) ;
min - > setValue ( blackHole - > minSpeed ( ) ) ;
h tq layout = new TQHBoxLayout ( tq layout, spacingHint ( ) ) ;
h layout = new TQHBoxLayout ( layout, spacingHint ( ) ) ;
h tq layout- > addWidget ( new TQLabel ( i18n ( " Maximum: " ) , this ) ) ;
h layout- > addWidget ( new TQLabel ( i18n ( " Maximum: " ) , this ) ) ;
KDoubleNumInput * max = new KDoubleNumInput ( this ) ;
KDoubleNumInput * max = new KDoubleNumInput ( this ) ;
max - > setRange ( 1 , 10 , 1 , true ) ;
max - > setRange ( 1 , 10 , 1 , true ) ;
h tq layout- > addWidget ( max ) ;
h layout- > addWidget ( max ) ;
connect ( max , TQT_SIGNAL ( valueChanged ( double ) ) , this , TQT_SLOT ( maxChanged ( double ) ) ) ;
connect ( max , TQT_SIGNAL ( valueChanged ( double ) ) , this , TQT_SLOT ( maxChanged ( double ) ) ) ;
max - > setValue ( blackHole - > maxSpeed ( ) ) ;
max - > setValue ( blackHole - > maxSpeed ( ) ) ;
}
}
@ -1959,42 +1959,42 @@ HoleConfig::HoleConfig(HoleInfo *holeInfo, TQWidget *parent)
{
{
this - > holeInfo = holeInfo ;
this - > holeInfo = holeInfo ;
TQVBoxLayout * tq layout = new TQVBoxLayout ( this , marginHint ( ) , spacingHint ( ) ) ;
TQVBoxLayout * layout = new TQVBoxLayout ( this , marginHint ( ) , spacingHint ( ) ) ;
TQHBoxLayout * h tq layout = new TQHBoxLayout ( tq layout, spacingHint ( ) ) ;
TQHBoxLayout * h layout = new TQHBoxLayout ( layout, spacingHint ( ) ) ;
h tq layout- > addWidget ( new TQLabel ( i18n ( " Course name: " ) , this ) ) ;
h layout- > addWidget ( new TQLabel ( i18n ( " Course name: " ) , this ) ) ;
KLineEdit * nameEdit = new KLineEdit ( holeInfo - > untranslatedName ( ) , this ) ;
KLineEdit * nameEdit = new KLineEdit ( holeInfo - > untranslatedName ( ) , this ) ;
h tq layout- > addWidget ( nameEdit ) ;
h layout- > addWidget ( nameEdit ) ;
connect ( nameEdit , TQT_SIGNAL ( textChanged ( const TQString & ) ) , this , TQT_SLOT ( nameChanged ( const TQString & ) ) ) ;
connect ( nameEdit , TQT_SIGNAL ( textChanged ( const TQString & ) ) , this , TQT_SLOT ( nameChanged ( const TQString & ) ) ) ;
h tq layout = new TQHBoxLayout ( tq layout, spacingHint ( ) ) ;
h layout = new TQHBoxLayout ( layout, spacingHint ( ) ) ;
h tq layout- > addWidget ( new TQLabel ( i18n ( " Course author: " ) , this ) ) ;
h layout- > addWidget ( new TQLabel ( i18n ( " Course author: " ) , this ) ) ;
KLineEdit * authorEdit = new KLineEdit ( holeInfo - > author ( ) , this ) ;
KLineEdit * authorEdit = new KLineEdit ( holeInfo - > author ( ) , this ) ;
h tq layout- > addWidget ( authorEdit ) ;
h layout- > addWidget ( authorEdit ) ;
connect ( authorEdit , TQT_SIGNAL ( textChanged ( const TQString & ) ) , this , TQT_SLOT ( authorChanged ( const TQString & ) ) ) ;
connect ( authorEdit , TQT_SIGNAL ( textChanged ( const TQString & ) ) , this , TQT_SLOT ( authorChanged ( const TQString & ) ) ) ;
tq layout- > addStretch ( ) ;
layout- > addStretch ( ) ;
h tq layout = new TQHBoxLayout ( tq layout, spacingHint ( ) ) ;
h layout = new TQHBoxLayout ( layout, spacingHint ( ) ) ;
h tq layout- > addWidget ( new TQLabel ( i18n ( " Par: " ) , this ) ) ;
h layout- > addWidget ( new TQLabel ( i18n ( " Par: " ) , this ) ) ;
TQSpinBox * par = new TQSpinBox ( 1 , 15 , 1 , this ) ;
TQSpinBox * par = new TQSpinBox ( 1 , 15 , 1 , this ) ;
par - > setValue ( holeInfo - > par ( ) ) ;
par - > setValue ( holeInfo - > par ( ) ) ;
h tq layout- > addWidget ( par ) ;
h layout- > addWidget ( par ) ;
connect ( par , TQT_SIGNAL ( valueChanged ( int ) ) , this , TQT_SLOT ( parChanged ( int ) ) ) ;
connect ( par , TQT_SIGNAL ( valueChanged ( int ) ) , this , TQT_SLOT ( parChanged ( int ) ) ) ;
h tq layout- > addStretch ( ) ;
h layout- > addStretch ( ) ;
h tq layout- > addWidget ( new TQLabel ( i18n ( " Maximum: " ) , this ) ) ;
h layout- > addWidget ( new TQLabel ( i18n ( " Maximum: " ) , this ) ) ;
TQSpinBox * maxstrokes = new TQSpinBox ( holeInfo - > lowestMaxStrokes ( ) , 30 , 1 , this ) ;
TQSpinBox * maxstrokes = new TQSpinBox ( holeInfo - > lowestMaxStrokes ( ) , 30 , 1 , this ) ;
TQWhatsThis : : add ( maxstrokes , i18n ( " Maximum number of strokes player can take on this hole. " ) ) ;
TQWhatsThis : : add ( maxstrokes , i18n ( " Maximum number of strokes player can take on this hole. " ) ) ;
TQToolTip : : add ( maxstrokes , i18n ( " Maximum number of strokes " ) ) ;
TQToolTip : : add ( maxstrokes , i18n ( " Maximum number of strokes " ) ) ;
maxstrokes - > setSpecialValueText ( i18n ( " Unlimited " ) ) ;
maxstrokes - > setSpecialValueText ( i18n ( " Unlimited " ) ) ;
maxstrokes - > setValue ( holeInfo - > maxStrokes ( ) ) ;
maxstrokes - > setValue ( holeInfo - > maxStrokes ( ) ) ;
h tq layout- > addWidget ( maxstrokes ) ;
h layout- > addWidget ( maxstrokes ) ;
connect ( maxstrokes , TQT_SIGNAL ( valueChanged ( int ) ) , this , TQT_SLOT ( maxStrokesChanged ( int ) ) ) ;
connect ( maxstrokes , TQT_SIGNAL ( valueChanged ( int ) ) , this , TQT_SLOT ( maxStrokesChanged ( int ) ) ) ;
TQCheckBox * check = new TQCheckBox ( i18n ( " Show border walls " ) , this ) ;
TQCheckBox * check = new TQCheckBox ( i18n ( " Show border walls " ) , this ) ;
check - > setChecked ( holeInfo - > borderWalls ( ) ) ;
check - > setChecked ( holeInfo - > borderWalls ( ) ) ;
tq layout- > addWidget ( check ) ;
layout- > addWidget ( check ) ;
connect ( check , TQT_SIGNAL ( toggled ( bool ) ) , this , TQT_SLOT ( borderWallsChanged ( bool ) ) ) ;
connect ( check , TQT_SIGNAL ( toggled ( bool ) ) , this , TQT_SLOT ( borderWallsChanged ( bool ) ) ) ;
}
}