diff options
Diffstat (limited to 'lskat')
30 files changed, 134 insertions, 420 deletions
@@ -1,3 +1,3 @@ - Convert BMP graphics to PNG (done) -- Checke QT QString-char * casting - (Its a bit of a QCString/QString mess right now) +- Checke QT TQString-char * casting + (Its a bit of a QCString/TQString mess right now) diff --git a/lskat/lskat.kdevprj b/lskat/lskat.kdevprj deleted file mode 100644 index 6d080a29..00000000 --- a/lskat/lskat.kdevprj +++ /dev/null @@ -1,286 +0,0 @@ -[AUTHORS] -dist=true -install=false -install_location= -type=DATA -[COPYING] -dist=true -install=false -install_location= -type=DATA -[ChangeLog] -dist=true -install=false -install_location= -type=DATA -[Config for BinMakefileAm] -bin_program=lskat -cxxflags=-O0 -g3 -Wall -ldadd=-ltdefile -ltdeui -ltdecore -lqt -lXext -lX11 -ldflags= -[General] -author=Martin Heni -email=martin@heni-online.de -kdevprj_version=1.0beta2 -lfv_open_groups= -makefiles=Makefile.am,lskat/Makefile.am,lskat/docs/Makefile.am,lskat/docs/en/Makefile.am,po/Makefile.am,lskatproc/Makefile -project_name=LSkat -project_type=normal_kde -sub_dir=lskat/ -version=0.9 -version_control=CVS -[INSTALL] -dist=true -install=false -install_location= -type=DATA -[LFV Groups] -Dialogs=*.kdevdlg -GNU=AUTHORS,COPYING,ChangeLog,INSTALL,README,TODO,NEWS -Headers=*.h,*.hxx,*.hpp,*.H -Others=* -Sources=*.cpp,*.c,*.cc,*.C,*.cxx,*.ec,*.ecpp,*.lxx,*.l++,*.ll,*.l -Translations=*.po -groups=Headers,Sources,Dialogs,Translations,GNU,Others -[Makefile.am] -files=lskat.kdevprj,AUTHORS,COPYING,ChangeLog,INSTALL,README,TODO,lskat.lsm -sub_dirs=lskat,po -type=normal -[README] -dist=true -install=false -install_location= -type=DATA -[TODO] -dist=true -install=false -install_location= -type=DATA -[lskat.kdevprj] -dist=true -install=false -install_location= -type=DATA -[lskat.lsm] -dist=true -install=false -install_location= -type=DATA -[lskat/KChildConnect.cpp] -dist=true -install=false -install_location= -type=SOURCE -[lskat/KChildConnect.h] -dist=true -install=false -install_location= -type=HEADER -[lskat/KConnectEntry.cpp] -dist=true -install=false -install_location= -type=SOURCE -[lskat/KConnectEntry.h] -dist=true -install=false -install_location= -type=HEADER -[lskat/KConnectTypes.h] -dist=true -install=false -install_location= -type=HEADER -[lskat/KEInput.cpp] -dist=true -install=false -install_location= -type=SOURCE -[lskat/KEInput.h] -dist=true -install=false -install_location= -type=HEADER -[lskat/KEMessage.cpp] -dist=true -install=false -install_location= -type=SOURCE -[lskat/KEMessage.h] -dist=true -install=false -install_location= -type=HEADER -[lskat/KInputChildProcess.cpp] -dist=true -install=false -install_location= -type=SOURCE -[lskat/KInputChildProcess.h] -dist=true -install=false -install_location= -type=HEADER -[lskat/KInteractiveConnect.cpp] -dist=true -install=false -install_location= -type=SOURCE -[lskat/KInteractiveConnect.h] -dist=true -install=false -install_location= -type=HEADER -[lskat/KMessageEntry.cpp] -dist=true -install=false -install_location= -type=SOURCE -[lskat/KMessageEntry.h] -dist=true -install=false -install_location= -type=HEADER -[lskat/TDEProcessConnect.cpp] -dist=true -install=false -install_location= -type=SOURCE -[lskat/TDEProcessConnect.h] -dist=true -install=false -install_location= -type=HEADER -[lskat/KRSocket.cpp] -dist=true -install=false -install_location= -type=SOURCE -[lskat/KRSocket.h] -dist=true -install=false -install_location= -type=HEADER -[lskat/KRemoteConnect.cpp] -dist=true -install=false -install_location= -type=SOURCE -[lskat/KRemoteConnect.h] -dist=true -install=false -install_location= -type=HEADER -[lskat/Makefile.am] -files=lskat/main.cpp,lskat/lskat.cpp,lskat/lskat.h,lskat/lskatdoc.cpp,lskat/lskatdoc.h,lskat/lskatview.cpp,lskat/lskatview.h,lskat/resource.h,lskat/lskat.desktop,lskat/lskat.xpm,lskat/mini-lskat.xpm,lskat/KChildConnect.cpp,lskat/KChildConnect.h,lskat/KConnectEntry.cpp,lskat/KConnectEntry.h,lskat/KConnectTypes.h,lskat/KEInput.cpp,lskat/KEInput.h,lskat/KEMessage.cpp,lskat/KEMessage.h,lskat/KInputChildProcess.cpp,lskat/KInputChildProcess.h,lskat/KInteractiveConnect.cpp,lskat/KInteractiveConnect.h,lskat/KMessageEntry.cpp,lskat/KMessageEntry.h,lskat/TDEProcessConnect.cpp,lskat/TDEProcessConnect.h,lskat/KRSocket.cpp,lskat/KRSocket.h,lskat/KRemoteConnect.cpp,lskat/KRemoteConnect.h,lskat/namedlg.cpp,lskat/namedlg.h,lskat/networkdlg.cpp,lskat/networkdlg.h,lskat/aboutdlg.cpp,lskat/aboutdlg.h,lskat/aboutdlgdata.cpp,lskat/msgdlg.cpp,lskat/msgdlg.h -sub_dirs= -type=prog_main -[lskat/aboutdlg.cpp] -dist=true -install=false -install_location= -type=SOURCE -[lskat/aboutdlg.h] -dist=true -install=false -install_location= -type=HEADER -[lskat/aboutdlgdata.cpp] -dist=true -install=false -install_location= -type=SOURCE -[lskat/docs/Makefile.am] -sub_dirs= -type=normal -[lskat/docs/en/Makefile.am] -sub_dirs= -type=normal -[lskat/lskat.cpp] -dist=true -install=false -install_location= -type=SOURCE -[lskat/lskat.desktop] -dist=true -install=true -install_location=$$(kde_appsdir)/Applications/lskat.desktop -type=DATA -[lskat/lskat.h] -dist=true -install=false -install_location= -type=HEADER -[lskat/lskat.xpm] -dist=true -install=true -install_location=$$(kde_icondir)/lskat.xpm -type=DATA -[lskat/lskatdoc.cpp] -dist=true -install=false -install_location= -type=SOURCE -[lskat/lskatdoc.h] -dist=true -install=false -install_location= -type=HEADER -[lskat/lskatview.cpp] -dist=true -install=false -install_location= -type=SOURCE -[lskat/lskatview.h] -dist=true -install=false -install_location= -type=HEADER -[lskat/main.cpp] -dist=true -install=false -install_location= -type=SOURCE -[lskat/mini-lskat.xpm] -dist=true -install=true -install_location=$$(kde_minidir)/lskat.xpm -type=DATA -[lskat/msgdlg.cpp] -dist=true -install=false -install_location= -type=SOURCE -[lskat/msgdlg.h] -dist=true -install=false -install_location= -type=HEADER -[lskat/namedlg.cpp] -dist=true -install=false -install_location= -type=SOURCE -[lskat/namedlg.h] -dist=true -install=false -install_location= -type=HEADER -[lskat/networkdlg.cpp] -dist=true -install=false -install_location= -type=SOURCE -[lskat/networkdlg.h] -dist=true -install=false -install_location= -type=HEADER -[lskat/resource.h] -dist=true -install=false -install_location= -type=HEADER -[po/Makefile.am] -sub_dirs= -type=po diff --git a/lskat/lskat/KChildConnect.h b/lskat/lskat/KChildConnect.h index a8fc4e19..0d2f002b 100644 --- a/lskat/lskat/KChildConnect.h +++ b/lskat/lskat/KChildConnect.h @@ -24,7 +24,7 @@ class KChildConnect: public TQObject { - Q_OBJECT + TQ_OBJECT protected: diff --git a/lskat/lskat/KConnectEntry.cpp b/lskat/lskat/KConnectEntry.cpp index ba714b58..750a4405 100644 --- a/lskat/lskat/KConnectEntry.cpp +++ b/lskat/lskat/KConnectEntry.cpp @@ -95,7 +95,7 @@ bool KConnectEntry::SendMsg(KEMessage *msg) bool KConnectEntry::Exit() { bool result; - result=FALSE; + result=false; switch(type) { case KG_INPUTTYPE_INTERACTIVE: @@ -110,7 +110,7 @@ bool KConnectEntry::Exit() result=connect.p->Exit(); delete connect.p; break; - default: result=FALSE; + default: result=false; break; } return result; @@ -135,7 +135,7 @@ bool KConnectEntry::Init(KG_INPUTTYPE stype,int id,KEMessage *msg) connect.p=new TDEProcessConnect; result=connect.p->Init(id,msg); break; - default: result=FALSE; + default: result=false; break; } return result; diff --git a/lskat/lskat/KEInput.cpp b/lskat/lskat/KEInput.cpp index 091bf4e1..21c299ae 100644 --- a/lskat/lskat/KEInput.cpp +++ b/lskat/lskat/KEInput.cpp @@ -26,7 +26,7 @@ KEInput::KEInput(TQObject * parent) : TQObject(parent,0) { number_of_inputs=0; - locked=FALSE; + locked=false; previous_input=-1; next_input=-1; cTimer=0; @@ -60,9 +60,9 @@ int KEInput::QueryPrevious() bool KEInput::IsInput(int no) { - if (no>=number_of_inputs || no<0) return FALSE; - if (QueryType(no)==0) return FALSE; - return TRUE; + if (no>=number_of_inputs || no<0) return false; + if (QueryType(no)==0) return false; + return true; } // Default is the type of the current player @@ -127,22 +127,22 @@ bool KEInput::SetInputDevice(int no, KG_INPUTTYPE type,KEMessage *msg) switch(QueryType(no)) { case KG_INPUTTYPE_INTERACTIVE: - connect(playerArray[no].QueryInteractiveConnect(),TQT_SIGNAL(signalReceiveMsg(KEMessage *,int )), - this,TQT_SLOT(slotSetInput(KEMessage *,int ))); - connect(playerArray[no].QueryInteractiveConnect(),TQT_SIGNAL(signalPrepareMove(KEMessage *,KG_INPUTTYPE)), - this,TQT_SLOT(slotPrepareMove(KEMessage *,KG_INPUTTYPE))); + connect(playerArray[no].QueryInteractiveConnect(),TQ_SIGNAL(signalReceiveMsg(KEMessage *,int )), + this,TQ_SLOT(slotSetInput(KEMessage *,int ))); + connect(playerArray[no].QueryInteractiveConnect(),TQ_SIGNAL(signalPrepareMove(KEMessage *,KG_INPUTTYPE)), + this,TQ_SLOT(slotPrepareMove(KEMessage *,KG_INPUTTYPE))); break; case KG_INPUTTYPE_REMOTE: - connect(playerArray[no].QueryRemoteConnect(),TQT_SIGNAL(signalReceiveMsg(KEMessage *,int )), - this,TQT_SLOT(slotSetInput(KEMessage *,int ))); - connect(playerArray[no].QueryRemoteConnect(),TQT_SIGNAL(signalPrepareMove(KEMessage *,KG_INPUTTYPE)), - this,TQT_SLOT(slotPrepareMove(KEMessage *,KG_INPUTTYPE))); + connect(playerArray[no].QueryRemoteConnect(),TQ_SIGNAL(signalReceiveMsg(KEMessage *,int )), + this,TQ_SLOT(slotSetInput(KEMessage *,int ))); + connect(playerArray[no].QueryRemoteConnect(),TQ_SIGNAL(signalPrepareMove(KEMessage *,KG_INPUTTYPE)), + this,TQ_SLOT(slotPrepareMove(KEMessage *,KG_INPUTTYPE))); break; case KG_INPUTTYPE_PROCESS: - connect(playerArray[no].QueryProcessConnect(),TQT_SIGNAL(signalReceiveMsg(KEMessage *,int )), - this,TQT_SLOT(slotSetInput(KEMessage *,int ))); - connect(playerArray[no].QueryProcessConnect(),TQT_SIGNAL(signalPrepareMove(KEMessage *,KG_INPUTTYPE)), - this,TQT_SLOT(slotPrepareMove(KEMessage *,KG_INPUTTYPE))); + connect(playerArray[no].QueryProcessConnect(),TQ_SIGNAL(signalReceiveMsg(KEMessage *,int )), + this,TQ_SLOT(slotSetInput(KEMessage *,int ))); + connect(playerArray[no].QueryProcessConnect(),TQ_SIGNAL(signalPrepareMove(KEMessage *,KG_INPUTTYPE)), + this,TQ_SLOT(slotPrepareMove(KEMessage *,KG_INPUTTYPE))); break; default: break; @@ -154,7 +154,7 @@ bool KEInput::SetInputDevice(int no, KG_INPUTTYPE type,KEMessage *msg) bool KEInput::RemoveInput(int no) { bool result; - if (no>=number_of_inputs || no<0) return FALSE; + if (no>=number_of_inputs || no<0) return false; result=playerArray[no].Exit(); // shrink if last entry is removed if (no==number_of_inputs-1) @@ -169,9 +169,9 @@ bool KEInput::RemoveInput(int no) // Sets a new player and sends it a message bool KEInput::Next(int number, bool force) { - if (locked && !force) return FALSE; - if (!IsInput(number)) return FALSE; - locked=TRUE; + if (locked && !force) return false; + if (!IsInput(number)) return false; + locked=true; // printf("KEInput::Next %d OK ... lock set!!\n",number); @@ -190,8 +190,8 @@ bool KEInput::Next(int number, bool force) // delay non interactive move to allow interactive inout if (cTimer) delete cTimer; // Ouch... cTimer=new TQTimer(this); - connect(cTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(slotTimerNextRemote())); - cTimer->start(K_INPUT_DELAY,TRUE); + connect(cTimer,TQ_SIGNAL(timeout()),this,TQ_SLOT(slotTimerNextRemote())); + cTimer->start(K_INPUT_DELAY,true); } else { @@ -204,15 +204,15 @@ bool KEInput::Next(int number, bool force) { // delay non interactive move to allow interactive inout cTimer=new TQTimer(this); - connect(cTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(slotTimerNextProcess())); - cTimer->start(K_INPUT_DELAY,TRUE); + connect(cTimer,TQ_SIGNAL(timeout()),this,TQ_SLOT(slotTimerNextProcess())); + cTimer->start(K_INPUT_DELAY,true); } else playerArray[number].QueryProcessConnect()->Next(); break; - default: return FALSE; + default: return false; } - return TRUE; + return true; } void KEInput::slotTimerNextRemote() @@ -263,20 +263,20 @@ bool KEInput::SetInput(KEMessage *msg,int number) /* if (!locked) { - printf("KEINput:SetInput not locked(should be) returning FALSE\n"); - return FALSE; + printf("KEINput:SetInput not locked(should be) returning false\n"); + return false; } */ if (number<0 || number>=number_of_inputs) number=next_input; // automatically select player // KEMessage *mMsg= new KEMessage; // evt if (mMsg) delete mMsg; // *mMsg=*msg; - // locked=FALSE; + // locked=false; // printf("**** KEInput: emitting signalReceiveInput 474\n"); emit signalReceiveInput(msg,number); // emit signalReceiveInput(mMsg); // delete mMsg; - return TRUE; + return true; } void KEInput::Lock() diff --git a/lskat/lskat/KEInput.h b/lskat/lskat/KEInput.h index a2b391c8..ee84e508 100644 --- a/lskat/lskat/KEInput.h +++ b/lskat/lskat/KEInput.h @@ -31,7 +31,7 @@ class KEInput : public TQObject { - Q_OBJECT + TQ_OBJECT private: diff --git a/lskat/lskat/KInputChildProcess.cpp b/lskat/lskat/KInputChildProcess.cpp index bd78235c..91ff119c 100644 --- a/lskat/lskat/KInputChildProcess.cpp +++ b/lskat/lskat/KInputChildProcess.cpp @@ -36,8 +36,8 @@ bool KInputChildProcess::exec() childConnect=new KChildConnect; if (!childConnect) return false; - connect(childConnect,TQT_SIGNAL(signalReceiveMsg(KEMessage *,int)), - this,TQT_SLOT(slotReceiveMsg(KEMessage *,int))); + connect(childConnect,TQ_SIGNAL(signalReceiveMsg(KEMessage *,int)), + this,TQ_SLOT(slotReceiveMsg(KEMessage *,int))); do { // Wait for input diff --git a/lskat/lskat/KInputChildProcess.h b/lskat/lskat/KInputChildProcess.h index 60ea185b..f1876f47 100644 --- a/lskat/lskat/KInputChildProcess.h +++ b/lskat/lskat/KInputChildProcess.h @@ -24,7 +24,7 @@ class KInputChildProcess : public TQObject { - Q_OBJECT + TQ_OBJECT private: diff --git a/lskat/lskat/KInteractiveConnect.h b/lskat/lskat/KInteractiveConnect.h index 9ec932db..db3ab9b6 100644 --- a/lskat/lskat/KInteractiveConnect.h +++ b/lskat/lskat/KInteractiveConnect.h @@ -22,7 +22,7 @@ class KInteractiveConnect:public KChildConnect { - Q_OBJECT + TQ_OBJECT public: diff --git a/lskat/lskat/KRSocket.cpp b/lskat/lskat/KRSocket.cpp index a508989b..1b5201ad 100644 --- a/lskat/lskat/KRSocket.cpp +++ b/lskat/lskat/KRSocket.cpp @@ -114,7 +114,7 @@ KRServerSocket::KRServerSocket( const char *_path, int optname, int value, int l } notifier = new TQSocketNotifier( sock, TQSocketNotifier::Read ); - connect( notifier, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( slotAccept(int) ) ); + connect( notifier, TQ_SIGNAL( activated(int) ), this, TQ_SLOT( slotAccept(int) ) ); } KRServerSocket::KRServerSocket( const char *_path ) : @@ -129,7 +129,7 @@ KRServerSocket::KRServerSocket( const char *_path ) : } notifier = new TQSocketNotifier( sock, TQSocketNotifier::Read ); - connect( notifier, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( slotAccept(int) ) ); + connect( notifier, TQ_SIGNAL( activated(int) ), this, TQ_SLOT( slotAccept(int) ) ); } KRServerSocket::KRServerSocket( unsigned short int _port ) : @@ -144,7 +144,7 @@ KRServerSocket::KRServerSocket( unsigned short int _port ) : } notifier = new TQSocketNotifier( sock, TQSocketNotifier::Read ); - connect( notifier, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( slotAccept(int) ) ); + connect( notifier, TQ_SIGNAL( activated(int) ), this, TQ_SLOT( slotAccept(int) ) ); } KRServerSocket::KRServerSocket( unsigned short int _port,int optname,int value,int level ) : @@ -159,7 +159,7 @@ KRServerSocket::KRServerSocket( unsigned short int _port,int optname,int value,i } notifier = new TQSocketNotifier( sock, TQSocketNotifier::Read ); - connect( notifier, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( slotAccept(int) ) ); + connect( notifier, TQ_SIGNAL( activated(int) ), this, TQ_SLOT( slotAccept(int) ) ); } bool KRServerSocket::init( const char *_path ) diff --git a/lskat/lskat/KRSocket.h b/lskat/lskat/KRSocket.h index 83969a4d..eb4e47de 100644 --- a/lskat/lskat/KRSocket.h +++ b/lskat/lskat/KRSocket.h @@ -72,7 +72,7 @@ class KRServerSocketPrivate; */ class KRServerSocket : public TQObject { - Q_OBJECT + TQ_OBJECT public: /** diff --git a/lskat/lskat/KRemoteConnect.cpp b/lskat/lskat/KRemoteConnect.cpp index b8f0d197..f8c91e70 100644 --- a/lskat/lskat/KRemoteConnect.cpp +++ b/lskat/lskat/KRemoteConnect.cpp @@ -108,15 +108,15 @@ bool tryserver; if (!kSocket) return false; if (kSocket->socket()!=-1) // success { - kSocket->enableRead(TRUE); - //kSocket->enableWrite(TRUE); - connect(kSocket,TQT_SIGNAL(closeEvent(TDESocket *)), - this,TQT_SLOT(socketClosed(TDESocket *))); - connect(kSocket,TQT_SIGNAL(readEvent(TDESocket *)), - this,TQT_SLOT(socketRead(TDESocket *))); + kSocket->enableRead(true); + //kSocket->enableWrite(true); + connect(kSocket,TQ_SIGNAL(closeEvent(TDESocket *)), + this,TQ_SLOT(socketClosed(TDESocket *))); + connect(kSocket,TQ_SIGNAL(readEvent(TDESocket *)), + this,TQ_SLOT(socketRead(TDESocket *))); /* - connect(kSocket,TQT_SIGNAL(writeEvent(TDESocket *)), - this,TQT_SLOT(socketWrite(TDESocket *))); + connect(kSocket,TQ_SIGNAL(writeEvent(TDESocket *)), + this,TQ_SLOT(socketWrite(TDESocket *))); */ /* printf("Socket(%d) %p connection built to a server\n", @@ -187,8 +187,8 @@ bool KRemoteConnect::OfferServerSocket() printf("Offering socket and publishing stuff\n"); service = new DNSSD::PublicService(Name,LSKAT_SERVICE,port); service->publishAsync(); - connect(kServerSocket,TQT_SIGNAL(accepted(TDESocket *)), - this,TQT_SLOT(socketRequest(TDESocket *))); + connect(kServerSocket,TQ_SIGNAL(accepted(TDESocket *)), + this,TQ_SLOT(socketRequest(TDESocket *))); return true; } @@ -204,15 +204,15 @@ void KRemoteConnect::socketRequest(TDESocket *sock) kSocket=sock; if (kSocket->socket()!=-1) // success { - kSocket->enableRead(TRUE); - //kSocket->enableWrite(TRUE); - connect(kSocket,TQT_SIGNAL(closeEvent(TDESocket *)), - this,TQT_SLOT(socketClosed(TDESocket *))); - connect(kSocket,TQT_SIGNAL(readEvent(TDESocket *)), - this,TQT_SLOT(socketRead(TDESocket *))); + kSocket->enableRead(true); + //kSocket->enableWrite(true); + connect(kSocket,TQ_SIGNAL(closeEvent(TDESocket *)), + this,TQ_SLOT(socketClosed(TDESocket *))); + connect(kSocket,TQ_SIGNAL(readEvent(TDESocket *)), + this,TQ_SLOT(socketRead(TDESocket *))); /* - connect(kSocket,TQT_SIGNAL(writeEvent(TDESocket *)), - this,TQT_SLOT(socketWrite(TDESocket *))); + connect(kSocket,TQ_SIGNAL(writeEvent(TDESocket *)), + this,TQ_SLOT(socketWrite(TDESocket *))); */ socketStatus=KR_SERVER; delete kServerSocket; // no more connections diff --git a/lskat/lskat/KRemoteConnect.h b/lskat/lskat/KRemoteConnect.h index 99e27b12..bbc99608 100644 --- a/lskat/lskat/KRemoteConnect.h +++ b/lskat/lskat/KRemoteConnect.h @@ -28,7 +28,7 @@ class KRemoteConnect: public KChildConnect { - Q_OBJECT + TQ_OBJECT protected: diff --git a/lskat/lskat/TDEProcessConnect.cpp b/lskat/lskat/TDEProcessConnect.cpp index b2038b4f..541a84a2 100644 --- a/lskat/lskat/TDEProcessConnect.cpp +++ b/lskat/lskat/TDEProcessConnect.cpp @@ -75,16 +75,16 @@ bool TDEProcessConnect::Init(int id,KEMessage *msg) // create process process=new TDEProcess; *process << processname; - connect(process, TQT_SIGNAL(receivedStdout(TDEProcess *, char *, int )), - this, TQT_SLOT(slotReceivedStdout(TDEProcess *, char * , int ))); - connect(process, TQT_SIGNAL(processExited(TDEProcess *)), - this, TQT_SLOT(slotProcessExited(TDEProcess *))); + connect(process, TQ_SIGNAL(receivedStdout(TDEProcess *, char *, int )), + this, TQ_SLOT(slotReceivedStdout(TDEProcess *, char * , int ))); + connect(process, TQ_SIGNAL(processExited(TDEProcess *)), + this, TQ_SLOT(slotProcessExited(TDEProcess *))); /* - connect(process, TQT_SIGNAL(wroteStdin(TDEProcess *)), - this, TQT_SLOT(slotWroteStdin(TDEProcess *))); + connect(process, TQ_SIGNAL(wroteStdin(TDEProcess *)), + this, TQ_SLOT(slotWroteStdin(TDEProcess *))); */ - // TRUE if ok + // true if ok running=process->start(TDEProcess::NotifyOnExit,TDEProcess::All); if (running && msg && msg->QueryNumberOfKeys()>0) diff --git a/lskat/lskat/TDEProcessConnect.h b/lskat/lskat/TDEProcessConnect.h index 3a38e23b..b7b37d33 100644 --- a/lskat/lskat/TDEProcessConnect.h +++ b/lskat/lskat/TDEProcessConnect.h @@ -17,7 +17,7 @@ #ifndef _KPROCESSCONNECT_H_ #define _KPROCESSCONNECT_H_ -#include <kprocess.h> +#include <tdeprocess.h> //#include <ksock.h> // #include "KEInput.h" #include "KEMessage.h" @@ -26,7 +26,7 @@ class TDEProcessConnect: public KChildConnect { - Q_OBJECT + TQ_OBJECT private: diff --git a/lskat/lskat/lskat.cpp b/lskat/lskat/lskat.cpp index 4774855b..fe09b337 100644 --- a/lskat/lskat/lskat.cpp +++ b/lskat/lskat/lskat.cpp @@ -19,7 +19,7 @@ #include <tqprogressdialog.h> // include files for TDE -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <tdemessagebox.h> #include <tdefiledialog.h> #include <tdelocale.h> @@ -47,11 +47,11 @@ LSkatApp::LSkatApp() : TDEMainWindow(0) { - config=kapp->config(); + config=tdeApp->config(); // localise data file TQString file=TQString::fromLatin1("lskat/grafix/t1.png"); - mGrafix=kapp->dirs()->findResourceDir("data", file); + mGrafix=tdeApp->dirs()->findResourceDir("data", file); if (mGrafix.isNull()) mGrafix = TQCString("grafix/"); else mGrafix+=TQCString("lskat/grafix/"); if (global_debug>3) printf("Localised datafile=%s\n",mGrafix.latin1()); @@ -73,16 +73,16 @@ LSkatApp::LSkatApp() : TDEMainWindow(0) // Needs to be after readOptions as we read in default paths doc->LoadGrafix(mGrafix); - mInput=new KEInput(TQT_TQOBJECT(this)); + mInput=new KEInput(this); doc->SetInputHandler(mInput); - connect(mInput,TQT_SIGNAL(signalPrepareProcessMove(KEMessage *)), - this,TQT_SLOT(slotPrepareProcessMove(KEMessage *))); - connect(mInput,TQT_SIGNAL(signalPrepareRemoteMove(KEMessage *)), - this,TQT_SLOT(slotPrepareRemoteMove(KEMessage *))); - connect(mInput,TQT_SIGNAL(signalPrepareInteractiveMove(KEMessage *)), - this,TQT_SLOT(slotPrepareInteractiveMove(KEMessage *))); - connect(mInput,TQT_SIGNAL(signalReceiveInput(KEMessage *, int)), - this,TQT_SLOT(slotReceiveInput(KEMessage *,int ))); + connect(mInput,TQ_SIGNAL(signalPrepareProcessMove(KEMessage *)), + this,TQ_SLOT(slotPrepareProcessMove(KEMessage *))); + connect(mInput,TQ_SIGNAL(signalPrepareRemoteMove(KEMessage *)), + this,TQ_SLOT(slotPrepareRemoteMove(KEMessage *))); + connect(mInput,TQ_SIGNAL(signalPrepareInteractiveMove(KEMessage *)), + this,TQ_SLOT(slotPrepareInteractiveMove(KEMessage *))); + connect(mInput,TQ_SIGNAL(signalReceiveInput(KEMessage *, int)), + this,TQ_SLOT(slotReceiveInput(KEMessage *,int ))); setMinimumSize(640,480); setMaximumSize(800,600); @@ -158,26 +158,26 @@ void LSkatApp::initGUI() { TQStringList list; - (void)KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(slotFileNew()), actionCollection(), "new_game"); + (void)KStdAction::openNew(this, TQ_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 TDEAction(i18n("&End Game"),"process-stop", 0, TQT_TQOBJECT(this), TQT_SLOT(slotFileEnd()), + (void)new TDEAction(i18n("&End Game"),"process-stop", 0, this, TQ_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 TDEAction(i18n("&Clear Statistics"),"flag", 0, TQT_TQOBJECT(this), TQT_SLOT(slotFileStatistics()), + (void)new TDEAction(i18n("&Clear Statistics"),"flag", 0, this, TQ_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 TDEAction(i18n("Send &Message..."), CTRL+Key_M, TQT_TQOBJECT(this), TQT_SLOT(slotFileMessage()), + (void)new TDEAction(i18n("Send &Message..."), CTRL+Key_M, this, TQ_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(TQT_TQOBJECT(this), TQT_SLOT(slotFileQuit()), actionCollection(), "game_exit"); + (void)KStdAction::quit(this, TQ_SLOT(slotFileQuit()), actionCollection(), "game_exit"); ACTION("game_exit")->setStatusText(i18n("Exiting...")); ACTION("game_exit")->setWhatsThis(i18n("Quits the program.")); - (void)new TDESelectAction(i18n("Starting Player"),0,TQT_TQOBJECT(this),TQT_SLOT(slotStartplayer()), + (void)new TDESelectAction(i18n("Starting Player"),0,this,TQ_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")); ((TDESelectAction *)ACTION("startplayer"))->setItems(list); - (void)new TDESelectAction(i18n("Player &1 Played By"),0,TQT_TQOBJECT(this),TQT_SLOT(slotPlayer1By()), + (void)new TDESelectAction(i18n("Player &1 Played By"),0,this,TQ_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")); ((TDESelectAction *)ACTION("player1"))->setItems(list); - (void)new TDESelectAction(i18n("Player &2 Played By"),0,TQT_TQOBJECT(this),TQT_SLOT(slotPlayer2By()), + (void)new TDESelectAction(i18n("Player &2 Played By"),0,this,TQ_SLOT(slotPlayer2By()), actionCollection(), "player2"); ACTION("player1")->setStatusText(i18n("Changing who plays player 2...")); ACTION("player1")->setWhatsThis(i18n("Changing who plays player 2...")); ((TDESelectAction *)ACTION("player2"))->setItems(list); - (void)new TDESelectAction(i18n("&Level"),0,TQT_TQOBJECT(this),TQT_SLOT(slotLevel()), + (void)new TDESelectAction(i18n("&Level"),0,this,TQ_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,21 +211,21 @@ void LSkatApp::initGUI() list.append(i18n("&Hard")); ((TDESelectAction *)ACTION("choose_level"))->setItems(list); - (void)new TDEAction(i18n("Select &Card Deck..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotOptionsCardDeck()), + (void)new TDEAction(i18n("Select &Card Deck..."), 0, this, TQ_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 TDEAction(i18n("Change &Names..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotOptionsNames()), + (void)new TDEAction(i18n("Change &Names..."), 0, this, TQ_SLOT(slotOptionsNames()), actionCollection(), "change_names"); ACTION("change_names")->setStatusText(i18n("Configure player names...")); ACTION("change_names")->setWhatsThis(i18n("Configure player names...")); actionCollection()->setHighlightingEnabled(true); - connect(actionCollection(), TQT_SIGNAL(actionStatusText(const TQString &)), TQT_SLOT(slotStatusMsg(const TQString &))); - connect(actionCollection(), TQT_SIGNAL(clearStatusText()), TQT_SLOT(slotClearStatusMsg())); + connect(actionCollection(), TQ_SIGNAL(actionStatusText(const TQString &)), TQ_SLOT(slotStatusMsg(const TQString &))); + connect(actionCollection(), TQ_SIGNAL(clearStatusText()), TQ_SLOT(slotClearStatusMsg())); - KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()), + KStdAction::keyBindings(guiFactory(), TQ_SLOT(configureShortcuts()), actionCollection()); } @@ -243,7 +243,7 @@ void LSkatApp::initStatusBar() // computer move timer procTimer=new TQTimer(this); - connect(procTimer,TQT_SIGNAL(timeout()),TQT_TQOBJECT(this),TQT_SLOT(slotProcTimer())); + connect(procTimer,TQ_SIGNAL(timeout()),this,TQ_SLOT(slotProcTimer())); } void LSkatApp::initDocument() @@ -299,7 +299,7 @@ void LSkatApp::saveProperties(TDEConfig *_cfg) _cfg->writePathEntry("filename", filename); _cfg->writeEntry("modified", doc->isModified()); - TQString tempname = kapp->tempSaveName(filename); + TQString tempname = tdeApp->tempSaveName(filename); doc->saveDocument(tempname); } } @@ -312,7 +312,7 @@ void LSkatApp::readProperties(TDEConfig* _cfg) if(modified) { bool canRecover; - TQString tempname = kapp->checkRecoverFile(filename, canRecover); + TQString tempname = tdeApp->checkRecoverFile(filename, canRecover); if(canRecover) { @@ -332,7 +332,7 @@ void LSkatApp::readProperties(TDEConfig* _cfg) } } - //TQString caption=kapp->caption(); + //TQString caption=tdeApp->caption(); setCaption(i18n("Lieutenant Skat")); } @@ -349,7 +349,7 @@ bool LSkatApp::queryExit() } ///////////////////////////////////////////////////////////////////// -// TQT_SLOT IMPLEMENTATION +// SLOT IMPLEMENTATION ///////////////////////////////////////////////////////////////////// void LSkatApp::slotFileStatistics() @@ -728,7 +728,7 @@ bool LSkatApp::MakeInputDevice(int no) { if (mInput->QueryType(no)!=type) { - // TQString path=kapp->dirs()->findExe(doc->QueryProcessName()); + // TQString path=tdeApp->dirs()->findExe(doc->QueryProcessName()); TQString path=doc->GetProcess(); if (global_debug>5) { diff --git a/lskat/lskat/lskat.h b/lskat/lskat/lskat.h index 6571ce5d..1caa3107 100644 --- a/lskat/lskat/lskat.h +++ b/lskat/lskat/lskat.h @@ -68,7 +68,7 @@ class LSkatView; */ class LSkatApp : public TDEMainWindow { - Q_OBJECT + TQ_OBJECT friend class LSkatView; diff --git a/lskat/lskat/lskatdoc.h b/lskat/lskat/lskatdoc.h index 52e29af2..0446f210 100644 --- a/lskat/lskat/lskatdoc.h +++ b/lskat/lskat/lskatdoc.h @@ -46,7 +46,7 @@ class LSkatView; */ class LSkatDoc : public TQObject { - Q_OBJECT + TQ_OBJECT public: /** Constructor for the fileclass of the application */ diff --git a/lskat/lskat/lskatview.cpp b/lskat/lskat/lskatview.cpp index ce1c7ec0..f78967cd 100644 --- a/lskat/lskat/lskatview.cpp +++ b/lskat/lskat/lskatview.cpp @@ -119,13 +119,13 @@ LSkatView::LSkatView(TQWidget *parent, const char *name) : TQWidget(parent, name moveTimer=new TQTimer(this); moveTimer->stop(); - connect(moveTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(moveTimerReady())); + connect(moveTimer,TQ_SIGNAL(timeout()),this,TQ_SLOT(moveTimerReady())); introcnt=0; introTimer=new TQTimer(this); introTimer->stop(); - connect(introTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(introTimerReady())); - introTimer->start(75,FALSE); + connect(introTimer,TQ_SIGNAL(timeout()),this,TQ_SLOT(introTimerReady())); + introTimer->start(75,false); for (int i=0;i<NO_OF_CARDS;i++) { @@ -760,7 +760,7 @@ void LSkatView::paintEvent( TQPaintEvent * e) TQPixmap pm(this->rect().size()); TQPainter p; TQBrush brush; - p.begin(TQT_TQPAINTDEVICE(&pm),this); + p.begin(&pm,this); brush.setPixmap( getDocument()->mPixBackground ); p.fillRect(0,0,this->rect().width(),this->rect().height(),brush); drawIntro(&p); @@ -790,7 +790,7 @@ TQPoint LSkatView::calcCardPos(int x,int y) // mouse click event void LSkatView::mousePressEvent( TQMouseEvent *mouse ) { - if (mouse->button()!=Qt::LeftButton) return ; + if (mouse->button()!=TQt::LeftButton) return ; if (!getDocument()->IsRunning()) return ; if (getDocument()->GetMoveStatus()!=-1) return ; @@ -857,7 +857,7 @@ void LSkatView::InitMove(int player,int mx,int my) cardmovey=my+2*player; cardmoveunder=getDocument()->GetCard(player,mx+4*my,getDocument()->GetHeight(player,mx+4*my)); introTimer->stop(); - moveTimer->start(MOVE_TIMER_DELAY,FALSE); + moveTimer->start(MOVE_TIMER_DELAY,false); cardmovecnt=0; cardorigin=calcCardPos(mx,my+2*player); if (getDocument()->GetCurrentPlayer()==0) diff --git a/lskat/lskat/lskatview.h b/lskat/lskat/lskatview.h index 3a6b3571..112a1dca 100644 --- a/lskat/lskat/lskatview.h +++ b/lskat/lskat/lskatview.h @@ -38,7 +38,7 @@ class LSkatDoc; */ class LSkatView : public TQWidget { - Q_OBJECT + TQ_OBJECT public: /** Constructor for the main view */ diff --git a/lskat/lskat/msgdlg.cpp b/lskat/lskat/msgdlg.cpp index c59109d3..fa9692cc 100644 --- a/lskat/lskat/msgdlg.cpp +++ b/lskat/lskat/msgdlg.cpp @@ -38,7 +38,7 @@ // Create the dialog for changing the player names MsgDlg::MsgDlg( TQWidget *parent, const char *name,const char * /*sufi */ ) - : TQDialog( parent, name,TRUE ) + : TQDialog( parent, name,true ) { setCaption(i18n("Send Message to Remote Player")); setMinimumSize(400,160); @@ -57,13 +57,13 @@ MsgDlg::MsgDlg( TQWidget *parent, const char *name,const char * /*sufi */ ) TQPushButton *PushButton; PushButton = new TQPushButton( i18n("Send" ), this, "PushButton_1" ); PushButton->setGeometry( 20, 120, 65, 30 ); - connect( PushButton, TQT_SIGNAL(clicked()), TQT_SLOT(accept()) ); - PushButton->setAutoRepeat( FALSE ); + connect( PushButton, TQ_SIGNAL(clicked()), TQ_SLOT(accept()) ); + PushButton->setAutoRepeat( false ); PushButton = new KPushButton( KStdGuiItem::cancel(), this, "PushButton_2" ); PushButton->setGeometry( 305, 120, 65, 30 ); - connect( PushButton, TQT_SIGNAL(clicked()), TQT_SLOT(reject()) ); - PushButton->setAutoRepeat( FALSE ); + connect( PushButton, TQ_SIGNAL(clicked()), TQ_SLOT(reject()) ); + PushButton->setAutoRepeat( false ); } TQString MsgDlg::GetMsg() diff --git a/lskat/lskat/msgdlg.h b/lskat/lskat/msgdlg.h index 51a57134..9c1e0440 100644 --- a/lskat/lskat/msgdlg.h +++ b/lskat/lskat/msgdlg.h @@ -22,7 +22,7 @@ class MsgDlg : public TQDialog { - Q_OBJECT + TQ_OBJECT public: diff --git a/lskat/lskat/namedlg.cpp b/lskat/lskat/namedlg.cpp index 3bd0cca6..1f9ae93f 100644 --- a/lskat/lskat/namedlg.cpp +++ b/lskat/lskat/namedlg.cpp @@ -23,7 +23,7 @@ * 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. + * true to construct a modal dialog. */ NameDlg::NameDlg( TQWidget *parent, const char *name,bool /* modal */, WFlags /* fl */ ) : KDialogBase( Plain, i18n("Configure Names"), Ok|Cancel, Ok, @@ -44,7 +44,7 @@ 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->setColumnLayout(0, TQt::Vertical ); player_names->layout()->setSpacing( 0 ); player_names->layout()->setMargin( 0 ); vbox_2 = new TQVBoxLayout( player_names->layout() ); diff --git a/lskat/lskat/namedlg.h b/lskat/lskat/namedlg.h index c6cc18d1..4aff2fde 100644 --- a/lskat/lskat/namedlg.h +++ b/lskat/lskat/namedlg.h @@ -20,11 +20,11 @@ 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* parent = 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 e23e50fe..6e0b003e 100644 --- a/lskat/lskat/networkdlg.cpp +++ b/lskat/lskat/networkdlg.cpp @@ -26,10 +26,10 @@ extern const char* LSKAT_SERVICE; // Create the dialog NetworkDlg::NetworkDlg( TQWidget *parent, const char *name ) - : NetworkDlgBase( parent, name, TRUE ) + : NetworkDlgBase( parent, name, true ) { browser = new DNSSD::ServiceBrowser(TQString::fromLatin1(LSKAT_SERVICE)); - connect(browser,TQT_SIGNAL(finished()),TQT_SLOT(gamesFound())); + connect(browser,TQ_SIGNAL(finished()),TQ_SLOT(gamesFound())); browser->startBrowse(); } diff --git a/lskat/lskat/networkdlg.h b/lskat/lskat/networkdlg.h index 7cd7ca9a..7fb07215 100644 --- a/lskat/lskat/networkdlg.h +++ b/lskat/lskat/networkdlg.h @@ -24,7 +24,7 @@ class NetworkDlg : public NetworkDlgBase { - Q_OBJECT + TQ_OBJECT public: diff --git a/lskat/lskat/networkdlgbase.ui b/lskat/lskat/networkdlgbase.ui index d064c13b..23f63a8e 100644 --- a/lskat/lskat/networkdlgbase.ui +++ b/lskat/lskat/networkdlgbase.ui @@ -298,9 +298,9 @@ <slot>toggleServerClient()</slot> </connection> </connections> -<Q_SLOTS> +<slots> <slot access="protected">toggleServerClient()</slot> <slot access="protected">gameSelected(int nr)</slot> -</Q_SLOTS> +</slots> <layoutdefaults spacing="6" margin="11"/> </UI> diff --git a/lskat/lskatproc/KChildConnect.h b/lskat/lskatproc/KChildConnect.h index a067d9f3..0c969dad 100644 --- a/lskat/lskatproc/KChildConnect.h +++ b/lskat/lskatproc/KChildConnect.h @@ -16,7 +16,7 @@ class KChildConnect: public TQObject { - Q_OBJECT + TQ_OBJECT protected: diff --git a/lskat/lskatproc/KInputChildProcess.cpp b/lskat/lskatproc/KInputChildProcess.cpp index 13e00b93..24fca968 100644 --- a/lskat/lskatproc/KInputChildProcess.cpp +++ b/lskat/lskatproc/KInputChildProcess.cpp @@ -36,8 +36,8 @@ bool KInputChildProcess::exec() childConnect=new KChildConnect; if (!childConnect) return false; - connect(childConnect,TQT_SIGNAL(signalReceiveMsg(KEMessage *,int)), - this,TQT_SLOT(slotReceiveMsg(KEMessage *,int))); + connect(childConnect,TQ_SIGNAL(signalReceiveMsg(KEMessage *,int)), + this,TQ_SLOT(slotReceiveMsg(KEMessage *,int))); do { // Wait for input diff --git a/lskat/lskatproc/KInputChildProcess.h b/lskat/lskatproc/KInputChildProcess.h index 60ea185b..f1876f47 100644 --- a/lskat/lskatproc/KInputChildProcess.h +++ b/lskat/lskatproc/KInputChildProcess.h @@ -24,7 +24,7 @@ class KInputChildProcess : public TQObject { - Q_OBJECT + TQ_OBJECT private: |