equal
deleted
inserted
replaced
37 class HWNewNet : public QObject |
37 class HWNewNet : public QObject |
38 { |
38 { |
39 Q_OBJECT |
39 Q_OBJECT |
40 |
40 |
41 public: |
41 public: |
42 HWNewNet(GameUIConfig * config, GameCFGWidget* pGameCFGWidget, TeamSelWidget* pTeamSelWidget); |
42 HWNewNet(); |
43 ~HWNewNet(); |
43 ~HWNewNet(); |
44 void Connect(const QString & hostName, quint16 port, const QString & nick); |
44 void Connect(const QString & hostName, quint16 port, const QString & nick); |
45 void Disconnect(); |
45 void Disconnect(); |
|
46 void SendPasswordHash(const QString & hash); |
|
47 void NewNick(const QString & nick); |
46 bool isRoomChief(); |
48 bool isRoomChief(); |
47 bool isInRoom(); |
49 bool isInRoom(); |
48 int getClientState(); |
50 int getClientState(); |
49 QString getNick(); |
51 QString getNick(); |
50 QString getRoom(); |
52 QString getRoom(); |
51 QString getHost(); |
53 QString getHost(); |
52 |
54 |
53 private: |
55 private: |
54 GameUIConfig* config; |
|
55 GameCFGWidget* m_pGameCFGWidget; |
|
56 TeamSelWidget* m_pTeamSelWidget; |
|
57 |
|
58 bool isChief; |
56 bool isChief; |
59 QString mynick; |
57 QString mynick; |
60 QString myroom; |
58 QString myroom; |
61 QString myhost; |
59 QString myhost; |
62 QTcpSocket NetSocket; |
60 QTcpSocket NetSocket; |
93 int netClientState; |
91 int netClientState; |
94 |
92 |
95 signals: |
93 signals: |
96 void AskForRunGame(); |
94 void AskForRunGame(); |
97 void Connected(); |
95 void Connected(); |
98 void Disconnected(); |
96 void Disconnected(const QString & reason); |
|
97 void Error(const QString & errmsg); |
|
98 void Warning(const QString & wrnmsg); |
|
99 void AskForPassword(const QString & nick); |
|
100 void NickTaken(const QString & nick); |
|
101 void AuthFailed(); |
99 void EnteredGame(); |
102 void EnteredGame(); |
100 void LeftRoom(); |
103 void LeftRoom(const QString & reason); |
101 void nickAdded(const QString& nick, bool notifyNick); |
104 void nickAdded(const QString& nick, bool notifyNick); |
102 void nickRemoved(const QString& nick); |
105 void nickRemoved(const QString& nick); |
103 void nickAddedLobby(const QString& nick, bool notifyNick); |
106 void nickAddedLobby(const QString& nick, bool notifyNick); |
104 void nickRemovedLobby(const QString& nick); |
107 void nickRemovedLobby(const QString& nick); |
105 void FromNet(const QByteArray & buf); |
108 void FromNet(const QByteArray & buf); |
108 |
111 |
109 void netSchemeConfig(QStringList &); |
112 void netSchemeConfig(QStringList &); |
110 void paramChanged(const QString & param, const QStringList & value); |
113 void paramChanged(const QString & param, const QStringList & value); |
111 void configAsked(); |
114 void configAsked(); |
112 |
115 |
|
116 void TeamAccepted(const QString&); |
113 void AddNetTeam(const HWTeam&); |
117 void AddNetTeam(const HWTeam&); |
|
118 void RemoveNetTeam(const HWTeam&); |
114 void hhnumChanged(const HWTeam&); |
119 void hhnumChanged(const HWTeam&); |
115 void teamColorChanged(const HWTeam&); |
120 void teamColorChanged(const HWTeam&); |
116 void chatStringLobby(const QString&); |
121 void chatStringLobby(const QString&); |
117 void chatStringLobby(const QString&, const QString&); |
122 void chatStringLobby(const QString&, const QString&); |
118 void chatStringFromNet(const QString&); |
123 void chatStringFromNet(const QString&); |
125 void serverMessageOld(const QString &); |
130 void serverMessageOld(const QString &); |
126 void latestProtocolVar(int); |
131 void latestProtocolVar(int); |
127 |
132 |
128 void setReadyStatus(const QString & nick, bool isReady); |
133 void setReadyStatus(const QString & nick, bool isReady); |
129 void setMyReadyStatus(bool isReady); |
134 void setMyReadyStatus(bool isReady); |
130 void showMessage(const QString &); |
|
131 |
135 |
132 public slots: |
136 public slots: |
133 void ToggleReady(); |
137 void ToggleReady(); |
134 void chatLineToNet(const QString& str); |
138 void chatLineToNet(const QString& str); |
135 void chatLineToLobby(const QString& str); |
139 void chatLineToLobby(const QString& str); |