summaryrefslogtreecommitdiffstats
path: root/kbattleship
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:58:26 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:58:26 +0000
commit838baf3f99ec5ab81b063eb5449a3381d860f377 (patch)
treedd31abcfde08ca92e4623b8f50b3d762a87c997a /kbattleship
parent2bf598bafa22fac4126fc8842df6b0119aadc0e9 (diff)
downloadtdegames-838baf3f99ec5ab81b063eb5449a3381d860f377.tar.gz
tdegames-838baf3f99ec5ab81b063eb5449a3381d860f377.zip
TQt4 port kdegames
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1236074 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kbattleship')
-rw-r--r--kbattleship/CLIENTS2
-rw-r--r--kbattleship/kbattleship/dialogs/chatDlg.ui18
-rw-r--r--kbattleship/kbattleship/dialogs/connectDlg.ui30
-rw-r--r--kbattleship/kbattleship/dialogs/infoDlg.ui30
-rw-r--r--kbattleship/kbattleship/dialogs/serverDlg.ui26
-rw-r--r--kbattleship/kbattleship/dialogs/statDlg.ui58
-rw-r--r--kbattleship/kbattleship/kbaiplayer.h3
-rw-r--r--kbattleship/kbattleship/kbattlefield.cpp10
-rw-r--r--kbattleship/kbattleship/kbattlefield.h2
-rw-r--r--kbattleship/kbattleship/kbattleship.cpp218
-rw-r--r--kbattleship/kbattleship/kbattleship.h1
-rw-r--r--kbattleship/kbattleship/kbattleshipclient.cpp6
-rw-r--r--kbattleship/kbattleship/kbattleshipclient.h1
-rw-r--r--kbattleship/kbattleship/kbattleshipserver.cpp12
-rw-r--r--kbattleship/kbattleship/kbattleshipserver.h1
-rw-r--r--kbattleship/kbattleship/kbattleshipview.cpp38
-rw-r--r--kbattleship/kbattleship/kbattleshipview.h5
-rw-r--r--kbattleship/kbattleship/kbchooserstrategy.cpp2
-rw-r--r--kbattleship/kbattleship/kbchooserstrategy.h2
-rw-r--r--kbattleship/kbattleship/kbdestroyshipstrategy.cpp22
-rw-r--r--kbattleship/kbattleship/kbdestroyshipstrategy.h2
-rw-r--r--kbattleship/kbattleship/kbdiagonalshotstrategy.cpp6
-rw-r--r--kbattleship/kbattleship/kbdiagonalshotstrategy.h2
-rw-r--r--kbattleship/kbattleship/kbdiagonalwrapstrategy.cpp4
-rw-r--r--kbattleship/kbattleship/kbdiagonalwrapstrategy.h2
-rw-r--r--kbattleship/kbattleship/kbhorizontalstepstrategy.cpp4
-rw-r--r--kbattleship/kbattleship/kbhorizontalstepstrategy.h2
-rw-r--r--kbattleship/kbattleship/kbrandomshotstrategy.cpp2
-rw-r--r--kbattleship/kbattleship/kbrandomshotstrategy.h2
-rw-r--r--kbattleship/kbattleship/kbstrategy.cpp4
-rw-r--r--kbattleship/kbattleship/kbstrategy.h2
-rw-r--r--kbattleship/kbattleship/kbverticalstepstrategy.cpp4
-rw-r--r--kbattleship/kbattleship/kbverticalstepstrategy.h2
-rw-r--r--kbattleship/kbattleship/kchatwidget.cpp10
-rw-r--r--kbattleship/kbattleship/kchatwidget.h3
-rw-r--r--kbattleship/kbattleship/kclientdialog.cpp6
-rw-r--r--kbattleship/kbattleship/kclientdialog.h3
-rw-r--r--kbattleship/kbattleship/kgridwidget.cpp10
-rw-r--r--kbattleship/kbattleship/kgridwidget.h2
-rw-r--r--kbattleship/kbattleship/kmessage.cpp2
-rw-r--r--kbattleship/kbattleship/konnectionhandling.cpp12
-rw-r--r--kbattleship/kbattleship/konnectionhandling.h7
-rw-r--r--kbattleship/kbattleship/kserverdialog.cpp4
-rw-r--r--kbattleship/kbattleship/kserverdialog.h3
-rw-r--r--kbattleship/kbattleship/kship.cpp4
-rw-r--r--kbattleship/kbattleship/kship.h2
-rw-r--r--kbattleship/kbattleship/kshiplist.cpp8
-rw-r--r--kbattleship/kbattleship/kshiplist.h3
-rw-r--r--kbattleship/kbattleship/kstatdialog.cpp2
-rw-r--r--kbattleship/kbattleship/kstatdialog.h3
50 files changed, 310 insertions, 299 deletions
diff --git a/kbattleship/CLIENTS b/kbattleship/CLIENTS
index 393dda40..54c82ec3 100644
--- a/kbattleship/CLIENTS
+++ b/kbattleship/CLIENTS
@@ -1,6 +1,6 @@
Information about other KBattleship-compatible clients:
-Client OS Status Homepage/Screenshots
+Client OS tqStatus Homepage/Screenshots
KBattleship Linux/KDE 100% http://games.kde.org/kbattleship
Mac KBattleship Mac OS + Mac OS X 100% http://www.sebek.de/
diff --git a/kbattleship/kbattleship/dialogs/chatDlg.ui b/kbattleship/kbattleship/dialogs/chatDlg.ui
index 40ffdbf3..ed8329cc 100644
--- a/kbattleship/kbattleship/dialogs/chatDlg.ui
+++ b/kbattleship/kbattleship/dialogs/chatDlg.ui
@@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>chatDlg</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>chatDlg</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@@ -25,9 +25,9 @@
<property name="spacing">
<number>3</number>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layouter</cstring>
+ <cstring>tqlayouter</cstring>
</property>
<grid>
<property name="name">
@@ -39,7 +39,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLineEdit" row="2" column="0">
+ <widget class="TQLineEdit" row="2" column="0">
<property name="name">
<cstring>commentEdit</cstring>
</property>
@@ -47,7 +47,7 @@
<string>Enter a message here</string>
</property>
</widget>
- <widget class="QPushButton" row="2" column="1">
+ <widget class="TQPushButton" row="2" column="1">
<property name="name">
<cstring>sendBtn</cstring>
</property>
@@ -64,7 +64,7 @@
<string></string>
</property>
</widget>
- <widget class="QMultiLineEdit" row="1" column="0" rowspan="1" colspan="2">
+ <widget class="TQMultiLineEdit" row="1" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>chatView</cstring>
</property>
@@ -75,7 +75,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>chatLabel</cstring>
</property>
@@ -87,5 +87,5 @@
</widget>
</hbox>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kbattleship/kbattleship/dialogs/connectDlg.ui b/kbattleship/kbattleship/dialogs/connectDlg.ui
index 1a5b53de..a59803ab 100644
--- a/kbattleship/kbattleship/dialogs/connectDlg.ui
+++ b/kbattleship/kbattleship/dialogs/connectDlg.ui
@@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>clientConnectDlg</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>clientConnectDlg</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@@ -15,15 +15,15 @@
<property name="caption">
<string>Connect to Server</string>
</property>
- <property name="layoutMargin" stdset="0">
+ <property name="tqlayoutMargin" stdset="0">
</property>
- <property name="layoutSpacing" stdset="0">
+ <property name="tqlayoutSpacing" stdset="0">
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>nicknameLabel</cstring>
</property>
@@ -38,7 +38,7 @@
<property name="text">
<string>&amp;Nick name:</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignLeft</set>
</property>
<property name="buddy" stdset="0">
@@ -47,7 +47,7 @@
<property name="hAlign" stdset="0">
</property>
</widget>
- <widget class="QLineEdit" row="1" column="1">
+ <widget class="TQLineEdit" row="1" column="1">
<property name="name">
<cstring>nicknameEdit</cstring>
</property>
@@ -58,7 +58,7 @@
<string>Enter a name that identifies you in the game</string>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>serverLabel</cstring>
</property>
@@ -73,7 +73,7 @@
<property name="text">
<string>&amp;Server:</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignLeft</set>
</property>
<property name="buddy" stdset="0">
@@ -82,7 +82,7 @@
<property name="hAlign" stdset="0">
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>lanLabel</cstring>
</property>
@@ -93,7 +93,7 @@
<cstring>lanBox</cstring>
</property>
</widget>
- <widget class="QLayoutWidget" row="2" column="1">
+ <widget class="TQLayoutWidget" row="2" column="1">
<property name="name">
<cstring>Layout4</cstring>
</property>
@@ -120,7 +120,7 @@
</sizepolicy>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>portLabel</cstring>
</property>
@@ -135,7 +135,7 @@
<property name="text">
<string>&amp;Port:</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignLeft</set>
</property>
<property name="buddy" stdset="0">
@@ -146,7 +146,7 @@
<property name="vAlign" stdset="0">
</property>
</widget>
- <widget class="QSpinBox">
+ <widget class="TQSpinBox">
<property name="name">
<cstring>portEdit</cstring>
</property>
@@ -174,7 +174,7 @@
<includes>
<include location="global" impldecl="in implementation">kcombobox.h</include>
</includes>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kcombobox.h</includehint>
<includehint>klineedit.h</includehint>
diff --git a/kbattleship/kbattleship/dialogs/infoDlg.ui b/kbattleship/kbattleship/dialogs/infoDlg.ui
index 3c66d854..b000b050 100644
--- a/kbattleship/kbattleship/dialogs/infoDlg.ui
+++ b/kbattleship/kbattleship/dialogs/infoDlg.ui
@@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>KInfoDialog</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>KInfoDialog</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@@ -25,7 +25,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QFrame">
+ <widget class="TQFrame">
<property name="name">
<cstring>Frame8</cstring>
</property>
@@ -45,7 +45,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout6</cstring>
</property>
@@ -59,7 +59,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>lbl_clientIdentfierLabel</cstring>
</property>
@@ -72,7 +72,7 @@
<string>Client identifier:</string>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>lbl_ClientInformationLabel</cstring>
</property>
@@ -91,7 +91,7 @@
<string>Client information:</string>
</property>
</widget>
- <widget class="QLabel" row="1" column="1">
+ <widget class="TQLabel" row="1" column="1">
<property name="name">
<cstring>lbl_clientVersion</cstring>
</property>
@@ -107,7 +107,7 @@
<string>CV</string>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>lbl_clientVersionLabel</cstring>
</property>
@@ -120,7 +120,7 @@
<string>Client version:</string>
</property>
</widget>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>lbl_ProtocolVersionLabel</cstring>
</property>
@@ -133,7 +133,7 @@
<string>Protocol version:</string>
</property>
</widget>
- <widget class="QLabel" row="3" column="1">
+ <widget class="TQLabel" row="3" column="1">
<property name="name">
<cstring>lbl_ProtocolVersion</cstring>
</property>
@@ -149,7 +149,7 @@
<string>PV</string>
</property>
</widget>
- <widget class="QLabel" row="2" column="1">
+ <widget class="TQLabel" row="2" column="1">
<property name="name">
<cstring>lbl_ClientInformation</cstring>
</property>
@@ -165,7 +165,7 @@
<string>CI</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="1">
+ <widget class="TQLabel" row="0" column="1">
<property name="name">
<cstring>lbl_clientIdentfier</cstring>
</property>
@@ -185,7 +185,7 @@
</widget>
</vbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout7</cstring>
</property>
@@ -210,7 +210,7 @@
<enum>Expanding</enum>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>PushButton7</cstring>
</property>
@@ -244,5 +244,5 @@
<slot>accept()</slot>
</connection>
</connections>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kbattleship/kbattleship/dialogs/serverDlg.ui b/kbattleship/kbattleship/dialogs/serverDlg.ui
index f16216b5..dbd6b52f 100644
--- a/kbattleship/kbattleship/dialogs/serverDlg.ui
+++ b/kbattleship/kbattleship/dialogs/serverDlg.ui
@@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>serverStartDlg</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>serverStartDlg</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@@ -15,15 +15,15 @@
<property name="caption">
<string>Start Server</string>
</property>
- <property name="layoutMargin" stdset="0">
+ <property name="tqlayoutMargin" stdset="0">
</property>
- <property name="layoutSpacing" stdset="0">
+ <property name="tqlayoutSpacing" stdset="0">
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>gamenameLabel</cstring>
</property>
@@ -34,7 +34,7 @@
<cstring>gamenameEdit</cstring>
</property>
</widget>
- <widget class="QSpinBox" row="2" column="1">
+ <widget class="TQSpinBox" row="2" column="1">
<property name="name">
<cstring>portEdit</cstring>
</property>
@@ -48,7 +48,7 @@
<string>Choose a port where the server listens on</string>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>portLabel_2</cstring>
</property>
@@ -63,7 +63,7 @@
<property name="text">
<string>&amp;Port:</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignLeft</set>
</property>
<property name="buddy" stdset="0">
@@ -74,7 +74,7 @@
<property name="vAlign" stdset="0">
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>nicknameLabel</cstring>
</property>
@@ -95,7 +95,7 @@
<property name="text">
<string>&amp;Nick name:</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignLeft</set>
</property>
<property name="buddy" stdset="0">
@@ -104,7 +104,7 @@
<property name="hAlign" stdset="0">
</property>
</widget>
- <widget class="QLineEdit" row="0" column="1">
+ <widget class="TQLineEdit" row="0" column="1">
<property name="name">
<cstring>gamenameEdit</cstring>
</property>
@@ -115,7 +115,7 @@
<string>Enter a name that identifies you in the game</string>
</property>
</widget>
- <widget class="QLineEdit" row="1" column="1">
+ <widget class="TQLineEdit" row="1" column="1">
<property name="name">
<cstring>nicknameEdit</cstring>
</property>
@@ -128,5 +128,5 @@
</widget>
</grid>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kbattleship/kbattleship/dialogs/statDlg.ui b/kbattleship/kbattleship/dialogs/statDlg.ui
index 7ff2c202..6af104de 100644
--- a/kbattleship/kbattleship/dialogs/statDlg.ui
+++ b/kbattleship/kbattleship/dialogs/statDlg.ui
@@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>statDlg</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>statDlg</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@@ -32,14 +32,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout8</cstring>
</property>
@@ -63,14 +63,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>OwnLabel</cstring>
</property>
@@ -84,7 +84,7 @@
<string>0</string>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>TextLabel1</cstring>
</property>
@@ -97,13 +97,13 @@
<property name="text">
<string>:</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignCenter</set>
</property>
<property name="hAlign" stdset="0">
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>EnemyLabel</cstring>
</property>
@@ -116,7 +116,7 @@
<property name="text">
<string>0</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
<property name="hAlign" stdset="0">
@@ -132,7 +132,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
@@ -151,14 +151,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>gbShots</cstring>
</property>
@@ -181,7 +181,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout17</cstring>
</property>
@@ -195,7 +195,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>pShots_2</cstring>
</property>
@@ -224,14 +224,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QLCDNumber">
+ <widget class="TQLCDNumber">
<property name="name">
<cstring>ShotLCD</cstring>
</property>
@@ -255,7 +255,7 @@
</widget>
</vbox>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>gbHits</cstring>
</property>
@@ -272,7 +272,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout15</cstring>
</property>
@@ -286,7 +286,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>pHits_2</cstring>
</property>
@@ -315,14 +315,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QLCDNumber">
+ <widget class="TQLCDNumber">
<property name="name">
<cstring>HitLCD</cstring>
</property>
@@ -343,7 +343,7 @@
</widget>
</vbox>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>gbWater</cstring>
</property>
@@ -360,7 +360,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout18</cstring>
</property>
@@ -374,7 +374,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>pWater_2</cstring>
</property>
@@ -403,14 +403,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QLCDNumber">
+ <widget class="TQLCDNumber">
<property name="name">
<cstring>WaterLCD</cstring>
</property>
@@ -441,7 +441,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
@@ -461,5 +461,5 @@
<data format="XPM.GZ" length="6001">789c3d98d9522b460e86efcf53504777a7a614e3dd959a0bc060035e31669b9a0bb51730c678df989a77cfef96d421247ca8b5fc92ba7d92bffe9cbd749a677ffefab5dec86632381b7cc8eaeccf703b9b1dfff3df7fffefd7ef5ce60c7f670bd9b3ecef7ffdfa1d32678333cae0af522ef29d71def8d2b86cfc9038447e331e987d9d58ed7de7b2dadbcae719b5d3dcd9ecf7c679655a189795799f38faf393f140996e94b319b31f8df3957c8cff9c7810b96a3c50e60be55cc6ec1abfec7ab8a79cea6767ab6f636cf5f3dad8ea0fb789355e30b6fef020b1da0fcaae275c39ab1e1e1bbbbe4262d533342eab9dae13abfdc3d8f487aeb2ebe76767d1f87963ef5fd6d9ece7c665657e3cf1799a273f18fb3cb789a3beeec6d8f5af945dbf8871deec7d67ebc7c2d8f4f22cb1eaf9311e987d9258ed2367ab7fa99cfaf1eeac7609c6a69fbb89b53f7563ef4727b1da73c69eef32b1da5f94f31965a6c8691f588c4dbfd48c7dbf76ce66a7c4311e358dad1f524dacf637e59ced1bb5136b3d5367ad9f5ac6b61f5475b6fd38248e76c9185b7fe822b1eaef197b7f3e136b7cd3effd09afce41cf5f19fb3c5ace6aa7983f9bf6452ac6de8f5162cdf7a29cde8799b3d5ff6cecf7efdbd9ec2563dfc7b9b3f587126bbeacb1e9a75e62ed9fc71fa81ea92be7bd9e65628d977336fd0563eb0f579dad7f2de3b29d7f30f67c711fb215d7136ace763fae8cbd7f4767d37b9358ed3fca5e3f7f2556bd0767cb3f36f67d1a385bfd569fd72f6f8987d1ee6c7ac23e71b493cea352f07d7a491ced12fb933bcff9fbfa6a6c7a65e66cf36828bbbeb04dacfd5b199b1eba74b6fedf1bfb7e1c9cadfea5b1f7b3e36cfef9c4aaef56b9e0f98fcea6b796389e0f4de382d96f126b3fe27ee5d2fce4d6d8eb3d37f6fdbd76b6fa878935de93b2d7270fcea6a79858cf4f8dbdbe4662d53b741e14e2f90be38a9dbf4eacfb5171b6f31de3a1e5ff4eacf9e3e7511ef3b2f96f8c5d6f4139f5bbe16cfbb932b6fa696fecf5349db59e3032f67a2689f57cddd9ce4f958be776be9658ebbf71b6f38fc6de2fcd2f5e5fb830b6fae4ced8ea916c62dd9f0f678b1f94bd1ef94aacf3da3a5bfefbc46a777fab8fc689d5de35f6f9c5fd2f640b05dbcf86b2e70b3fce16af6c6c7ae53db19eff74363d8bc4da0f67eb0fad9cf53ce7126bbcb9b1efd3d1d9cebf26567b4fb9e4fd89f32a88d71b06ce66ff34f6793d3b5bfdef89d5be36f67a76ce564f39b1da4bce43eddf9d72c9f76be26cfeb789d53e7436ff91b1f733be87c5acdbb9686c76ce38ab5d96c6a68f7689751e5fce966f6d6c7ac2d859ed21def762aa3fec8cbdbfe7c63edfbbc45affd6d9f23d195b3fe923b19eef3adbf94fe5b2efffccd9f4c679947229de5439d98bc6deaf92b3d95f138fa2ffc0d8ea0df1fd2b8574fec7d8f55c258efef2616c7ae8d1d9e2c5fee38f7b43cbf7ae5cf1f91612477bb8761e15238bb1d5132689357ffcefb372a8b8de7b67b3bf386b3cda185bfdd47756bbec8dadde10cf57f26ea78ab1e9e37367b57336b1fab3b2b8def83e550662fa649e58eba91b8bdabb1b26160e3ce0218f78cceffcc113fee429fef9c5337c7ff39c17bc846582af39af78cd1bde763731df8677bce7031ff9872ff892afb8cad77cc335aef32dbeeef89e1bdce4167ed386adc35d9c7ee01e3f44ff47eec3ff899f91b3c52ffcca6f9ce173ce728ef35ce02297f05319bf7be50ae2bee0dc1bef88cd7f83cafba8eb8a88845b14b844031ad288c6f44e1f34e137fa44ee6b6ed094be6846df88d2e715cdd59f167ca4254edcd08ad6b4a12ded28d09e0e74a41fe86dd305f7e91267eafc4a57885425a12a8fa3ff135dd30db886c8759aa1ca3addd21ddd53951ad4a4166a5b529bdac8dfa13d7297a94b0fd4e369f43ff57dc22fa8f791fa34e25b7aa2677aa1577aa30c9df39cb298d152274039cad3150dd1c9776a47ff211f68498553975073910aa0364fa94465aa0843fb2b1d857823c27d0950b34505797451f52ff92003be95217ed7a4aa8c507755c6f22e1ff42113f99429ede44b66f48c492fe59b6b72ea89f02afaa343b482e62f78f7a014ded496057dd2a32c29c80adf4b59d34a3694e505f5309b2ff4d0f2a3331df438275bc4cc4125b64b76b2e73b643dc8024adb3493a3fcc8858ce15fe51bb9c446d4e839eef79554e51a14d09b3636b3cf5f31f717a69fc50cdb98213443c10dcfa52675e8bcc5e97b5e46ff5bb9433fa6728fcaaad8a6be4c658f0dda4a439ad2a21769c3a3814daed1443ab8050dd94a97afa51af52fe8809343587bf07d40b706d2931d8d642d8fd297963c207f40bc23b7e409353c23ff0a3bacf39fa3b217799537c9a0febe9c43f71e9dcf626a39c11f74a881c91631a1a21cb14fd82129a19b2b91e83f96326ac3ecf95b3252917a60da7109678b98c4919e0261b773320912023ab20c03dc8a3cf2af63ff73d4912e5d85217fa303cf61848c35dc8470ea12badf44e426faf1888a3e70977a50b285da0bf5c75635b077537c8454b14b1bec721ffbbfc2366fd1f11aedc3587ab486f7845af09a8577dcc9a2d47911ebefe35e35691d3ee880fdeaf3166fd14c1ec204a74af0df05fc1bb3dc63b3dbb8b53dd83ee50691ecff4fe1a56ae34e8c30a34fd4b0a6676cef17b47e4a8f9bf2c1af612a0ff406db842e90ad717a63907f1ffd2788dae67af8a229269b0933d480b72f7ccb2eccd1c53db41c51f951821cb81d16e8de90af4fbb12fd0f889943059f88104e5b80aeb730d53195b16b3dec47239ceeffe95435ac30bd4beae2055986b5ea87822a5ebe06ee652e6c4eb700b358e06b0eef1dfcaaa77b2b6fd4099f611b7698247a110eda7fbc9c630c768f19d730f52ee2bf862366dec6bd20285923f712513be107fe1738d5c01b7d7a95a27fb80c57f0afe2b737785f6fa1af18f05606dc16fe0eb530c44f5fb0e28e40770df716d5867ab8d5fe87bb704f0bbc8105bc22d7786df0e663f7bba7379f0ea181cc43dc864e68483634d1834bbe0c2da87e228efeb7618daf76b8c21b56c31d29a136dde82ddefc1c174307113ba78d42f62a7ad8c50eddd33ce8fbbf0e0fb408f7bc878a1eb6fa0dd3bcc6e7c07778c4cf3778d1d7127f4fe8c9e9f303afd03ef4a13bfa87a7987f8d78cfdcc1fb38c73754e27daba2ceabd00a2fd0fb125e4f1cead073dddd40f53af463fe157e7a0b99b0c64b7efaf43cbde647be4435e7211bb2e8d765c885163e217a218fd8b81fe13eb45173e1f7fffffef50feb776dab</data>
</image>
</images>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kbattleship/kbattleship/kbaiplayer.h b/kbattleship/kbattleship/kbaiplayer.h
index c5aa3a79..9f7128c3 100644
--- a/kbattleship/kbattleship/kbaiplayer.h
+++ b/kbattleship/kbattleship/kbaiplayer.h
@@ -26,9 +26,10 @@
#include "kbattlefield.h"
#include "kshiplist.h"
-class KBAIPlayer : public QObject
+class KBAIPlayer : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
KBAIPlayer();
~KBAIPlayer();
diff --git a/kbattleship/kbattleship/kbattlefield.cpp b/kbattleship/kbattleship/kbattlefield.cpp
index c4a9e422..bb6cbd5a 100644
--- a/kbattleship/kbattleship/kbattlefield.cpp
+++ b/kbattleship/kbattleship/kbattlefield.cpp
@@ -20,10 +20,10 @@
#include "kbattlefield.h"
-KBattleField::KBattleField(TQWidget *parent, bool grid) : KGridWidget(parent, grid)
+KBattleField::KBattleField(TQWidget *tqparent, bool grid) : KGridWidget(tqparent, grid)
{
- m_parent = parent;
- m_width = parent->width();
+ m_parent = tqparent;
+ m_width = tqparent->width();
m_canDraw = true;
m_ownfieldx = 10;
@@ -91,7 +91,7 @@ void KBattleField::drawOwnField()
if(!m_canDraw)
return;
- KBattleshipWindow *window = static_cast<KBattleshipWindow *>(m_parent->parent()->parent());
+ KBattleshipWindow *window = static_cast<KBattleshipWindow *>(TQT_TQWIDGET(m_parent->tqparent()->tqparent()));
KShip *ship = 0;
int data;
@@ -151,7 +151,7 @@ void KBattleField::drawEnemyField()
if(!m_canDraw)
return;
- KBattleshipWindow *window = static_cast<KBattleshipWindow *>(m_parent->parent()->parent());
+ KBattleshipWindow *window = static_cast<KBattleshipWindow *>(TQT_TQWIDGET(m_parent->tqparent()->tqparent()));
for(int i = 0; i != m_enemyfieldx; i++)
{
diff --git a/kbattleship/kbattleship/kbattlefield.h b/kbattleship/kbattleship/kbattlefield.h
index 94bcf3f5..51c62198 100644
--- a/kbattleship/kbattleship/kbattlefield.h
+++ b/kbattleship/kbattleship/kbattlefield.h
@@ -27,7 +27,7 @@ class KBattleField : public KGridWidget
{
public:
enum{FREE, WATER, HIT, DEATH, BORDER, SHIP1P1, SHIP2P1, SHIP2P2, SHIP3P1, SHIP3P2, SHIP3P3, SHIP4P1, SHIP4P2, SHIP4P3, SHIP4P4};
- KBattleField(TQWidget *parent, bool grid);
+ KBattleField(TQWidget *tqparent, bool grid);
void clearOwnField();
void clearEnemyField();
diff --git a/kbattleship/kbattleship/kbattleship.cpp b/kbattleship/kbattleship/kbattleship.cpp
index 32759e28..62952b19 100644
--- a/kbattleship/kbattleship/kbattleship.cpp
+++ b/kbattleship/kbattleship/kbattleship.cpp
@@ -84,24 +84,24 @@ void KBattleshipWindow::initStatusBar()
{
m_ownNickname = "-";
m_enemyNickname = "-";
- statusBar()->insertItem(i18n(" Player 1: %1 ").arg(m_ownNickname), ID_PLAYER_OWN, 0, true);
- statusBar()->insertItem(i18n(" Player 2: %1 ").arg(m_enemyNickname), ID_PLAYER_ENEMY, 0, true);
+ statusBar()->insertItem(i18n(" Player 1: %1 ").tqarg(m_ownNickname), ID_PLAYER_OWN, 0, true);
+ statusBar()->insertItem(i18n(" Player 2: %1 ").tqarg(m_enemyNickname), ID_PLAYER_ENEMY, 0, true);
statusBar()->insertItem(i18n("Ready"), ID_STATUS_MSG, 1);
statusBar()->setItemAlignment(ID_STATUS_MSG, AlignLeft);
}
void KBattleshipWindow::initActions()
{
- KStdAction::configureNotifications(this, TQT_SLOT(slotConfigureNotifications()), actionCollection());
- m_gameServerConnect = new KAction(i18n("&Connect to Server..."), "connect_no", Key_F2, this, TQT_SLOT(slotServerConnect()), actionCollection(), "game_serverconnect");
- m_gameNewServer = new KAction(i18n("&Start Server..."), "network", Key_F3, this, TQT_SLOT(slotNewServer()), actionCollection(), "game_newserver");
- m_gameSingle = new KAction(i18n("S&ingle Player..."), "gear", Key_F4, this, TQT_SLOT(slotSinglePlayer()), actionCollection(), "game_singleplayer");
- m_gameQuit = KStdGameAction::quit(this, TQT_SLOT(close()), actionCollection());
- KStdGameAction::highscores(this, TQT_SLOT(slotHighscore()), actionCollection());
- m_gameEnemyInfo = new KAction(i18n("&Enemy Info"), "view_text", Key_F11, this, TQT_SLOT(slotEnemyClientInfo()), actionCollection(), "game_enemyinfo");
+ KStdAction::configureNotifications(TQT_TQOBJECT(this), TQT_SLOT(slotConfigureNotifications()), actionCollection());
+ m_gameServerConnect = new KAction(i18n("&Connect to Server..."), "connect_no", Key_F2, TQT_TQOBJECT(this), TQT_SLOT(slotServerConnect()), actionCollection(), "game_serverconnect");
+ m_gameNewServer = new KAction(i18n("&Start Server..."), "network", Key_F3, TQT_TQOBJECT(this), TQT_SLOT(slotNewServer()), actionCollection(), "game_newserver");
+ m_gameSingle = new KAction(i18n("S&ingle Player..."), "gear", Key_F4, TQT_TQOBJECT(this), TQT_SLOT(slotSinglePlayer()), actionCollection(), "game_singleplayer");
+ m_gameQuit = KStdGameAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection());
+ KStdGameAction::highscores(TQT_TQOBJECT(this), TQT_SLOT(slotHighscore()), actionCollection());
+ m_gameEnemyInfo = new KAction(i18n("&Enemy Info"), "view_text", Key_F11, TQT_TQOBJECT(this), TQT_SLOT(slotEnemyClientInfo()), actionCollection(), "game_enemyinfo");
m_configSound = new KToggleAction(i18n("&Play Sounds"), 0, actionCollection(), "options_configure_sound");
- m_configGrid = new KToggleAction(i18n("&Show Grid"), 0, this, TQT_SLOT(slotShowGrid()), actionCollection(), "options_show_grid");
+ m_configGrid = new KToggleAction(i18n("&Show Grid"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotShowGrid()), actionCollection(), "options_show_grid");
m_configGrid->setCheckedState(i18n("Hide Grid"));
m_gameEnemyInfo->setEnabled(false);
@@ -111,9 +111,9 @@ void KBattleshipWindow::initActions()
void KBattleshipWindow::initChat()
{
- connect(m_chat, TQT_SIGNAL(sigSendMessage(const TQString &)), this, TQT_SLOT(slotSendChatMessage(const TQString &)));
- connect(m_chat, TQT_SIGNAL(sigChangeEnemyNickname(const TQString &)), this, TQT_SLOT(slotChangeEnemyPlayer(const TQString &)));
- connect(m_chat, TQT_SIGNAL(sigChangeOwnNickname(const TQString &)), this, TQT_SLOT(slotChangedNickCommand(const TQString &)));
+ connect(m_chat, TQT_SIGNAL(sigSendMessage(const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(slotSendChatMessage(const TQString &)));
+ connect(m_chat, TQT_SIGNAL(sigChangeEnemyNickname(const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(slotChangeEnemyPlayer(const TQString &)));
+ connect(m_chat, TQT_SIGNAL(sigChangeOwnNickname(const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(slotChangedNickCommand(const TQString &)));
}
void KBattleshipWindow::changeShipPlacementDirection(){
@@ -122,8 +122,8 @@ void KBattleshipWindow::changeShipPlacementDirection(){
void KBattleshipWindow::initShipPlacing()
{
- connect(m_ownshiplist, TQT_SIGNAL(sigOwnFieldDataChanged(int, int, int)), this, TQT_SLOT(slotChangeOwnFieldData(int, int, int)));
- connect(m_ownshiplist, TQT_SIGNAL(sigLastShipAdded()), this, TQT_SLOT(slotShipsReady()));
+ connect(m_ownshiplist, TQT_SIGNAL(sigOwnFieldDataChanged(int, int, int)), TQT_TQOBJECT(this), TQT_SLOT(slotChangeOwnFieldData(int, int, int)));
+ connect(m_ownshiplist, TQT_SIGNAL(sigLastShipAdded()), TQT_TQOBJECT(this), TQT_SLOT(slotShipsReady()));
}
void KBattleshipWindow::initView()
@@ -148,10 +148,10 @@ void KBattleshipWindow::initView()
m_view->startDrawing();
setFocusProxy(m_view);
- connect(m_view, TQT_SIGNAL(sigEnemyFieldClicked(int, int)), this, TQT_SLOT(slotEnemyFieldClick(int, int)));
- connect(m_view, TQT_SIGNAL(sigOwnFieldClicked(int, int)), this, TQT_SLOT(slotPlaceShip(int, int)));
- connect(m_view, TQT_SIGNAL(sigMouseOverField(int, int)), this, TQT_SLOT(slotPlaceShipPreview(int, int)));
- connect(m_view, TQT_SIGNAL(changeShipPlacementDirection()), this, TQT_SLOT(changeShipPlacementDirection()));
+ connect(m_view, TQT_SIGNAL(sigEnemyFieldClicked(int, int)), TQT_TQOBJECT(this), TQT_SLOT(slotEnemyFieldClick(int, int)));
+ connect(m_view, TQT_SIGNAL(sigOwnFieldClicked(int, int)), TQT_TQOBJECT(this), TQT_SLOT(slotPlaceShip(int, int)));
+ connect(m_view, TQT_SIGNAL(sigMouseOverField(int, int)), TQT_TQOBJECT(this), TQT_SLOT(slotPlaceShipPreview(int, int)));
+ connect(m_view, TQT_SIGNAL(changeShipPlacementDirection()), TQT_TQOBJECT(this), TQT_SLOT(changeShipPlacementDirection()));
}
void KBattleshipWindow::slotDeleteAI()
@@ -314,14 +314,14 @@ void KBattleshipWindow::slotEnemyFieldClick(int fieldx, int fieldy)
slotStatusMsg(i18n("You won the game :)"));
m_stat->slotAddOwnWon();
slotUpdateHighscore();
- switch(KMessageBox::questionYesNo(this, i18n("Do you want to restart the game?"),TQString::null,i18n("Restart"),i18n("Do Not Restart")))
+ switch(KMessageBox::questionYesNo(this, i18n("Do you want to restart the game?"),TQString(),i18n("Restart"),i18n("Do Not Restart")))
{
case KMessageBox::Yes:
- TQTimer::singleShot(0, this, TQT_SLOT(slotRestartAI()));
+ TQTimer::singleShot(0, TQT_TQOBJECT(this), TQT_SLOT(slotRestartAI()));
break;
case KMessageBox::No:
- TQTimer::singleShot(0, this, TQT_SLOT(slotDeleteAI()));
+ TQTimer::singleShot(0, TQT_TQOBJECT(this), TQT_SLOT(slotDeleteAI()));
break;
}
return;
@@ -697,8 +697,8 @@ void KBattleshipWindow::slotServerConnect()
slotStatusMsg(i18n("Loading Connect-Server dialog..."));
m_client = new KClientDialog(this);
- connect(m_client, TQT_SIGNAL(sigConnectServer()), this, TQT_SLOT(slotConnectToBattleshipServer()));
- connect(m_client, TQT_SIGNAL(sigCancelConnect()), this, TQT_SLOT(slotDeleteConnectDialog()));
+ connect(m_client, TQT_SIGNAL(sigConnectServer()), TQT_TQOBJECT(this), TQT_SLOT(slotConnectToBattleshipServer()));
+ connect(m_client, TQT_SIGNAL(sigCancelConnect()), TQT_TQOBJECT(this), TQT_SLOT(slotDeleteConnectDialog()));
m_client->show();
slotStatusMsg(i18n("Ready"));
@@ -715,7 +715,7 @@ void KBattleshipWindow::slotDeleteConnectDialog()
void KBattleshipWindow::slotReplayRequest()
{
- switch(KMessageBox::questionYesNo(this, i18n("The client is asking to restart the game. Do you accept?"),TQString::null,i18n("Accept Restart"), i18n("Deny Restart")))
+ switch(KMessageBox::questionYesNo(this, i18n("The client is asking to restart the game. Do you accept?"),TQString(),i18n("Accept Restart"), i18n("Deny Restart")))
{
case KMessageBox::Yes:
if (m_connection)
@@ -735,7 +735,7 @@ void KBattleshipWindow::slotReplayRequest()
void KBattleshipWindow::slotServerReplay()
{
KMessage *msg = new KMessage(KMessage::REPLAY);
- switch(KMessageBox::questionYesNo(this, i18n("Do you want to restart the game?"), TQString::null, i18n("Restart"), i18n("Do Not Restart")))
+ switch(KMessageBox::questionYesNo(this, i18n("Do you want to restart the game?"), TQString(), i18n("Restart"), i18n("Do Not Restart")))
{
case KMessageBox::Yes:
if (m_connection)
@@ -761,7 +761,7 @@ void KBattleshipWindow::slotServerReplay()
void KBattleshipWindow::slotClientReplay()
{
KMessage *msg = new KMessage(KMessage::REPLAY);
- switch(KMessageBox::questionYesNo(this, i18n("Do you want to ask the server restarting the game?"), TQString::null, i18n("Ask to Restart"), i18n("Do Not Ask")))
+ switch(KMessageBox::questionYesNo(this, i18n("Do you want to ask the server restarting the game?"), TQString(), i18n("Ask to Restart"), i18n("Do Not Ask")))
{
case KMessageBox::Yes:
if (m_connection)
@@ -806,8 +806,8 @@ void KBattleshipWindow::slotNewServer()
slotStatusMsg(i18n("Loading Start-Server dialog..."));
m_server = new KServerDialog(this);
- connect(m_server, TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotStartBattleshipServer()));
- connect(m_server, TQT_SIGNAL(cancelClicked()), this, TQT_SLOT(slotDeleteServerDialog()));
+ connect(m_server, TQT_SIGNAL(okClicked()), TQT_TQOBJECT(this), TQT_SLOT(slotStartBattleshipServer()));
+ connect(m_server, TQT_SIGNAL(cancelClicked()), TQT_TQOBJECT(this), TQT_SLOT(slotDeleteServerDialog()));
m_server->show();
slotStatusMsg(i18n("Ready"));
@@ -828,7 +828,7 @@ void KBattleshipWindow::slotSendVersion()
msg->versionMessage();
slotSendMessage(msg);
- TQTimer::singleShot(150, this, TQT_SLOT(slotSendGreet()));
+ TQTimer::singleShot(150, TQT_TQOBJECT(this), TQT_SLOT(slotSendGreet()));
}
void KBattleshipWindow::slotSendGreet()
@@ -862,49 +862,49 @@ void KBattleshipWindow::slotStartBattleshipServer()
if(m_connection == 0)
{
m_connection = new KonnectionHandling(this, m_kbserver);
- connect(m_connection, TQT_SIGNAL(sigStatusBar(const TQString &)), this, TQT_SLOT(slotStatusMsg(const TQString &)));
- connect(m_connection, TQT_SIGNAL(sigEnemyNickname(const TQString &)), this, TQT_SLOT(slotChangeEnemyPlayer(const TQString &)));
- connect(m_connection, TQT_SIGNAL(sigSendNickname()), this, TQT_SLOT(slotSendGreet()));
- connect(m_connection, TQT_SIGNAL(sigPlaceShips(bool)), this, TQT_SLOT(slotSetPlaceable(bool)));
- connect(m_connection, TQT_SIGNAL(sigShootable(bool)), this, TQT_SLOT(slotSetShootable(bool)));
- connect(m_connection, TQT_SIGNAL(sigSendFieldState(int, int)), this, TQT_SLOT(slotSendEnemyFieldState(int, int)));
- connect(m_connection, TQT_SIGNAL(sigEnemyFieldData(int, int, int, int, int, int, int, bool)), this, TQT_SLOT(slotReceivedEnemyFieldData(int, int, int, int, int, int, int, bool)));
- connect(m_connection, TQT_SIGNAL(sigClientLost()), this, TQT_SLOT(slotClientLost()));
- connect(m_connection, TQT_SIGNAL(sigAbortNetworkGame()), this, TQT_SLOT(slotAbortNetworkGame()));
- connect(m_connection, TQT_SIGNAL(sigReplay()), this, TQT_SLOT(slotReplayRequest()));
+ connect(m_connection, TQT_SIGNAL(sigStatusBar(const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(slotStatusMsg(const TQString &)));
+ connect(m_connection, TQT_SIGNAL(sigEnemyNickname(const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(slotChangeEnemyPlayer(const TQString &)));
+ connect(m_connection, TQT_SIGNAL(sigSendNickname()), TQT_TQOBJECT(this), TQT_SLOT(slotSendGreet()));
+ connect(m_connection, TQT_SIGNAL(sigPlaceShips(bool)), TQT_TQOBJECT(this), TQT_SLOT(slotSetPlaceable(bool)));
+ connect(m_connection, TQT_SIGNAL(sigShootable(bool)), TQT_TQOBJECT(this), TQT_SLOT(slotSetShootable(bool)));
+ connect(m_connection, TQT_SIGNAL(sigSendFieldState(int, int)), TQT_TQOBJECT(this), TQT_SLOT(slotSendEnemyFieldState(int, int)));
+ connect(m_connection, TQT_SIGNAL(sigEnemyFieldData(int, int, int, int, int, int, int, bool)), TQT_TQOBJECT(this), TQT_SLOT(slotReceivedEnemyFieldData(int, int, int, int, int, int, int, bool)));
+ connect(m_connection, TQT_SIGNAL(sigClientLost()), TQT_TQOBJECT(this), TQT_SLOT(slotClientLost()));
+ connect(m_connection, TQT_SIGNAL(sigAbortNetworkGame()), TQT_TQOBJECT(this), TQT_SLOT(slotAbortNetworkGame()));
+ connect(m_connection, TQT_SIGNAL(sigReplay()), TQT_TQOBJECT(this), TQT_SLOT(slotReplayRequest()));
connect(m_connection, TQT_SIGNAL(sigChatMessage(const TQString &, const TQString &, bool)), m_chat, TQT_SLOT(slotReceivedMessage(const TQString &, const TQString &, bool)));
- connect(m_connection, TQT_SIGNAL(sigClientInformation(const TQString &, const TQString &, const TQString &, const TQString &)), this, TQT_SLOT(slotReceivedClientInformation(const TQString &, const TQString &, const TQString &, const TQString &)));
- connect(m_connection, TQT_SIGNAL(sigLost(KMessage *)), this, TQT_SLOT(slotLost(KMessage *)));
+ connect(m_connection, TQT_SIGNAL(sigClientInformation(const TQString &, const TQString &, const TQString &, const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(slotReceivedClientInformation(const TQString &, const TQString &, const TQString &, const TQString &)));
+ connect(m_connection, TQT_SIGNAL(sigLost(KMessage *)), TQT_TQOBJECT(this), TQT_SLOT(slotLost(KMessage *)));
}
else
{
if(m_connection->type() == KonnectionHandling::CLIENT)
{
- disconnect(m_kbclient, TQT_SIGNAL(sigConnected()), this, TQT_SLOT(slotSendVersion()));
- disconnect(m_connection, TQT_SIGNAL(sigAbortNetworkGame()), this, TQT_SLOT(slotAbortNetworkGame()));
- disconnect(m_connection, TQT_SIGNAL(sigStatusBar(const TQString &)), this, TQT_SLOT(slotStatusMsg(const TQString &)));
- disconnect(m_connection, TQT_SIGNAL(sigEnemyNickname(const TQString &)), this, TQT_SLOT(slotChangeEnemyPlayer(const TQString &)));
- disconnect(m_connection, TQT_SIGNAL(sigSendFieldState(int, int)), this, TQT_SLOT(slotSendEnemyFieldState(int, int)));
- disconnect(m_connection, TQT_SIGNAL(sigEnemyFieldData(int, int, int, int, int, int, int, bool)), this, TQT_SLOT(slotReceivedEnemyFieldData(int, int, int, int, int, int, int, bool)));
- disconnect(m_connection, TQT_SIGNAL(sigShootable(bool)), this, TQT_SLOT(slotSetShootable(bool)));
- disconnect(m_connection, TQT_SIGNAL(sigPlaceShips(bool)), this, TQT_SLOT(slotSetPlaceable(bool)));
- disconnect(m_connection, TQT_SIGNAL(sigServerLost()), this, TQT_SLOT(slotServerLost()));
- disconnect(m_connection, TQT_SIGNAL(sigReplay()), this, TQT_SLOT(slotReplay()));
+ disconnect(m_kbclient, TQT_SIGNAL(sigConnected()), TQT_TQOBJECT(this), TQT_SLOT(slotSendVersion()));
+ disconnect(m_connection, TQT_SIGNAL(sigAbortNetworkGame()), TQT_TQOBJECT(this), TQT_SLOT(slotAbortNetworkGame()));
+ disconnect(m_connection, TQT_SIGNAL(sigStatusBar(const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(slotStatusMsg(const TQString &)));
+ disconnect(m_connection, TQT_SIGNAL(sigEnemyNickname(const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(slotChangeEnemyPlayer(const TQString &)));
+ disconnect(m_connection, TQT_SIGNAL(sigSendFieldState(int, int)), TQT_TQOBJECT(this), TQT_SLOT(slotSendEnemyFieldState(int, int)));
+ disconnect(m_connection, TQT_SIGNAL(sigEnemyFieldData(int, int, int, int, int, int, int, bool)), TQT_TQOBJECT(this), TQT_SLOT(slotReceivedEnemyFieldData(int, int, int, int, int, int, int, bool)));
+ disconnect(m_connection, TQT_SIGNAL(sigShootable(bool)), TQT_TQOBJECT(this), TQT_SLOT(slotSetShootable(bool)));
+ disconnect(m_connection, TQT_SIGNAL(sigPlaceShips(bool)), TQT_TQOBJECT(this), TQT_SLOT(slotSetPlaceable(bool)));
+ disconnect(m_connection, TQT_SIGNAL(sigServerLost()), TQT_TQOBJECT(this), TQT_SLOT(slotServerLost()));
+ disconnect(m_connection, TQT_SIGNAL(sigReplay()), TQT_TQOBJECT(this), TQT_SLOT(slotReplay()));
disconnect(m_connection, TQT_SIGNAL(sigChatMessage(const TQString &, const TQString &, bool)), m_chat, TQT_SLOT(slotReceivedMessage(const TQString &, const TQString &, bool)));
- disconnect(m_connection, TQT_SIGNAL(sigLost(KMessage *)), this, TQT_SLOT(slotLost(KMessage *)));
+ disconnect(m_connection, TQT_SIGNAL(sigLost(KMessage *)), TQT_TQOBJECT(this), TQT_SLOT(slotLost(KMessage *)));
m_connection->updateInternal(m_kbserver);
- connect(m_connection, TQT_SIGNAL(sigStatusBar(const TQString &)), this, TQT_SLOT(slotStatusMsg(const TQString &)));
- connect(m_connection, TQT_SIGNAL(sigEnemyNickname(const TQString &)), this, TQT_SLOT(slotChangeEnemyPlayer(const TQString &)));
- connect(m_connection, TQT_SIGNAL(sigSendNickname()), this, TQT_SLOT(slotSendGreet()));
- connect(m_connection, TQT_SIGNAL(sigPlaceShips(bool)), this, TQT_SLOT(slotSetPlaceable(bool)));
- connect(m_connection, TQT_SIGNAL(sigShootable(bool)), this, TQT_SLOT(slotSetShootable(bool)));
- connect(m_connection, TQT_SIGNAL(sigSendFieldState(int, int)), this, TQT_SLOT(slotSendEnemyFieldState(int, int)));
- connect(m_connection, TQT_SIGNAL(sigEnemyFieldData(int, int, int, int, int, int, int, bool)), this, TQT_SLOT(slotReceivedEnemyFieldData(int, int, int, int, int, int, int, bool)));
- connect(m_connection, TQT_SIGNAL(sigClientLost()), this, TQT_SLOT(slotClientLost()));
- connect(m_connection, TQT_SIGNAL(sigAbortNetworkGame()), this, TQT_SLOT(slotAbortNetworkGame()));
- connect(m_connection, TQT_SIGNAL(sigReplay()), this, TQT_SLOT(slotReplayRequest()));
+ connect(m_connection, TQT_SIGNAL(sigStatusBar(const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(slotStatusMsg(const TQString &)));
+ connect(m_connection, TQT_SIGNAL(sigEnemyNickname(const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(slotChangeEnemyPlayer(const TQString &)));
+ connect(m_connection, TQT_SIGNAL(sigSendNickname()), TQT_TQOBJECT(this), TQT_SLOT(slotSendGreet()));
+ connect(m_connection, TQT_SIGNAL(sigPlaceShips(bool)), TQT_TQOBJECT(this), TQT_SLOT(slotSetPlaceable(bool)));
+ connect(m_connection, TQT_SIGNAL(sigShootable(bool)), TQT_TQOBJECT(this), TQT_SLOT(slotSetShootable(bool)));
+ connect(m_connection, TQT_SIGNAL(sigSendFieldState(int, int)), TQT_TQOBJECT(this), TQT_SLOT(slotSendEnemyFieldState(int, int)));
+ connect(m_connection, TQT_SIGNAL(sigEnemyFieldData(int, int, int, int, int, int, int, bool)), TQT_TQOBJECT(this), TQT_SLOT(slotReceivedEnemyFieldData(int, int, int, int, int, int, int, bool)));
+ connect(m_connection, TQT_SIGNAL(sigClientLost()), TQT_TQOBJECT(this), TQT_SLOT(slotClientLost()));
+ connect(m_connection, TQT_SIGNAL(sigAbortNetworkGame()), TQT_TQOBJECT(this), TQT_SLOT(slotAbortNetworkGame()));
+ connect(m_connection, TQT_SIGNAL(sigReplay()), TQT_TQOBJECT(this), TQT_SLOT(slotReplayRequest()));
connect(m_connection, TQT_SIGNAL(sigChatMessage(const TQString &, const TQString &, bool)), m_chat, TQT_SLOT(slotReceivedMessage(const TQString &, const TQString &, bool)));
- connect(m_connection, TQT_SIGNAL(sigLost(KMessage *)), this, TQT_SLOT(slotLost(KMessage *)));
+ connect(m_connection, TQT_SIGNAL(sigLost(KMessage *)), TQT_TQOBJECT(this), TQT_SLOT(slotLost(KMessage *)));
}
else
m_connection->updateInternal(m_kbserver);
@@ -1075,14 +1075,14 @@ void KBattleshipWindow::parseCommandLine() {
if( !u.isValid()) {
KMessageBox::sorry(this,
i18n("The URL passed to KDE Battleship '%1' is not a valid url")
- .arg(args->arg(0)));
+ .tqarg(args->arg(0)));
return;
}
if( u.protocol() != "kbattleship" ) {
KMessageBox::sorry(this,
i18n("The URL passed to KDE Battleship '%1' is not recognised "
"as a Battleship game.")
- .arg(args->arg(0)));
+ .tqarg(args->arg(0)));
return;
}
@@ -1119,51 +1119,51 @@ void KBattleshipWindow::slotConnectToBattleshipServer(const TQString &host, int
if(m_connection == 0)
{
m_connection = new KonnectionHandling(this, m_kbclient);
- connect(m_kbclient, TQT_SIGNAL(sigConnected()), this, TQT_SLOT(slotSendVersion()));
- connect(m_connection, TQT_SIGNAL(sigAbortNetworkGame()), this, TQT_SLOT(slotAbortNetworkGame()));
- connect(m_connection, TQT_SIGNAL(sigStatusBar(const TQString &)), this, TQT_SLOT(slotStatusMsg(const TQString &)));
- connect(m_connection, TQT_SIGNAL(sigEnemyNickname(const TQString &)), this, TQT_SLOT(slotChangeEnemyPlayer(const TQString &)));
- connect(m_connection, TQT_SIGNAL(sigSendFieldState(int, int)), this, TQT_SLOT(slotSendEnemyFieldState(int, int)));
- connect(m_connection, TQT_SIGNAL(sigEnemyFieldData(int, int, int, int, int, int, int, bool)), this, TQT_SLOT(slotReceivedEnemyFieldData(int, int, int, int, int, int, int, bool)));
- connect(m_connection, TQT_SIGNAL(sigShootable(bool)), this, TQT_SLOT(slotSetShootable(bool)));
- connect(m_connection, TQT_SIGNAL(sigPlaceShips(bool)), this, TQT_SLOT(slotSetPlaceable(bool)));
- connect(m_connection, TQT_SIGNAL(sigServerLost()), this, TQT_SLOT(slotServerLost()));
- connect(m_connection, TQT_SIGNAL(sigReplay()), this, TQT_SLOT(slotReplay()));
+ connect(m_kbclient, TQT_SIGNAL(sigConnected()), TQT_TQOBJECT(this), TQT_SLOT(slotSendVersion()));
+ connect(m_connection, TQT_SIGNAL(sigAbortNetworkGame()), TQT_TQOBJECT(this), TQT_SLOT(slotAbortNetworkGame()));
+ connect(m_connection, TQT_SIGNAL(sigStatusBar(const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(slotStatusMsg(const TQString &)));
+ connect(m_connection, TQT_SIGNAL(sigEnemyNickname(const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(slotChangeEnemyPlayer(const TQString &)));
+ connect(m_connection, TQT_SIGNAL(sigSendFieldState(int, int)), TQT_TQOBJECT(this), TQT_SLOT(slotSendEnemyFieldState(int, int)));
+ connect(m_connection, TQT_SIGNAL(sigEnemyFieldData(int, int, int, int, int, int, int, bool)), TQT_TQOBJECT(this), TQT_SLOT(slotReceivedEnemyFieldData(int, int, int, int, int, int, int, bool)));
+ connect(m_connection, TQT_SIGNAL(sigShootable(bool)), TQT_TQOBJECT(this), TQT_SLOT(slotSetShootable(bool)));
+ connect(m_connection, TQT_SIGNAL(sigPlaceShips(bool)), TQT_TQOBJECT(this), TQT_SLOT(slotSetPlaceable(bool)));
+ connect(m_connection, TQT_SIGNAL(sigServerLost()), TQT_TQOBJECT(this), TQT_SLOT(slotServerLost()));
+ connect(m_connection, TQT_SIGNAL(sigReplay()), TQT_TQOBJECT(this), TQT_SLOT(slotReplay()));
connect(m_connection, TQT_SIGNAL(sigChatMessage(const TQString &, const TQString &, bool)), m_chat, TQT_SLOT(slotReceivedMessage(const TQString &, const TQString &, bool)));
- connect(m_connection, TQT_SIGNAL(sigClientInformation(const TQString &, const TQString &, const TQString &, const TQString &)), this, TQT_SLOT(slotReceivedClientInformation(const TQString &, const TQString &, const TQString &, const TQString &)));
- connect(m_connection, TQT_SIGNAL(sigLost(KMessage *)), this, TQT_SLOT(slotLost(KMessage *)));
+ connect(m_connection, TQT_SIGNAL(sigClientInformation(const TQString &, const TQString &, const TQString &, const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(slotReceivedClientInformation(const TQString &, const TQString &, const TQString &, const TQString &)));
+ connect(m_connection, TQT_SIGNAL(sigLost(KMessage *)), TQT_TQOBJECT(this), TQT_SLOT(slotLost(KMessage *)));
}
else
{
if(m_connection->type() == KonnectionHandling::SERVER)
{
- disconnect(m_connection, TQT_SIGNAL(sigStatusBar(const TQString &)), this, TQT_SLOT(slotStatusMsg(const TQString &)));
- disconnect(m_connection, TQT_SIGNAL(sigEnemyNickname(const TQString &)), this, TQT_SLOT(slotChangeEnemyPlayer(const TQString &)));
- disconnect(m_connection, TQT_SIGNAL(sigSendNickname()), this, TQT_SLOT(slotSendGreet()));
- disconnect(m_connection, TQT_SIGNAL(sigPlaceShips(bool)), this, TQT_SLOT(slotSetPlaceable(bool)));
- disconnect(m_connection, TQT_SIGNAL(sigShootable(bool)), this, TQT_SLOT(slotSetShootable(bool)));
- disconnect(m_connection, TQT_SIGNAL(sigSendFieldState(int, int)), this, TQT_SLOT(slotSendEnemyFieldState(int, int)));
- disconnect(m_connection, TQT_SIGNAL(sigEnemyFieldData(int, int, int, int, int, int, int, bool)), this, TQT_SLOT(slotReceivedEnemyFieldData(int, int, int, int, int, int, int, bool)));
- disconnect(m_connection, TQT_SIGNAL(sigClientLost()), this, TQT_SLOT(slotClientLost()));
- disconnect(m_connection, TQT_SIGNAL(sigAbortNetworkGame()), this, TQT_SLOT(slotAbortNetworkGame()));
- disconnect(m_connection, TQT_SIGNAL(sigReplay()), this, TQT_SLOT(slotReplayRequest()));
+ disconnect(m_connection, TQT_SIGNAL(sigStatusBar(const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(slotStatusMsg(const TQString &)));
+ disconnect(m_connection, TQT_SIGNAL(sigEnemyNickname(const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(slotChangeEnemyPlayer(const TQString &)));
+ disconnect(m_connection, TQT_SIGNAL(sigSendNickname()), TQT_TQOBJECT(this), TQT_SLOT(slotSendGreet()));
+ disconnect(m_connection, TQT_SIGNAL(sigPlaceShips(bool)), TQT_TQOBJECT(this), TQT_SLOT(slotSetPlaceable(bool)));
+ disconnect(m_connection, TQT_SIGNAL(sigShootable(bool)), TQT_TQOBJECT(this), TQT_SLOT(slotSetShootable(bool)));
+ disconnect(m_connection, TQT_SIGNAL(sigSendFieldState(int, int)), TQT_TQOBJECT(this), TQT_SLOT(slotSendEnemyFieldState(int, int)));
+ disconnect(m_connection, TQT_SIGNAL(sigEnemyFieldData(int, int, int, int, int, int, int, bool)), TQT_TQOBJECT(this), TQT_SLOT(slotReceivedEnemyFieldData(int, int, int, int, int, int, int, bool)));
+ disconnect(m_connection, TQT_SIGNAL(sigClientLost()), TQT_TQOBJECT(this), TQT_SLOT(slotClientLost()));
+ disconnect(m_connection, TQT_SIGNAL(sigAbortNetworkGame()), TQT_TQOBJECT(this), TQT_SLOT(slotAbortNetworkGame()));
+ disconnect(m_connection, TQT_SIGNAL(sigReplay()), TQT_TQOBJECT(this), TQT_SLOT(slotReplayRequest()));
disconnect(m_connection, TQT_SIGNAL(sigChatMessage(const TQString &, const TQString &, bool)), m_chat, TQT_SLOT(slotReceivedMessage(const TQString &, const TQString &, bool)));
- disconnect(m_connection, TQT_SIGNAL(sigLost(KMessage *)), this, TQT_SLOT(slotLost(KMessage *)));
+ disconnect(m_connection, TQT_SIGNAL(sigLost(KMessage *)), TQT_TQOBJECT(this), TQT_SLOT(slotLost(KMessage *)));
m_connection->updateInternal(m_kbclient);
- connect(m_kbclient, TQT_SIGNAL(sigConnected()), this, TQT_SLOT(slotSendVersion()));
- connect(m_connection, TQT_SIGNAL(sigAbortNetworkGame()), this, TQT_SLOT(slotAbortNetworkGame()));
- connect(m_connection, TQT_SIGNAL(sigStatusBar(const TQString &)), this, TQT_SLOT(slotStatusMsg(const TQString &)));
- connect(m_connection, TQT_SIGNAL(sigEnemyNickname(const TQString &)), this, TQT_SLOT(slotChangeEnemyPlayer(const TQString &)));
- connect(m_connection, TQT_SIGNAL(sigSendFieldState(int, int)), this, TQT_SLOT(slotSendEnemyFieldState(int, int)));
- connect(m_connection, TQT_SIGNAL(sigEnemyFieldData(int, int, int, int, int, int, int, bool)), this, TQT_SLOT(slotReceivedEnemyFieldData(int, int, int, int, int, int, int, bool)));
- connect(m_connection, TQT_SIGNAL(sigShootable(bool)), this, TQT_SLOT(slotSetShootable(bool)));
- connect(m_connection, TQT_SIGNAL(sigPlaceShips(bool)), this, TQT_SLOT(slotSetPlaceable(bool)));
- connect(m_connection, TQT_SIGNAL(sigServerLost()), this, TQT_SLOT(slotServerLost()));
- connect(m_connection, TQT_SIGNAL(sigReplay()), this, TQT_SLOT(slotReplay()));
+ connect(m_kbclient, TQT_SIGNAL(sigConnected()), TQT_TQOBJECT(this), TQT_SLOT(slotSendVersion()));
+ connect(m_connection, TQT_SIGNAL(sigAbortNetworkGame()), TQT_TQOBJECT(this), TQT_SLOT(slotAbortNetworkGame()));
+ connect(m_connection, TQT_SIGNAL(sigStatusBar(const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(slotStatusMsg(const TQString &)));
+ connect(m_connection, TQT_SIGNAL(sigEnemyNickname(const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(slotChangeEnemyPlayer(const TQString &)));
+ connect(m_connection, TQT_SIGNAL(sigSendFieldState(int, int)), TQT_TQOBJECT(this), TQT_SLOT(slotSendEnemyFieldState(int, int)));
+ connect(m_connection, TQT_SIGNAL(sigEnemyFieldData(int, int, int, int, int, int, int, bool)), TQT_TQOBJECT(this), TQT_SLOT(slotReceivedEnemyFieldData(int, int, int, int, int, int, int, bool)));
+ connect(m_connection, TQT_SIGNAL(sigShootable(bool)), TQT_TQOBJECT(this), TQT_SLOT(slotSetShootable(bool)));
+ connect(m_connection, TQT_SIGNAL(sigPlaceShips(bool)), TQT_TQOBJECT(this), TQT_SLOT(slotSetPlaceable(bool)));
+ connect(m_connection, TQT_SIGNAL(sigServerLost()), TQT_TQOBJECT(this), TQT_SLOT(slotServerLost()));
+ connect(m_connection, TQT_SIGNAL(sigReplay()), TQT_TQOBJECT(this), TQT_SLOT(slotReplay()));
connect(m_connection, TQT_SIGNAL(sigChatMessage(const TQString &, const TQString &, bool)), m_chat, TQT_SLOT(slotReceivedMessage(const TQString &, const TQString &, bool)));
m_kbclient->init();
- connect(m_connection, TQT_SIGNAL(sigClientInformation(const TQString &, const TQString &, const TQString &, const TQString &)), this, TQT_SLOT(slotReceivedClientInformation(const TQString &, const TQString &, const TQString &, const TQString &)));
- connect(m_connection, TQT_SIGNAL(sigLost(KMessage *)), this, TQT_SLOT(slotLost(KMessage *)));
+ connect(m_connection, TQT_SIGNAL(sigClientInformation(const TQString &, const TQString &, const TQString &, const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(slotReceivedClientInformation(const TQString &, const TQString &, const TQString &, const TQString &)));
+ connect(m_connection, TQT_SIGNAL(sigLost(KMessage *)), TQT_TQOBJECT(this), TQT_SLOT(slotLost(KMessage *)));
}
else
m_connection->updateInternal(m_kbclient);
@@ -1198,13 +1198,13 @@ void KBattleshipWindow::slotStatusMsg(const TQString &text)
void KBattleshipWindow::slotChangeOwnPlayer(const TQString &text)
{
statusBar()->clear();
- statusBar()->changeItem(i18n(" Player 1: %1 ").arg(text), ID_PLAYER_OWN);
+ statusBar()->changeItem(i18n(" Player 1: %1 ").tqarg(text), ID_PLAYER_OWN);
}
void KBattleshipWindow::slotChangeEnemyPlayer(const TQString &text)
{
statusBar()->clear();
- statusBar()->changeItem(i18n(" Player 2: %1 ").arg(text), ID_PLAYER_ENEMY);
+ statusBar()->changeItem(i18n(" Player 2: %1 ").tqarg(text), ID_PLAYER_ENEMY);
}
void KBattleshipWindow::slotSinglePlayer()
@@ -1234,7 +1234,7 @@ void KBattleshipWindow::slotSinglePlayer()
slotStatusMsg(i18n("Ready"));
m_stat->clear();
m_chat->clear();
- TQTimer::singleShot(0, this, TQT_SLOT(slotDeleteAI()));
+ TQTimer::singleShot(0, TQT_TQOBJECT(this), TQT_SLOT(slotDeleteAI()));
cleanup(false);
}
}
@@ -1269,8 +1269,8 @@ void KBattleshipWindow::slotStartBattleshipGame(bool clearstat)
{
m_aiPlayer = new KBAIPlayer();
m_aiPlayer->init(m_view->field(), m_enemyshiplist);
- connect(m_aiPlayer, TQT_SIGNAL(sigReady()), this, TQT_SLOT(slotAIReady()));
- connect(m_aiPlayer, TQT_SIGNAL(sigShootAt(const TQPoint)), this, TQT_SLOT(slotAIShootsAt(const TQPoint)));
+ connect(m_aiPlayer, TQT_SIGNAL(sigReady()), TQT_TQOBJECT(this), TQT_SLOT(slotAIReady()));
+ connect(m_aiPlayer, TQT_SIGNAL(sigShootAt(const TQPoint)), TQT_TQOBJECT(this), TQT_SLOT(slotAIShootsAt(const TQPoint)));
}
m_aiPlayer->slotRestart();
}
@@ -1317,14 +1317,14 @@ void KBattleshipWindow::slotAIShootsAt(const TQPoint pos)
m_stat->slotAddEnemyWon();
slotUpdateHighscore();
m_view->drawEnemyShipsAI(m_enemyshiplist); // let's show ai player ships
- switch(KMessageBox::questionYesNo(this, i18n("Do you want to restart the game?"), TQString::null, i18n("Restart"), i18n("Do Not Restart")))
+ switch(KMessageBox::questionYesNo(this, i18n("Do you want to restart the game?"), TQString(), i18n("Restart"), i18n("Do Not Restart")))
{
case KMessageBox::Yes:
- TQTimer::singleShot(0, this, TQT_SLOT(slotRestartAI()));
+ TQTimer::singleShot(0, TQT_TQOBJECT(this), TQT_SLOT(slotRestartAI()));
break;
case KMessageBox::No:
- TQTimer::singleShot(0, this, TQT_SLOT(slotDeleteAI()));
+ TQTimer::singleShot(0, TQT_TQOBJECT(this), TQT_SLOT(slotDeleteAI()));
break;
}
}
diff --git a/kbattleship/kbattleship/kbattleship.h b/kbattleship/kbattleship/kbattleship.h
index 9ba86eac..e90c16f0 100644
--- a/kbattleship/kbattleship/kbattleship.h
+++ b/kbattleship/kbattleship/kbattleship.h
@@ -47,6 +47,7 @@
class KBattleshipWindow : public KMainWindow
{
Q_OBJECT
+ TQ_OBJECT
public:
enum{ID_STATUS_MSG, ID_PLAYER_OWN, ID_PLAYER_ENEMY};
KBattleshipWindow();
diff --git a/kbattleship/kbattleship/kbattleshipclient.cpp b/kbattleship/kbattleship/kbattleshipclient.cpp
index e7d61638..550323b1 100644
--- a/kbattleship/kbattleship/kbattleshipclient.cpp
+++ b/kbattleship/kbattleship/kbattleshipclient.cpp
@@ -43,8 +43,8 @@ void KBattleshipClient::init()
return;
}
- m_readNotifier = new TQSocketNotifier(fd(), TQSocketNotifier::Read, this);
- TQObject::connect(m_readNotifier, TQT_SIGNAL(activated(int)), TQT_SLOT(slotReadData()));
+ m_readNotifier = new TQSocketNotifier(fd(), TQSocketNotifier::Read, TQT_TQOBJECT(this));
+ TQT_BASE_OBJECT_NAME::connect(m_readNotifier, TQT_SIGNAL(activated(int)), TQT_SLOT(slotReadData()));
emit sigConnected();
}
@@ -73,7 +73,7 @@ void KBattleshipClient::slotReadData()
m_readBuffer += TQString::fromUtf8(buf);
delete []buf;
int pos;
- while ((pos = m_readBuffer.find("</kmessage>")) >= 0)
+ while ((pos = m_readBuffer.tqfind("</kmessage>")) >= 0)
{
pos += 11; // Length of "</kmessage>"
KMessage *msg = new KMessage();
diff --git a/kbattleship/kbattleship/kbattleshipclient.h b/kbattleship/kbattleship/kbattleshipclient.h
index 1f6bdd96..8ea29fb8 100644
--- a/kbattleship/kbattleship/kbattleshipclient.h
+++ b/kbattleship/kbattleship/kbattleshipclient.h
@@ -25,6 +25,7 @@
class KBattleshipClient : public KExtendedSocket
{
Q_OBJECT
+ TQ_OBJECT
public:
KBattleshipClient(const TQString &host, int port);
diff --git a/kbattleship/kbattleship/kbattleshipserver.cpp b/kbattleship/kbattleship/kbattleshipserver.cpp
index a90533cc..34be153d 100644
--- a/kbattleship/kbattleship/kbattleshipserver.cpp
+++ b/kbattleship/kbattleship/kbattleshipserver.cpp
@@ -31,7 +31,7 @@
#include "kbattleshipserver.moc"
KBattleshipServer::KBattleshipServer(int port, const TQString& name)
- : KExtendedSocket(TQString::null, port, inetSocket | passiveSocket), m_name(name)
+ : KExtendedSocket(TQString(), port, inetSocket | passiveSocket), m_name(name)
{
m_port = port;
m_serverSocket = 0;
@@ -41,7 +41,7 @@ void KBattleshipServer::init()
{
if(listen())
{
- KMessageBox::error(0L, i18n("Failed to bind to local port \"%1\"\n\nPlease check if another KBattleship server instance\nis running or another application uses this port.").arg(m_port));
+ KMessageBox::error(0L, i18n("Failed to bind to local port \"%1\"\n\nPlease check if another KBattleship server instance\nis running or another application uses this port.").tqarg(m_port));
emit sigServerFailure();
return;
}
@@ -49,8 +49,8 @@ void KBattleshipServer::init()
m_service.setType(BATTLESHIP_SERVICE);
m_service.setPort(m_port);
m_service.publishAsync();
- m_connectNotifier = new TQSocketNotifier(fd(), TQSocketNotifier::Read, this);
- TQObject::connect(m_connectNotifier, TQT_SIGNAL(activated(int)), TQT_SLOT(slotNewConnection()));
+ m_connectNotifier = new TQSocketNotifier(fd(), TQSocketNotifier::Read, TQT_TQOBJECT(this));
+ TQT_BASE_OBJECT_NAME::connect(m_connectNotifier, TQT_SIGNAL(activated(int)), TQT_SLOT(slotNewConnection()));
}
void KBattleshipServer::slotNewConnection()
@@ -61,7 +61,7 @@ void KBattleshipServer::slotNewConnection()
{
m_service.stop();
m_serverSocket = sock;
- m_readNotifier = new TQSocketNotifier(sock->fd(), TQSocketNotifier::Read, this);
+ m_readNotifier = new TQSocketNotifier(sock->fd(), TQSocketNotifier::Read, TQT_TQOBJECT(this));
TQObject::connect(m_readNotifier, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotReadClient()));
emit sigNewConnect();
}
@@ -85,7 +85,7 @@ void KBattleshipServer::slotReadClient()
m_readBuffer += TQString::fromUtf8(buf);
delete []buf;
int pos;
- while ((pos = m_readBuffer.find("</kmessage>")) >= 0)
+ while ((pos = m_readBuffer.tqfind("</kmessage>")) >= 0)
{
pos += 11; // Length of "</kmessage>"
KMessage *msg = new KMessage();
diff --git a/kbattleship/kbattleship/kbattleshipserver.h b/kbattleship/kbattleship/kbattleshipserver.h
index bb198db8..010165ca 100644
--- a/kbattleship/kbattleship/kbattleshipserver.h
+++ b/kbattleship/kbattleship/kbattleshipserver.h
@@ -26,6 +26,7 @@
class KBattleshipServer : public KExtendedSocket
{
Q_OBJECT
+ TQ_OBJECT
public:
KBattleshipServer(int port, const TQString& name);
void init();
diff --git a/kbattleship/kbattleship/kbattleshipview.cpp b/kbattleship/kbattleship/kbattleshipview.cpp
index 14339d78..35e1a06a 100644
--- a/kbattleship/kbattleship/kbattleshipview.cpp
+++ b/kbattleship/kbattleship/kbattleshipview.cpp
@@ -22,8 +22,8 @@
#include "kbattleship.h"
#include "kbattleshipview.moc"
-KBattleshipView::KBattleshipView(TQWidget *parent, const char *name, bool draw)
- : TQWidget(parent, name, WResizeNoErase), m_drawGrid(draw)
+KBattleshipView::KBattleshipView(TQWidget *tqparent, const char *name, bool draw)
+ : TQWidget(tqparent, name, WResizeNoErase), m_drawGrid(draw)
{
setFixedSize(20 * 32 + 30, 10 * 32 + 20);
setBackgroundMode(NoBackground);
@@ -106,11 +106,11 @@ void KBattleshipView::drawEnemyShipsHuman(KMessage *msg, KShipList *list)
int posx, posy, placedLeft;
bool left;
int i = 3;
- while (!msg->field(TQString("ship%1").arg(i)).isNull())
+ while (!msg->field(TQString("ship%1").tqarg(i)).isNull())
{
- posx = msg->field(TQString("ship%1").arg(i)).section(" ", 0, 0).toInt();
- posy = msg->field(TQString("ship%1").arg(i)).section(" ", 1, 1).toInt();
- placedLeft = msg->field(TQString("ship%1").arg(i)).section(" ", 2, 2).toInt();
+ posx = msg->field(TQString("ship%1").tqarg(i)).section(" ", 0, 0).toInt();
+ posy = msg->field(TQString("ship%1").tqarg(i)).section(" ", 1, 1).toInt();
+ placedLeft = msg->field(TQString("ship%1").tqarg(i)).section(" ", 2, 2).toInt();
if (placedLeft == 0) left = false;
else left = true;
list->addNewShip(!left, posx, posy);
@@ -152,7 +152,7 @@ bool KBattleshipView::eventFilter(TQObject *object, TQEvent *event)
{
if(event->type() == TQEvent::KeyPress && m_decide)
{
- TQKeyEvent *keyEvent = static_cast<TQKeyEvent *>(event);
+ TQKeyEvent *keyEvent = TQT_TQKEYEVENT(event);
if(keyEvent->key() == Key_Shift){
emit sigMouseOverField(m_lastX, m_lastY);
emit changeShipPlacementDirection();
@@ -160,7 +160,7 @@ bool KBattleshipView::eventFilter(TQObject *object, TQEvent *event)
}
else if(event->type() == TQEvent::KeyRelease && m_decide)
{
- TQKeyEvent *keyEvent = static_cast<TQKeyEvent *>(event);
+ TQKeyEvent *keyEvent = TQT_TQKEYEVENT(event);
if(keyEvent->key() == Key_Shift){
emit sigMouseOverField(m_lastX, m_lastY);
emit changeShipPlacementDirection();
@@ -170,15 +170,15 @@ bool KBattleshipView::eventFilter(TQObject *object, TQEvent *event)
{
m_decide = false;
- TQMouseEvent *mouseEvent = static_cast<TQMouseEvent *>(event);
+ TQMouseEvent *mouseEvent = TQT_TQMOUSEEVENT(event);
- if(mouseEvent->button() == RightButton){
+ if(mouseEvent->button() == Qt::RightButton){
emit sigMouseOverField(m_lastX, m_lastY);
emit changeShipPlacementDirection();
return true;
}
- if(mouseEvent->button() != LeftButton)
+ if(mouseEvent->button() != Qt::LeftButton)
return false;
TQPoint point(mouseEvent->x(), mouseEvent->y());
@@ -190,9 +190,9 @@ bool KBattleshipView::eventFilter(TQObject *object, TQEvent *event)
int fieldx = 0;
int fieldy = 0;
- if(ownRect.contains(point))
+ if(ownRect.tqcontains(point))
newRect = ownRect;
- else if(enemyRect.contains(point))
+ else if(enemyRect.tqcontains(point))
newRect = enemyRect;
else
return false;
@@ -204,7 +204,7 @@ bool KBattleshipView::eventFilter(TQObject *object, TQEvent *event)
j++;
TQRect tempRect(i, newRect.top(), m_battlefield->gridSize(), newRect.bottom() - newRect.top());
- if(tempRect.contains(point))
+ if(tempRect.tqcontains(point))
{
fieldx = j;
break;
@@ -218,7 +218,7 @@ bool KBattleshipView::eventFilter(TQObject *object, TQEvent *event)
j++;
TQRect tempRect(newRect.left(), i, newRect.right() - newRect.left(), m_battlefield->gridSize());
- if(tempRect.contains(point))
+ if(tempRect.tqcontains(point))
{
fieldy = j;
break;
@@ -237,7 +237,7 @@ bool KBattleshipView::eventFilter(TQObject *object, TQEvent *event)
setFocus();
m_decide = true;
- TQMouseEvent *mouseEvent = static_cast<TQMouseEvent *>(event);
+ TQMouseEvent *mouseEvent = TQT_TQMOUSEEVENT(event);
TQPoint point(mouseEvent->x(), mouseEvent->y());
TQRect ownRect = m_battlefield->ownRect();
@@ -245,7 +245,7 @@ bool KBattleshipView::eventFilter(TQObject *object, TQEvent *event)
int fieldx = 0;
int fieldy = 0;
- if(ownRect.contains(point))
+ if(ownRect.tqcontains(point))
{
int j = -1;
@@ -254,7 +254,7 @@ bool KBattleshipView::eventFilter(TQObject *object, TQEvent *event)
j++;
TQRect tempRect(i, ownRect.top(), m_battlefield->gridSize(), ownRect.bottom() - ownRect.top());
- if(tempRect.contains(point))
+ if(tempRect.tqcontains(point))
{
fieldx = j;
break;
@@ -268,7 +268,7 @@ bool KBattleshipView::eventFilter(TQObject *object, TQEvent *event)
j++;
TQRect tempRect(ownRect.left(), i, ownRect.right() - ownRect.left(), m_battlefield->gridSize());
- if(tempRect.contains(point))
+ if(tempRect.tqcontains(point))
{
fieldy = j;
break;
diff --git a/kbattleship/kbattleship/kbattleshipview.h b/kbattleship/kbattleship/kbattleshipview.h
index 51d1fcc3..7e65b9f3 100644
--- a/kbattleship/kbattleship/kbattleshipview.h
+++ b/kbattleship/kbattleship/kbattleshipview.h
@@ -30,11 +30,12 @@
#include "kship.h"
#include "kshiplist.h"
-class KBattleshipView : public QWidget
+class KBattleshipView : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KBattleshipView(TQWidget *parent = 0, const char *name = 0, bool draw = false);
+ KBattleshipView(TQWidget *tqparent = 0, const char *name = 0, bool draw = false);
~KBattleshipView();
KBattleField *field() { return m_battlefield; }
diff --git a/kbattleship/kbattleship/kbchooserstrategy.cpp b/kbattleship/kbattleship/kbchooserstrategy.cpp
index 6473e73b..fc832086 100644
--- a/kbattleship/kbattleship/kbchooserstrategy.cpp
+++ b/kbattleship/kbattleship/kbchooserstrategy.cpp
@@ -25,7 +25,7 @@
#define MAX_CHILD_NUM 4
-KBChooserStrategy::KBChooserStrategy(KBStrategy *parent) : KBStrategy(parent)
+KBChooserStrategy::KBChooserStrategy(KBStrategy *tqparent) : KBStrategy(tqparent)
{
m_destroyer = new KBDestroyShipStrategy(this);
m_destroying = false;
diff --git a/kbattleship/kbattleship/kbchooserstrategy.h b/kbattleship/kbattleship/kbchooserstrategy.h
index 5ac7d7c2..c2df5103 100644
--- a/kbattleship/kbattleship/kbchooserstrategy.h
+++ b/kbattleship/kbattleship/kbchooserstrategy.h
@@ -25,7 +25,7 @@
class KBChooserStrategy : public KBStrategy
{
public:
- KBChooserStrategy(KBStrategy *parent = 0);
+ KBChooserStrategy(KBStrategy *tqparent = 0);
virtual ~KBChooserStrategy();
virtual void init(KBattleField *field, const TQRect &field_rect);
diff --git a/kbattleship/kbattleship/kbdestroyshipstrategy.cpp b/kbattleship/kbattleship/kbdestroyshipstrategy.cpp
index a3882963..05095311 100644
--- a/kbattleship/kbattleship/kbdestroyshipstrategy.cpp
+++ b/kbattleship/kbattleship/kbdestroyshipstrategy.cpp
@@ -17,7 +17,7 @@
#include "kbdestroyshipstrategy.h"
-KBDestroyShipStrategy::KBDestroyShipStrategy(KBStrategy *parent) : KBStrategy(parent)
+KBDestroyShipStrategy::KBDestroyShipStrategy(KBStrategy *tqparent) : KBStrategy(tqparent)
{
m_working = false;
}
@@ -320,7 +320,7 @@ void KBDestroyShipStrategy::markBorderingFields()
if (m_direction == VERTICAL)
{
- while (m_fieldRect.contains(col, row) &&
+ while (m_fieldRect.tqcontains(col, row) &&
m_battleField->ownState(col, row) == KBattleField::HIT)
{
row--;
@@ -332,24 +332,24 @@ void KBDestroyShipStrategy::markBorderingFields()
row++;
i = col+1; // right of the ship
j = col-1; // left of the ship
- while (m_fieldRect.contains(col, row) &&
+ while (m_fieldRect.tqcontains(col, row) &&
m_battleField->ownState(col, row) == KBattleField::HIT)
{
- if (m_fieldRect.contains(i, row))
+ if (m_fieldRect.tqcontains(i, row))
setViablePos(i, row, false);
- if (m_fieldRect.contains(j, row))
+ if (m_fieldRect.tqcontains(j, row))
setViablePos(j, row, false);
setViablePos(col, row, false);
row++;
}
- if (m_fieldRect.contains(col, row))
+ if (m_fieldRect.tqcontains(col, row))
{ // below the ship
setViablePos(col, row, false);
}
}
else if (m_direction == HORIZONTAL)
{
- while (m_fieldRect.contains(col, row) &&
+ while (m_fieldRect.tqcontains(col, row) &&
m_battleField->ownState(col, row) == KBattleField::HIT)
{
col--;
@@ -361,17 +361,17 @@ void KBDestroyShipStrategy::markBorderingFields()
col++;
i = row+1; // below the ship
j = row-1; // above the ship
- while (m_fieldRect.contains(col, row) &&
+ while (m_fieldRect.tqcontains(col, row) &&
m_battleField->ownState(col, row) == KBattleField::HIT)
{
- if (m_fieldRect.contains(col, i))
+ if (m_fieldRect.tqcontains(col, i))
setViablePos(col, i, false);
- if (m_fieldRect.contains(col, j))
+ if (m_fieldRect.tqcontains(col, j))
setViablePos(col, j, false);
setViablePos(col, row, false);
col++;
}
- if (m_fieldRect.contains(col, row))
+ if (m_fieldRect.tqcontains(col, row))
{ // right of the ship
setViablePos(col, row, false);
}
diff --git a/kbattleship/kbattleship/kbdestroyshipstrategy.h b/kbattleship/kbattleship/kbdestroyshipstrategy.h
index 41503be1..c6e758a3 100644
--- a/kbattleship/kbattleship/kbdestroyshipstrategy.h
+++ b/kbattleship/kbattleship/kbdestroyshipstrategy.h
@@ -23,7 +23,7 @@
class KBDestroyShipStrategy : public KBStrategy
{
public:
- KBDestroyShipStrategy(KBStrategy *parent = 0);
+ KBDestroyShipStrategy(KBStrategy *tqparent = 0);
virtual void init(KBattleField *field, const TQRect &field_rect);
virtual const TQPoint nextShot();
diff --git a/kbattleship/kbattleship/kbdiagonalshotstrategy.cpp b/kbattleship/kbattleship/kbdiagonalshotstrategy.cpp
index db83bc75..57dc317d 100644
--- a/kbattleship/kbattleship/kbdiagonalshotstrategy.cpp
+++ b/kbattleship/kbattleship/kbdiagonalshotstrategy.cpp
@@ -16,7 +16,7 @@
#include "kbdiagonalshotstrategy.h"
-KBDiagonalShotStrategy::KBDiagonalShotStrategy(KBStrategy *parent) : KBStrategy(parent)
+KBDiagonalShotStrategy::KBDiagonalShotStrategy(KBStrategy *tqparent) : KBStrategy(tqparent)
{
m_column = 0;
m_row = 0;
@@ -34,7 +34,7 @@ const TQPoint KBDiagonalShotStrategy::nextShot()
bool KBDiagonalShotStrategy::advance()
{
- while (m_fieldRect.contains(m_column, m_row))
+ while (m_fieldRect.tqcontains(m_column, m_row))
{
if(enemyFieldStateAt(m_column, m_row) != KBStrategy::SHOT)
return true;
@@ -97,7 +97,7 @@ TQPoint KBDiagonalShotStrategy::endPoint()
if(m_vertical == 0 || m_horizontal == 0)
return TQPoint(col, row);
- while(m_fieldRect.contains(col, row))
+ while(m_fieldRect.tqcontains(col, row))
{
row += m_vertical;
col += m_horizontal;
diff --git a/kbattleship/kbattleship/kbdiagonalshotstrategy.h b/kbattleship/kbattleship/kbdiagonalshotstrategy.h
index e328fad2..47af1240 100644
--- a/kbattleship/kbattleship/kbdiagonalshotstrategy.h
+++ b/kbattleship/kbattleship/kbdiagonalshotstrategy.h
@@ -23,7 +23,7 @@ class KBDiagonalShotStrategy : public KBStrategy
{
public:
enum Direction {LEFTUP, LEFTDOWN, RIGHTUP, RIGHTDOWN};
- KBDiagonalShotStrategy(KBStrategy *parent = 0);
+ KBDiagonalShotStrategy(KBStrategy *tqparent = 0);
virtual const TQPoint nextShot();
virtual bool hasMoreShots();
diff --git a/kbattleship/kbattleship/kbdiagonalwrapstrategy.cpp b/kbattleship/kbattleship/kbdiagonalwrapstrategy.cpp
index 7055403b..7f0a305e 100644
--- a/kbattleship/kbattleship/kbdiagonalwrapstrategy.cpp
+++ b/kbattleship/kbattleship/kbdiagonalwrapstrategy.cpp
@@ -17,11 +17,11 @@
#include <krandomsequence.h>
#include "kbdiagonalwrapstrategy.h"
-KBDiagonalWrapStrategy::KBDiagonalWrapStrategy(KBStrategy *parent) : KBStrategy(parent)
+KBDiagonalWrapStrategy::KBDiagonalWrapStrategy(KBStrategy *tqparent) : KBStrategy(tqparent)
{
m_child = new KBDiagonalShotStrategy(this);
- if(parent == 0)
+ if(tqparent == 0)
{
m_destroyer = new KBDestroyShipStrategy(this);
m_destroying = false;
diff --git a/kbattleship/kbattleship/kbdiagonalwrapstrategy.h b/kbattleship/kbattleship/kbdiagonalwrapstrategy.h
index f4a7c28d..26c271d1 100644
--- a/kbattleship/kbattleship/kbdiagonalwrapstrategy.h
+++ b/kbattleship/kbattleship/kbdiagonalwrapstrategy.h
@@ -24,7 +24,7 @@
class KBDiagonalWrapStrategy : public KBStrategy
{
public:
- KBDiagonalWrapStrategy(KBStrategy *parent = 0);
+ KBDiagonalWrapStrategy(KBStrategy *tqparent = 0);
virtual ~KBDiagonalWrapStrategy();
virtual void init(KBattleField *field, const TQRect &field_rect);
diff --git a/kbattleship/kbattleship/kbhorizontalstepstrategy.cpp b/kbattleship/kbattleship/kbhorizontalstepstrategy.cpp
index a6e931da..63ee74fa 100644
--- a/kbattleship/kbattleship/kbhorizontalstepstrategy.cpp
+++ b/kbattleship/kbattleship/kbhorizontalstepstrategy.cpp
@@ -17,10 +17,10 @@
#include <krandomsequence.h>
#include "kbhorizontalstepstrategy.h"
-KBHorizontalStepStrategy::KBHorizontalStepStrategy(KBStrategy *parent) : KBStrategy(parent)
+KBHorizontalStepStrategy::KBHorizontalStepStrategy(KBStrategy *tqparent) : KBStrategy(tqparent)
{
m_child = 0;
- if(parent == 0) // only the master destroys ships
+ if(tqparent == 0) // only the master destroys ships
{
m_destroyer = new KBDestroyShipStrategy(this);
m_destroying = false;
diff --git a/kbattleship/kbattleship/kbhorizontalstepstrategy.h b/kbattleship/kbattleship/kbhorizontalstepstrategy.h
index 80ec7b72..21bfac4e 100644
--- a/kbattleship/kbattleship/kbhorizontalstepstrategy.h
+++ b/kbattleship/kbattleship/kbhorizontalstepstrategy.h
@@ -23,7 +23,7 @@
class KBHorizontalStepStrategy : public KBStrategy
{
public:
- KBHorizontalStepStrategy(KBStrategy *parent = 0);
+ KBHorizontalStepStrategy(KBStrategy *tqparent = 0);
virtual ~KBHorizontalStepStrategy();
virtual void init(KBattleField *field, const TQRect &field_rect);
diff --git a/kbattleship/kbattleship/kbrandomshotstrategy.cpp b/kbattleship/kbattleship/kbrandomshotstrategy.cpp
index 62416350..901fbe75 100644
--- a/kbattleship/kbattleship/kbrandomshotstrategy.cpp
+++ b/kbattleship/kbattleship/kbrandomshotstrategy.cpp
@@ -16,7 +16,7 @@
#include "kbrandomshotstrategy.h"
-KBRandomShotStrategy::KBRandomShotStrategy(KBStrategy *parent) : KBStrategy(parent)
+KBRandomShotStrategy::KBRandomShotStrategy(KBStrategy *tqparent) : KBStrategy(tqparent)
{
m_destroyer = new KBDestroyShipStrategy(this);
m_destroying = false;
diff --git a/kbattleship/kbattleship/kbrandomshotstrategy.h b/kbattleship/kbattleship/kbrandomshotstrategy.h
index 141961b9..79e15018 100644
--- a/kbattleship/kbattleship/kbrandomshotstrategy.h
+++ b/kbattleship/kbattleship/kbrandomshotstrategy.h
@@ -25,7 +25,7 @@
class KBRandomShotStrategy : public KBStrategy
{
public:
- KBRandomShotStrategy(KBStrategy *parent = 0);
+ KBRandomShotStrategy(KBStrategy *tqparent = 0);
virtual ~KBRandomShotStrategy();
virtual void init(KBattleField *field, const TQRect &field_rect);
diff --git a/kbattleship/kbattleship/kbstrategy.cpp b/kbattleship/kbattleship/kbstrategy.cpp
index be445559..e7ce823a 100644
--- a/kbattleship/kbattleship/kbstrategy.cpp
+++ b/kbattleship/kbattleship/kbstrategy.cpp
@@ -17,9 +17,9 @@
#include "kbstrategy.h"
-KBStrategy::KBStrategy(KBStrategy *parent)
+KBStrategy::KBStrategy(KBStrategy *tqparent)
{
- m_parent = parent;
+ m_parent = tqparent;
m_viableShots = 0;
}
diff --git a/kbattleship/kbattleship/kbstrategy.h b/kbattleship/kbattleship/kbstrategy.h
index 9c4cdf15..04ade696 100644
--- a/kbattleship/kbattleship/kbstrategy.h
+++ b/kbattleship/kbattleship/kbstrategy.h
@@ -26,7 +26,7 @@ class KBStrategy
{
public:
enum{FREE, SHOT, SHIP};
- KBStrategy(KBStrategy *parent = 0);
+ KBStrategy(KBStrategy *tqparent = 0);
virtual ~KBStrategy();
virtual const TQPoint nextShot() = 0;
diff --git a/kbattleship/kbattleship/kbverticalstepstrategy.cpp b/kbattleship/kbattleship/kbverticalstepstrategy.cpp
index 7642ccaf..a9784463 100644
--- a/kbattleship/kbattleship/kbverticalstepstrategy.cpp
+++ b/kbattleship/kbattleship/kbverticalstepstrategy.cpp
@@ -18,11 +18,11 @@
#include <krandomsequence.h>
#include "kbverticalstepstrategy.h"
-KBVerticalStepStrategy::KBVerticalStepStrategy(KBStrategy *parent) : KBStrategy(parent)
+KBVerticalStepStrategy::KBVerticalStepStrategy(KBStrategy *tqparent) : KBStrategy(tqparent)
{
m_child = 0;
- if(parent == 0) // only the master destroys ships
+ if(tqparent == 0) // only the master destroys ships
{
m_destroyer = new KBDestroyShipStrategy(this);
m_destroying = false;
diff --git a/kbattleship/kbattleship/kbverticalstepstrategy.h b/kbattleship/kbattleship/kbverticalstepstrategy.h
index a5d614c6..642210ca 100644
--- a/kbattleship/kbattleship/kbverticalstepstrategy.h
+++ b/kbattleship/kbattleship/kbverticalstepstrategy.h
@@ -24,7 +24,7 @@
class KBVerticalStepStrategy : public KBStrategy
{
public:
- KBVerticalStepStrategy(KBStrategy *parent = 0);
+ KBVerticalStepStrategy(KBStrategy *tqparent = 0);
virtual ~KBVerticalStepStrategy();
virtual void init(KBattleField *field, const TQRect &field_rect);
diff --git a/kbattleship/kbattleship/kchatwidget.cpp b/kbattleship/kbattleship/kchatwidget.cpp
index 9d5e12af..1e9dd005 100644
--- a/kbattleship/kbattleship/kchatwidget.cpp
+++ b/kbattleship/kbattleship/kchatwidget.cpp
@@ -18,7 +18,7 @@
#include <kapplication.h>
#include "kchatwidget.moc"
-KChatWidget::KChatWidget(TQWidget *parent, const char *name) : chatDlg(parent, name)
+KChatWidget::KChatWidget(TQWidget *tqparent, const char *name) : chatDlg(tqparent, name)
{
connect(sendBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotComputeMessage()));
connect(commentEdit, TQT_SIGNAL(returnPressed()), this, TQT_SLOT(slotComputeMessage()));
@@ -26,13 +26,13 @@ KChatWidget::KChatWidget(TQWidget *parent, const char *name) : chatDlg(parent, n
chatView->setMinimumSize(0, 50);
commentEdit->installEventFilter(this);
- m_currentNickname = TQString::null;
+ m_currentNickname = TQString();
slotAcceptMsg(false);
}
void KChatWidget::clear()
{
- m_currentNickname = TQString::null;
+ m_currentNickname = TQString();
slotAcceptMsg(false);
chatView->clear();
commentEdit->clear();
@@ -61,9 +61,9 @@ void KChatWidget::slotReceivedMessage(const TQString &nickname, const TQString &
bool KChatWidget::eventFilter(TQObject *obj, TQEvent *e)
{
- if(obj == commentEdit && e->type() == TQEvent::Wheel)
+ if(TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(commentEdit) && e->type() == TQEvent::Wheel)
{
- kapp->notify(chatView, e);
+ kapp->notify(TQT_TQOBJECT(chatView), e);
return true;
}
return chatDlg::eventFilter(obj, e);
diff --git a/kbattleship/kbattleship/kchatwidget.h b/kbattleship/kbattleship/kchatwidget.h
index 7a0f0bed..574e8648 100644
--- a/kbattleship/kbattleship/kchatwidget.h
+++ b/kbattleship/kbattleship/kchatwidget.h
@@ -27,8 +27,9 @@
class KChatWidget : public chatDlg
{
Q_OBJECT
+ TQ_OBJECT
public:
- KChatWidget(TQWidget *parent = 0, const char *name = 0);
+ KChatWidget(TQWidget *tqparent = 0, const char *name = 0);
void clear();
void setNickname(const TQString &nickname) { m_currentNickname = nickname; }
diff --git a/kbattleship/kbattleship/kclientdialog.cpp b/kbattleship/kbattleship/kclientdialog.cpp
index 97015b71..37cd7fe7 100644
--- a/kbattleship/kbattleship/kclientdialog.cpp
+++ b/kbattleship/kbattleship/kclientdialog.cpp
@@ -25,8 +25,8 @@
#include "kbattleshipserver.h" // for BATTLESHIP_SERVICE
#include "kclientdialog.moc"
-KClientDialog::KClientDialog(TQWidget *parent, const char *name)
- : KDialogBase(Plain, i18n("Connect to Server"), Ok|Cancel, Ok, parent, name, true, false, KGuiItem(i18n("&Connect")))
+KClientDialog::KClientDialog(TQWidget *tqparent, const char *name)
+ : KDialogBase(Plain, i18n("Connect to Server"), Ok|Cancel, Ok, tqparent, name, true, false, KGuiItem(i18n("&Connect")))
{
TQFrame* page = plainPage();
TQGridLayout* pageLayout = new TQGridLayout(page, 1, 1, 0, 0);
@@ -42,7 +42,7 @@ KClientDialog::KClientDialog(TQWidget *parent, const char *name)
connect(m_mainWidget->serverEdit, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotCheckEnableOk()));
m_config->setGroup("History");
- m_browser = new DNSSD::ServiceBrowser(TQString::fromLatin1(BATTLESHIP_SERVICE));
+ m_browser = new DNSSD::ServiceBrowser(TQString::tqfromLatin1(BATTLESHIP_SERVICE));
connect(m_browser,TQT_SIGNAL(finished()),TQT_SLOT(nextBatch()));
m_browser->startBrowse();
connect(m_mainWidget->lanBox,TQT_SIGNAL(activated(int)),TQT_SLOT(gameSelected(int)));
diff --git a/kbattleship/kbattleship/kclientdialog.h b/kbattleship/kbattleship/kclientdialog.h
index f424baf6..f46018ab 100644
--- a/kbattleship/kbattleship/kclientdialog.h
+++ b/kbattleship/kbattleship/kclientdialog.h
@@ -32,8 +32,9 @@
class KClientDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KClientDialog(TQWidget *parent = 0, const char *name = 0);
+ KClientDialog(TQWidget *tqparent = 0, const char *name = 0);
~KClientDialog();
TQString port() const;
diff --git a/kbattleship/kbattleship/kgridwidget.cpp b/kbattleship/kbattleship/kgridwidget.cpp
index 6cc660d7..cb6e573e 100644
--- a/kbattleship/kbattleship/kgridwidget.cpp
+++ b/kbattleship/kbattleship/kgridwidget.cpp
@@ -26,10 +26,10 @@
#include "kbattlefield.h"
#include "kgridwidget.h"
-KGridWidget::KGridWidget(TQWidget *parent, bool draw) : m_drawGrid(draw)
+KGridWidget::KGridWidget(TQWidget *tqparent, bool draw) : m_drawGrid(draw)
{
- m_doubleBuffer = new TQPixmap(parent->width(), parent->height());
- m_parent = parent;
+ m_doubleBuffer = new TQPixmap(tqparent->width(), tqparent->height());
+ m_parent = tqparent;
cleanBuffer();
cacheImages();
@@ -392,8 +392,8 @@ void KGridWidget::drawIcon(const TQPixmap &icon, bool hitBlend, bool waterBlend,
painter.end();
else
{
- painter.setBrush(Qt::NoBrush);
- painter.setPen(Qt::black);
+ painter.setBrush(TQt::NoBrush);
+ painter.setPen(TQt::black);
painter.drawRect(m_x, m_y, m_size, m_size);
painter.end();
}
diff --git a/kbattleship/kbattleship/kgridwidget.h b/kbattleship/kbattleship/kgridwidget.h
index 1026695b..96ecde3a 100644
--- a/kbattleship/kbattleship/kgridwidget.h
+++ b/kbattleship/kbattleship/kgridwidget.h
@@ -23,7 +23,7 @@
class KGridWidget
{
public:
- KGridWidget(TQWidget *parent, bool draw);
+ KGridWidget(TQWidget *tqparent, bool draw);
~KGridWidget();
void enableGrid() { m_drawGrid = true; }
diff --git a/kbattleship/kbattleship/kmessage.cpp b/kbattleship/kbattleship/kmessage.cpp
index a316b314..f17e4bf5 100644
--- a/kbattleship/kbattleship/kmessage.cpp
+++ b/kbattleship/kbattleship/kmessage.cpp
@@ -78,7 +78,7 @@ TQString KMessage::field(const TQString &name) const
TQDomNode xmlNode = m_xmlDocument.documentElement().namedItem(name);
if(!xmlNode.isNull())
return (xmlNode.toElement()).text();
- return TQString::null;
+ return TQString();
}
int KMessage::type()
diff --git a/kbattleship/kbattleship/konnectionhandling.cpp b/kbattleship/kbattleship/konnectionhandling.cpp
index 5d5c1026..dc1a5880 100644
--- a/kbattleship/kbattleship/konnectionhandling.cpp
+++ b/kbattleship/kbattleship/konnectionhandling.cpp
@@ -19,7 +19,7 @@
extern const char *protocolVersion;
-KonnectionHandling::KonnectionHandling(TQWidget *parent, KBattleshipServer *server) : TQObject(parent)
+KonnectionHandling::KonnectionHandling(TQWidget *tqparent, KBattleshipServer *server) : TQObject(tqparent)
{
m_kbserver = server;
m_kbclient = 0;
@@ -31,7 +31,7 @@ KonnectionHandling::KonnectionHandling(TQWidget *parent, KBattleshipServer *serv
connect(server, TQT_SIGNAL(sigMessageSent(KMessage *)), this, TQT_SLOT(slotMessageSent(KMessage *)));
}
-KonnectionHandling::KonnectionHandling(TQWidget *parent, KBattleshipClient *client) : TQObject(parent)
+KonnectionHandling::KonnectionHandling(TQWidget *tqparent, KBattleshipClient *client) : TQObject(tqparent)
{
m_kbclient = client;
m_kbserver = 0;
@@ -94,7 +94,7 @@ void KonnectionHandling::slotNewMessage(KMessage *msg)
case KMessage::DISCARD:
if(msg->field("kmversion") == TQString("true"))
{
- KMessageBox::error(0L, i18n("Connection dropped by enemy. The client's protocol implementation (%1) is not compatible with our (%2) version.").arg(msg->field("reason")).arg(protocolVersion));
+ KMessageBox::error(0L, i18n("Connection dropped by enemy. The client's protocol implementation (%1) is not compatible with our (%2) version.").tqarg(msg->field("reason")).tqarg(protocolVersion));
emit sigAbortNetworkGame();
}
else
@@ -156,10 +156,10 @@ void KonnectionHandling::slotNewMessage(KMessage *msg)
{
// First message....got client information
case KMessage::GETVERSION:
- if(msg->field("protocolVersion") != TQString::fromLatin1(protocolVersion))
+ if(msg->field("protocolVersion") != TQString::tqfromLatin1(protocolVersion))
{
m_kbserver->slotDiscardClient(protocolVersion, true, false);
- KMessageBox::error(0L, i18n("Connection to client dropped. The client's protocol implementation (%1) is not compatible with our (%2) version.").arg(msg->field("protocolVersion")).arg(protocolVersion));
+ KMessageBox::error(0L, i18n("Connection to client dropped. The client's protocol implementation (%1) is not compatible with our (%2) version.").tqarg(msg->field("protocolVersion")).tqarg(protocolVersion));
}
else
emit sigClientInformation(msg->field("clientName"), msg->field("clientVersion"), msg->field("clientDescription"), msg->field("protocolVersion"));
@@ -232,7 +232,7 @@ void KonnectionHandling::slotSocketError(int error)
break;
default:
- KMessageBox::error(0L, i18n("Unknown error; No: %1").arg(error));
+ KMessageBox::error(0L, i18n("Unknown error; No: %1").tqarg(error));
break;
}
diff --git a/kbattleship/kbattleship/konnectionhandling.h b/kbattleship/kbattleship/konnectionhandling.h
index 95615d66..598225c5 100644
--- a/kbattleship/kbattleship/konnectionhandling.h
+++ b/kbattleship/kbattleship/konnectionhandling.h
@@ -27,13 +27,14 @@
#include "kbattleshipserver.h"
#include "kmessage.h"
-class KonnectionHandling : public QObject
+class KonnectionHandling : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
enum{SERVER, CLIENT};
- KonnectionHandling(TQWidget *parent, KBattleshipServer *server);
- KonnectionHandling(TQWidget *parent, KBattleshipClient *client);
+ KonnectionHandling(TQWidget *tqparent, KBattleshipServer *server);
+ KonnectionHandling(TQWidget *tqparent, KBattleshipClient *client);
int type() { return m_type; }
diff --git a/kbattleship/kbattleship/kserverdialog.cpp b/kbattleship/kbattleship/kserverdialog.cpp
index d8fa1b1d..2574757f 100644
--- a/kbattleship/kbattleship/kserverdialog.cpp
+++ b/kbattleship/kbattleship/kserverdialog.cpp
@@ -21,8 +21,8 @@
#include "kserverdialog.h"
-KServerDialog::KServerDialog(TQWidget *parent, const char *name) :
- KDialogBase(Plain, i18n("Start Server"), Ok|Cancel, Ok, parent, name, true, false, KGuiItem(i18n("&Start")))
+KServerDialog::KServerDialog(TQWidget *tqparent, const char *name) :
+ KDialogBase(Plain, i18n("Start Server"), Ok|Cancel, Ok, tqparent, name, true, false, KGuiItem(i18n("&Start")))
{
TQFrame* page = plainPage();
TQGridLayout* pageLayout = new TQGridLayout(page, 1, 1, 0, 0);
diff --git a/kbattleship/kbattleship/kserverdialog.h b/kbattleship/kbattleship/kserverdialog.h
index ca455509..ad7cc499 100644
--- a/kbattleship/kbattleship/kserverdialog.h
+++ b/kbattleship/kbattleship/kserverdialog.h
@@ -31,8 +31,9 @@
class KServerDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KServerDialog(TQWidget *parent = 0, const char *name = 0);
+ KServerDialog(TQWidget *tqparent = 0, const char *name = 0);
TQString port() const;
TQString nickname() const;
diff --git a/kbattleship/kbattleship/kship.cpp b/kbattleship/kbattleship/kship.cpp
index a9fbb558..05e893b3 100644
--- a/kbattleship/kbattleship/kship.cpp
+++ b/kbattleship/kbattleship/kship.cpp
@@ -60,7 +60,7 @@ bool KShip::placedLeft()
return m_placedLeft;
}
-bool KShip::contains(int x, int y)
+bool KShip::tqcontains(int x, int y)
{
return (x >= m_shipxstart && x <= m_shipxstop) && (y >= m_shipystart && y <= m_shipystop);
}
@@ -69,7 +69,7 @@ int KShip::shipTypeEnum(int x, int y)
{
int ret;
ret = KBattleField::WATER;
- if (contains(x, y))
+ if (tqcontains(x, y))
{
switch(m_shiptype)
{
diff --git a/kbattleship/kbattleship/kship.h b/kbattleship/kbattleship/kship.h
index df436c7a..6d60ac62 100644
--- a/kbattleship/kbattleship/kship.h
+++ b/kbattleship/kbattleship/kship.h
@@ -32,7 +32,7 @@ public:
int shipTypeEnum(int x, int y);
bool placedLeft();
- bool contains(int x, int y);
+ bool tqcontains(int x, int y);
private:
int m_shipxstart;
diff --git a/kbattleship/kbattleship/kshiplist.cpp b/kbattleship/kbattleship/kshiplist.cpp
index 6a3463af..b28f95f4 100644
--- a/kbattleship/kbattleship/kshiplist.cpp
+++ b/kbattleship/kbattleship/kshiplist.cpp
@@ -118,7 +118,7 @@ bool KShipList::canAddShips()
void KShipList::addNewShip(int button, int fieldx, int fieldy)
{
- if(!addNewShip(!(button == LeftButton), fieldx, fieldy))
+ if(!addNewShip(!(button == Qt::LeftButton), fieldx, fieldy))
KMessageBox::information(0L, i18n("You cannot place the ship here."));
}
@@ -126,20 +126,20 @@ bool KShipList::addNewShip(bool vertical, int fieldx, int fieldy)
{
TQRect ship = vertical ? TQRect(fieldx, fieldy, 1, m_shipsadded) : TQRect(fieldx, fieldy, m_shipsadded, 1);
TQRect field = TQRect(0, 0, m_fieldx, m_fieldy);
- if(!field.contains(ship))
+ if(!field.tqcontains(ship))
return false;
for(KShip *placedShip = m_shiplist.first(); placedShip != 0; placedShip = m_shiplist.next())
{
for(int i = fieldx-1; i < (fieldx + ship.width()+1); i++)
{
- if(placedShip->contains(i, fieldy - 1) || placedShip->contains(i, fieldy + ship.height()))
+ if(placedShip->tqcontains(i, fieldy - 1) || placedShip->tqcontains(i, fieldy + ship.height()))
return false;
}
for(int i = fieldy-1; i < (fieldy + ship.height()+1); i++)
{
- if(placedShip->contains(fieldx - 1, i) || placedShip->contains(fieldx + ship.width(), i))
+ if(placedShip->tqcontains(fieldx - 1, i) || placedShip->tqcontains(fieldx + ship.width(), i))
return false;
}
}
diff --git a/kbattleship/kbattleship/kshiplist.h b/kbattleship/kbattleship/kshiplist.h
index e27705b6..eddaa412 100644
--- a/kbattleship/kbattleship/kshiplist.h
+++ b/kbattleship/kbattleship/kshiplist.h
@@ -25,9 +25,10 @@
#include "kbattlefield.h"
#include "kship.h"
-class KShipList : public QObject
+class KShipList : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
KShipList();
diff --git a/kbattleship/kbattleship/kstatdialog.cpp b/kbattleship/kbattleship/kstatdialog.cpp
index 03bc7d41..28b9c142 100644
--- a/kbattleship/kbattleship/kstatdialog.cpp
+++ b/kbattleship/kbattleship/kstatdialog.cpp
@@ -19,7 +19,7 @@
#include <tqlabel.h>
#include "kstatdialog.moc"
-KStatDialog::KStatDialog(TQWidget *parent, const char *name) : statDlg(parent, name)
+KStatDialog::KStatDialog(TQWidget *tqparent, const char *name) : statDlg(tqparent, name)
{
}
diff --git a/kbattleship/kbattleship/kstatdialog.h b/kbattleship/kbattleship/kstatdialog.h
index 5657fccd..172b7e47 100644
--- a/kbattleship/kbattleship/kstatdialog.h
+++ b/kbattleship/kbattleship/kstatdialog.h
@@ -23,8 +23,9 @@
class KStatDialog : public statDlg
{
Q_OBJECT
+ TQ_OBJECT
public:
- KStatDialog(TQWidget *parent = 0, const char *name = 0);
+ KStatDialog(TQWidget *tqparent = 0, const char *name = 0);
void setShot();
void setShot(int shot);