diff options
Diffstat (limited to 'kopete/protocols/irc/libkirc/kircengine.h')
-rw-r--r-- | kopete/protocols/irc/libkirc/kircengine.h | 71 |
1 files changed, 36 insertions, 35 deletions
diff --git a/kopete/protocols/irc/libkirc/kircengine.h b/kopete/protocols/irc/libkirc/kircengine.h index c39bbe6e..e086afc1 100644 --- a/kopete/protocols/irc/libkirc/kircengine.h +++ b/kopete/protocols/irc/libkirc/kircengine.h @@ -51,27 +51,28 @@ namespace KIRC * @author Jason Keirstead <[email protected]> */ class Engine - : public QObject + : public TQObject { Q_OBJECT + TQ_OBJECT -// Q_PROPERTY(TQUrl serverURL READ serverURL WRITE setServerURL) +// TQ_PROPERTY(TQUrl serverURL READ serverURL WRITE setServerURL) // Extracted from the base of the serverURL. -// Q_PROPERTY(bool useSSL); -// Q_PROPERTY(TQString user READ user); -// Q_PROPERTY(TQString password); -// Q_PROPERTY(TQString host READ host); -// Q_PROPERTY(int port READ host); +// TQ_PROPERTY(bool useSSL); +// TQ_PROPERTY(TQString user READ user); +// TQ_PROPERTY(TQString password); +// TQ_PROPERTY(TQString host READ host); +// TQ_PROPERTY(int port READ host); // Extracted from the query of the serverURL. -// Q_PROPERTY(bool reqsPasswd); -// Q_PROPERTY(TQString name); // real name -// Q_PROPERTY(TQStringList nickList READ nickList WRITE setNickList) -// Q_PROPERTY(TQString nick READ nick) -// Q_PROPERTY(TQStringList portList) +// TQ_PROPERTY(bool reqsPasswd); +// TQ_PROPERTY(TQString name); // real name +// TQ_PROPERTY(TQStringList nickList READ nickList WRITE setNickList) +// TQ_PROPERTY(TQString nick READ nick) +// TQ_PROPERTY(TQStringList portList) - Q_ENUMS(Status) + Q_ENUMS(tqStatus) public: enum Error @@ -83,7 +84,7 @@ public: MethodFailed }; - enum Status + enum tqStatus { Idle, Connecting, @@ -105,7 +106,7 @@ public: MessageOfTheDayCondensedMessage }; - Engine( TQObject *parent = 0, const char* name = 0 ); + Engine( TQObject *tqparent = 0, const char* name = 0 ); ~Engine(); // TQString nick() const; @@ -118,7 +119,7 @@ public: inline const TQString ¤tHost() const { return m_Host; }; - inline Q_UINT16 currentPort() + inline TQ_UINT16 currentPort() { return m_Port; } inline const TQString &nickName() const @@ -159,12 +160,12 @@ public: void setVersionString(const TQString &versionString); void setUserString(const TQString &userString); void setSourceString(const TQString &sourceString); - void connectToServer(const TQString &host, Q_UINT16 port, const TQString &nickname, bool useSSL = false); + void connectToServer(const TQString &host, TQ_UINT16 port, const TQString &nickname, bool useSSL = false); KExtendedSocket *socket() { return m_sock; }; - inline KIRC::Engine::Status status() const + inline KIRC::Engine::tqStatus status() const { return m_status; } inline bool isDisconnected() const @@ -174,7 +175,7 @@ public: { return m_status == Connected; } inline void setCodec( const TQString &nick, const TQTextCodec *codec ) - { codecs.replace( nick, codec ); } + { codecs.tqreplace( nick, codec ); } /* Custom CTCP replies handling */ inline TQString &customCtcp( const TQString &s ) @@ -191,16 +192,16 @@ public slots: void writeMessage(const TQString &message, const TQTextCodec *codec = 0 ); void writeMessage(const TQString &command, const TQStringList &args, - const TQString &suffix = TQString::null, const TQTextCodec *codec = 0); + const TQString &suffix = TQString(), const TQTextCodec *codec = 0); void writeCtcpMessage(const TQString &command, const TQString &to, const TQString &ctcpMessage); void writeCtcpMessage(const TQString &command, const TQString &to, const TQString &suffix, - const TQString &ctcpCommand, const TQStringList &ctcpArgs, const TQString &ctcpSuffix = TQString::null, + const TQString &ctcpCommand, const TQStringList &ctcpArgs, const TQString &ctcpSuffix = TQString(), bool emitRepliedCtcp = true); inline void writeCtcpQueryMessage(const TQString &to, const TQString &suffix, - const TQString &ctcpCommand, const TQStringList &ctcpArgs = TQStringList(), const TQString &ctcpSuffix = TQString::null, + const TQString &ctcpCommand, const TQStringList &ctcpArgs = TQStringList(), const TQString &ctcpSuffix = TQString(), bool emitRepliedCtcp = true) { return writeCtcpMessage("PRIVMSG", to, suffix, ctcpCommand, ctcpArgs, ctcpSuffix, emitRepliedCtcp); } @@ -208,42 +209,42 @@ public slots: { writeCtcpMessage("NOTICE", to, ctcpMessage); } inline void writeCtcpReplyMessage(const TQString &to, const TQString &suffix, - const TQString &ctcpCommand, const TQStringList &ctcpArgs = TQStringList(), const TQString &ctcpSuffix = TQString::null, + const TQString &ctcpCommand, const TQStringList &ctcpArgs = TQStringList(), const TQString &ctcpSuffix = TQString(), bool emitRepliedCtcp = true) { return writeCtcpMessage("NOTICE", to, suffix, ctcpCommand, ctcpArgs, ctcpSuffix, emitRepliedCtcp); } inline void writeCtcpErrorMessage(const TQString &to, const TQString &ctcpLine, const TQString &errorMsg, bool emitRepliedCtcp=true) - { return writeCtcpReplyMessage(to, TQString::null, "ERRMSG", ctcpLine, errorMsg, emitRepliedCtcp); } + { return writeCtcpReplyMessage(to, TQString(), "ERRMSG", ctcpLine, errorMsg, emitRepliedCtcp); } bool bind(const TQString &command, TQObject *object, const char *member, int minArgs = KIRC::MessageRedirector::Unknown, int maxArgs = KIRC::MessageRedirector::Unknown, - const TQString &helpMessage = TQString::null); + const TQString &helpMessage = TQString()); bool bind(int id, TQObject *object, const char *member, int minArgs = KIRC::MessageRedirector::Unknown, int maxArgs = KIRC::MessageRedirector::Unknown, - const TQString &helpMessage = TQString::null); + const TQString &helpMessage = TQString()); bool bindCtcpQuery(const TQString &command, TQObject *object, const char *member, int minArgs = KIRC::MessageRedirector::Unknown, int maxArgs = KIRC::MessageRedirector::Unknown, - const TQString &helpMessage = TQString::null); + const TQString &helpMessage = TQString()); bool bindCtcpReply(const TQString &command, TQObject *object, const char *member, int minArgs = KIRC::MessageRedirector::Unknown, int maxArgs = KIRC::MessageRedirector::Unknown, - const TQString &helpMessage = TQString::null); + const TQString &helpMessage = TQString()); - void away(bool isAway, const TQString &awayMessage = TQString::null); + void away(bool isAway, const TQString &awayMessage = TQString()); void ison(const TQStringList &nickList); void join(const TQString &name, const TQString &key); void kick(const TQString &user, const TQString &channel, const TQString &reason); void list(); void mode(const TQString &target, const TQString &mode); - void motd(const TQString &server = TQString::null); + void motd(const TQString &server = TQString()); void nick(const TQString &newNickname); void notice(const TQString &target, const TQString &message); void part(const TQString &name, const TQString &reason); @@ -259,7 +260,7 @@ public slots: void topic(const TQString &channel, const TQString &topic); void user(const TQString &newUsername, const TQString &hostname, const TQString &newRealname); - void user(const TQString &newUsername, Q_UINT8 mode, const TQString &newRealname); + void user(const TQString &newUsername, TQ_UINT8 mode, const TQString &newRealname); void whois(const TQString &user); @@ -274,7 +275,7 @@ public slots: void showInfoDialog(); signals: - void statusChanged(KIRC::Engine::Status newStatus); + void statusChanged(KIRC::Engine::tqStatus newtqStatus); void internalError(KIRC::Engine::Error, KIRC::Message &); void receivedMessage(KIRC::Message &); @@ -478,7 +479,7 @@ private: void bindNumericReplies(); void bindCtcp(); - void setStatus(KIRC::Engine::Status status); + void settqStatus(KIRC::Engine::tqStatus status); bool invokeCtcpCommandOfMessage(const TQDict<KIRC::MessageRedirector> &map, KIRC::Message &message); /* @@ -492,9 +493,9 @@ private: //Static regexes static const TQRegExp m_RemoveLinefeeds; - KIRC::Engine::Status m_status; + KIRC::Engine::tqStatus m_status; TQString m_Host; - Q_UINT16 m_Port; + TQ_UINT16 m_Port; // TQUrl serverURL; // TQUrl currentServerURL; |