summaryrefslogtreecommitdiffstats
path: root/lskat
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 /lskat
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 'lskat')
-rw-r--r--lskat/lskat/KChildConnect.cpp6
-rw-r--r--lskat/lskat/KChildConnect.h5
-rw-r--r--lskat/lskat/KConnectEntry.cpp8
-rw-r--r--lskat/lskat/KConnectEntry.h2
-rw-r--r--lskat/lskat/KEInput.cpp10
-rw-r--r--lskat/lskat/KEInput.h7
-rw-r--r--lskat/lskat/KEMessage.cpp28
-rw-r--r--lskat/lskat/KInputChildProcess.cpp2
-rw-r--r--lskat/lskat/KInputChildProcess.h3
-rw-r--r--lskat/lskat/KInteractiveConnect.h1
-rw-r--r--lskat/lskat/KProcessConnect.cpp2
-rw-r--r--lskat/lskat/KProcessConnect.h1
-rw-r--r--lskat/lskat/KRSocket.h3
-rw-r--r--lskat/lskat/KRemoteConnect.cpp4
-rw-r--r--lskat/lskat/KRemoteConnect.h3
-rw-r--r--lskat/lskat/lskat.cpp48
-rw-r--r--lskat/lskat/lskat.h3
-rw-r--r--lskat/lskat/lskatdoc.cpp12
-rw-r--r--lskat/lskat/lskatdoc.h13
-rw-r--r--lskat/lskat/lskatview.cpp132
-rw-r--r--lskat/lskat/lskatview.h11
-rw-r--r--lskat/lskat/msgdlg.cpp4
-rw-r--r--lskat/lskat/msgdlg.h5
-rw-r--r--lskat/lskat/namedlg.cpp16
-rw-r--r--lskat/lskat/namedlg.h3
-rw-r--r--lskat/lskat/networkdlg.cpp8
-rw-r--r--lskat/lskat/networkdlg.h3
-rw-r--r--lskat/lskat/networkdlgbase.ui56
-rw-r--r--lskat/lskatproc/KChildConnect.cpp6
-rw-r--r--lskat/lskatproc/KChildConnect.h5
-rw-r--r--lskat/lskatproc/KEMessage.cpp28
-rw-r--r--lskat/lskatproc/KInputChildProcess.cpp2
-rw-r--r--lskat/lskatproc/KInputChildProcess.h3
33 files changed, 229 insertions, 214 deletions
diff --git a/lskat/lskat/KChildConnect.cpp b/lskat/lskat/KChildConnect.cpp
index 35ac9408..f74fd10b 100644
--- a/lskat/lskat/KChildConnect.cpp
+++ b/lskat/lskat/KChildConnect.cpp
@@ -30,7 +30,7 @@ KChildConnect::~KChildConnect()
{
}
-KR_STATUS KChildConnect::QueryStatus()
+KR_STATUS KChildConnect::QuerytqStatus()
{
return KR_OK;
}
@@ -57,7 +57,7 @@ bool KChildConnect::SendMsg(KEMessage *msg)
return Send(sendstring);
}
-// Send string to parent
+// Send string to tqparent
bool KChildConnect::Send(TQString str)
{
if (!str || str.length()<1) return true; // no need to send crap
@@ -75,7 +75,7 @@ void KChildConnect::Receive(TQString input)
// Call us recursive until there are no CR left
len=KEMESSAGE_CR.length();
- pos=input.find(KEMESSAGE_CR);
+ pos=input.tqfind(KEMESSAGE_CR);
if (pos>0)
{
tmp=input.left(pos);
diff --git a/lskat/lskat/KChildConnect.h b/lskat/lskat/KChildConnect.h
index b8e48fcd..99ab31b0 100644
--- a/lskat/lskat/KChildConnect.h
+++ b/lskat/lskat/KChildConnect.h
@@ -22,9 +22,10 @@
#include "KEMessage.h"
-class KChildConnect: public QObject
+class KChildConnect: public TQObject
{
Q_OBJECT
+ TQ_OBJECT
protected:
TQStrList inputcache;
@@ -41,7 +42,7 @@ class KChildConnect: public QObject
virtual bool SendMsg(KEMessage *msg);
virtual bool Send(TQString str);
- virtual KR_STATUS QueryStatus();
+ virtual KR_STATUS QuerytqStatus();
public slots:
diff --git a/lskat/lskat/KConnectEntry.cpp b/lskat/lskat/KConnectEntry.cpp
index 870b8cd2..ed926d6d 100644
--- a/lskat/lskat/KConnectEntry.cpp
+++ b/lskat/lskat/KConnectEntry.cpp
@@ -55,18 +55,18 @@ KInteractiveConnect *KConnectEntry::QueryInteractiveConnect()
return connect.i;
}
-KR_STATUS KConnectEntry::QueryStatus()
+KR_STATUS KConnectEntry::QuerytqStatus()
{
switch(type)
{
case KG_INPUTTYPE_INTERACTIVE:
- return connect.i->QueryStatus();
+ return connect.i->QuerytqStatus();
break;
case KG_INPUTTYPE_REMOTE:
- return connect.r->QueryStatus();
+ return connect.r->QuerytqStatus();
break;
case KG_INPUTTYPE_PROCESS:
- return connect.p->QueryStatus();
+ return connect.p->QuerytqStatus();
break;
default:
return KR_INVALID;
diff --git a/lskat/lskat/KConnectEntry.h b/lskat/lskat/KConnectEntry.h
index 73619eac..16df7924 100644
--- a/lskat/lskat/KConnectEntry.h
+++ b/lskat/lskat/KConnectEntry.h
@@ -50,7 +50,7 @@ class KConnectEntry
KConnectEntry &operator=(KConnectEntry &entry);
bool Exit();
bool Init(KG_INPUTTYPE stype,int id=0,KEMessage *msg=0);
- KR_STATUS QueryStatus();
+ KR_STATUS QuerytqStatus();
bool SendMsg(KEMessage *msg);
};
#endif
diff --git a/lskat/lskat/KEInput.cpp b/lskat/lskat/KEInput.cpp
index 091bf4e1..ea2def79 100644
--- a/lskat/lskat/KEInput.cpp
+++ b/lskat/lskat/KEInput.cpp
@@ -22,8 +22,8 @@
#include "KEInput.moc"
-KEInput::KEInput(TQObject * parent)
- : TQObject(parent,0)
+KEInput::KEInput(TQObject * tqparent)
+ : TQObject(tqparent,0)
{
number_of_inputs=0;
locked=FALSE;
@@ -85,14 +85,14 @@ KG_INPUTTYPE KEInput::QueryType(int no)
return playerArray[no].QueryType();
}
-KR_STATUS KEInput::QueryStatus(int no)
+KR_STATUS KEInput::QuerytqStatus(int no)
{
if (no==-1) no=QueryNext();
if (no>=number_of_inputs || no<0)
{
return KR_INVALID;
}
- return playerArray[no].QueryStatus();
+ return playerArray[no].QuerytqStatus();
}
bool KEInput::SendMsg(KEMessage *msg,int no)
{
@@ -122,7 +122,7 @@ bool KEInput::SetInputDevice(int no, KG_INPUTTYPE type,KEMessage *msg)
result=playerArray[no].Init(type,no,msg);
// if (result)
// Connect even if remote connection is not yet build
- if (result || playerArray[no].QueryStatus()==KR_WAIT_FOR_CLIENT)
+ if (result || playerArray[no].QuerytqStatus()==KR_WAIT_FOR_CLIENT)
{
switch(QueryType(no))
{
diff --git a/lskat/lskat/KEInput.h b/lskat/lskat/KEInput.h
index 4e83f36a..0a599e9a 100644
--- a/lskat/lskat/KEInput.h
+++ b/lskat/lskat/KEInput.h
@@ -29,9 +29,10 @@
#include "KConnectTypes.h"
-class KEInput : public QObject
+class KEInput : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
private:
int number_of_inputs;
@@ -46,7 +47,7 @@ class KEInput : public QObject
TQMemArray<KConnectEntry> playerArray;
public:
- KEInput(TQObject * parent=0);
+ KEInput(TQObject * tqparent=0);
~KEInput();
int QueryNumberOfInputs();
int QueryNext();
@@ -55,7 +56,7 @@ class KEInput : public QObject
bool IsRemote(int no=-1);
int QueryPrevious();
KG_INPUTTYPE QueryType(int no=-1);
- KR_STATUS QueryStatus(int no=-1);
+ KR_STATUS QuerytqStatus(int no=-1);
bool IsInput(int no);
bool SetInputDevice(int no, KG_INPUTTYPE type, KEMessage *msg=0);
bool RemoveInput(int no);
diff --git a/lskat/lskat/KEMessage.cpp b/lskat/lskat/KEMessage.cpp
index 38cd2e8d..43ae9312 100644
--- a/lskat/lskat/KEMessage.cpp
+++ b/lskat/lskat/KEMessage.cpp
@@ -61,7 +61,7 @@ void KEMessage::AddData(TQString key, const char *data,int size)
KGM_TYPE KEMessage::QueryType(TQString key)
{
KMessageEntry *entry;
- entry=dict.find(key);
+ entry=dict.tqfind(key);
if (!entry) return (KGM_TYPE)0;
return entry->QueryType();
}
@@ -69,7 +69,7 @@ KGM_TYPE KEMessage::QueryType(TQString key)
bool KEMessage::HasKey(TQString key)
{
KMessageEntry *entry;
- entry=dict.find(key);
+ entry=dict.tqfind(key);
if (!entry) return false;
return true;
}
@@ -78,7 +78,7 @@ bool KEMessage::GetData(TQString key,short &s)
{
short *result;
KMessageEntry *entry;
- entry=dict.find(key);
+ entry=dict.tqfind(key);
if (!entry) return false;
if (entry->QueryType()!=KGM_TYPE_SHORT) return false;
// printf("GetShortData: %p for %s\n",entry->QueryData(),(char *)key);
@@ -91,7 +91,7 @@ bool KEMessage::GetData(TQString key,long &l)
{
long *result;
KMessageEntry *entry;
- entry=dict.find(key);
+ entry=dict.tqfind(key);
if (!entry) return false;
if (entry->QueryType()!=KGM_TYPE_LONG) return false;
result=(long *)entry->QueryData();
@@ -103,7 +103,7 @@ bool KEMessage::GetData(TQString key,float &f)
{
float *result;
KMessageEntry *entry;
- entry=dict.find(key);
+ entry=dict.tqfind(key);
if (!entry) return false;
if (entry->QueryType()!=KGM_TYPE_FLOAT) return false;
// printf("GetFloatData: %p for %s\n",entry->QueryData(),(char *)key);
@@ -115,7 +115,7 @@ bool KEMessage::GetData(TQString key,float &f)
bool KEMessage::GetData(TQString key,char * &c,int &size)
{
KMessageEntry *entry;
- entry=dict.find(key);
+ entry=dict.tqfind(key);
if (!entry) return false;
if (entry->QueryType()!=KGM_TYPE_DATA) return false;
c=entry->QueryData();
@@ -179,19 +179,19 @@ TQString KEMessage::StringToEntry(TQString str,KMessageEntry *entry)
len=KEMESSAGE_SEP.length();
if (!entry) return TQString();
- pos=str.find(KEMESSAGE_SEP,0);
+ pos=str.tqfind(KEMESSAGE_SEP,0);
if (pos<0) return TQString(); // wrong format
key=str.left(pos);
oldpos=pos;
- pos=str.find(KEMESSAGE_SEP,oldpos+len);
+ pos=str.tqfind(KEMESSAGE_SEP,oldpos+len);
if (pos<0) return TQString(); // wrong format
size=str.mid(oldpos+len,pos-oldpos-len);
oldpos=pos;
- pos=str.find(KEMESSAGE_SEP,oldpos+len);
+ pos=str.tqfind(KEMESSAGE_SEP,oldpos+len);
if (pos<0) return TQString(); // wrong format
type=str.mid(oldpos+len,pos-oldpos-len);
@@ -202,7 +202,7 @@ TQString KEMessage::StringToEntry(TQString str,KMessageEntry *entry)
cnt=size.toInt();
entry->SetType((KGM_TYPE)type.toInt());
- // I hope this works with unicode strings as well
+ // I hope this works with tqunicode strings as well
p=data.latin1();
q=(char *)calloc(data.length()/2,sizeof(char));
if (!q) return TQString();
@@ -226,7 +226,7 @@ TQString KEMessage::ToString()
s=KEMESSAGE_HEAD+KEMESSAGE_CR;
for (it=keys.first();it!=0;it=keys.next())
{
- entry=dict.find(TQCString(it));
+ entry=dict.tqfind(TQCString(it));
s+=EntryToString(it,entry);
}
s+=KEMESSAGE_TAIL+KEMESSAGE_CR;
@@ -251,14 +251,14 @@ bool KEMessage::AddStringMsg(TQString str)
len=KEMESSAGE_CR.length();
- pos=str.find(KEMESSAGE_CR);
+ pos=str.tqfind(KEMESSAGE_CR);
if (pos<0) return false; // wrong format
if (str.left(pos)!=(KEMESSAGE_HEAD)) return false; // wrong message
do
{
oldpos=pos;
- pos=str.find(KEMESSAGE_CR,oldpos+len);
+ pos=str.tqfind(KEMESSAGE_CR,oldpos+len);
if (pos<0) return false; // wrong format
data=str.mid(oldpos+len,pos-oldpos-len);
if (data!=(KEMESSAGE_TAIL))
@@ -315,7 +315,7 @@ KEMessage &KEMessage::operator=(KEMessage &msg)
// printf("Assigning = KEMessage from %p to %p\n",&msg,this);
for (it=msg.keys.first();it!=0;it=msg.keys.next())
{
- entry=msg.dict.find(TQCString(it));
+ entry=msg.dict.tqfind(TQCString(it));
newentry=new KMessageEntry;
*newentry=*entry;
AddEntry(TQCString(it),newentry);
diff --git a/lskat/lskat/KInputChildProcess.cpp b/lskat/lskat/KInputChildProcess.cpp
index bd78235c..5ba87e96 100644
--- a/lskat/lskat/KInputChildProcess.cpp
+++ b/lskat/lskat/KInputChildProcess.cpp
@@ -55,7 +55,7 @@ bool KInputChildProcess::exec()
s=inputbuffer+s;
// printf("ChildABC '%s'\n",(const char *)s);
// fflush(stdout);
- pos=s.findRev(KEMESSAGE_CR);
+ pos=s.tqfindRev(KEMESSAGE_CR);
if (pos<0)
{
inputbuffer=s;
diff --git a/lskat/lskat/KInputChildProcess.h b/lskat/lskat/KInputChildProcess.h
index 2f964e71..14201922 100644
--- a/lskat/lskat/KInputChildProcess.h
+++ b/lskat/lskat/KInputChildProcess.h
@@ -22,9 +22,10 @@
#include "KChildConnect.h"
-class KInputChildProcess : public QObject
+class KInputChildProcess : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
private:
char *buffer;
diff --git a/lskat/lskat/KInteractiveConnect.h b/lskat/lskat/KInteractiveConnect.h
index 1585f60f..5c01d6bd 100644
--- a/lskat/lskat/KInteractiveConnect.h
+++ b/lskat/lskat/KInteractiveConnect.h
@@ -23,6 +23,7 @@
class KInteractiveConnect:public KChildConnect
{
Q_OBJECT
+ TQ_OBJECT
public:
KInteractiveConnect();
diff --git a/lskat/lskat/KProcessConnect.cpp b/lskat/lskat/KProcessConnect.cpp
index 97cd9221..b3117c18 100644
--- a/lskat/lskat/KProcessConnect.cpp
+++ b/lskat/lskat/KProcessConnect.cpp
@@ -115,7 +115,7 @@ void KProcessConnect::slotReceivedStdout(KProcess *, char *buffer, int buflen)
}
// Append old unresolved input
s=inputbuffer+s;
- pos=s.findRev(KEMESSAGE_CR);
+ pos=s.tqfindRev(KEMESSAGE_CR);
// printf("String '%s' pos=%d len=%d\n",(const char *)s,pos,s.length());
if (pos<0)
{
diff --git a/lskat/lskat/KProcessConnect.h b/lskat/lskat/KProcessConnect.h
index 0e7b491a..38a68fa9 100644
--- a/lskat/lskat/KProcessConnect.h
+++ b/lskat/lskat/KProcessConnect.h
@@ -27,6 +27,7 @@
class KProcessConnect: public KChildConnect
{
Q_OBJECT
+ TQ_OBJECT
private:
KProcess *process;
diff --git a/lskat/lskat/KRSocket.h b/lskat/lskat/KRSocket.h
index faf1c975..c139a1b1 100644
--- a/lskat/lskat/KRSocket.h
+++ b/lskat/lskat/KRSocket.h
@@ -70,9 +70,10 @@ class KRServerSocketPrivate;
* @version $Id$
* @short Monitor a port for incoming TCP/IP connections.
*/
-class KRServerSocket : public QObject
+class KRServerSocket : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor.
diff --git a/lskat/lskat/KRemoteConnect.cpp b/lskat/lskat/KRemoteConnect.cpp
index 315d2a96..a84ab9dc 100644
--- a/lskat/lskat/KRemoteConnect.cpp
+++ b/lskat/lskat/KRemoteConnect.cpp
@@ -63,7 +63,7 @@ KRemoteConnect::~KRemoteConnect()
printf("DESTGRUCTING KRemoteConenct\n");
}
-KR_STATUS KRemoteConnect::QueryStatus()
+KR_STATUS KRemoteConnect::QuerytqStatus()
{
return socketStatus;
}
@@ -267,7 +267,7 @@ void KRemoteConnect::socketRead(KSocket *sock)
// Append old unresolved input
s=inputbuffer+s;
- pos=s.findRev(KEMESSAGE_CR);
+ pos=s.tqfindRev(KEMESSAGE_CR);
// printf("String '%s' pos=%d len=%d\n",(const char *)s,pos,s.length());
if (pos<0)
{
diff --git a/lskat/lskat/KRemoteConnect.h b/lskat/lskat/KRemoteConnect.h
index 99f9280d..5669b330 100644
--- a/lskat/lskat/KRemoteConnect.h
+++ b/lskat/lskat/KRemoteConnect.h
@@ -29,6 +29,7 @@
class KRemoteConnect: public KChildConnect
{
Q_OBJECT
+ TQ_OBJECT
protected:
KRServerSocket *kServerSocket;
@@ -53,7 +54,7 @@ class KRemoteConnect: public KChildConnect
// bool SendMsg(KEMessage *msg);
virtual bool Send(TQString str);
// void Receive(TQString input);
- virtual KR_STATUS QueryStatus();
+ virtual KR_STATUS QuerytqStatus();
protected:
bool OfferServerSocket();
diff --git a/lskat/lskat/lskat.cpp b/lskat/lskat/lskat.cpp
index 41309afd..c6f21ff1 100644
--- a/lskat/lskat/lskat.cpp
+++ b/lskat/lskat/lskat.cpp
@@ -50,7 +50,7 @@ LSkatApp::LSkatApp() : KMainWindow(0)
config=kapp->config();
// localise data file
- TQString file=TQString::fromLatin1("lskat/grafix/t1.png");
+ TQString file=TQString::tqfromLatin1("lskat/grafix/t1.png");
mGrafix=kapp->dirs()->findResourceDir("data", file);
if (mGrafix.isNull()) mGrafix = TQCString("grafix/");
else mGrafix+=TQCString("lskat/grafix/");
@@ -63,7 +63,7 @@ LSkatApp::LSkatApp() : KMainWindow(0)
initStatusBar();
setupGUI(KMainWindow::StatusBar | Save);
- createGUI(TQString::null, false);
+ createGUI(TQString(), false);
initDocument();
initView();
@@ -73,7 +73,7 @@ LSkatApp::LSkatApp() : KMainWindow(0)
// Needs to be after readOptions as we read in default paths
doc->LoadGrafix(mGrafix);
- mInput=new KEInput(this);
+ mInput=new KEInput(TQT_TQOBJECT(this));
doc->SetInputHandler(mInput);
connect(mInput,TQT_SIGNAL(signalPrepareProcessMove(KEMessage *)),
this,TQT_SLOT(slotPrepareProcessMove(KEMessage *)));
@@ -158,26 +158,26 @@ void LSkatApp::initGUI()
{
TQStringList list;
- (void)KStdAction::openNew(this, TQT_SLOT(slotFileNew()), actionCollection(), "new_game");
+ (void)KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(slotFileNew()), actionCollection(), "new_game");
ACTION("new_game")->setStatusText(i18n("Starting a new game..."));
ACTION("new_game")->setWhatsThis(i18n("Starting a new game..."));
- (void)new KAction(i18n("&End Game"),"stop", 0, this, TQT_SLOT(slotFileEnd()),
+ (void)new KAction(i18n("&End Game"),"stop", 0, TQT_TQOBJECT(this), TQT_SLOT(slotFileEnd()),
actionCollection(), "end_game");
ACTION("end_game")->setStatusText(i18n("Ending the current game..."));
ACTION("end_game")->setWhatsThis(i18n("Aborts a currently played game. No winner will be declared."));
- (void)new KAction(i18n("&Clear Statistics"),"flag", 0, this, TQT_SLOT(slotFileStatistics()),
+ (void)new KAction(i18n("&Clear Statistics"),"flag", 0, TQT_TQOBJECT(this), TQT_SLOT(slotFileStatistics()),
actionCollection(), "clear_statistics");
ACTION("clear_statistics")->setStatusText(i18n("Delete all time statistics..."));
ACTION("clear_statistics")->setWhatsThis(i18n("Clears the all time statistics which is kept in all sessions."));
- (void)new KAction(i18n("Send &Message..."), CTRL+Key_M, this, TQT_SLOT(slotFileMessage()),
+ (void)new KAction(i18n("Send &Message..."), CTRL+Key_M, TQT_TQOBJECT(this), TQT_SLOT(slotFileMessage()),
actionCollection(), "send_message");
ACTION("send_message")->setStatusText(i18n("Sending message to remote player..."));
ACTION("send_message")->setWhatsThis(i18n("Allows you to talk with a remote player."));
- (void)KStdAction::quit(this, TQT_SLOT(slotFileQuit()), actionCollection(), "game_exit");
+ (void)KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(slotFileQuit()), actionCollection(), "game_exit");
ACTION("game_exit")->setStatusText(i18n("Exiting..."));
ACTION("game_exit")->setWhatsThis(i18n("Quits the program."));
- (void)new KSelectAction(i18n("Starting Player"),0,this,TQT_SLOT(slotStartplayer()),
+ (void)new KSelectAction(i18n("Starting Player"),0,TQT_TQOBJECT(this),TQT_SLOT(slotStartplayer()),
actionCollection(), "startplayer");
ACTION("startplayer")->setStatusText(i18n("Changing starting player..."));
ACTION("startplayer")->setWhatsThis(i18n("Chooses which player begins the next game."));
@@ -186,7 +186,7 @@ void LSkatApp::initGUI()
list.append(i18n("Player &2"));
((KSelectAction *)ACTION("startplayer"))->setItems(list);
- (void)new KSelectAction(i18n("Player &1 Played By"),0,this,TQT_SLOT(slotPlayer1By()),
+ (void)new KSelectAction(i18n("Player &1 Played By"),0,TQT_TQOBJECT(this),TQT_SLOT(slotPlayer1By()),
actionCollection(), "player1");
ACTION("player1")->setStatusText(i18n("Changing who plays player 1..."));
ACTION("player1")->setWhatsThis(i18n("Changing who plays player 1..."));
@@ -195,13 +195,13 @@ void LSkatApp::initGUI()
list.append(i18n("&Computer"));
list.append(i18n("&Remote"));
((KSelectAction *)ACTION("player1"))->setItems(list);
- (void)new KSelectAction(i18n("Player &2 Played By"),0,this,TQT_SLOT(slotPlayer2By()),
+ (void)new KSelectAction(i18n("Player &2 Played By"),0,TQT_TQOBJECT(this),TQT_SLOT(slotPlayer2By()),
actionCollection(), "player2");
ACTION("player1")->setStatusText(i18n("Changing who plays player 2..."));
ACTION("player1")->setWhatsThis(i18n("Changing who plays player 2..."));
((KSelectAction *)ACTION("player2"))->setItems(list);
- (void)new KSelectAction(i18n("&Level"),0,this,TQT_SLOT(slotLevel()),
+ (void)new KSelectAction(i18n("&Level"),0,TQT_TQOBJECT(this),TQT_SLOT(slotLevel()),
actionCollection(), "choose_level");
ACTION("choose_level")->setStatusText(i18n("Change level..."));
ACTION("choose_level")->setWhatsThis(i18n("Change the strength of the computer player."));
@@ -211,12 +211,12 @@ void LSkatApp::initGUI()
list.append(i18n("&Hard"));
((KSelectAction *)ACTION("choose_level"))->setItems(list);
- (void)new KAction(i18n("Select &Card Deck..."), 0, this, TQT_SLOT(slotOptionsCardDeck()),
+ (void)new KAction(i18n("Select &Card Deck..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotOptionsCardDeck()),
actionCollection(), "select_carddeck");
ACTION("select_carddeck")->setStatusText(i18n("Configure card decks..."));
ACTION("select_carddeck")->setWhatsThis(i18n("Choose how the cards should look."));
- (void)new KAction(i18n("Change &Names..."), 0, this, TQT_SLOT(slotOptionsNames()),
+ (void)new KAction(i18n("Change &Names..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotOptionsNames()),
actionCollection(), "change_names");
ACTION("change_names")->setStatusText(i18n("Configure player names..."));
ACTION("change_names")->setWhatsThis(i18n("Configure player names..."));
@@ -243,7 +243,7 @@ void LSkatApp::initStatusBar()
// computer move timer
procTimer=new TQTimer(this);
- connect(procTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(slotProcTimer()));
+ connect(procTimer,TQT_SIGNAL(timeout()),TQT_TQOBJECT(this),TQT_SLOT(slotProcTimer()));
}
void LSkatApp::initDocument()
@@ -358,7 +358,7 @@ void LSkatApp::slotFileStatistics()
message=i18n("Do you really want to clear the all time "
"statistical data?");
- if (KMessageBox::Yes==KMessageBox::questionYesNo(this,message,TQString::null,KStdGuiItem::clear()))
+ if (KMessageBox::Yes==KMessageBox::questionYesNo(this,message,TQString(),KStdGuiItem::clear()))
{
doc->ClearStats();
doc->slotUpdateAllViews(0);
@@ -587,7 +587,7 @@ void LSkatApp::slotStatusNames(){
if (!doc->IsRunning()) msg=i18n("No game running");
else
{
- msg=i18n("%1 to move...").arg(doc->GetName(doc->GetCurrentPlayer()));
+ msg=i18n("%1 to move...").tqarg(doc->GetName(doc->GetCurrentPlayer()));
}
slotStatusMover(msg);
}
@@ -625,14 +625,14 @@ void LSkatApp::NewGame()
}
// Connected 0 and we are server
else if (mInput->QueryType(0)==KG_INPUTTYPE_REMOTE &&
- mInput->QueryStatus()>0 && doc->IsServer())
+ mInput->QuerytqStatus()>0 && doc->IsServer())
{
mInput->Unlock();
mInput->Next(doc->GetStartPlayer());
}
// Connected 1 and we are server
else if (mInput->QueryType(1)==KG_INPUTTYPE_REMOTE &&
- mInput->QueryStatus()>1 && doc->IsServer())
+ mInput->QuerytqStatus()>1 && doc->IsServer())
{
mInput->Unlock();
mInput->Next(doc->GetStartPlayer());
@@ -659,7 +659,7 @@ bool LSkatApp::MakeInputDevice(int no)
msg=new KEMessage;
PrepareGame(msg);
// Build new connection
- if ( mInput->QueryType(no)!=type || mInput->QueryStatus(no)<=0)
+ if ( mInput->QueryType(no)!=type || mInput->QuerytqStatus(no)<=0)
{
OptionsNetwork();
port=doc->QueryPort();
@@ -677,11 +677,11 @@ bool LSkatApp::MakeInputDevice(int no)
tim=10000;
if (!host.isEmpty())
{
- s=i18n("Remote connection to %1:%2...").arg(host).arg(port);
+ s=i18n("Remote connection to %1:%2...").tqarg(host).tqarg(port);
}
else
{
- s=i18n("Offering remote connection on port %1...").arg(port);
+ s=i18n("Offering remote connection on port %1...").tqarg(port);
}
progress=new TQProgressDialog(s, i18n("Abort"), tim, this,0,true );
progress->setCaption(i18n("Lieutenant Skat"));
@@ -689,7 +689,7 @@ bool LSkatApp::MakeInputDevice(int no)
{
progress->setProgress( j );
if ( progress->wasCancelled() ) break;
- if (mInput->QueryStatus(no)>0) break;
+ if (mInput->QuerytqStatus(no)>0) break;
usleep(100);
}
// progress.setProgress(tim);
@@ -717,7 +717,7 @@ bool LSkatApp::MakeInputDevice(int no)
}
}
delete msg;
- if (mInput->QueryStatus(no)>0)
+ if (mInput->QuerytqStatus(no)>0)
{
res=true;
}
diff --git a/lskat/lskat/lskat.h b/lskat/lskat/lskat.h
index e44f7e1b..cd20b841 100644
--- a/lskat/lskat/lskat.h
+++ b/lskat/lskat/lskat.h
@@ -23,7 +23,7 @@
#include <config.h>
#endif
-// include files for Qt
+// include files for TQt
#include <tqstrlist.h>
// include files for KDE
@@ -69,6 +69,7 @@ class LSkatView;
class LSkatApp : public KMainWindow
{
Q_OBJECT
+ TQ_OBJECT
friend class LSkatView;
diff --git a/lskat/lskat/lskatdoc.cpp b/lskat/lskat/lskatdoc.cpp
index fd95f0c8..f8b955e5 100644
--- a/lskat/lskat/lskatdoc.cpp
+++ b/lskat/lskat/lskatdoc.cpp
@@ -15,7 +15,7 @@
* *
***************************************************************************/
-// include files for Qt
+// include files for TQt
#include <tqdir.h>
#include <tqfileinfo.h>
#include <time.h>
@@ -36,7 +36,7 @@
TQPtrList<LSkatView> *LSkatDoc::pViewList = 0L;
-LSkatDoc::LSkatDoc(TQWidget *parent, const char *name) : TQObject(parent, name)
+LSkatDoc::LSkatDoc(TQWidget *tqparent, const char *name) : TQObject(tqparent, name)
{
int i;
if(!pViewList)
@@ -135,7 +135,7 @@ void LSkatDoc::slotUpdateAllViews(LSkatView *sender)
for(w=pViewList->first(); w!=0; w=pViewList->next())
{
if(w!=sender)
- w->repaint();
+ w->tqrepaint();
}
}
}
@@ -147,7 +147,7 @@ void LSkatDoc::UpdateViews(int mode)
{
for(w=pViewList->first(); w!=0; w=pViewList->next())
{
- if (mode & UPDATE_STATUS) w->updateStatus();
+ if (mode & UPDATE_STATUS) w->updatetqStatus();
}
}
}
@@ -528,8 +528,8 @@ int LSkatDoc::WonMove(int c1,int c2)
}
-int LSkatDoc::GetMoveStatus() {return movestatus;}
-void LSkatDoc::SetMoveStatus(int i) { movestatus=i; }
+int LSkatDoc::GetMovetqStatus() {return movestatus;}
+void LSkatDoc::SetMovetqStatus(int i) { movestatus=i; }
int LSkatDoc::GetCurrentPlayer() {return currentplayer;}
void LSkatDoc::SetCurrentPlayer(int i) {currentplayer=i;}
int LSkatDoc::GetStartPlayer() {return startplayer;}
diff --git a/lskat/lskat/lskatdoc.h b/lskat/lskat/lskatdoc.h
index 8e62a27f..b9304baa 100644
--- a/lskat/lskat/lskatdoc.h
+++ b/lskat/lskat/lskatdoc.h
@@ -44,12 +44,13 @@ class LSkatView;
* @author Source Framework Automatically Generated by KDevelop, (c) The KDevelop Team.
* @version KDevelop version 0.4 code generation
*/
-class LSkatDoc : public QObject
+class LSkatDoc : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/** Constructor for the fileclass of the application */
- LSkatDoc(TQWidget *parent, const char *name=0);
+ LSkatDoc(TQWidget *tqparent, const char *name=0);
/** Destructor for the fileclass of the application */
~LSkatDoc();
@@ -96,8 +97,8 @@ class LSkatDoc : public QObject
bool IsRunning();
CCOLOUR GetTrump();
void SetTrump(CCOLOUR i);
- int GetMoveStatus();
- void SetMoveStatus(int i);
+ int GetMovetqStatus();
+ void SetMovetqStatus(int i);
int GetCurrentPlayer();
void SetCurrentPlayer(int i);
int GetStartPlayer();
@@ -215,8 +216,8 @@ public:
int cardvalues[14];
public slots:
- /** calls repaint() on all views connected to the document object and is called by the view by which the document has been changed.
- * As this view normally repaints itself, it is excluded from the paintEvent.
+ /** calls tqrepaint() on all views connected to the document object and is called by the view by which the document has been changed.
+ * As this view normally tqrepaints itself, it is excluded from the paintEvent.
*/
void slotUpdateAllViews(LSkatView *sender);
diff --git a/lskat/lskat/lskatview.cpp b/lskat/lskat/lskatview.cpp
index a338bc00..8603a662 100644
--- a/lskat/lskat/lskatview.cpp
+++ b/lskat/lskat/lskatview.cpp
@@ -15,7 +15,7 @@
* *
***************************************************************************/
-// include files for Qt
+// include files for TQt
#include <tqpixmap.h>
#include <tqcolor.h>
#include <tqrect.h>
@@ -104,7 +104,7 @@
#define MOVECOUNTER 20 // so many moves when playing card
#define MOVE_TIMER_DELAY 7 // timer in milllisec default 7
-LSkatView::LSkatView(TQWidget *parent, const char *name) : TQWidget(parent, name)
+LSkatView::LSkatView(TQWidget *tqparent, const char *name) : TQWidget(tqparent, name)
{
setBackgroundMode(PaletteBase);
// setBackgroundMode(NoBackground);
@@ -136,7 +136,7 @@ LSkatView::LSkatView(TQWidget *parent, const char *name) : TQWidget(parent, name
// Access the document with the game data
LSkatDoc *LSkatView::getDocument() const
{
- LSkatApp *theApp=(LSkatApp *) parentWidget();
+ LSkatApp *theApp=(LSkatApp *) tqparentWidget();
return theApp->getDocument();
}
@@ -206,7 +206,7 @@ void LSkatView::drawMove(TQPainter *p)
int card;
TQPoint point;
- card=getDocument()->GetMoveStatus();
+ card=getDocument()->GetMovetqStatus();
if (card>=0)
{
@@ -403,12 +403,12 @@ void LSkatView::drawFinal(TQPainter *p)
TQRect brect1_3,brect2_3,brect3_3,brect4_3;
TQRect brect1_4,brect2_4,brect3_4,brect4_4;
- // Calculate geometry
+ // Calculate tqgeometry
line1=i18n("Game over");
rect=p->window();
//rect1.moveBy(0,FINAL_Y0-24);
p->setFont(font24);
- brect1=p->boundingRect(rect,Qt::AlignHCenter|Qt::SingleLine|Qt::AlignTop,line1);
+ brect1=p->boundingRect(rect,TQt::AlignHCenter|TQt::SingleLine|TQt::AlignTop,line1);
//TQRect wrect=p->window();
sumrect=brect1;
@@ -418,7 +418,7 @@ void LSkatView::drawFinal(TQPainter *p)
int hp=getDocument()->mPixTrump[trump].height()+5;
rect=TQRect(0,hp>sumrect.height()?hp:sumrect.height(),p->window().width(),p->window().height());
p->setFont(font14);
- brect2=p->boundingRect(rect,Qt::AlignHCenter|Qt::SingleLine|Qt::AlignTop,line2);
+ brect2=p->boundingRect(rect,TQt::AlignHCenter|TQt::SingleLine|TQt::AlignTop,line2);
sumrect|=brect2;
}
else
@@ -429,53 +429,53 @@ void LSkatView::drawFinal(TQPainter *p)
}
else if (sc0>sc1)
{
- line2=i18n("Player 1 - %1 won ").arg(getDocument()->GetName(0));
+ line2=i18n("Player 1 - %1 won ").tqarg(getDocument()->GetName(0));
}
else
{
- line2=i18n("Player 2 - %1 won ").arg(getDocument()->GetName(1));
+ line2=i18n("Player 2 - %1 won ").tqarg(getDocument()->GetName(1));
}
int hp=getDocument()->mPixTrump[trump].height()+5;
rect=TQRect(0,hp>sumrect.height()?hp:sumrect.height(),p->window().width(),p->window().height());
p->setFont(font14);
- brect2=p->boundingRect(rect,Qt::AlignHCenter|Qt::SingleLine|Qt::AlignTop,line2);
+ brect2=p->boundingRect(rect,TQt::AlignHCenter|TQt::SingleLine|TQt::AlignTop,line2);
sumrect|=brect2;
p->setFont(font14);
col1_3=i18n("Score:");
col1_4=TQString(" ");
rect=TQRect(0,0,p->window().width(),p->window().height());
- brect1_3=p->boundingRect(rect,Qt::AlignLeft|Qt::SingleLine|Qt::AlignTop,col1_3);
+ brect1_3=p->boundingRect(rect,TQt::AlignLeft|TQt::SingleLine|TQt::AlignTop,col1_3);
ts[0]=brect1_3.width()+10;
col2_3=getDocument()->GetName(0);
rect=TQRect(0,0,p->window().width(),p->window().height());
- brect2_3=p->boundingRect(rect,Qt::AlignLeft|Qt::SingleLine|Qt::AlignTop,col2_3);
+ brect2_3=p->boundingRect(rect,TQt::AlignLeft|TQt::SingleLine|TQt::AlignTop,col2_3);
col2_4=getDocument()->GetName(1);
rect=TQRect(0,0,p->window().width(),p->window().height());
- brect2_4=p->boundingRect(rect,Qt::AlignLeft|Qt::SingleLine|Qt::AlignTop,col2_4);
+ brect2_4=p->boundingRect(rect,TQt::AlignLeft|TQt::SingleLine|TQt::AlignTop,col2_4);
rect=brect2_3|brect2_4;
ts[1]=ts[0]+rect.width()+10;
col3_3.sprintf("%d",sc0);
rect=TQRect(0,0,p->window().width(),p->window().height());
- brect3_3=p->boundingRect(rect,Qt::AlignLeft|Qt::SingleLine|Qt::AlignTop,col3_3);
+ brect3_3=p->boundingRect(rect,TQt::AlignLeft|TQt::SingleLine|TQt::AlignTop,col3_3);
col3_4.sprintf("%d",sc1);
rect=TQRect(0,0,p->window().width(),p->window().height());
- brect3_4=p->boundingRect(rect,Qt::AlignLeft|Qt::SingleLine|Qt::AlignTop,col3_4);
+ brect3_4=p->boundingRect(rect,TQt::AlignLeft|TQt::SingleLine|TQt::AlignTop,col3_4);
rect=brect3_3|brect3_4;
ts[2]=ts[1]+rect.width()+30;
- col4_3=i18n("%1 points").arg(pt0);
+ col4_3=i18n("%1 points").tqarg(pt0);
rect=TQRect(0,0,p->window().width(),p->window().height());
- brect4_3=p->boundingRect(rect,Qt::AlignLeft|Qt::SingleLine|Qt::AlignTop,col4_3);
+ brect4_3=p->boundingRect(rect,TQt::AlignLeft|TQt::SingleLine|TQt::AlignTop,col4_3);
- col4_4=i18n("%1 points").arg(pt1);
+ col4_4=i18n("%1 points").tqarg(pt1);
rect=TQRect(0,0,p->window().width(),p->window().height());
- brect4_4=p->boundingRect(rect,Qt::AlignLeft|Qt::SingleLine|Qt::AlignTop,col4_4);
+ brect4_4=p->boundingRect(rect,TQt::AlignLeft|TQt::SingleLine|TQt::AlignTop,col4_4);
rect=brect4_3|brect4_4;
ts[3]=ts[2]+rect.width()+10;
@@ -492,36 +492,36 @@ void LSkatView::drawFinal(TQPainter *p)
p->setFont(font14);
if (sc0>=120)
{
- line5=i18n("%1 won to nil. Congratulations!").arg(getDocument()->GetName(0));
+ line5=i18n("%1 won to nil. Congratulations!").tqarg(getDocument()->GetName(0));
rect=TQRect(0,sumrect.height()+10,p->window().width(),p->window().height());
- brect5=p->boundingRect(rect,Qt::AlignHCenter|Qt::SingleLine|Qt::AlignTop,line5);
+ brect5=p->boundingRect(rect,TQt::AlignHCenter|TQt::SingleLine|TQt::AlignTop,line5);
sumrect|=brect5;
}
else if (sc0>=90)
{
if (sc0==90)
- line5=i18n("%1 won with 90 points. Super!").arg(getDocument()->GetName(0));
+ line5=i18n("%1 won with 90 points. Super!").tqarg(getDocument()->GetName(0));
else
- line5=i18n("%1 won over 90 points. Super!").arg(getDocument()->GetName(0));
+ line5=i18n("%1 won over 90 points. Super!").tqarg(getDocument()->GetName(0));
rect=TQRect(0,sumrect.height()+10,p->window().width(),p->window().height());
- brect5=p->boundingRect(rect,Qt::AlignHCenter|Qt::SingleLine|Qt::AlignTop,line5);
+ brect5=p->boundingRect(rect,TQt::AlignHCenter|TQt::SingleLine|TQt::AlignTop,line5);
sumrect|=brect5;
}
if (sc1>=120)
{
- line5=i18n("%1 won to nil. Congratulations!").arg(getDocument()->GetName(1));
+ line5=i18n("%1 won to nil. Congratulations!").tqarg(getDocument()->GetName(1));
rect=TQRect(0,sumrect.height()+10,p->window().width(),p->window().height());
- brect5=p->boundingRect(rect,Qt::AlignHCenter|Qt::SingleLine|Qt::AlignTop,line5);
+ brect5=p->boundingRect(rect,TQt::AlignHCenter|TQt::SingleLine|TQt::AlignTop,line5);
sumrect|=brect5;
}
else if (sc1>=90)
{
if (sc1==90)
- line5=i18n("%1 won with 90 points. Super!").arg(getDocument()->GetName(1));
+ line5=i18n("%1 won with 90 points. Super!").tqarg(getDocument()->GetName(1));
else
- line5=i18n("%1 won over 90 points. Super!").arg(getDocument()->GetName(1));
+ line5=i18n("%1 won over 90 points. Super!").tqarg(getDocument()->GetName(1));
rect=TQRect(0,sumrect.height()+10,p->window().width(),p->window().height());
- brect5=p->boundingRect(rect,Qt::AlignHCenter|Qt::SingleLine|Qt::AlignTop,line5);
+ brect5=p->boundingRect(rect,TQt::AlignHCenter|TQt::SingleLine|TQt::AlignTop,line5);
sumrect|=brect5;
}
}
@@ -542,14 +542,14 @@ void LSkatView::drawFinal(TQPainter *p)
rect=sumrect;
rect.setTop(brect1.top()+offset.y());
//brect1.moveBy(offset.x(),offset.y());
- p->drawText(rect,Qt::AlignHCenter|Qt::SingleLine|Qt::AlignTop,line1);
+ p->drawText(rect,TQt::AlignHCenter|TQt::SingleLine|TQt::AlignTop,line1);
p->setFont(font14);
p->setPen(COL_PLAYER);
rect=sumrect;
rect.setTop(brect2.top()+offset.y());
//brect2.moveBy(offset.x(),offset.y());
- p->drawText(rect,Qt::AlignHCenter|Qt::SingleLine|Qt::AlignTop,line2);
+ p->drawText(rect,TQt::AlignHCenter|TQt::SingleLine|TQt::AlignTop,line2);
p->drawPixmap(sumrect.topLeft()+TQPoint(-5,-5), getDocument()->mPixTrump[trump]);
p->drawPixmap(sumrect.topLeft()+TQPoint(5,-5)+TQPoint(sumrect.width()-getDocument()->mPixTrump[trump].width(),0),
@@ -560,40 +560,40 @@ void LSkatView::drawFinal(TQPainter *p)
{
p->setTabArray(ts);
p->setFont(font14);
- p->setPen(Qt::black);
+ p->setPen(TQt::black);
rect=sumrect;
rect.setTop(brect3.top()+offset.y());
// Workaround for the next line where the ExpandTab crashes!!!
drawTabText(p,rect,line3,ts);
- // p->drawText(rect,Qt::AlignLeft|Qt::SingleLine|Qt::AlignTop|Qt::ExpandTabs,line3);
+ // p->drawText(rect,TQt::AlignLeft|TQt::SingleLine|TQt::AlignTop|TQt::ExpandTabs,line3);
rect=sumrect;
rect.setTop(brect4.top()+offset.y());
// Workaround for the next line where the ExpandTab crashes!!!
drawTabText(p,rect,line4,ts);
- // p->drawText(rect,Qt::AlignLeft|Qt::SingleLine|Qt::AlignTop|Qt::ExpandTabs,line4);
+ // p->drawText(rect,TQt::AlignLeft|TQt::SingleLine|TQt::AlignTop|TQt::ExpandTabs,line4);
}
if (!line5.isNull())
{
p->setFont(font14);
- p->setPen(Qt::black);
+ p->setPen(TQt::black);
rect=sumrect;
rect.setTop(brect5.top()+offset.y());
- p->drawText(rect,Qt::AlignHCenter|Qt::SingleLine|Qt::AlignTop,line5);
+ p->drawText(rect,TQt::AlignHCenter|TQt::SingleLine|TQt::AlignTop,line5);
}
}
// This function is just a workaround for the QT function drawText
-// with Qt::EXpandTAbs eanbled. For some strange reasons this crashes...
+// with TQt::EXpandTAbs eanbled. For some strange reasons this crashes...
void LSkatView::drawTabText(TQPainter *p,TQRect rect,TQString s,int *ts)
{
int lcnt=0;
- // p->setPen(Qt::black);
+ // p->setPen(TQt::black);
// p->drawRect(rect);
while(s.length()>0 && (lcnt==0 || ts[lcnt-1]) )
{
- int lpos=s.find("\t");
+ int lpos=s.tqfind("\t");
int rpos=s.length()-lpos-1;
if (lpos<0)
{
@@ -605,13 +605,13 @@ void LSkatView::drawTabText(TQPainter *p,TQRect rect,TQString s,int *ts)
TQRect rect2=rect;
if (lcnt>0)
rect2.setLeft(rect.left()+ts[lcnt-1]);
- p->drawText(rect2,Qt::AlignLeft|Qt::SingleLine|Qt::AlignTop,tmp);
+ p->drawText(rect2,TQt::AlignLeft|TQt::SingleLine|TQt::AlignTop,tmp);
lcnt++;
}
}
// Draw the status field at the right side
-void LSkatView::drawStatus(TQPainter *p)
+void LSkatView::drawtqStatus(TQPainter *p)
{
TQPoint p1,p2;
int trump;
@@ -651,7 +651,7 @@ void LSkatView::drawStatus(TQPainter *p)
// Player pl -------------------
// line1=TQString(i18n("Player 1"))+TQString(TQCString(" - "))+getDocument()->GetName(0);
line1=getDocument()->GetName(pl);
- brect1=p->boundingRect(drawrect,Qt::AlignLeft|Qt::SingleLine|Qt::AlignTop,line1);
+ brect1=p->boundingRect(drawrect,TQt::AlignLeft|TQt::SingleLine|TQt::AlignTop,line1);
sumrect=brect1;
if (getDocument()->IsRunning())
@@ -659,11 +659,11 @@ void LSkatView::drawStatus(TQPainter *p)
// Geometry and strings
line2=i18n("Score:");
rect=TQRect(drawrect.left(),sumrect.bottom()+16,drawrect.width(),drawrect.height()-sumrect.height());
- brect2=p->boundingRect(rect,Qt::AlignLeft|Qt::SingleLine|Qt::AlignTop,line2);
+ brect2=p->boundingRect(rect,TQt::AlignLeft|TQt::SingleLine|TQt::AlignTop,line2);
sumrect|=brect2;
line3=i18n("Move:");
rect=TQRect(drawrect.left(),sumrect.bottom()+10,drawrect.width(),drawrect.height()-sumrect.height());
- brect3=p->boundingRect(rect,Qt::AlignLeft|Qt::SingleLine|Qt::AlignTop,line3);
+ brect3=p->boundingRect(rect,TQt::AlignLeft|TQt::SingleLine|TQt::AlignTop,line3);
sumrect|=brect3;
rect=brect2|brect3;
@@ -674,14 +674,14 @@ void LSkatView::drawStatus(TQPainter *p)
// paint
if (getDocument()->GetStartPlayer()==pl) p->setPen(COL_PLAYER);
else p->setPen(black);
- p->drawText(brect1,Qt::AlignLeft|Qt::SingleLine|Qt::AlignTop,line1);
+ p->drawText(brect1,TQt::AlignLeft|TQt::SingleLine|TQt::AlignTop,line1);
p->setPen(black);
- p->drawText(brect2,Qt::AlignLeft|Qt::SingleLine|Qt::AlignTop,line2);
- p->drawText(brect3,Qt::AlignLeft|Qt::SingleLine|Qt::AlignTop,line3);
+ p->drawText(brect2,TQt::AlignLeft|TQt::SingleLine|TQt::AlignTop,line2);
+ p->drawText(brect3,TQt::AlignLeft|TQt::SingleLine|TQt::AlignTop,line3);
rect2=TQRect(brect2.left()+rect.width(),brect2.top(),drawrect.width()-brect2.width()-rect.width(),brect2.height());
- p->drawText(rect2,Qt::AlignLeft|Qt::SingleLine|Qt::AlignTop,line2a);
+ p->drawText(rect2,TQt::AlignLeft|TQt::SingleLine|TQt::AlignTop,line2a);
rect2=TQRect(brect3.left()+rect.width(),brect3.top(),drawrect.width()-brect3.width()-rect.width(),brect3.height());
- p->drawText(rect2,Qt::AlignLeft|Qt::SingleLine|Qt::AlignTop,line2b);
+ p->drawText(rect2,TQt::AlignLeft|TQt::SingleLine|TQt::AlignTop,line2b);
pa=TQPoint(drawrect.width()-getDocument()->mPixTrump[trump].width(),drawrect.height()-getDocument()->mPixTrump[trump].height());
if (getDocument()->GetStartPlayer()==pl)
@@ -695,17 +695,17 @@ void LSkatView::drawStatus(TQPainter *p)
// Geometry and strings
line2=i18n("Points:");
rect=TQRect(drawrect.left(),sumrect.bottom()+6,drawrect.width(),drawrect.height()-sumrect.height());
- brect2=p->boundingRect(rect,Qt::AlignLeft|Qt::SingleLine|Qt::AlignTop,line2);
+ brect2=p->boundingRect(rect,TQt::AlignLeft|TQt::SingleLine|TQt::AlignTop,line2);
sumrect|=brect2;
line3=i18n("Won:");
rect=TQRect(drawrect.left(),sumrect.bottom()+6,drawrect.width(),drawrect.height()-sumrect.height());
- brect3=p->boundingRect(rect,Qt::AlignLeft|Qt::SingleLine|Qt::AlignTop,line3);
+ brect3=p->boundingRect(rect,TQt::AlignLeft|TQt::SingleLine|TQt::AlignTop,line3);
sumrect|=brect3;
line4=i18n("Games:");
rect=TQRect(drawrect.left(),sumrect.bottom()+6,drawrect.width(),drawrect.height()-sumrect.height());
- brect4=p->boundingRect(rect,Qt::AlignLeft|Qt::SingleLine|Qt::AlignTop,line4);
+ brect4=p->boundingRect(rect,TQt::AlignLeft|TQt::SingleLine|TQt::AlignTop,line4);
sumrect|=brect4;
rect=brect2|brect3|brect4;
@@ -716,17 +716,17 @@ void LSkatView::drawStatus(TQPainter *p)
// paint
p->setPen(COL_PLAYER);
- p->drawText(brect1,Qt::AlignLeft|Qt::SingleLine|Qt::AlignTop,line1);
+ p->drawText(brect1,TQt::AlignLeft|TQt::SingleLine|TQt::AlignTop,line1);
p->setPen(black);
- p->drawText(brect2,Qt::AlignLeft|Qt::SingleLine|Qt::AlignTop,line2);
- p->drawText(brect3,Qt::AlignLeft|Qt::SingleLine|Qt::AlignTop,line3);
- p->drawText(brect4,Qt::AlignLeft|Qt::SingleLine|Qt::AlignTop,line4);
+ p->drawText(brect2,TQt::AlignLeft|TQt::SingleLine|TQt::AlignTop,line2);
+ p->drawText(brect3,TQt::AlignLeft|TQt::SingleLine|TQt::AlignTop,line3);
+ p->drawText(brect4,TQt::AlignLeft|TQt::SingleLine|TQt::AlignTop,line4);
rect2=TQRect(brect2.left()+rect.width(),brect2.top(),drawrect.width()-brect2.width()-rect.width()+5,brect2.height());
- p->drawText(rect2,Qt::AlignLeft|Qt::SingleLine|Qt::AlignTop,line2a);
+ p->drawText(rect2,TQt::AlignLeft|TQt::SingleLine|TQt::AlignTop,line2a);
rect2=TQRect(brect3.left()+rect.width(),brect3.top(),drawrect.width()-brect3.width()-rect.width()+5,brect3.height());
- p->drawText(rect2,Qt::AlignLeft|Qt::SingleLine|Qt::AlignTop,line2b);
+ p->drawText(rect2,TQt::AlignLeft|TQt::SingleLine|TQt::AlignTop,line2b);
rect2=TQRect(brect4.left()+rect.width(),brect4.top(),drawrect.width()-brect4.width()-rect.width()+5,brect4.height());
- p->drawText(rect2,Qt::AlignLeft|Qt::SingleLine|Qt::AlignTop,line2c);
+ p->drawText(rect2,TQt::AlignLeft|TQt::SingleLine|TQt::AlignTop,line2c);
pa=TQPoint(drawrect.width()-getDocument()->mPixType[getDocument()->GetPlayedBy(pl)-1].width(),0);
p->drawPixmap(p1+pa+TQPoint(3,-3), getDocument()->mPixType[getDocument()->GetPlayedBy(pl)-1]);
@@ -740,7 +740,7 @@ void LSkatView::drawStatus(TQPainter *p)
void LSkatView::Paint(TQPainter *p)
{
// If game is running
- drawStatus(p);
+ drawtqStatus(p);
drawDeck(p);
if (getDocument()->IsRunning())
{
@@ -760,7 +760,7 @@ void LSkatView::paintEvent( TQPaintEvent * e)
TQPixmap pm(this->rect().size());
TQPainter p;
TQBrush brush;
- p.begin(&pm,this);
+ p.tqbegin(TQT_TQPAINTDEVICE(&pm),this);
brush.setPixmap( getDocument()->mPixBackground );
p.fillRect(0,0,this->rect().width(),this->rect().height(),brush);
drawIntro(&p);
@@ -790,10 +790,10 @@ TQPoint LSkatView::calcCardPos(int x,int y)
// mouse click event
void LSkatView::mousePressEvent( TQMouseEvent *mouse )
{
- if (mouse->button()!=LeftButton) return ;
+ if (mouse->button()!=Qt::LeftButton) return ;
if (!getDocument()->IsRunning()) return ;
- if (getDocument()->GetMoveStatus()!=-1) return ;
+ if (getDocument()->GetMovetqStatus()!=-1) return ;
TQPoint point;
int mx,my,player;
@@ -890,7 +890,7 @@ void LSkatView::introTimerReady()
}
else if (introcnt<NO_OF_CARDS)
{
- repaint(false);
+ tqrepaint(false);
}
}
@@ -900,7 +900,7 @@ void LSkatView::moveTimerReady()
TQString ld,s;
if (cardmovecnt>=MOVECOUNTER)
{
- LSkatApp *m=(LSkatApp *) parentWidget();
+ LSkatApp *m=(LSkatApp *) tqparentWidget();
moveTimer->stop();
cardmovecnt=0;
update(TQRect(cardend,getDocument()->cardsize));
@@ -925,7 +925,7 @@ void LSkatView::moveTimerReady()
}
}
-void LSkatView::updateStatus()
+void LSkatView::updatetqStatus()
{
update(status_rect1);
update(status_rect2);
diff --git a/lskat/lskat/lskatview.h b/lskat/lskat/lskatview.h
index 19146cc5..8fd86025 100644
--- a/lskat/lskat/lskatview.h
+++ b/lskat/lskat/lskatview.h
@@ -36,14 +36,15 @@ class LSkatDoc;
* @author Source Framework Automatically Generated by KDevelop, (c) The KDevelop Team.
* @version KDevelop version 0.4 code generation
*/
-class LSkatView : public QWidget
+class LSkatView : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
/** Constructor for the main view */
- LSkatView(TQWidget *parent = 0, const char *name=0);
+ LSkatView(TQWidget *tqparent = 0, const char *name=0);
- /** returns a pointer to the document connected to the view instance. Mind that this method requires a LSkatApp instance as a parent
+ /** returns a pointer to the document connected to the view instance. Mind that this method requires a LSkatApp instance as a tqparent
* widget to get to the window document pointer by calling the LSkatApp::getDocument() method.
*
* @see LSkatApp#getDocument
@@ -53,13 +54,13 @@ class LSkatView : public QWidget
void paintEvent( TQPaintEvent * p);
void Paint(TQPainter *p);
void InitMove(int player,int x,int y);
- void updateStatus();
+ void updatetqStatus();
protected:
void drawDeck(TQPainter *p);
void drawIntro(TQPainter *p);
void drawMove(TQPainter *p);
- void drawStatus(TQPainter *p);
+ void drawtqStatus(TQPainter *p);
void drawFinal(TQPainter *p);
void drawBorder(TQPainter *p,TQRect rect,int offset,int width,int mode);
TQPoint calcCardPos(int x,int y);
diff --git a/lskat/lskat/msgdlg.cpp b/lskat/lskat/msgdlg.cpp
index cb3e6334..e1a6923a 100644
--- a/lskat/lskat/msgdlg.cpp
+++ b/lskat/lskat/msgdlg.cpp
@@ -37,8 +37,8 @@
// Create the dialog for changing the player names
-MsgDlg::MsgDlg( TQWidget *parent, const char *name,const char * /*sufi */ )
- : TQDialog( parent, name,TRUE )
+MsgDlg::MsgDlg( TQWidget *tqparent, const char *name,const char * /*sufi */ )
+ : TQDialog( tqparent, name,TRUE )
{
setCaption(i18n("Send Message to Remote Player"));
setMinimumSize(400,160);
diff --git a/lskat/lskat/msgdlg.h b/lskat/lskat/msgdlg.h
index 6612597d..b2b0bfe0 100644
--- a/lskat/lskat/msgdlg.h
+++ b/lskat/lskat/msgdlg.h
@@ -20,12 +20,13 @@
#include <tqstring.h>
#include <tqdialog.h>
-class MsgDlg : public QDialog
+class MsgDlg : public TQDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- MsgDlg (TQWidget* parent = NULL,const char* name = NULL,const char *sufi=NULL);
+ MsgDlg (TQWidget* tqparent = NULL,const char* name = NULL,const char *sufi=NULL);
TQString GetMsg();
protected slots:
diff --git a/lskat/lskat/namedlg.cpp b/lskat/lskat/namedlg.cpp
index 4bbffad7..66296195 100644
--- a/lskat/lskat/namedlg.cpp
+++ b/lskat/lskat/namedlg.cpp
@@ -19,15 +19,15 @@
#define NAME_MAX_LEN 12
/*
- * Constructs a NameDlg which is a child of 'parent', with the
+ * Constructs a NameDlg which is a child of 'tqparent', with the
* name 'name' and widget flags set to 'f'
*
* The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog.
*/
-NameDlg::NameDlg( TQWidget *parent, const char *name,bool /* modal */, WFlags /* fl */ )
+NameDlg::NameDlg( TQWidget *tqparent, const char *name,bool /* modal */, WFlags /* fl */ )
: KDialogBase( Plain, i18n("Configure Names"), Ok|Cancel, Ok,
- parent, name, true,true )
+ tqparent, name, true,true )
{
TQWidget *page = plainPage();
@@ -45,10 +45,10 @@ NameDlg::NameDlg( TQWidget *parent, const char *name,bool /* modal */, WFlags /*
player_names = new TQGroupBox( page, "player_names" );
player_names->setTitle(i18n("Player Names") );
player_names->setColumnLayout(0, Qt::Vertical );
- player_names->layout()->setSpacing( 0 );
- player_names->layout()->setMargin( 0 );
- vbox_2 = new TQVBoxLayout( player_names->layout() );
- vbox_2->setAlignment( Qt::AlignTop );
+ player_names->tqlayout()->setSpacing( 0 );
+ player_names->tqlayout()->setMargin( 0 );
+ vbox_2 = new TQVBoxLayout( player_names->tqlayout() );
+ vbox_2->tqsetAlignment( TQt::AlignTop );
vbox_2->setSpacing( 6 );
vbox_2->setMargin( 11 );
@@ -109,7 +109,7 @@ NameDlg::NameDlg( TQWidget *parent, const char *name,bool /* modal */, WFlags /*
*/
NameDlg::~NameDlg()
{
- // no need to delete child widgets, Qt does it all for us
+ // no need to delete child widgets, TQt does it all for us
}
// In and output the name strings
diff --git a/lskat/lskat/namedlg.h b/lskat/lskat/namedlg.h
index df236595..f8f26881 100644
--- a/lskat/lskat/namedlg.h
+++ b/lskat/lskat/namedlg.h
@@ -21,9 +21,10 @@ class TQPushButton;
class NameDlg : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- NameDlg( TQWidget* parent = 0, const char* name = 0, bool modal = TRUE, WFlags fl = 0 );
+ NameDlg( TQWidget* tqparent = 0, const char* name = 0, bool modal = TRUE, WFlags fl = 0 );
~NameDlg();
void SetNames(TQString n1,TQString n2);
void GetNames(TQString &n1,TQString &n2);
diff --git a/lskat/lskat/networkdlg.cpp b/lskat/lskat/networkdlg.cpp
index 16e1716a..1bf3f18f 100644
--- a/lskat/lskat/networkdlg.cpp
+++ b/lskat/lskat/networkdlg.cpp
@@ -25,10 +25,10 @@
extern const char* LSKAT_SERVICE;
// Create the dialog
-NetworkDlg::NetworkDlg( TQWidget *parent, const char *name )
- : NetworkDlgBase( parent, name, TRUE )
+NetworkDlg::NetworkDlg( TQWidget *tqparent, const char *name )
+ : NetworkDlgBase( tqparent, name, TRUE )
{
- browser = new DNSSD::ServiceBrowser(TQString::fromLatin1(LSKAT_SERVICE));
+ browser = new DNSSD::ServiceBrowser(TQString::tqfromLatin1(LSKAT_SERVICE));
connect(browser,TQT_SIGNAL(finished()),TQT_SLOT(gamesFound()));
browser->startBrowse();
}
@@ -97,7 +97,7 @@ void NetworkDlg::toggleServerClient()
hostname->setEnabled(true);
}
else {
- hostname->setText(TQString::null);
+ hostname->setText(TQString());
hostname->setEnabled(false);
}
}
diff --git a/lskat/lskat/networkdlg.h b/lskat/lskat/networkdlg.h
index 6efccd2f..9657280d 100644
--- a/lskat/lskat/networkdlg.h
+++ b/lskat/lskat/networkdlg.h
@@ -25,9 +25,10 @@
class NetworkDlg : public NetworkDlgBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- NetworkDlg(TQWidget* parent=NULL, const char* name=NULL);
+ NetworkDlg(TQWidget* tqparent=NULL, const char* name=NULL);
~NetworkDlg();
void SetName(const TQString& name);
void SetHost(const TQString& host);
diff --git a/lskat/lskat/networkdlgbase.ui b/lskat/lskat/networkdlgbase.ui
index 861c77f3..e840bc72 100644
--- a/lskat/lskat/networkdlgbase.ui
+++ b/lskat/lskat/networkdlgbase.ui
@@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>NetworkDlgBase</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>NetworkDlgBase</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@@ -19,7 +19,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QButtonGroup">
+ <widget class="TQButtonGroup">
<property name="name">
<cstring>group</cstring>
</property>
@@ -38,7 +38,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>serverBtn</cstring>
</property>
@@ -49,7 +49,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>clientBtn</cstring>
</property>
@@ -59,11 +59,11 @@
</widget>
</vbox>
</widget>
- <widget class="QWidgetStack">
+ <widget class="TQWidgetStack">
<property name="name">
<cstring>stack</cstring>
</property>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>serverPage</cstring>
</property>
@@ -80,7 +80,7 @@
<property name="spacing">
<number>0</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>serverLabel</cstring>
</property>
@@ -91,7 +91,7 @@
<cstring>serverName</cstring>
</property>
</widget>
- <widget class="QLineEdit">
+ <widget class="TQLineEdit">
<property name="name">
<cstring>serverName</cstring>
</property>
@@ -106,7 +106,7 @@
</widget>
</hbox>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>clientPage</cstring>
</property>
@@ -123,7 +123,7 @@
<property name="spacing">
<number>0</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>clientLabel</cstring>
</property>
@@ -134,7 +134,7 @@
<cstring>clientName</cstring>
</property>
</widget>
- <widget class="QComboBox">
+ <widget class="TQComboBox">
<property name="name">
<cstring>clientName</cstring>
</property>
@@ -142,15 +142,15 @@
</hbox>
</widget>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout9</cstring>
+ <cstring>tqlayout9</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>hostLabel</cstring>
</property>
@@ -165,13 +165,13 @@
<property name="text">
<string>Host:</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignLeft</set>
</property>
<property name="hAlign" stdset="0">
</property>
</widget>
- <widget class="QLineEdit">
+ <widget class="TQLineEdit">
<property name="name">
<cstring>hostname</cstring>
</property>
@@ -179,7 +179,7 @@
<bool>false</bool>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>portLabel</cstring>
</property>
@@ -194,7 +194,7 @@
<property name="text">
<string>Port:</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignLeft</set>
</property>
<property name="hAlign" stdset="0">
@@ -202,7 +202,7 @@
<property name="vAlign" stdset="0">
</property>
</widget>
- <widget class="QSpinBox">
+ <widget class="TQSpinBox">
<property name="name">
<cstring>port</cstring>
</property>
@@ -218,9 +218,9 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout11</cstring>
+ <cstring>tqlayout11</cstring>
</property>
<hbox>
<property name="name">
@@ -236,14 +236,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>51</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>pushButton1</cstring>
</property>
@@ -261,7 +261,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>61</width>
<height>20</height>
@@ -298,9 +298,9 @@
<slot>toggleServerClient()</slot>
</connection>
</connections>
-<slots>
+<Q_SLOTS>
<slot access="protected">toggleServerClient()</slot>
<slot access="protected">gameSelected(int nr)</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/lskat/lskatproc/KChildConnect.cpp b/lskat/lskatproc/KChildConnect.cpp
index 6ea4b973..a504018d 100644
--- a/lskat/lskatproc/KChildConnect.cpp
+++ b/lskat/lskatproc/KChildConnect.cpp
@@ -30,7 +30,7 @@ KChildConnect::~KChildConnect()
{
}
-KR_STATUS KChildConnect::QueryStatus()
+KR_STATUS KChildConnect::QuerytqStatus()
{
return KR_OK;
}
@@ -57,7 +57,7 @@ bool KChildConnect::SendMsg(KEMessage *msg)
return Send(sendstring);
}
-// Send string to parent
+// Send string to tqparent
bool KChildConnect::Send(TQString str)
{
if (!str || str.length()<1) return true; // no need to send crap
@@ -75,7 +75,7 @@ void KChildConnect::Receive(TQString input)
// Call us recursive until there are no CR left
len=KEMESSAGE_CR.length();
- pos=input.find(KEMESSAGE_CR);
+ pos=input.tqfind(KEMESSAGE_CR);
if (pos>0)
{
tmp=input.left(pos);
diff --git a/lskat/lskatproc/KChildConnect.h b/lskat/lskatproc/KChildConnect.h
index 37339218..36e9e9a5 100644
--- a/lskat/lskatproc/KChildConnect.h
+++ b/lskat/lskatproc/KChildConnect.h
@@ -14,9 +14,10 @@
#include "KEMessage.h"
-class KChildConnect: public QObject
+class KChildConnect: public TQObject
{
Q_OBJECT
+ TQ_OBJECT
protected:
TQStrList inputcache;
@@ -33,7 +34,7 @@ class KChildConnect: public QObject
virtual bool SendMsg(KEMessage *msg);
virtual bool Send(TQString str);
- virtual KR_STATUS QueryStatus();
+ virtual KR_STATUS QuerytqStatus();
public slots:
diff --git a/lskat/lskatproc/KEMessage.cpp b/lskat/lskatproc/KEMessage.cpp
index ce8985f3..96c33797 100644
--- a/lskat/lskatproc/KEMessage.cpp
+++ b/lskat/lskatproc/KEMessage.cpp
@@ -61,7 +61,7 @@ void KEMessage::AddData(TQString key,const char *data,int size)
KGM_TYPE KEMessage::QueryType(TQString key)
{
KMessageEntry *entry;
- entry=dict.find(key);
+ entry=dict.tqfind(key);
if (!entry) return (KGM_TYPE)0;
return entry->QueryType();
}
@@ -69,7 +69,7 @@ KGM_TYPE KEMessage::QueryType(TQString key)
bool KEMessage::HasKey(TQString key)
{
KMessageEntry *entry;
- entry=dict.find(key);
+ entry=dict.tqfind(key);
if (!entry) return false;
return true;
}
@@ -78,7 +78,7 @@ bool KEMessage::GetData(TQString key,short &s)
{
short *result;
KMessageEntry *entry;
- entry=dict.find(key);
+ entry=dict.tqfind(key);
if (!entry) return false;
if (entry->QueryType()!=KGM_TYPE_SHORT) return false;
// printf("GetShortData: %p for %s\n",entry->QueryData(),(char *)key);
@@ -91,7 +91,7 @@ bool KEMessage::GetData(TQString key,long &l)
{
long *result;
KMessageEntry *entry;
- entry=dict.find(key);
+ entry=dict.tqfind(key);
if (!entry) return false;
if (entry->QueryType()!=KGM_TYPE_LONG) return false;
result=(long *)entry->QueryData();
@@ -103,7 +103,7 @@ bool KEMessage::GetData(TQString key,float &f)
{
float *result;
KMessageEntry *entry;
- entry=dict.find(key);
+ entry=dict.tqfind(key);
if (!entry) return false;
if (entry->QueryType()!=KGM_TYPE_FLOAT) return false;
// printf("GetFloatData: %p for %s\n",entry->QueryData(),(char *)key);
@@ -115,7 +115,7 @@ bool KEMessage::GetData(TQString key,float &f)
bool KEMessage::GetData(TQString key,char * &c,int &size)
{
KMessageEntry *entry;
- entry=dict.find(key);
+ entry=dict.tqfind(key);
if (!entry) return false;
if (entry->QueryType()!=KGM_TYPE_DATA) return false;
c=entry->QueryData();
@@ -179,19 +179,19 @@ TQString KEMessage::StringToEntry(TQString str,KMessageEntry *entry)
len=KEMESSAGE_SEP.length();
if (!entry) return TQString();
- pos=str.find(KEMESSAGE_SEP,0);
+ pos=str.tqfind(KEMESSAGE_SEP,0);
if (pos<0) return TQString(); // wrong format
key=str.left(pos);
oldpos=pos;
- pos=str.find(KEMESSAGE_SEP,oldpos+len);
+ pos=str.tqfind(KEMESSAGE_SEP,oldpos+len);
if (pos<0) return TQString(); // wrong format
size=str.mid(oldpos+len,pos-oldpos-len);
oldpos=pos;
- pos=str.find(KEMESSAGE_SEP,oldpos+len);
+ pos=str.tqfind(KEMESSAGE_SEP,oldpos+len);
if (pos<0) return TQString(); // wrong format
type=str.mid(oldpos+len,pos-oldpos-len);
@@ -202,7 +202,7 @@ TQString KEMessage::StringToEntry(TQString str,KMessageEntry *entry)
cnt=size.toInt();
entry->SetType((KGM_TYPE)type.toInt());
- // I hope this works with unicode strings as well
+ // I hope this works with tqunicode strings as well
p=data.latin1();
q=(char *)calloc(data.length()/2,sizeof(char));
if (!q) return TQString();
@@ -226,7 +226,7 @@ TQString KEMessage::ToString()
s=KEMESSAGE_HEAD+KEMESSAGE_CR;
for (it=keys.first();it!=0;it=keys.next())
{
- entry=dict.find(TQCString(it));
+ entry=dict.tqfind(TQCString(it));
s+=EntryToString(it,entry);
}
s+=KEMESSAGE_TAIL+KEMESSAGE_CR;
@@ -251,14 +251,14 @@ bool KEMessage::AddStringMsg(TQString str)
len=KEMESSAGE_CR.length();
- pos=str.find(KEMESSAGE_CR);
+ pos=str.tqfind(KEMESSAGE_CR);
if (pos<0) return false; // wrong format
if (str.left(pos)!=(KEMESSAGE_HEAD)) return false; // wrong message
do
{
oldpos=pos;
- pos=str.find(KEMESSAGE_CR,oldpos+len);
+ pos=str.tqfind(KEMESSAGE_CR,oldpos+len);
if (pos<0) return false; // wrong format
data=str.mid(oldpos+len,pos-oldpos-len);
if (data!=(KEMESSAGE_TAIL))
@@ -315,7 +315,7 @@ KEMessage &KEMessage::operator=(KEMessage &msg)
// printf("Assigning = KEMessage from %p to %p\n",&msg,this);
for (it=msg.keys.first();it!=0;it=msg.keys.next())
{
- entry=msg.dict.find(TQCString(it));
+ entry=msg.dict.tqfind(TQCString(it));
newentry=new KMessageEntry;
*newentry=*entry;
AddEntry(TQCString(it),newentry);
diff --git a/lskat/lskatproc/KInputChildProcess.cpp b/lskat/lskatproc/KInputChildProcess.cpp
index 13e00b93..c06f42e5 100644
--- a/lskat/lskatproc/KInputChildProcess.cpp
+++ b/lskat/lskatproc/KInputChildProcess.cpp
@@ -55,7 +55,7 @@ bool KInputChildProcess::exec()
s=inputbuffer+s;
// printf("ChildABC '%s'\n",(const char *)s);
// fflush(stdout);
- pos=s.findRev(KEMESSAGE_CR);
+ pos=s.tqfindRev(KEMESSAGE_CR);
if (pos<0)
{
inputbuffer=s;
diff --git a/lskat/lskatproc/KInputChildProcess.h b/lskat/lskatproc/KInputChildProcess.h
index 2f964e71..14201922 100644
--- a/lskat/lskatproc/KInputChildProcess.h
+++ b/lskat/lskatproc/KInputChildProcess.h
@@ -22,9 +22,10 @@
#include "KChildConnect.h"
-class KInputChildProcess : public QObject
+class KInputChildProcess : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
private:
char *buffer;