Rename obsolete tq methods to standard names

pull/1/head
Timothy Pearson 12 years ago
parent c0f375feba
commit 3677045295

@ -114,23 +114,23 @@ AtlantikConfig ConfigDialog::config()
ConfigPlayer::ConfigPlayer(ConfigDialog* configDialog, TQWidget *parent, const char *name) : TQWidget(parent, name)
{
m_configDialog = configDialog;
TQVBoxLayout *tqlayout = new TQVBoxLayout(parent, KDialog::marginHint(), KDialog::spacingHint());
TQVBoxLayout *layout = new TQVBoxLayout(parent, KDialog::marginHint(), KDialog::spacingHint());
TQLabel *label = new TQLabel(i18n("Player name:"), parent);
tqlayout->addWidget(label);
layout->addWidget(label);
m_playerName = new TQLineEdit(parent);
tqlayout->addWidget(m_playerName);
layout->addWidget(m_playerName);
TQLabel *label2 = new TQLabel(i18n("Player image:"), parent);
tqlayout->addWidget(label2);
layout->addWidget(label2);
m_playerIcon = new KPushButton(parent, "playerIcon");
tqlayout->addWidget(m_playerIcon);
layout->addWidget(m_playerIcon);
connect( m_playerIcon, TQT_SIGNAL(clicked()), this, TQT_SLOT(chooseImage()) );
tqlayout->addStretch(1);
layout->addStretch(1);
reset();
}
@ -185,10 +185,10 @@ void ConfigPlayer::reset()
ConfigMonopigator::ConfigMonopigator(ConfigDialog *configDialog, TQWidget *parent, const char *name) : TQWidget(parent, name)
{
m_configDialog = configDialog;
TQVBoxLayout *tqlayout = new TQVBoxLayout(parent, KDialog::marginHint(), KDialog::spacingHint());
TQVBoxLayout *layout = new TQVBoxLayout(parent, KDialog::marginHint(), KDialog::spacingHint());
m_connectOnStart = new TQCheckBox(i18n("Request list of Internet servers on start-up"), parent);
tqlayout->addWidget(m_connectOnStart);
layout->addWidget(m_connectOnStart);
TQString message=i18n(
"If checked, Atlantik connects to a meta server on start-up to\n"
@ -196,7 +196,7 @@ ConfigMonopigator::ConfigMonopigator(ConfigDialog *configDialog, TQWidget *paren
TQWhatsThis::add(m_connectOnStart, message);
m_hideDevelopmentServers = new TQCheckBox(i18n("Hide development servers"), parent);
tqlayout->addWidget(m_hideDevelopmentServers);
layout->addWidget(m_hideDevelopmentServers);
message=i18n(
"Some of the Internet servers might be running development\n"
@ -204,7 +204,7 @@ ConfigMonopigator::ConfigMonopigator(ConfigDialog *configDialog, TQWidget *paren
"display these servers.\n");
TQWhatsThis::add(m_hideDevelopmentServers, message);
tqlayout->addStretch(1);
layout->addStretch(1);
reset();
}
@ -228,17 +228,17 @@ void ConfigMonopigator::reset()
ConfigGeneral::ConfigGeneral(ConfigDialog *configDialog, TQWidget *parent, const char *name) : TQWidget(parent, name)
{
m_configDialog = configDialog;
TQVBoxLayout *tqlayout = new TQVBoxLayout(parent, KDialog::marginHint(), KDialog::spacingHint());
TQVBoxLayout *layout = new TQVBoxLayout(parent, KDialog::marginHint(), KDialog::spacingHint());
m_chatTimestamps = new TQCheckBox(i18n("Show timestamps in chat messages"), parent);
tqlayout->addWidget(m_chatTimestamps);
layout->addWidget(m_chatTimestamps);
TQString message=i18n(
"If checked, Atlantik will add timestamps in front of chat\n"
"messages.\n");
TQWhatsThis::add(m_chatTimestamps, message);
tqlayout->addStretch(1);
layout->addStretch(1);
reset();
}
@ -256,10 +256,10 @@ void ConfigGeneral::reset()
ConfigBoard::ConfigBoard(ConfigDialog *configDialog, TQWidget *parent, const char *name) : TQWidget(parent, name)
{
m_configDialog = configDialog;
TQVBoxLayout *tqlayout = new TQVBoxLayout(parent, KDialog::marginHint(), KDialog::spacingHint());
TQVBoxLayout *layout = new TQVBoxLayout(parent, KDialog::marginHint(), KDialog::spacingHint());
TQGroupBox *box = new TQGroupBox(1, Qt::Horizontal, i18n("Game Status Feedback"), parent);
tqlayout->addWidget(box);
layout->addWidget(box);
m_indicateUnowned = new TQCheckBox(i18n("Display title deed card on unowned properties"), box);
TQString message=i18n(
@ -292,9 +292,9 @@ ConfigBoard::ConfigBoard(ConfigDialog *configDialog, TQWidget *parent, const cha
TQWhatsThis::add(m_quartzEffects, message);
// box = new TQGroupBox(1, Qt::Horizontal, i18n("Size"), parent);
// tqlayout->addWidget(box);
// layout->addWidget(box);
tqlayout->addStretch(1);
layout->addStretch(1);
reset();
}

@ -151,7 +151,7 @@ KAstTopLevel::KAstTopLevel()
vb->addWidget( view, 10 );
// -- bottom tqlayout:
// -- bottom layout:
TQFrame *sep2 = new TQFrame( mainWin );
sep2->setMaximumHeight( 1 );
sep2->setFrameStyle( TQFrame::HLine | TQFrame::Raised );

@ -469,7 +469,7 @@ void KFibsPlayerList::getSetupPages(KTabCtl *nb, int space)
gl = new TQGridLayout(gbl, LVEnd, 2, 20);
gl->addWidget(lb, 0, 0);
// two column tqlayout....
// two column layout....
for (i = 1; i < LVEnd/2; i++) {
gl->addWidget(d->mCol[2*i-1]->cb, i, 0);
gl->addWidget(d->mCol[2*i ]->cb, i, 1);

@ -733,7 +733,7 @@ void AbTop::newGame()
/* Copy ASCII representation into Clipboard */
void AbTop::copy()
{
TQClipboard *cb = TQApplication::tqclipboard();
TQClipboard *cb = TQApplication::clipboard();
cb->setText( board->getASCIIState( moveNo ).ascii() );
}
@ -741,7 +741,7 @@ void AbTop::paste()
{
if (!pastePossible) return;
TQClipboard *cb = TQApplication::tqclipboard();
TQClipboard *cb = TQApplication::clipboard();
pastePosition( cb->text().ascii() );
/* don't do this in pastePosition: RECURSION !! */

@ -453,13 +453,13 @@ void KCubeBoxWidget::initCubes()
int i,j;
// create Layout
tqlayout=new TQGridLayout(this,s,s);
layout=new TQGridLayout(this,s,s);
for(i=0;i<s;i++)
{
tqlayout->setRowStretch(i,1);
tqlayout->setColStretch(i,1);
layout->setRowStretch(i,1);
layout->setColStretch(i,1);
}
@ -474,7 +474,7 @@ void KCubeBoxWidget::initCubes()
{
cubes[i][j]=new KCubeWidget(this);
cubes[i][j]->setCoordinates(i,j);
tqlayout->addWidget(cubes[i][j],i,j);
layout->addWidget(cubes[i][j],i,j);
cubes[i][j]->show();
connect(cubes[i][j],TQT_SIGNAL(clicked(int,int,bool)),TQT_SLOT(stopHint()));
connect(cubes[i][j],TQT_SIGNAL(clicked(int,int,bool)),TQT_SLOT(checkClick(int,int,bool)));
@ -511,8 +511,8 @@ TQSize KCubeBoxWidget::sizeHint() const
void KCubeBoxWidget::deleteCubes()
{
if(tqlayout)
delete tqlayout;
if(layout)
delete layout;
CubeBoxBase<KCubeWidget>::deleteCubes();
}

@ -147,7 +147,7 @@ protected slots:
private:
void init();
TQGridLayout *tqlayout;
TQGridLayout *layout;
CubeBox *undoBox;
Brain brain;

@ -10,7 +10,7 @@
;
; The general form of the options is "Variable=value". Everything
; between the equals sign and the end of the line is considered part
; of the value. The spacing and tqlayout is free-form but only one option
; of the value. The spacing and layout is free-form but only one option
; per line is allowed. Variables and values are not case-sensitive.
;
; Note: characters after a semi-colon are treated as a comment

@ -4,7 +4,7 @@
#include <tqstring.h>
#include "KmTypes.h"
const TQString layoutMagic1_0 = "kmahjongg-tqlayout-v1.0";
const TQString layoutMagic1_0 = "kmahjongg-layout-v1.0";
class BoardLayout {

@ -35,7 +35,7 @@
// When we assign a tile to draw in a slot we do it in order from te following
// table, wrapping on the tile number. It makes the tile tqlayout look more
// table, wrapping on the tile number. It makes the tile layout look more
// random.
@ -69,10 +69,10 @@ Editor::Editor
// setup the tool bar
setupToolbar();
TQVBoxLayout *tqlayout = new TQVBoxLayout(this, 1);
tqlayout->addWidget(topToolbar,0);
tqlayout->addWidget(drawFrame,1);
tqlayout->activate();
TQVBoxLayout *layout = new TQVBoxLayout(this, 1);
layout->addWidget(topToolbar,0);
layout->addWidget(drawFrame,1);
layout->activate();
resize( sWidth+60, sHeight+60);
setMinimumSize( sWidth+60, sHeight+60);
@ -272,7 +272,7 @@ void Editor::loadBoard() {
KURL url = KFileDialog::getOpenURL(
NULL,
i18n("*.tqlayout|Board Layout (*.tqlayout)\n"
i18n("*.layout|Board Layout (*.layout)\n"
"*|All Files"),
this,
i18n("Open Board Layout" ));
@ -309,7 +309,7 @@ bool Editor::saveBoard() {
// get a save file name
KURL url = KFileDialog::getSaveURL(
NULL,
i18n("*.tqlayout|Board Layout (*.tqlayout)\n"
i18n("*.layout|Board Layout (*.layout)\n"
"*|All Files"),
this,
i18n("Save Board Layout" ));
@ -373,7 +373,7 @@ bool Editor::testSave()
// The main paint event, draw in the grid and blit in
// the tiles as specified by the tqlayout.
// the tiles as specified by the layout.
void Editor::paintEvent( TQPaintEvent* ) {

@ -399,8 +399,8 @@ void HighScore::copyTableToScreen(const TQString &name) {
repaint(false);
}
int HighScore::exec(TQString &tqlayout) {
copyTableToScreen(tqlayout);
int HighScore::exec(TQString &layout) {
copyTableToScreen(layout);
return(TQDialog::exec());
}

@ -41,7 +41,7 @@ public:
virtual ~HighScore();
int exec(TQString &tqlayout);
int exec(TQString &layout);
void checkHighScore(int score, int elapsed, long game, TQString &board);

@ -76,7 +76,7 @@ void Preview::initialise(const PreviewType type)
TQString extension;
TQString tile = Prefs::tileSet();
TQString back = Prefs::background();
TQString tqlayout = Prefs::layout();
TQString layout = Prefs::layout();
// set up the concept of the current file. Initialised to the preferences
// value initially. Set the caption to indicate what we are doing
@ -98,10 +98,10 @@ void Preview::initialise(const PreviewType type)
break;
case board:
m_fileSelector = i18n("*.tqlayout|Board Layout File (*.tqlayout)\n");
m_fileSelector = i18n("*.layout|Board Layout File (*.layout)\n");
setCaption(i18n("Change Board Layout"));
m_selectedFile = tqlayout;
extension = "*.tqlayout";
m_selectedFile = layout;
extension = "*.layout";
break;
case theme:
@ -167,7 +167,7 @@ void Preview::load() {
}
}
// Top level preview drawing method. Background, tileset and tqlayout
// Top level preview drawing method. Background, tileset and layout
// are initialised from the preferences. Depending on the type
// of preview dialog we pick up the selected file for one of these
// chaps.
@ -176,7 +176,7 @@ void Preview::drawPreview()
{
TQString tile = Prefs::tileSet();
TQString back = Prefs::background();
TQString tqlayout = Prefs::layout();
TQString layout = Prefs::layout();
switch (m_previewType)
{
@ -189,12 +189,12 @@ void Preview::drawPreview()
break;
case board:
tqlayout = m_selectedFile;
layout = m_selectedFile;
break;
case theme:
// a theme is quite a bit of work. We load the
// specified bits in (tqlayout, background and tileset
// specified bits in (layout, background and tileset
if (!m_selectedFile.isEmpty())
{
TQString backRaw, layoutRaw, tilesetRaw, magic;
@ -233,17 +233,17 @@ void Preview::drawPreview()
back = locate("appdata", back);
}
tqlayout = layoutRaw;
tqlayout.replace(":", "/kmahjongg/pics/");
if (!TQFile::exists(tqlayout))
layout = layoutRaw;
layout.replace(":", "/kmahjongg/pics/");
if (!TQFile::exists(layout))
{
tqlayout = layoutRaw;
tqlayout = "pics/" + tqlayout.right(tqlayout.length() - tqlayout.find(":") - 1);
tqlayout = locate("appdata", tqlayout);
layout = layoutRaw;
layout = "pics/" + layout.right(layout.length() - layout.find(":") - 1);
layout = locate("appdata", layout);
}
m_themeBack=back;
m_themeLayout=tqlayout;
m_themeLayout=layout;
m_themeTileset=tile;
}
}
@ -251,7 +251,7 @@ void Preview::drawPreview()
}
renderBackground(back);
renderTiles(tile, tqlayout);
renderTiles(tile, layout);
}
void Preview::paintEvent( TQPaintEvent* ){
@ -260,7 +260,7 @@ void Preview::paintEvent( TQPaintEvent* ){
// the user selected ok, or apply. This method passes the changes
// across to the game widget and if necessary forces a board redraw
// (unnecessary on tqlayout changes since it only effects the next game)
// (unnecessary on layout changes since it only effects the next game)
void Preview::applyChange()
{
switch (m_previewType)
@ -287,7 +287,7 @@ void Preview::applyChange()
break;
}
// don't redraw for a tqlayout change
// don't redraw for a layout change
if (m_previewType == board || m_previewType == theme) layoutChange();
else boardRedraw(true);
@ -310,9 +310,9 @@ void Preview::renderBackground(const TQString &bg) {
// This method draws a mini-tiled board with no tiles missing.
void Preview::renderTiles(const TQString &file, const TQString &tqlayout) {
void Preview::renderTiles(const TQString &file, const TQString &layout) {
m_tiles.loadTileset(file, true);
m_boardLayout.loadBoardLayout(tqlayout);
m_boardLayout.loadBoardLayout(layout);
TQPixmap *dest = m_drawFrame->getPreviewPixmap();
int xOffset = m_tiles.width()/2;
@ -366,7 +366,7 @@ void Preview::renderTiles(const TQString &file, const TQString &tqlayout) {
void Preview::saveTheme() {
TQString tile = Prefs::tileSet();
TQString back = Prefs::background();
TQString tqlayout = Prefs::layout();
TQString layout = Prefs::layout();
TQString with = ":";
// we want to replace any path in the default store
@ -375,7 +375,7 @@ void Preview::saveTheme() {
back.replace(p,with);
tile.replace(p,with);
tqlayout.replace(p,with);
layout.replace(p,with);
// Get the name of the file to save
@ -417,7 +417,7 @@ void Preview::saveTheme() {
themeMagicV1_0,
tile.utf8().data(),
back.utf8().data(),
tqlayout.utf8().data());
layout.utf8().data());
fclose(outFile);
}

@ -63,7 +63,7 @@ protected:
virtual void drawPreview();
void applyChange() ;
void renderBackground(const TQString &bg);
void renderTiles(const TQString &file, const TQString &tqlayout);
void renderTiles(const TQString &file, const TQString &layout);
void paintEvent( TQPaintEvent* pa );
signals:

@ -60,11 +60,11 @@ BoardWidget::BoardWidget( TQWidget* parent, const char *name )
kapp->quit();
}
getFileOrDefault(Prefs::layout(), "tqlayout", tFile);
getFileOrDefault(Prefs::layout(), "layout", tFile);
if( ! loadBoardLayout(tFile) )
{
KMessageBox::error(this,
i18n("An error occurred when loading the board tqlayout %1\n"
i18n("An error occurred when loading the board layout %1\n"
"KMahjongg will now terminate.").arg(tFile));
kapp->quit();
}
@ -92,7 +92,7 @@ void BoardWidget::saveSettings(){
//config->writePathEntry("Tileset_file", tileFile);
//config->writePathEntry("Background_file", backgroundFile);
//config->writePathEntry("Layout_file", tqlayout);
//config->writePathEntry("Layout_file", layout);
}
void BoardWidget::getFileOrDefault(TQString filename, TQString type, TQString &res)
@ -766,7 +766,7 @@ void BoardWidget::calculateNewGame( int gNumber)
}
// ---------------------------------------------------------
// Generate the position data for the tqlayout from contents of Game.Map.
// Generate the position data for the layout from contents of Game.Map.
void BoardWidget::generateTilePositions() {
numTiles = 0;
@ -788,7 +788,7 @@ void BoardWidget::generateTilePositions() {
}
// ---------------------------------------------------------
// Generate the dependency data for the tqlayout from the position data.
// Generate the dependency data for the layout from the position data.
// Note that the coordinates of each tile in tilePositions are those of
// the upper left quarter of the tile.
void BoardWidget::generatePositionDepends() {
@ -1393,7 +1393,7 @@ bool BoardWidget::findMove( POSITION& posA, POSITION& posB )
iPosCount = 0; // Hier Anzahl der gefunden Paare merken
// The new tile tqlayout with non-contiguos horizantle spans
// The new tile layout with non-contiguos horizantle spans
// can lead to huge numbers of matching pairs being exposed.
// we alter the loop to bail out when BoardLayout::maxTiles/2 pairs are found
// (or less);

@ -151,7 +151,7 @@ void KMahjongg::setupKAction()
pauseAction = KStdGameAction::pause(TQT_TQOBJECT(this), TQT_SLOT(pause()), actionCollection());
// TODO: store the background ; open on startup
// TODO: same about tqlayout
// TODO: same about layout
// TODO: same about theme
// move

@ -1,4 +1,4 @@
kmahjongg-tqlayout-v1.0
kmahjongg-layout-v1.0
12....12121212121212121212....12
4312..43434343434343434343..1243
124312........1212........124312

@ -1,4 +1,4 @@
kmahjongg-tqlayout-v1.0
kmahjongg-layout-v1.0
# Level 0 -------------------------
...121212121212121212121212.....
...434343434343434343434343.....

@ -1,4 +1,4 @@
kmahjongg-theme-v1.0
:default.tileset
:default.bgnd
:default.tqlayout
:default.layout

@ -1,4 +1,4 @@
kmahjongg-tqlayout-v1.0
kmahjongg-layout-v1.0
.............121212.......12..12
.............434343.......43..43
.............12.............12..

@ -1,5 +1,5 @@
kmahjongg-theme-v1.0
:pirates.tileset
:pirates.bgnd
:pirates.tqlayout
:pirates.layout

@ -1,4 +1,4 @@
kmahjongg-tqlayout-v1.0
kmahjongg-layout-v1.0
# Level 0 -------------------------
....121212121212121212121212....
....434343434343434343434343....

@ -1,4 +1,4 @@
kmahjongg-tqlayout-v1.0
kmahjongg-layout-v1.0
................................
12121212..121212121212..12121212
43434343..434343434343..43434343

@ -1,4 +1,4 @@
kmahjongg-tqlayout-v1.0
kmahjongg-layout-v1.0
.1212121212121212121212121212...
.4343434343434343434343434343...
.1212121212121212121212121212...

@ -1,4 +1,4 @@
kmahjongg-tqlayout-v1.0
kmahjongg-layout-v1.0
................................
................................
.121212121212121212.............

@ -1,4 +1,4 @@
kmahjongg-tqlayout-v1.0
kmahjongg-layout-v1.0
# Level 0 -------------------------
....121212121212121212121212....
....434343434343434343434343....

@ -1,4 +1,4 @@
kmahjongg-tqlayout-v1.0
kmahjongg-layout-v1.0
# Level 0 -------------------------
.121212121212121212121212121212.
.434343434343434343434343434343.

@ -128,8 +128,8 @@ void FieldFrame::drawBox(TQPainter &painter, const TQPoint &p,
&colorGroup().brush(TQColorGroup::Background));
if (hasFocus) {
painter.translate(p.x(), p.y());
TQRect fbr = tqstyle().subRect(TQStyle::SR_PushButtonFocusRect, &_button);
tqstyle().tqdrawPrimitive(TQStyle::PE_FocusRect, &painter, fbr,
TQRect fbr = style().subRect(TQStyle::SR_PushButtonFocusRect, &_button);
style().tqdrawPrimitive(TQStyle::PE_FocusRect, &painter, fbr,
colorGroup(), TQStyle::Style_Enabled);
painter.resetXForm();
}
@ -137,9 +137,9 @@ void FieldFrame::drawBox(TQPainter &painter, const TQPoint &p,
TQRect r(p, _button.size());
const TQPixmap *pixmap = (type==NoPixmap ? 0 : &_pixmaps[type]);
TQColor color = (nbMines==0 ? black : Settings::mineColor(nbMines-1));
tqstyle().drawItem(&painter, r, AlignCenter, colorGroup(), true, pixmap,
style().drawItem(&painter, r, AlignCenter, colorGroup(), true, pixmap,
text, -1, &color);
if ( advised!=-1 )
tqstyle().drawItem(&painter, r, AlignCenter, colorGroup(), true,
style().drawItem(&painter, r, AlignCenter, colorGroup(), true,
&_advised[advised], TQString());
}

@ -54,7 +54,7 @@ Status::Status(TQWidget *parent)
_solver = new Solver(TQT_TQOBJECT(this));
connect(_solver, TQT_SIGNAL(solvingDone(bool)), TQT_SLOT(solvingDone(bool)));
// top tqlayout
// top layout
TQGridLayout *top = new TQGridLayout(this, 2, 5, 10, 10);
top->setColStretch(1, 1);
top->setColStretch(3, 1);

@ -36,8 +36,8 @@ void Config::changed()
MessageConfig::MessageConfig(TQString text, TQWidget *parent, const char *name)
: Config(parent, name)
{
TQVBoxLayout *tqlayout = new TQVBoxLayout(this, marginHint(), spacingHint());
tqlayout->addWidget(new TQLabel(text, this));
TQVBoxLayout *layout = new TQVBoxLayout(this, marginHint(), spacingHint());
layout->addWidget(new TQLabel(text, this));
}
DefaultConfig::DefaultConfig(TQWidget *parent, const char *name)

@ -15,13 +15,13 @@ Editor::Editor(ObjectList *list, TQWidget *parent, const char *name)
this->list = list;
config = 0;
htqlayout = new TQHBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
hlayout = new TQHBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
TQVBoxLayout *vtqlayout = new TQVBoxLayout(htqlayout, KDialog::spacingHint());
vtqlayout->addWidget(new TQLabel(i18n("Add object:"), this));
TQVBoxLayout *vlayout = new TQVBoxLayout(hlayout, KDialog::spacingHint());
vlayout->addWidget(new TQLabel(i18n("Add object:"), this));
listbox = new KListBox(this, "Listbox");
vtqlayout->addWidget(listbox);
htqlayout->setStretchFactor(vtqlayout, 2);
vlayout->addWidget(listbox);
hlayout->setStretchFactor(vlayout, 2);
TQStringList items;
Object *obj = 0;
@ -49,8 +49,8 @@ void Editor::setItem(CanvasItem *item)
if (!config)
return;
config->ctorDone();
htqlayout->addWidget(config);
htqlayout->setStretchFactor(config, 2);
hlayout->addWidget(config);
hlayout->setStretchFactor(config, 2);
config->setFrameStyle(TQFrame::Box | TQFrame::Raised);
config->setLineWidth(1);
config->show();

@ -30,7 +30,7 @@ private slots:
private:
ObjectList *list;
TQHBoxLayout *htqlayout;
TQHBoxLayout *hlayout;
KListBox *listbox;
Config *config;
};

@ -257,14 +257,14 @@ FloaterConfig::FloaterConfig(Floater *floater, TQWidget *parent)
: BridgeConfig(floater, parent)
{
this->floater = floater;
m_vtqlayout->addStretch();
m_vlayout->addStretch();
m_vtqlayout->addWidget(new TQLabel(i18n("Moving speed"), this));
TQHBoxLayout *htqlayout = new TQHBoxLayout(m_vtqlayout, spacingHint());
htqlayout->addWidget(new TQLabel(i18n("Slow"), this));
m_vlayout->addWidget(new TQLabel(i18n("Moving speed"), this));
TQHBoxLayout *hlayout = new TQHBoxLayout(m_vlayout, spacingHint());
hlayout->addWidget(new TQLabel(i18n("Slow"), this));
TQSlider *slider = new TQSlider(0, 20, 2, floater->curSpeed(), Qt::Horizontal, this);
htqlayout->addWidget(slider);
htqlayout->addWidget(new TQLabel(i18n("Fast"), this));
hlayout->addWidget(slider);
hlayout->addWidget(new TQLabel(i18n("Fast"), this));
connect(slider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(speedChanged(int)));
}

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

@ -207,7 +207,7 @@ private slots:
void check2Changed(bool on);
protected:
TQVBoxLayout *m_vtqlayout;
TQVBoxLayout *m_vlayout;
private:
TQLabel *slow1;
@ -557,7 +557,7 @@ protected slots:
void rightWallChanged(bool);
protected:
TQVBoxLayout *m_vtqlayout;
TQVBoxLayout *m_vlayout;
TQCheckBox *top;
TQCheckBox *bot;
TQCheckBox *left;

@ -65,7 +65,7 @@ Kolf::Kolf()
filename = TQString();
dummy = new TQWidget(this);
setCentralWidget(dummy);
tqlayout = new TQGridLayout(dummy, 3, 1);
layout = new TQGridLayout(dummy, 3, 1);
resize(420, 480);
}
@ -176,7 +176,7 @@ void Kolf::startNewGame()
players.clear();
delete scoreboard;
scoreboard = new ScoreBoard(dummy, "Score Board");
tqlayout->addWidget(scoreboard, 1, 0);
layout->addWidget(scoreboard, 1, 0);
scoreboard->show();
if (loadedGame.isNull())
@ -264,7 +264,7 @@ void Kolf::startNewGame()
game->setShowGuideLine(showGuideLineAction->isChecked());
game->setSound(soundAction->isChecked());
tqlayout->addWidget(game, 0, 0, AlignCenter);
layout->addWidget(game, 0, 0, AlignCenter);
game->show();
game->setFocus();
@ -372,7 +372,7 @@ void Kolf::createSpacer()
spacer = new KolfGame(obj, &spacerPlayers, KGlobal::dirs()->findResource("appdata", "intro"), dummy);
spacer->setSound(false);
spacer->startFirstHole(1);
tqlayout->addWidget(spacer, 0, 0, AlignCenter);
layout->addWidget(spacer, 0, 0, AlignCenter);
spacer->hidePutter();
spacer->ignoreEvents(true);
@ -601,7 +601,7 @@ void Kolf::editingStarted()
scoreboard->hide();
tqlayout->addWidget(editor, 1, 0);
layout->addWidget(editor, 1, 0);
editor->show();
clearHoleAction->setEnabled(true);

@ -88,7 +88,7 @@ private:
TQString filename;
PlayerList players;
PlayerList spacerPlayers;
TQGridLayout *tqlayout;
TQGridLayout *layout;
ScoreBoard *scoreboard;
KToggleAction *editingAction;
KAction *newHoleAction;

@ -56,14 +56,14 @@ NewGameDialog::NewGameDialog(bool enableCourses, TQWidget *parent, const char *_
scroller = new TQScrollView(playerPage);
bigLayout->addWidget(scroller);
tqlayout = new TQVBox(scroller->viewport());
layout = new TQVBox(scroller->viewport());
if (!TQPixmapCache::find("grass", grass))
{
grass.load(locate("appdata", "pics/grass.png"));
TQPixmapCache::insert("grass", grass);
}
scroller->viewport()->setBackgroundPixmap(grass);
scroller->addChild(tqlayout);
scroller->addChild(layout);
TQMap<TQString, TQString> entries = config->entryMap("New Game Dialog");
unsigned int i = 0;
@ -95,7 +95,7 @@ NewGameDialog::NewGameDialog(bool enableCourses, TQWidget *parent, const char *_
connect(coursesLink, TQT_SIGNAL(leftClickedURL(const TQString &)), kapp, TQT_SLOT(invokeBrowser(const TQString &)));
coursePageLayout->addWidget(coursesLink);
TQHBoxLayout *htqlayout = new TQHBoxLayout(coursePageLayout, spacingHint());
TQHBoxLayout *hlayout = new TQHBoxLayout(coursePageLayout, spacingHint());
// following use this group
config->setGroup("New Game Dialog Mode");
@ -128,13 +128,13 @@ NewGameDialog::NewGameDialog(bool enableCourses, TQWidget *parent, const char *_
nameList.append(newName);
courseList = new KListBox(coursePage);
htqlayout->addWidget(courseList);
hlayout->addWidget(courseList);
courseList->insertStringList(nameList);
courseList->setCurrentItem(curItem);
connect(courseList, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(courseSelected(int)));
connect(courseList, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(selectionChanged()));
TQVBoxLayout *detailLayout = new TQVBoxLayout(htqlayout, spacingHint());
TQVBoxLayout *detailLayout = new TQVBoxLayout(hlayout, spacingHint());
name = new TQLabel(coursePage);
detailLayout->addWidget(name);
author = new TQLabel(coursePage);
@ -170,15 +170,15 @@ NewGameDialog::NewGameDialog(bool enableCourses, TQWidget *parent, const char *_
// options page
optionsPage = addPage(i18n("Options"), i18n("Game Options"));
TQVBoxLayout *vtqlayout = new TQVBoxLayout(optionsPage, marginHint(), spacingHint());
TQVBoxLayout *vlayout = new TQVBoxLayout(optionsPage, marginHint(), spacingHint());
mode = new TQCheckBox(i18n("&Strict mode"), optionsPage);
vtqlayout->addWidget(mode);
vlayout->addWidget(mode);
mode->setChecked(config->readBoolEntry("competition", false));
TQLabel *desc = new TQLabel(i18n("In strict mode, undo, editing, and switching holes is not allowed. This is generally for competition. Only in strict mode are highscores kept."), optionsPage);
desc->setTextFormat(RichText);
vtqlayout->addWidget(desc);
vlayout->addWidget(desc);
}
void NewGameDialog::slotOk()
@ -287,7 +287,7 @@ void NewGameDialog::addPlayer()
if (editors.count() >= startColors.count())
return;
editors.append(new PlayerEditor(i18n("Player %1").arg(editors.count() + 1), *startColors.at(editors.count()), tqlayout));
editors.append(new PlayerEditor(i18n("Player %1").arg(editors.count() + 1), *startColors.at(editors.count()), layout));
editors.last()->show();
connect(editors.last(), TQT_SIGNAL(deleteEditor(PlayerEditor *)), this, TQT_SLOT(deleteEditor(PlayerEditor *)));
@ -314,7 +314,7 @@ void NewGameDialog::enableButtons()
PlayerEditor::PlayerEditor(TQString startName, TQColor startColor, TQWidget *parent, const char *_name)
: TQWidget(parent, _name)
{
TQHBoxLayout *tqlayout = new TQHBoxLayout(this, KDialogBase::spacingHint());
TQHBoxLayout *layout = new TQHBoxLayout(this, KDialogBase::spacingHint());
if (!TQPixmapCache::find("grass", grass))
{
@ -324,17 +324,17 @@ PlayerEditor::PlayerEditor(TQString startName, TQColor startColor, TQWidget *par
setBackgroundPixmap(grass);
editor = new KLineEdit(this);
tqlayout->addWidget(editor);
layout->addWidget(editor);
editor->setFrame(false);
editor->setText(startName);
tqlayout->addStretch();
tqlayout->addWidget(colorButton = new KColorButton(startColor, this));
layout->addStretch();
layout->addWidget(colorButton = new KColorButton(startColor, this));
colorButton->setAutoMask(true);
colorButton->setBackgroundPixmap(grass);
KPushButton *remove = new KPushButton(i18n("Remove"), this);
remove->setAutoMask(true);
tqlayout->addWidget(remove);
layout->addWidget(remove);
remove->setBackgroundPixmap(grass);
connect(remove, TQT_SIGNAL(clicked()), this, TQT_SLOT(removeMe()));
}

@ -74,7 +74,7 @@ private slots:
void showHighscores();
private:
TQVBox *tqlayout;
TQVBox *layout;
KPushButton *addButton;
TQFrame *playerPage;
TQScrollView *scroller;

@ -57,17 +57,17 @@ void PoolBall::draw(TQPainter &p)
PoolBallConfig::PoolBallConfig(PoolBall *poolBall, TQWidget *parent)
: Config(parent), m_poolBall(poolBall)