Merge branch 'master' of https://github.com/pokerth/pokerth.git
Conflicts: ts/pokerth_gd.ts
This commit is contained in:
@@ -1,3 +1,28 @@
|
||||
2013-12-01 version 1.1 beta4
|
||||
- Updated several translations
|
||||
- New icon for spectator list on table (#217)
|
||||
- Display the number of spectators next to the spectator icon (#206)
|
||||
- BUGFIX: Correct sound is now played when joining a game (#230)
|
||||
- BUGFIX: No longer beep if ignored player uses nickname in chat (#221)
|
||||
|
||||
2013-11-02 version 1.1 beta3
|
||||
- New option to allow/disallow spectators when creating a game (#215)
|
||||
|
||||
2013-10-12 version 1.1 beta2
|
||||
- BUGFIX: Now you are able to click the menu buttons during a local game again (#203)
|
||||
- BUGFIX: Idle players are shown correctly if they join YOUR game (#198)
|
||||
- Updating websocket++ to latest github release (0.3 alpha4)
|
||||
|
||||
2013-10-06 version 1.1 beta1
|
||||
- New web-based spectator mode on http://www.pokerth.net/live (#37)
|
||||
- Show list of spectators in the lobby and on the game table (#196)
|
||||
- Support for WebSocket connections was integrated in the server
|
||||
- Added option to disable emoticons in the chat (#172)
|
||||
- Avatars are no longer displayed for players which are on the ignore list (#187)
|
||||
- BUGFIX: context menu in connected player list was fixed (#183)
|
||||
- BUGFIX: "display idle players" in the lobby was fixed (#136)
|
||||
- translation updates
|
||||
|
||||
2013-04-07 version 1.0.1
|
||||
- New Galician (gl) translation
|
||||
- Client settings dialog option for connecting to a private, password protected server (#178)
|
||||
|
||||
+19
-19
@@ -13,32 +13,31 @@ OBJECTS_DIR = obj
|
||||
TEMPLATE = app
|
||||
INCLUDEPATH += src/ \
|
||||
src/chatcleaner/ \
|
||||
src/third_party/asn1/ \
|
||||
src/net/
|
||||
DEPENDPATH += src/ \
|
||||
src/chatcleaner/ \
|
||||
src/third_party/asn1/ \
|
||||
src/net/
|
||||
SOURCES += chatcleaner.cpp \
|
||||
cleanerserver.cpp \
|
||||
messagefilter.cpp \
|
||||
badwordcheck.cpp \
|
||||
textfloodcheck.cpp \
|
||||
cleanerconfig.cpp \
|
||||
capsfloodcheck.cpp \
|
||||
letterrepeatingcheck.cpp \
|
||||
urlcheck.cpp
|
||||
HEADERS += cleanerserver.h \
|
||||
messagefilter.h \
|
||||
badwordcheck.h \
|
||||
textfloodcheck.h \
|
||||
cleanerconfig.h \
|
||||
capsfloodcheck.h \
|
||||
letterrepeatingcheck.h \
|
||||
urlcheck.h
|
||||
SOURCES += src/chatcleaner/chatcleaner.cpp \
|
||||
src/chatcleaner/cleanerserver.cpp \
|
||||
src/chatcleaner/messagefilter.cpp \
|
||||
src/chatcleaner/badwordcheck.cpp \
|
||||
src/chatcleaner/textfloodcheck.cpp \
|
||||
src/chatcleaner/cleanerconfig.cpp \
|
||||
src/chatcleaner/capsfloodcheck.cpp \
|
||||
src/chatcleaner/letterrepeatingcheck.cpp \
|
||||
src/chatcleaner/urlcheck.cpp
|
||||
HEADERS += src/chatcleaner/cleanerserver.h \
|
||||
src/chatcleaner/messagefilter.h \
|
||||
src/chatcleaner/badwordcheck.h \
|
||||
src/chatcleaner/textfloodcheck.h \
|
||||
src/chatcleaner/cleanerconfig.h \
|
||||
src/chatcleaner/capsfloodcheck.h \
|
||||
src/chatcleaner/letterrepeatingcheck.h \
|
||||
src/chatcleaner/urlcheck.h
|
||||
LIBPATH += lib
|
||||
LIBS += -lpokerth_lib \
|
||||
-lpokerth_protocol \
|
||||
-lprotobuf \
|
||||
-ltinyxml
|
||||
|
||||
win32 {
|
||||
@@ -61,4 +60,5 @@ mac {
|
||||
QMAKE_CXXFLAGS -= -std=gnu++0x
|
||||
LIBPATH += /Developer/SDKs/MacOSX10.5.sdk/usr/lib
|
||||
INCLUDEPATH += /Developer/SDKs/MacOSX10.6.sdk/usr/include/
|
||||
INCLUDEPATH += /usr/local/include
|
||||
}
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
/*****************************************************************************
|
||||
* PokerTH - The open source texas holdem engine *
|
||||
* Copyright (C) 2006-2013 Felix Hammer, Florian Thauer, Lothar May *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Affero General Public License as *
|
||||
* published by the Free Software Foundation, either version 3 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Affero General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Affero General Public License *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
* *
|
||||
* *
|
||||
* Additional permission under GNU AGPL version 3 section 7 *
|
||||
* *
|
||||
* If you modify this program, or any covered work, by linking or *
|
||||
* combining it with the OpenSSL project's OpenSSL library (or a *
|
||||
* modified version of that library), containing parts covered by the *
|
||||
* terms of the OpenSSL or SSLeay licenses, the authors of PokerTH *
|
||||
* (Felix Hammer, Florian Thauer, Lothar May) grant you additional *
|
||||
* permission to convey the resulting work. *
|
||||
* Corresponding Source for a non-source form of such a combination *
|
||||
* shall include the source code for the parts of OpenSSL used as well *
|
||||
* as that of the covered work. *
|
||||
*****************************************************************************/
|
||||
|
||||
option java_package = "de.chatcleaner.protocol";
|
||||
option java_outer_classname = "ProtoBuf";
|
||||
option optimize_for = LITE_RUNTIME;
|
||||
|
||||
message CleanerInitMessage {
|
||||
required uint32 requestedVersion = 1;
|
||||
required string clientSecret = 2;
|
||||
}
|
||||
|
||||
message CleanerInitAckMessage {
|
||||
required uint32 serverVersion = 1;
|
||||
required string serverSecret = 2;
|
||||
}
|
||||
|
||||
enum CleanerChatType {
|
||||
cleanerChatTypeLobby = 0;
|
||||
cleanerChatTypeGame = 1;
|
||||
}
|
||||
|
||||
message CleanerChatRequestMessage {
|
||||
required uint32 requestId = 1;
|
||||
required CleanerChatType cleanerChatType = 2;
|
||||
optional uint32 gameId = 3 [default = 0];
|
||||
required uint32 playerId = 4;
|
||||
required string playerName = 5;
|
||||
required string chatMessage = 6;
|
||||
}
|
||||
|
||||
message CleanerChatReplyMessage {
|
||||
required uint32 requestId = 1;
|
||||
required CleanerChatType cleanerChatType = 2;
|
||||
optional uint32 gameId = 3 [default = 0];
|
||||
required uint32 playerId = 4;
|
||||
enum CleanerActionType {
|
||||
cleanerActionNone = 0;
|
||||
cleanerActionWarning = 1;
|
||||
cleanerActionKick = 2;
|
||||
cleanerActionBan = 3;
|
||||
cleanerActionMute = 4;
|
||||
}
|
||||
required CleanerActionType cleanerActionType = 5;
|
||||
optional string cleanerText = 6 [default = ""];
|
||||
}
|
||||
|
||||
// The main message type (it is prefixed by 4 bytes length of the message).
|
||||
|
||||
message ChatCleanerMessage {
|
||||
enum ChatCleanerMessageType {
|
||||
Type_CleanerInitMessage = 1;
|
||||
Type_CleanerInitAckMessage = 2;
|
||||
Type_CleanerChatRequestMessage = 3;
|
||||
Type_CleanerChatReplyMessage = 4;
|
||||
}
|
||||
required ChatCleanerMessageType messageType = 1;
|
||||
|
||||
optional CleanerInitMessage cleanerInitMessage = 2;
|
||||
optional CleanerInitAckMessage cleanerInitAckMessage = 3;
|
||||
optional CleanerChatRequestMessage cleanerChatRequestMessage = 4;
|
||||
optional CleanerChatReplyMessage cleanerChatReplyMessage = 5;
|
||||
}
|
||||
+2
-2
@@ -41,13 +41,13 @@ unix : !mac {
|
||||
|
||||
QMAKE_LIBDIR += lib $${PREFIX}/lib /opt/gsasl/lib
|
||||
INCLUDEPATH += $${PREFIX}/include
|
||||
LIB_DIRS = $${PREFIX}/lib $${PREFIX}/lib64
|
||||
LIB_DIRS = $${PREFIX}/lib $${PREFIX}/lib64 $$system(qmake -query QT_INSTALL_LIBS)
|
||||
BOOST_PROGRAM_OPTIONS = boost_program_options boost_program_options-mt
|
||||
BOOST_SYS = boost_system boost_system-mt
|
||||
|
||||
|
||||
#
|
||||
# searching in $PREFIX/lib and $PREFIX/lib64
|
||||
# searching in $PREFIX/lib, $PREFIX/lib64 and $$system(qmake -query QT_INSTALL_LIBS)
|
||||
# to override the default '/usr' pass PREFIX
|
||||
# variable to qmake.
|
||||
#
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,40 @@
|
||||
Qt
|
||||
http://qt-project.org/doc/qt-5.0/qtdoc/opensourcelicense.html
|
||||
http://qt-project.org/doc/qt-5.0/qtdoc/3rdparty.html
|
||||
|
||||
Boost
|
||||
http://www.boost.org/users/license.html
|
||||
|
||||
libprotobuf
|
||||
http://code.google.com/p/protobuf/
|
||||
|
||||
websocket++
|
||||
https://github.com/zaphoyd/websocketpp/blob/master/COPYING
|
||||
|
||||
libcurl
|
||||
http://curl.haxx.se/docs/copyright.html
|
||||
|
||||
libgsasl
|
||||
http://www.gnu.org/software/gsasl/
|
||||
|
||||
tinyxml
|
||||
http://www.grinninglizard.com/tinyxmldocs/
|
||||
|
||||
OpenSSL
|
||||
http://www.openssl.org/source/license.html
|
||||
|
||||
libgcrypt
|
||||
http://www.gnupg.org/
|
||||
|
||||
SDL
|
||||
http://www.libsdl.org/license.php
|
||||
|
||||
SDL_mixer
|
||||
http://www.libsdl.org/projects/SDL_mixer/
|
||||
|
||||
sqlite3
|
||||
http://www.sqlite.org/copyright.html
|
||||
|
||||
Due to dependencies of these libs, PokerTH may link to additional libs not listed here. If you think acknowledgement for a certain lib is missing, please contact us.
|
||||
|
||||
This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/)
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -12,7 +12,7 @@ on your Linux system.
|
||||
|
||||
3. Within /opt/mingw, run
|
||||
make gcc
|
||||
make qt
|
||||
make qt5
|
||||
make boost
|
||||
make curl
|
||||
make libgsasl
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
/*****************************************************************************
|
||||
* PokerTH - The open source texas holdem engine *
|
||||
* Copyright (C) 2006-2011 Felix Hammer, Florian Thauer, Lothar May *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Affero General Public License as *
|
||||
* published by the Free Software Foundation, either version 3 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Affero General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Affero General Public License *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
*****************************************************************************/
|
||||
|
||||
CHATCLEANER-PROTOCOL DEFINITIONS
|
||||
IMPLICIT TAGS
|
||||
EXTENSIBILITY IMPLIED ::=
|
||||
|
||||
BEGIN
|
||||
|
||||
ChatCleanerMessage ::= CHOICE {
|
||||
cleanerInitMessage CleanerInitMessage,
|
||||
cleanerInitAckMessage CleanerInitAckMessage,
|
||||
cleanerChatRequestMessage CleanerChatRequestMessage,
|
||||
cleanerChatReplyMessage CleanerChatReplyMessage
|
||||
}
|
||||
|
||||
CleanerInitMessage ::= [APPLICATION 0] SEQUENCE {
|
||||
requestedVersion INTEGER(0..65535),
|
||||
clientSecret UTF8String (SIZE(1..32))
|
||||
}
|
||||
|
||||
CleanerInitAckMessage ::= [APPLICATION 1] SEQUENCE {
|
||||
serverVersion INTEGER(0..65535),
|
||||
serverSecret UTF8String (SIZE(1..32))
|
||||
}
|
||||
|
||||
CleanerChatType ::= CHOICE {
|
||||
cleanerChatTypeLobby [0] CleanerChatTypeLobby,
|
||||
cleanerChatTypeGame [1] CleanerChatTypeGame
|
||||
}
|
||||
|
||||
CleanerChatTypeLobby ::= SEQUENCE {
|
||||
}
|
||||
|
||||
CleanerChatTypeGame ::= SEQUENCE {
|
||||
gameId INTEGER(1..4294967295)
|
||||
}
|
||||
|
||||
CleanerChatRequestMessage ::= [APPLICATION 2] SEQUENCE {
|
||||
requestId INTEGER(1..4294967295),
|
||||
cleanerChatType CleanerChatType,
|
||||
playerId INTEGER(1..4294967295),
|
||||
playerName UTF8String (SIZE(1..32)),
|
||||
chatMessage UTF8String (SIZE(1..128))
|
||||
}
|
||||
|
||||
CleanerChatReplyMessage ::= [APPLICATION 3] SEQUENCE {
|
||||
requestId INTEGER(1..4294967295),
|
||||
cleanerChatType CleanerChatType,
|
||||
playerId INTEGER(1..4294967295),
|
||||
cleanerActionType ENUMERATED {
|
||||
cleanerActionNone (0),
|
||||
cleanerActionWarning (1),
|
||||
cleanerActionKick (2),
|
||||
cleanerActionBan (3),
|
||||
cleanerActionMute (4)
|
||||
},
|
||||
cleanerText UTF8String (SIZE(1..128)) OPTIONAL
|
||||
}
|
||||
|
||||
END
|
||||
@@ -1,848 +0,0 @@
|
||||
/*****************************************************************************
|
||||
* PokerTH - The open source texas holdem engine *
|
||||
* Copyright (C) 2006-2011 Felix Hammer, Florian Thauer, Lothar May *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Affero General Public License as *
|
||||
* published by the Free Software Foundation, either version 3 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Affero General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Affero General Public License *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
*****************************************************************************/
|
||||
|
||||
/* This file is now deprecated! google protocol buffers are used instead.
|
||||
* Please refer to pokerth.proto. */
|
||||
|
||||
POKERTH-PROTOCOL DEFINITIONS
|
||||
IMPLICIT TAGS
|
||||
EXTENSIBILITY IMPLIED ::=
|
||||
|
||||
BEGIN
|
||||
|
||||
PokerTHMessage ::= CHOICE {
|
||||
announceMessage AnnounceMessage,
|
||||
initMessage InitMessage,
|
||||
authMessage AuthMessage,
|
||||
initAckMessage InitAckMessage,
|
||||
avatarRequestMessage AvatarRequestMessage,
|
||||
avatarReplyMessage AvatarReplyMessage,
|
||||
playerListMessage PlayerListMessage,
|
||||
gameListMessage GameListMessage,
|
||||
playerInfoRequestMessage PlayerInfoRequestMessage,
|
||||
playerInfoReplyMessage PlayerInfoReplyMessage,
|
||||
subscriptionRequestMessage SubscriptionRequestMessage,
|
||||
joinGameRequestMessage JoinGameRequestMessage,
|
||||
joinGameReplyMessage JoinGameReplyMessage,
|
||||
gamePlayerMessage GamePlayerMessage,
|
||||
kickPlayerRequestMessage KickPlayerRequestMessage,
|
||||
leaveGameRequestMessage LeaveGameRequestMessage,
|
||||
invitePlayerToGameMessage InvitePlayerToGameMessage,
|
||||
inviteNotifyMessage InviteNotifyMessage,
|
||||
rejectGameInvitationMessage RejectGameInvitationMessage,
|
||||
rejectInvNotifyMessage RejectInvNotifyMessage,
|
||||
startEventMessage StartEventMessage,
|
||||
startEventAckMessage StartEventAckMessage,
|
||||
gameStartMessage GameStartMessage,
|
||||
handStartMessage HandStartMessage,
|
||||
playersTurnMessage PlayersTurnMessage,
|
||||
myActionRequestMessage MyActionRequestMessage,
|
||||
yourActionRejectedMessage YourActionRejectedMessage,
|
||||
playersActionDoneMessage PlayersActionDoneMessage,
|
||||
dealFlopCardsMessage DealFlopCardsMessage,
|
||||
dealTurnCardMessage DealTurnCardMessage,
|
||||
dealRiverCardMessage DealRiverCardMessage,
|
||||
allInShowCardsMessage AllInShowCardsMessage,
|
||||
endOfHandMessage EndOfHandMessage,
|
||||
showMyCardsRequestMessage ShowMyCardsRequestMessage,
|
||||
afterHandShowCardsMessage AfterHandShowCardsMessage,
|
||||
endOfGameMessage EndOfGameMessage,
|
||||
playerIdChangedMessage PlayerIdChangedMessage,
|
||||
askKickPlayerMessage AskKickPlayerMessage,
|
||||
askKickDeniedMessage AskKickDeniedMessage,
|
||||
startKickPetitionMessage StartKickPetitionMessage,
|
||||
voteKickRequestMessage VoteKickRequestMessage,
|
||||
voteKickReplyMessage VoteKickReplyMessage,
|
||||
kickPetitionUpdateMessage KickPetitionUpdateMessage,
|
||||
endKickPetitionMessage EndKickPetitionMessage,
|
||||
statisticsMessage StatisticsMessage,
|
||||
chatRequestMessage ChatRequestMessage,
|
||||
chatMessage ChatMessage,
|
||||
chatRejectMessage ChatRejectMessage,
|
||||
dialogMessage DialogMessage,
|
||||
timeoutWarningMessage TimeoutWarningMessage,
|
||||
resetTimeoutMessage ResetTimeoutMessage,
|
||||
reportAvatarMessage ReportAvatarMessage,
|
||||
reportAvatarAckMessage ReportAvatarAckMessage,
|
||||
reportGameMessage ReportGameMessage,
|
||||
reportGameAckMessage ReportGameAckMessage,
|
||||
errorMessage ErrorMessage
|
||||
}
|
||||
|
||||
AnnounceMessage ::= [APPLICATION 0] SEQUENCE {
|
||||
protocolVersion Version,
|
||||
latestGameVersion Version,
|
||||
latestBetaRevision INTEGER(0..65535),
|
||||
serverType ENUMERATED {
|
||||
serverTypeLAN (0),
|
||||
serverTypeInternetNoAuth (1),
|
||||
serverTypeInternetAuth (2)
|
||||
},
|
||||
numPlayersOnServer INTEGER(0..65535)
|
||||
}
|
||||
|
||||
-- buildId contains a constant build id (specific for Windows/Linux/Mac builds)
|
||||
InitMessage ::= [APPLICATION 1] SEQUENCE {
|
||||
requestedVersion Version,
|
||||
buildId INTEGER,
|
||||
myLastSessionId Guid OPTIONAL,
|
||||
authServerPassword UTF8String (SIZE(1..64)) OPTIONAL,
|
||||
login CHOICE {
|
||||
guestLogin [0] GuestLogin,
|
||||
authenticatedLogin [1] AuthenticatedLogin,
|
||||
unauthenticatedLogin [2] UnauthenticatedLogin
|
||||
}
|
||||
}
|
||||
|
||||
Version ::= SEQUENCE {
|
||||
major INTEGER(0..65535),
|
||||
minor INTEGER(0..65535)
|
||||
}
|
||||
|
||||
GuestLogin ::= SEQUENCE {
|
||||
nickName UTF8String (SIZE(1..64))
|
||||
}
|
||||
|
||||
-- Login data is according to SCRAM SHA-1
|
||||
AuthenticatedLogin ::= SEQUENCE {
|
||||
clientUserData OCTET STRING (SIZE(1..256)),
|
||||
avatar AvatarHash OPTIONAL
|
||||
}
|
||||
|
||||
UnauthenticatedLogin ::= SEQUENCE {
|
||||
nickName UTF8String (SIZE(1..64)),
|
||||
avatar AvatarHash OPTIONAL
|
||||
}
|
||||
|
||||
AuthMessage ::= [APPLICATION 2] CHOICE {
|
||||
authServerChallenge [0] AuthServerChallenge,
|
||||
authClientResponse [1] AuthClientResponse,
|
||||
authServerVerification [2] AuthServerVerification
|
||||
}
|
||||
|
||||
AuthServerChallenge ::= SEQUENCE {
|
||||
serverChallenge OCTET STRING (SIZE(1..256))
|
||||
}
|
||||
|
||||
AuthClientResponse ::= SEQUENCE {
|
||||
clientResponse OCTET STRING (SIZE(1..256))
|
||||
}
|
||||
|
||||
AuthServerVerification ::= SEQUENCE {
|
||||
serverVerification OCTET STRING (SIZE(1..256))
|
||||
}
|
||||
|
||||
InitAckMessage ::= [APPLICATION 3] SEQUENCE {
|
||||
yourSessionId Guid,
|
||||
yourPlayerId NonZeroId,
|
||||
yourAvatar AvatarHash OPTIONAL,
|
||||
rejoinGameId NonZeroId OPTIONAL
|
||||
}
|
||||
|
||||
AvatarRequestMessage ::= [APPLICATION 4] SEQUENCE {
|
||||
requestId NonZeroId,
|
||||
avatar AvatarHash
|
||||
}
|
||||
|
||||
AvatarReplyMessage ::= [APPLICATION 5] SEQUENCE {
|
||||
requestId NonZeroId,
|
||||
avatarResult CHOICE {
|
||||
avatarHeader [0] AvatarHeader,
|
||||
avatarData [1] AvatarData,
|
||||
avatarEnd [2] AvatarEnd,
|
||||
unknownAvatar [3] UnknownAvatar
|
||||
}
|
||||
}
|
||||
|
||||
AvatarHeader ::= SEQUENCE {
|
||||
avatarType NetAvatarType,
|
||||
avatarSize INTEGER(32..30720)
|
||||
}
|
||||
|
||||
AvatarData ::= SEQUENCE {
|
||||
avatarBlock OCTET STRING (SIZE(1..256))
|
||||
}
|
||||
|
||||
AvatarEnd ::= SEQUENCE {
|
||||
}
|
||||
|
||||
UnknownAvatar ::= SEQUENCE {
|
||||
}
|
||||
|
||||
AvatarHash ::= OCTET STRING (SIZE(16)) -- md5 hash value
|
||||
|
||||
NetAvatarType ::= ENUMERATED {
|
||||
avatarImagePng (1),
|
||||
avatarImageJpg (2),
|
||||
avatarImageGif (3)
|
||||
}
|
||||
|
||||
PlayerListMessage ::= [APPLICATION 6] SEQUENCE {
|
||||
playerId NonZeroId,
|
||||
playerListNotification ENUMERATED {
|
||||
playerListNew (0),
|
||||
playerListLeft (1)
|
||||
}
|
||||
}
|
||||
|
||||
GameListMessage ::= [APPLICATION 7] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
gameListNotification CHOICE {
|
||||
gameListNew [0] GameListNew,
|
||||
gameListUpdate [1] GameListUpdate,
|
||||
gameListPlayerJoined [2] GameListPlayerJoined,
|
||||
gameListPlayerLeft [3] GameListPlayerLeft,
|
||||
gameListAdminChanged [4] GameListAdminChanged
|
||||
}
|
||||
}
|
||||
|
||||
GameListNew ::= SEQUENCE {
|
||||
gameMode NetGameMode,
|
||||
isPrivate BOOLEAN,
|
||||
playerIds SEQUENCE SIZE(0..10) OF NonZeroId,
|
||||
adminPlayerId NonZeroId,
|
||||
gameInfo NetGameInfo
|
||||
}
|
||||
|
||||
GameListUpdate ::= SEQUENCE {
|
||||
gameMode NetGameMode
|
||||
}
|
||||
|
||||
GameListPlayerJoined ::= SEQUENCE {
|
||||
playerId NonZeroId
|
||||
}
|
||||
|
||||
GameListPlayerLeft ::= SEQUENCE {
|
||||
playerId NonZeroId
|
||||
}
|
||||
|
||||
GameListAdminChanged ::= SEQUENCE {
|
||||
newAdminPlayerId NonZeroId
|
||||
}
|
||||
|
||||
NetGameMode ::= ENUMERATED {
|
||||
gameCreated (1),
|
||||
gameStarted (2),
|
||||
gameClosed (3)
|
||||
}
|
||||
|
||||
PlayerInfoRequestMessage ::= [APPLICATION 8] SEQUENCE {
|
||||
playerId NonZeroId
|
||||
}
|
||||
|
||||
PlayerInfoReplyMessage ::= [APPLICATION 9] SEQUENCE {
|
||||
playerId NonZeroId,
|
||||
playerInfoResult CHOICE {
|
||||
playerInfoData [0] PlayerInfoData,
|
||||
unknownPlayerInfo [1] UnknownPlayerInfo
|
||||
}
|
||||
}
|
||||
|
||||
PlayerInfoRights ::= ENUMERATED {
|
||||
playerRightsGuest (1),
|
||||
playerRightsNormal (2),
|
||||
playerRightsAdmin (3)
|
||||
}
|
||||
|
||||
PlayerInfoData ::= SEQUENCE {
|
||||
playerName UTF8String (SIZE(1..32)),
|
||||
isHuman BOOLEAN,
|
||||
playerRights PlayerInfoRights,
|
||||
countryCode UTF8String (SIZE(2)) OPTIONAL,
|
||||
avatarData SEQUENCE {
|
||||
avatarType NetAvatarType,
|
||||
avatar AvatarHash
|
||||
} OPTIONAL
|
||||
}
|
||||
|
||||
UnknownPlayerInfo ::= SEQUENCE {
|
||||
}
|
||||
|
||||
-- The following request will not be confirmed by the server. It is used,
|
||||
-- optionally, to reduce server traffic. The server might ignore it.
|
||||
SubscriptionRequestMessage ::= [APPLICATION 10] SEQUENCE {
|
||||
subscriptionAction ENUMERATED {
|
||||
unsubscribeGameList (1),
|
||||
resubscribeGameList (2)
|
||||
}
|
||||
}
|
||||
|
||||
JoinGameRequestMessage ::= [APPLICATION 11] SEQUENCE {
|
||||
joinGameAction CHOICE {
|
||||
joinExistingGame [0] JoinExistingGame,
|
||||
joinNewGame [1] JoinNewGame,
|
||||
rejoinExistingGame [2] RejoinExistingGame
|
||||
},
|
||||
autoLeave BOOLEAN
|
||||
}
|
||||
|
||||
JoinExistingGame ::= SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
password UTF8String (SIZE(1..64)) OPTIONAL
|
||||
}
|
||||
|
||||
JoinNewGame ::= SEQUENCE {
|
||||
gameInfo NetGameInfo,
|
||||
password UTF8String (SIZE(1..64)) OPTIONAL
|
||||
}
|
||||
|
||||
RejoinExistingGame ::= SEQUENCE {
|
||||
gameId NonZeroId
|
||||
}
|
||||
|
||||
JoinGameReplyMessage ::= [APPLICATION 12] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
joinGameResult CHOICE {
|
||||
joinGameAck [0] JoinGameAck,
|
||||
joinGameFailed [1] JoinGameFailed
|
||||
}
|
||||
}
|
||||
|
||||
JoinGameAck ::= SEQUENCE {
|
||||
areYouGameAdmin BOOLEAN,
|
||||
gameInfo NetGameInfo
|
||||
}
|
||||
|
||||
JoinGameFailed ::= SEQUENCE {
|
||||
joinGameFailureReason ENUMERATED {
|
||||
invalidGame (1),
|
||||
gameIsFull (2),
|
||||
gameIsRunning (3),
|
||||
invalidPassword (4),
|
||||
notAllowedAsGuest (5),
|
||||
notInvited (6),
|
||||
gameNameInUse (7),
|
||||
badGameName (8),
|
||||
invalidSettings (9),
|
||||
ipAddressBlocked (10),
|
||||
rejoinFailed (11)
|
||||
}
|
||||
}
|
||||
|
||||
NetGameInfo ::= SEQUENCE {
|
||||
gameName UTF8String (SIZE(1..64)),
|
||||
netGameType ENUMERATED {
|
||||
normalGame (1),
|
||||
registeredOnlyGame (2),
|
||||
inviteOnlyGame (3),
|
||||
rankingGame (4)
|
||||
},
|
||||
maxNumPlayers INTEGER(2..10),
|
||||
raiseIntervalMode CHOICE {
|
||||
raiseEveryHands [0] INTEGER(1..1000),
|
||||
raiseEveryMinutes [1] INTEGER(1..1000)
|
||||
},
|
||||
endRaiseMode ENUMERATED {
|
||||
doubleBlinds (1),
|
||||
raiseByEndValue (2),
|
||||
keepLastBlind (3)
|
||||
},
|
||||
proposedGuiSpeed INTEGER(1..11),
|
||||
delayBetweenHands INTEGER(5..20), -- These are seconds
|
||||
playerActionTimeout INTEGER(0..60), -- These are seconds
|
||||
firstSmallBlind INTEGER(1..20000),
|
||||
endRaiseSmallBlindValue InitialAmountOfMoney,
|
||||
startMoney InitialNonZeroAmountOfMoney,
|
||||
manualBlinds SEQUENCE SIZE(0..30) OF InitialNonZeroAmountOfMoney
|
||||
}
|
||||
|
||||
GamePlayerMessage ::= [APPLICATION 13] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
gamePlayerNotification CHOICE {
|
||||
gamePlayerJoined [0] GamePlayerJoined,
|
||||
gamePlayerLeft [1] GamePlayerLeft,
|
||||
gameAdminChanged [2] GameAdminChanged,
|
||||
removedFromGame [3] RemovedFromGame
|
||||
}
|
||||
}
|
||||
|
||||
GamePlayerJoined ::= SEQUENCE {
|
||||
playerId NonZeroId,
|
||||
isGameAdmin BOOLEAN
|
||||
}
|
||||
|
||||
GamePlayerLeft ::= SEQUENCE {
|
||||
playerId NonZeroId,
|
||||
gamePlayerLeftReason ENUMERATED {
|
||||
leftOnRequest (0),
|
||||
leftKicked (1),
|
||||
leftError (2)
|
||||
}
|
||||
}
|
||||
|
||||
GameAdminChanged ::= SEQUENCE {
|
||||
newAdminPlayerId NonZeroId
|
||||
}
|
||||
|
||||
RemovedFromGame ::= SEQUENCE {
|
||||
removedFromGameReason ENUMERATED {
|
||||
removedOnRequest (0), -- No error, client wished to leave.
|
||||
kickedFromGame (1),
|
||||
gameIsFull (2),
|
||||
gameIsRunning (3),
|
||||
gameTimeout (4),
|
||||
removedStartFailed (5)
|
||||
}
|
||||
}
|
||||
|
||||
KickPlayerRequestMessage ::= [APPLICATION 14] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
playerId NonZeroId
|
||||
}
|
||||
|
||||
LeaveGameRequestMessage ::= [APPLICATION 15] SEQUENCE {
|
||||
gameId NonZeroId
|
||||
}
|
||||
|
||||
InvitePlayerToGameMessage ::= [APPLICATION 16] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
playerId NonZeroId
|
||||
}
|
||||
|
||||
InviteNotifyMessage ::= [APPLICATION 17] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
playerIdWho NonZeroId,
|
||||
playerIdByWhom NonZeroId
|
||||
}
|
||||
|
||||
RejectGameInvReason ::= ENUMERATED {
|
||||
no (0),
|
||||
busy (1)
|
||||
}
|
||||
|
||||
RejectGameInvitationMessage ::= [APPLICATION 18] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
myRejectReason RejectGameInvReason
|
||||
}
|
||||
|
||||
RejectInvNotifyMessage ::= [APPLICATION 19] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
playerId NonZeroId,
|
||||
playerRejectReason RejectGameInvReason
|
||||
}
|
||||
|
||||
StartEventMessage ::= [APPLICATION 20] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
startEventType CHOICE {
|
||||
startEvent [0] StartEvent,
|
||||
rejoinEvent [1] RejoinEvent
|
||||
}
|
||||
}
|
||||
|
||||
StartEvent ::= SEQUENCE {
|
||||
fillWithComputerPlayers BOOLEAN
|
||||
}
|
||||
|
||||
RejoinEvent ::= SEQUENCE {
|
||||
}
|
||||
|
||||
StartEventAckMessage ::= [APPLICATION 21] SEQUENCE {
|
||||
gameId NonZeroId
|
||||
}
|
||||
|
||||
RejoinPlayerData ::= SEQUENCE {
|
||||
playerId NonZeroId,
|
||||
playerMoney AmountOfMoney
|
||||
}
|
||||
|
||||
GameStartModeInitial ::= SEQUENCE {
|
||||
playerSeats SEQUENCE SIZE(2..10) OF NonZeroId
|
||||
}
|
||||
|
||||
GameStartModeRejoin ::= SEQUENCE {
|
||||
handNum NonZeroId,
|
||||
rejoinPlayerData SEQUENCE SIZE(2..10) OF RejoinPlayerData
|
||||
}
|
||||
|
||||
GameStartMessage ::= [APPLICATION 22] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
startDealerPlayerId NonZeroId,
|
||||
gameStartMode CHOICE {
|
||||
gameStartModeInitial [0] GameStartModeInitial,
|
||||
gameStartModeRejoin [1] GameStartModeRejoin
|
||||
}
|
||||
}
|
||||
|
||||
PlainCards ::= SEQUENCE {
|
||||
plainCard1 Card,
|
||||
plainCard2 Card
|
||||
}
|
||||
|
||||
EncryptedCards ::= SEQUENCE {
|
||||
cardData OCTET STRING (SIZE(16..64))
|
||||
}
|
||||
|
||||
HandStartMessage ::= [APPLICATION 23] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
yourCards CHOICE {
|
||||
plainCards [0] PlainCards,
|
||||
encryptedCards [1] EncryptedCards
|
||||
},
|
||||
smallBlind INTEGER(1..100000000),
|
||||
seatStates SEQUENCE SIZE(2..10) OF NetPlayerState
|
||||
}
|
||||
|
||||
PlayersTurnMessage ::= [APPLICATION 24] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
playerId NonZeroId,
|
||||
gameState NetGameState
|
||||
}
|
||||
|
||||
MyActionRequestMessage ::= [APPLICATION 25] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
handNum NonZeroId,
|
||||
gameState NetGameState,
|
||||
myAction NetPlayerAction,
|
||||
myRelativeBet AmountOfMoney
|
||||
}
|
||||
|
||||
YourActionRejectedMessage ::= [APPLICATION 26] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
gameState NetGameState,
|
||||
yourAction NetPlayerAction,
|
||||
yourRelativeBet AmountOfMoney,
|
||||
rejectionReason ENUMERATED {
|
||||
rejectedInvalidGameState (1),
|
||||
rejectedNotYourTurn (2),
|
||||
rejectedActionNotAllowed (3)
|
||||
}
|
||||
}
|
||||
|
||||
PlayersActionDoneMessage ::= [APPLICATION 27] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
playerId NonZeroId,
|
||||
gameState NetGameState,
|
||||
playerAction NetPlayerAction,
|
||||
totalPlayerBet AmountOfMoney,
|
||||
playerMoney AmountOfMoney,
|
||||
highestSet AmountOfMoney,
|
||||
minimumRaise AmountOfMoney
|
||||
}
|
||||
|
||||
DealFlopCardsMessage ::= [APPLICATION 28] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
flopCard1 Card,
|
||||
flopCard2 Card,
|
||||
flopCard3 Card
|
||||
}
|
||||
|
||||
DealTurnCardMessage ::= [APPLICATION 29] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
turnCard Card
|
||||
}
|
||||
|
||||
DealRiverCardMessage ::= [APPLICATION 30] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
riverCard Card
|
||||
}
|
||||
|
||||
AllInShowCardsMessage ::= [APPLICATION 31] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
playersAllIn SEQUENCE SIZE(1..10) OF PlayerAllIn
|
||||
}
|
||||
|
||||
PlayerAllIn ::= SEQUENCE {
|
||||
playerId NonZeroId,
|
||||
allInCard1 Card,
|
||||
allInCard2 Card
|
||||
}
|
||||
|
||||
EndOfHandMessage ::= [APPLICATION 32] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
endOfHandType CHOICE {
|
||||
endOfHandShowCards [0] EndOfHandShowCards,
|
||||
endOfHandHideCards [1] EndOfHandHideCards
|
||||
}
|
||||
}
|
||||
|
||||
EndOfHandShowCards ::= SEQUENCE {
|
||||
playerResults SEQUENCE SIZE(1..10) OF PlayerResult
|
||||
}
|
||||
|
||||
PlayerResult ::= SEQUENCE {
|
||||
playerId NonZeroId,
|
||||
resultCard1 Card,
|
||||
resultCard2 Card,
|
||||
bestHandPosition SEQUENCE SIZE(5) OF INTEGER, -- TODO size restrictions
|
||||
moneyWon AmountOfMoney,
|
||||
playerMoney AmountOfMoney,
|
||||
cardsValue INTEGER OPTIONAL
|
||||
}
|
||||
|
||||
EndOfHandHideCards ::= SEQUENCE {
|
||||
playerId NonZeroId,
|
||||
moneyWon AmountOfMoney,
|
||||
playerMoney AmountOfMoney
|
||||
}
|
||||
|
||||
ShowMyCardsRequestMessage ::= [APPLICATION 33] SEQUENCE {
|
||||
}
|
||||
|
||||
AfterHandShowCardsMessage ::= [APPLICATION 34] SEQUENCE {
|
||||
playerResult PlayerResult
|
||||
}
|
||||
|
||||
EndOfGameMessage ::= [APPLICATION 35] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
winnerPlayerId NonZeroId
|
||||
}
|
||||
|
||||
PlayerIdChangedMessage ::= [APPLICATION 36] SEQUENCE {
|
||||
oldPlayerId NonZeroId,
|
||||
newPlayerId NonZeroId
|
||||
}
|
||||
|
||||
AskKickPlayerMessage ::= [APPLICATION 64] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
playerId NonZeroId
|
||||
}
|
||||
|
||||
AskKickDeniedMessage ::= [APPLICATION 65] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
playerId NonZeroId,
|
||||
kickDeniedReason ENUMERATED {
|
||||
kickDeniedInvalidGameState (0),
|
||||
kickDeniedNotPossible (1),
|
||||
kickDeniedTryAgainLater (2),
|
||||
kickDeniedAlreadyInProgress (3),
|
||||
kickDeniedInvalidPlayerId (4)
|
||||
}
|
||||
}
|
||||
|
||||
StartKickPetitionMessage ::= [APPLICATION 66] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
petitionId NonZeroId,
|
||||
proposingPlayerId NonZeroId,
|
||||
kickPlayerId NonZeroId,
|
||||
kickTimeoutSec INTEGER(1..120),
|
||||
numVotesNeededToKick INTEGER(1..9)
|
||||
}
|
||||
|
||||
VoteKickRequestMessage ::= [APPLICATION 67] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
petitionId NonZeroId,
|
||||
voteKick BOOLEAN
|
||||
}
|
||||
|
||||
VoteKickReplyMessage ::= [APPLICATION 68] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
petitionId NonZeroId,
|
||||
voteKickReplyType CHOICE {
|
||||
voteKickAck [0] VoteKickAck,
|
||||
voteKickDenied [1] VoteKickDenied
|
||||
}
|
||||
}
|
||||
|
||||
VoteKickAck ::= SEQUENCE {
|
||||
}
|
||||
|
||||
VoteKickDenied ::= SEQUENCE {
|
||||
voteKickDeniedReason ENUMERATED {
|
||||
voteKickDeniedInvalid (0),
|
||||
voteKickDeniedAlreadyVoted (1)
|
||||
}
|
||||
}
|
||||
|
||||
KickPetitionUpdateMessage ::= [APPLICATION 69] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
petitionId NonZeroId,
|
||||
numVotesAgainstKicking INTEGER(0..9),
|
||||
numVotesInFavourOfKicking INTEGER(1..9),
|
||||
numVotesNeededToKick INTEGER(1..9)
|
||||
}
|
||||
|
||||
EndKickPetitionMessage ::= [APPLICATION 70] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
petitionId NonZeroId,
|
||||
numVotesAgainstKicking INTEGER(0..9),
|
||||
numVotesInFavourOfKicking INTEGER(1..9),
|
||||
resultPlayerKicked BOOLEAN,
|
||||
petitionEndReason ENUMERATED {
|
||||
petitionEndEnoughVotes (0),
|
||||
petitionEndTooFewPlayers (1),
|
||||
petitionEndPlayerLeft (2),
|
||||
petitionEndTimeout (3)
|
||||
}
|
||||
}
|
||||
|
||||
StatisticsMessage ::= [APPLICATION 128] SEQUENCE {
|
||||
statisticsData SEQUENCE SIZE(1..32) OF StatisticsData
|
||||
}
|
||||
|
||||
StatisticsData ::= SEQUENCE {
|
||||
statisticsType ENUMERATED {
|
||||
statNumberOfPlayers (1)
|
||||
},
|
||||
statisticsValue INTEGER
|
||||
}
|
||||
|
||||
ChatRequestMessage ::= [APPLICATION 129] SEQUENCE {
|
||||
chatRequestType CHOICE {
|
||||
chatRequestTypeLobby [0] ChatRequestTypeLobby,
|
||||
chatRequestTypeGame [1] ChatRequestTypeGame,
|
||||
chatRequestTypePrivate [2] ChatRequestTypePrivate
|
||||
},
|
||||
chatText UTF8String (SIZE(1..128))
|
||||
}
|
||||
|
||||
ChatRequestTypeLobby ::= SEQUENCE {
|
||||
}
|
||||
|
||||
ChatRequestTypeGame ::= SEQUENCE {
|
||||
gameId NonZeroId
|
||||
}
|
||||
|
||||
ChatRequestTypePrivate ::= SEQUENCE {
|
||||
targetPlayerId NonZeroId
|
||||
}
|
||||
|
||||
ChatMessage ::= [APPLICATION 130] SEQUENCE {
|
||||
chatType CHOICE {
|
||||
chatTypeLobby [0] ChatTypeLobby,
|
||||
chatTypeGame [1] ChatTypeGame,
|
||||
chatTypeBot [2] ChatTypeBot,
|
||||
chatTypeBroadcast [3] ChatTypeBroadcast,
|
||||
chatTypePrivate [4] ChatTypePrivate
|
||||
},
|
||||
chatText UTF8String (SIZE(1..128))
|
||||
}
|
||||
|
||||
ChatTypeLobby ::= SEQUENCE {
|
||||
playerId NonZeroId
|
||||
}
|
||||
|
||||
ChatTypeGame ::= SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
playerId NonZeroId
|
||||
}
|
||||
|
||||
ChatTypeBroadcast ::= SEQUENCE {
|
||||
}
|
||||
|
||||
ChatTypeBot ::= SEQUENCE {
|
||||
}
|
||||
|
||||
ChatTypePrivate ::= SEQUENCE {
|
||||
playerId NonZeroId
|
||||
}
|
||||
|
||||
ChatRejectMessage ::= [APPLICATION 131] SEQUENCE {
|
||||
chatText UTF8String (SIZE(1..128))
|
||||
}
|
||||
|
||||
DialogMessage ::= [APPLICATION 132] SEQUENCE {
|
||||
notificationText UTF8String (SIZE(1..128))
|
||||
}
|
||||
|
||||
TimeoutWarningMessage ::= [APPLICATION 133] SEQUENCE {
|
||||
timeoutReason ENUMERATED {
|
||||
timeoutNoDataReceived (0),
|
||||
timeoutInactiveGame (1),
|
||||
timeoutKickAfterAutofold (2)
|
||||
},
|
||||
remainingSeconds INTEGER
|
||||
}
|
||||
|
||||
ResetTimeoutMessage ::= [APPLICATION 134] SEQUENCE {
|
||||
}
|
||||
|
||||
ReportAvatarMessage ::= [APPLICATION 135] SEQUENCE {
|
||||
reportedPlayerId NonZeroId,
|
||||
reportedAvatar AvatarHash
|
||||
}
|
||||
|
||||
ReportAvatarAckMessage ::= [APPLICATION 136] SEQUENCE {
|
||||
reportedPlayerId NonZeroId,
|
||||
reportAvatarResult ENUMERATED {
|
||||
avatarReportAccepted (0),
|
||||
avatarReportDuplicate (1),
|
||||
avatarReportInvalid (2)
|
||||
}
|
||||
}
|
||||
|
||||
ReportGameMessage ::= [APPLICATION 137] SEQUENCE {
|
||||
reportedGameId NonZeroId
|
||||
}
|
||||
|
||||
ReportGameAckMessage ::= [APPLICATION 138] SEQUENCE {
|
||||
reportedGameId NonZeroId,
|
||||
reportGameResult ENUMERATED {
|
||||
gameReportAccepted (0),
|
||||
gameReportDuplicate (1),
|
||||
gameReportInvalid (2)
|
||||
}
|
||||
}
|
||||
|
||||
ErrorMessage ::= [APPLICATION 255] SEQUENCE {
|
||||
errorReason ENUMERATED {
|
||||
errorReserved (0),
|
||||
errorInitVersionNotSupported (1),
|
||||
errorInitServerFull (2),
|
||||
errorInitAuthFailure (3),
|
||||
errorInitPlayerNameInUse (4),
|
||||
errorInitInvalidPlayerName (5),
|
||||
errorInitServerMaintenance (6),
|
||||
errorInitBlocked (7),
|
||||
errorAvatarTooLarge (8),
|
||||
errorInvalidPacket (256),
|
||||
errorInvalidState (257),
|
||||
errorKickedFromServer (258),
|
||||
errorBannedFromServer (259),
|
||||
errorBlockedByServer (260),
|
||||
errorSessionTimeout (261)
|
||||
}
|
||||
}
|
||||
|
||||
NetGameState ::= ENUMERATED {
|
||||
statePreflop (0),
|
||||
stateFlop (1),
|
||||
stateTurn (2),
|
||||
stateRiver (3),
|
||||
statePreflopSmallBlind (4),
|
||||
statePreflopBigBlind (5)
|
||||
}
|
||||
|
||||
NetPlayerAction ::= ENUMERATED {
|
||||
actionNone (0),
|
||||
actionFold (1),
|
||||
actionCheck (2),
|
||||
actionCall (3),
|
||||
actionBet (4),
|
||||
actionRaise (5),
|
||||
actionAllIn (6)
|
||||
}
|
||||
|
||||
NetPlayerState ::= ENUMERATED {
|
||||
playerStateNormal (0),
|
||||
playerStateSessionInactive (1),
|
||||
playerStateNoMoney (2)
|
||||
}
|
||||
|
||||
NonZeroId ::= INTEGER(1..4294967295)
|
||||
|
||||
Id ::= INTEGER(0..4294967295)
|
||||
|
||||
Guid ::= OCTET STRING (SIZE(16))
|
||||
|
||||
Card ::= INTEGER(0..51)
|
||||
|
||||
AmountOfMoney ::= INTEGER(0..10000000)
|
||||
InitialAmountOfMoney ::= INTEGER(0..1000000)
|
||||
InitialNonZeroAmountOfMoney ::= INTEGER(1..1000000)
|
||||
|
||||
END
|
||||
@@ -42,14 +42,14 @@ unix : !mac {
|
||||
|
||||
QMAKE_LIBDIR += lib $${PREFIX}/lib /opt/gsasl/lib
|
||||
INCLUDEPATH += $${PREFIX}/include
|
||||
LIB_DIRS = $${PREFIX}/lib $${PREFIX}/lib64
|
||||
LIB_DIRS = $${PREFIX}/lib $${PREFIX}/lib64 $$system(qmake -query QT_INSTALL_LIBS)
|
||||
BOOST_THREAD = boost_thread boost_thread-mt
|
||||
BOOST_PROGRAM_OPTIONS = boost_program_options boost_program_options-mt
|
||||
BOOST_SYS = boost_system boost_system-mt
|
||||
|
||||
|
||||
#
|
||||
# searching in $PREFIX/lib and $PREFIX/lib64
|
||||
# searching in $PREFIX/lib, $PREFIX/lib64 and $$system(qmake -query QT_INSTALL_LIBS)
|
||||
# to override the default '/usr' pass PREFIX
|
||||
# variable to qmake.
|
||||
#
|
||||
|
||||
+42
-15
@@ -9,8 +9,8 @@
|
||||
# of binary-size if you leave Qt out.
|
||||
# (see http://trolltech.com/developer/downloads/qt/mac)
|
||||
|
||||
QT_FW_PATH="/Library/Frameworks"
|
||||
QT_PLUGIN_PATH="/Developer/Applications/Qt/plugins"
|
||||
QT_FW_PATH="/Developer/Qt5/5/clang_64/lib"
|
||||
QT_PLUGIN_PATH="/Developer/Qt5/5/clang_64/plugins"
|
||||
SDL_FW_PATH="/Library/Frameworks"
|
||||
APPLICATION="./pokerth.app"
|
||||
BINARY="$APPLICATION/Contents/MacOs/pokerth"
|
||||
@@ -27,6 +27,7 @@ mkdir $BINARY_FW_PATH
|
||||
BINARY_PLUGIN_PATH="$APPLICATION/Contents/plugins"
|
||||
mkdir -p $BINARY_PLUGIN_PATH/imageformats
|
||||
mkdir -p $BINARY_PLUGIN_PATH/sqldrivers
|
||||
mkdir -p $BINARY_PLUGIN_PATH/platforms
|
||||
|
||||
# integrate SDL-frameworks into binary
|
||||
cp -R $SDL_FW_PATH/SDL.framework $BINARY_FW_PATH
|
||||
@@ -38,55 +39,81 @@ if [ "$1" != "--without-qt" ] ; then
|
||||
cp $QT_PLUGIN_PATH/imageformats/libqgif.dylib $BINARY_PLUGIN_PATH/imageformats
|
||||
cp $QT_PLUGIN_PATH/imageformats/libqjpeg.dylib $BINARY_PLUGIN_PATH/imageformats
|
||||
cp $QT_PLUGIN_PATH/sqldrivers/libqsqlite.dylib $BINARY_PLUGIN_PATH/sqldrivers
|
||||
cp $QT_PLUGIN_PATH/platforms/libqcocoa.dylib $BINARY_PLUGIN_PATH/platforms
|
||||
cp -R $QT_FW_PATH/QtCore.framework $BINARY_FW_PATH
|
||||
cp -R $QT_FW_PATH/QtGui.framework $BINARY_FW_PATH
|
||||
cp -R $QT_FW_PATH/QtWidgets.framework $BINARY_FW_PATH
|
||||
cp -R $QT_FW_PATH/QtSql.framework $BINARY_FW_PATH
|
||||
cp -R $QT_FW_PATH/QtNetwork.framework $BINARY_FW_PATH
|
||||
cp -R $QT_FW_PATH/QtPrintSupport.framework $BINARY_FW_PATH
|
||||
# remove debug versions
|
||||
rm -f $APPLICATION/Contents/Frameworks/QtCore.framework/QtCore_debug
|
||||
rm -rf $APPLICATION/Contents/Frameworks/QtCore.framework/QtCore_debug.dSYM
|
||||
rm -f $APPLICATION/Contents/Frameworks/QtCore.framework/QtCore_debug.prl
|
||||
rm -f $APPLICATION/Contents/Frameworks/QtCore.framework/Versions/4/QtCore_debug
|
||||
rm -f $APPLICATION/Contents/Frameworks/QtCore.framework/Versions/5/QtCore_debug
|
||||
rm -f $APPLICATION/Contents/Frameworks/QtGui.framework/QtGui_debug
|
||||
rm -rf $APPLICATION/Contents/Frameworks/QtGui.framework/QtGui_debug.dSYM
|
||||
rm -f $APPLICATION/Contents/Frameworks/QtGui.framework/QtGui_debug.prl
|
||||
rm -f $APPLICATION/Contents/Frameworks/QtGui.framework/Versions/4/QtGui_debug
|
||||
rm -f $APPLICATION/Contents/Frameworks/QtGui.framework/Versions/5/QtGui_debug
|
||||
rm -f $APPLICATION/Contents/Frameworks/QtWidgets.framework/QtWidgets_debug
|
||||
rm -f $APPLICATION/Contents/Frameworks/QtWidgets.framework/QtWidgets_debug.prl
|
||||
rm -f $APPLICATION/Contents/Frameworks/QtWidgets.framework/Versions/5/QtWidgets_debug
|
||||
rm -f $APPLICATION/Contents/Frameworks/QtSql.framework/QtSql_debug
|
||||
rm -rf $APPLICATION/Contents/Frameworks/QtSql.framework/QtSql_debug.dSYM
|
||||
rm -f $APPLICATION/Contents/Frameworks/QtSql.framework/QtSql_debug.prl
|
||||
rm -f $APPLICATION/Contents/Frameworks/QtSql.framework/Versions/4/QtSql_debug
|
||||
rm -f $APPLICATION/Contents/Frameworks/QtSql.framework/Versions/5/QtSql_debug
|
||||
rm -f $APPLICATION/Contents/Frameworks/QtNetwork.framework/QtNetwork_debug
|
||||
rm -rf $APPLICATION/Contents/Frameworks/QtNetwork.framework/QtNetwork_debug.dSYM
|
||||
rm -f $APPLICATION/Contents/Frameworks/QtNetwork.framework/QtNetwork_debug.prl
|
||||
rm -f $APPLICATION/Contents/Frameworks/QtNetwork.framework/Versions/4/QtNetwork_debug
|
||||
rm -f $APPLICATION/Contents/Frameworks/QtNetwork.framework/Versions/5/QtNetwork_debug
|
||||
rm -f $APPLICATION/Contents/Frameworks/QtPrintSupport.framework/QtPrintSupport_debug
|
||||
rm -f $APPLICATION/Contents/Frameworks/QtPrintSupport.framework/QtPrintSupport_debug.prl
|
||||
rm -f $APPLICATION/Contents/Frameworks/QtPrintSupport.framework/Versions/5/QtPrintSupport_debug
|
||||
|
||||
# redirect binary to use integrated frameworks
|
||||
QTCORE="QtCore.framework/Versions/4.0/QtCore"
|
||||
QTGUI="QtGui.framework/Versions/4.0/QtGui"
|
||||
QTSQL="QtSql.framework/Versions/4.0/QtSql"
|
||||
QTNETWORK="QtNetwork.framework/Versions/4.0/QtNetwork"
|
||||
QTCORE="QtCore.framework/Versions/5/QtCore"
|
||||
QTGUI="QtGui.framework/Versions/5/QtGui"
|
||||
QTWIDGETS="QtWidgets.framework/Versions/5/QtWidgets"
|
||||
QTSQL="QtSql.framework/Versions/5/QtSql"
|
||||
QTNETWORK="QtNetwork.framework/Versions/5/QtNetwork"
|
||||
QTPRINT="QtPrintSupport.framework/Versions/5/QtPrintSupport"
|
||||
install_name_tool -id @executable_path/../Frameworks/$QTCORE $BINARY_FW_PATH/$QTCORE
|
||||
install_name_tool -id @executable_path/../Frameworks/$QTGUI $BINARY_FW_PATH/$QTGUI
|
||||
install_name_tool -id @executable_path/../Frameworks/$QTWIDGETS $BINARY_FW_PATH/$QTWIDGETS
|
||||
install_name_tool -id @executable_path/../Frameworks/$QTSQL $BINARY_FW_PATH/$QTSQL
|
||||
install_name_tool -id @executable_path/../Frameworks/$QTSQL $BINARY_FW_PATH/$QTNETWORK
|
||||
install_name_tool -id @executable_path/../Frameworks/$QTNETWORK $BINARY_FW_PATH/$QTNETWORK
|
||||
install_name_tool -id @executable_path/../Frameworks/$QTPRINT $BINARY_FW_PATH/$QTPRINT
|
||||
QTCORE_LINK=$(otool -L $BINARY | grep QtCore | cut -d"(" -f1 | cut -f2)
|
||||
QTGUI_LINK=$(otool -L $BINARY | grep QtGui | cut -d"(" -f1 | cut -f2)
|
||||
QTWIDGETS_LINK=$(otool -L $BINARY | grep QtWidgets | cut -d"(" -f1 | cut -f2)
|
||||
QTSQL_LINK=$(otool -L $BINARY | grep QtSql | cut -d"(" -f1 | cut -f2)
|
||||
QTNETWORK_LINK=$(otool -L $BINARY | grep QtNetwork | cut -d"(" -f1 | cut -f2)
|
||||
QTPRINT_LINK=$(otool -L $BINARY_PLUGIN_PATH/platforms/libqcocoa.dylib | grep QtPrintSupport | cut -d"(" -f1 | cut -f2)
|
||||
install_name_tool -change $QTCORE_LINK @executable_path/../Frameworks/$QTCORE $BINARY
|
||||
install_name_tool -change $QTGUI_LINK @executable_path/../Frameworks/$QTGUI $BINARY
|
||||
install_name_tool -change $QTWIDGETS_LINK @executable_path/../Frameworks/$QTWIDGETS $BINARY
|
||||
install_name_tool -change $QTSQL_LINK @executable_path/../Frameworks/$QTSQL $BINARY
|
||||
install_name_tool -change $QTNETWORK_LINK @executable_path/../Frameworks/$QTNETWORK $BINARY
|
||||
install_name_tool -change $QTCORE_LINK @executable_path/../Frameworks/$QTCORE $BINARY_PLUGIN_PATH/imageformats/libqgif.dylib
|
||||
install_name_tool -change $QTGUI_LINK @executable_path/../Frameworks/$QTGUI $BINARY_PLUGIN_PATH/imageformats/libqgif.dylib
|
||||
install_name_tool -change $QTWIDGETS_LINK @executable_path/../Frameworks/$QTWIDGETS $BINARY_PLUGIN_PATH/imageformats/libqgif.dylib
|
||||
install_name_tool -change $QTCORE_LINK @executable_path/../Frameworks/$QTCORE $BINARY_PLUGIN_PATH/imageformats/libqjpeg.dylib
|
||||
install_name_tool -change $QTGUI_LINK @executable_path/../Frameworks/$QTGUI $BINARY_PLUGIN_PATH/imageformats/libqjpeg.dylib
|
||||
install_name_tool -change $QTWIDGETS_LINK @executable_path/../Frameworks/$QTWIDGETS $BINARY_PLUGIN_PATH/imageformats/libqjpeg.dylib
|
||||
install_name_tool -change $QTCORE_LINK @executable_path/../Frameworks/$QTCORE $BINARY_PLUGIN_PATH/sqldrivers/libqsqlite.dylib
|
||||
install_name_tool -change $QTSQL_LINK @executable_path/../Frameworks/$QTSQL $BINARY_PLUGIN_PATH/sqldrivers/libqsqlite.dylib
|
||||
install_name_tool -change $QTCORE_LINK @executable_path/../Frameworks/$QTCORE $BINARY_PLUGIN_PATH/platforms/libqcocoa.dylib
|
||||
install_name_tool -change $QTGUI_LINK @executable_path/../Frameworks/$QTGUI $BINARY_PLUGIN_PATH/platforms/libqcocoa.dylib
|
||||
install_name_tool -change $QTWIDGETS_LINK @executable_path/../Frameworks/$QTWIDGETS $BINARY_PLUGIN_PATH/platforms/libqcocoa.dylib
|
||||
install_name_tool -change $QTPRINT_LINK @executable_path/../Frameworks/$QTPRINT $BINARY_PLUGIN_PATH/platforms/libqcocoa.dylib
|
||||
|
||||
QTCORE_LINK=$(otool -L $BINARY_FW_PATH/$QTGUI | grep QtCore | head -1 | cut -d"(" -f1 | cut -f2)
|
||||
install_name_tool -change $QTCORE_LINK @executable_path/../Frameworks/$QTCORE $BINARY_FW_PATH/$QTGUI
|
||||
install_name_tool -change $QTCORE_LINK @executable_path/../Frameworks/$QTCORE $BINARY_FW_PATH/$QTWIDGETS
|
||||
install_name_tool -change $QTCORE_LINK @executable_path/../Frameworks/$QTCORE $BINARY_FW_PATH/$QTSQL
|
||||
install_name_tool -change $QTCORE_LINK @executable_path/../Frameworks/$QTCORE $BINARY_FW_PATH/$QTNETWORK
|
||||
install_name_tool -change $QTCORE_LINK @executable_path/../Frameworks/$QTCORE $BINARY_FW_PATH/$QTPRINT
|
||||
|
||||
QTGUI_LINK=$(otool -L $BINARY_FW_PATH/$QTWIDGETS | grep QtGui | cut -d"(" -f1 | cut -f2)
|
||||
install_name_tool -change $QTGUI_LINK @executable_path/../Frameworks/$QTGUI $BINARY_FW_PATH/$QTWIDGETS
|
||||
install_name_tool -change $QTGUI_LINK @executable_path/../Frameworks/$QTGUI $BINARY_FW_PATH/$QTPRINT
|
||||
|
||||
QTWIDGETS_LINK=$(otool -L $BINARY_FW_PATH/$QTPRINT | grep QtWidgets | cut -d"(" -f1 | cut -f2)
|
||||
install_name_tool -change $QTWIDGETS_LINK @executable_path/../Frameworks/$QTWIDGETS $BINARY_FW_PATH/$QTPRINT
|
||||
fi
|
||||
|
||||
+30
@@ -6,3 +6,33 @@ SUBDIRS = pokerth_protocol.pro pokerth_db.pro pokerth_lib.pro pokerth_game.pro
|
||||
SUBDIRS += pokerth_server.pro chatcleaner.pro
|
||||
}
|
||||
CONFIG += ordered
|
||||
|
||||
OTHER_FILES += \
|
||||
android/src/org/kde/necessitas/ministro/IMinistro.aidl \
|
||||
android/src/org/kde/necessitas/ministro/IMinistroCallback.aidl \
|
||||
android/src/org/qtproject/qt5/android/bindings/QtActivity.java \
|
||||
android/src/org/qtproject/qt5/android/bindings/QtApplication.java \
|
||||
android/res/values-pl/strings.xml \
|
||||
android/res/values-es/strings.xml \
|
||||
android/res/values-it/strings.xml \
|
||||
android/res/values-ru/strings.xml \
|
||||
android/res/values-et/strings.xml \
|
||||
android/res/values-rs/strings.xml \
|
||||
android/res/values-ja/strings.xml \
|
||||
android/res/values-fa/strings.xml \
|
||||
android/res/values-ro/strings.xml \
|
||||
android/res/values-zh-rTW/strings.xml \
|
||||
android/res/values-nl/strings.xml \
|
||||
android/res/values-zh-rCN/strings.xml \
|
||||
android/res/values-pt-rBR/strings.xml \
|
||||
android/res/values-el/strings.xml \
|
||||
android/res/layout/splash.xml \
|
||||
android/res/values-fr/strings.xml \
|
||||
android/res/values-id/strings.xml \
|
||||
android/res/values-ms/strings.xml \
|
||||
android/res/values-de/strings.xml \
|
||||
android/res/values-nb/strings.xml \
|
||||
android/res/values/strings.xml \
|
||||
android/res/values/libs.xml \
|
||||
android/version.xml \
|
||||
android/AndroidManifest.xml
|
||||
|
||||
+8
-2
@@ -110,6 +110,7 @@ message NetGameInfo {
|
||||
required uint32 firstSmallBlind = 12;
|
||||
required uint32 startMoney = 13;
|
||||
repeated uint32 manualBlinds = 14 [packed = true];
|
||||
optional bool allowSpectators = 15 [default = true];
|
||||
}
|
||||
|
||||
// Message Part containing player result.
|
||||
@@ -223,6 +224,7 @@ message GameListNewMessage {
|
||||
repeated uint32 playerIds = 4 [packed = true];
|
||||
required uint32 adminPlayerId = 5;
|
||||
required NetGameInfo gameInfo = 6;
|
||||
repeated uint32 spectatorIds = 7 [packed = true];
|
||||
}
|
||||
|
||||
message GameListUpdateMessage {
|
||||
@@ -288,8 +290,8 @@ message SubscriptionRequestMessage {
|
||||
message JoinExistingGameMessage {
|
||||
required uint32 gameId = 1;
|
||||
optional string password = 2;
|
||||
optional bool autoLeave = 3;
|
||||
optional bool spectateOnly = 4;
|
||||
optional bool autoLeave = 3 [default = false];
|
||||
optional bool spectateOnly = 4 [default = false];
|
||||
}
|
||||
|
||||
message JoinNewGameMessage {
|
||||
@@ -307,6 +309,7 @@ message JoinGameAckMessage {
|
||||
required uint32 gameId = 1;
|
||||
required bool areYouGameAdmin = 2;
|
||||
required NetGameInfo gameInfo = 3;
|
||||
optional bool spectateOnly = 4;
|
||||
}
|
||||
|
||||
message JoinGameFailedMessage {
|
||||
@@ -323,6 +326,7 @@ message JoinGameFailedMessage {
|
||||
invalidSettings = 9;
|
||||
ipAddressBlocked = 10;
|
||||
rejoinFailed = 11;
|
||||
noSpectatorsAllowed = 12;
|
||||
}
|
||||
required JoinGameFailureReason joinGameFailureReason = 2;
|
||||
}
|
||||
@@ -369,6 +373,7 @@ message RemovedFromGameMessage {
|
||||
gameIsRunning = 3;
|
||||
gameTimeout = 4;
|
||||
removedStartFailed = 5;
|
||||
gameClosed = 6;
|
||||
}
|
||||
required RemovedFromGameReason removedFromGameReason = 2;
|
||||
}
|
||||
@@ -449,6 +454,7 @@ message HandStartMessage {
|
||||
optional bytes encryptedCards = 3;
|
||||
required uint32 smallBlind = 4;
|
||||
repeated NetPlayerState seatStates = 5;
|
||||
optional uint32 dealerPlayerId = 6;
|
||||
}
|
||||
|
||||
message PlayersTurnMessage {
|
||||
|
||||
@@ -67,4 +67,5 @@ mac{
|
||||
INCLUDEPATH += /Developer/SDKs/MacOSX10.6.sdk/usr/include/
|
||||
INCLUDEPATH += /Library/Frameworks/SDL.framework/Headers
|
||||
INCLUDEPATH += /Library/Frameworks/SDL_mixer.framework/Headers
|
||||
INCLUDEPATH += /usr/local/include
|
||||
}
|
||||
|
||||
+12
-10
@@ -18,6 +18,7 @@ CONFIG += qt \
|
||||
warn_on
|
||||
include(src/third_party/qtsingleapplication/qtsingleapplication.pri)
|
||||
QT += sql
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
UI_DIR = uics
|
||||
MOC_DIR = mocs
|
||||
OBJECTS_DIR = obj
|
||||
@@ -42,7 +43,6 @@ INCLUDEPATH += . \
|
||||
src/engine/local_engine \
|
||||
src/engine/network_engine \
|
||||
src/config \
|
||||
src/third_party/asn1 \
|
||||
src/gui/qt \
|
||||
src/gui/qt/connecttoserverdialog \
|
||||
src/core \
|
||||
@@ -200,7 +200,6 @@ HEADERS += src/engine/game.h \
|
||||
src/gui/generic/serverguiwrapper.h \
|
||||
src/gui/qt/gametable/mychancelabel.h \
|
||||
src/gui/qt/serverlistdialog/serverlistdialogimpl.h \
|
||||
src/gui/qt/gametable/mymenubar.h \
|
||||
src/gui/qt/gametable/mytimeoutlabel.h \
|
||||
src/gui/qt/gametable/mynamelabel.h \
|
||||
src/gui/qt/settingsdialog/mystylelistitem.h \
|
||||
@@ -277,7 +276,6 @@ SOURCES += src/pokerth.cpp \
|
||||
src/core/common/loghelper_client.cpp \
|
||||
src/gui/qt/gametable/mychancelabel.cpp \
|
||||
src/gui/qt/serverlistdialog/serverlistdialogimpl.cpp \
|
||||
src/gui/qt/gametable/mymenubar.cpp \
|
||||
src/gui/qt/gametable/mytimeoutlabel.cpp \
|
||||
src/gui/qt/gametable/mynamelabel.cpp \
|
||||
src/gui/qt/settingsdialog/mystylelistitem.cpp \
|
||||
@@ -318,6 +316,7 @@ TRANSLATIONS = ts/pokerth_af.ts \
|
||||
ts/pokerth_sv.ts \
|
||||
ts/pokerth_ta.ts \
|
||||
ts/pokerth_tr.ts \
|
||||
ts/pokerth_vi.ts \
|
||||
ts/pokerth_START_HERE.ts
|
||||
|
||||
LIBS += -lpokerth_lib \
|
||||
@@ -358,12 +357,12 @@ win32 {
|
||||
-lcrypto \
|
||||
-lssh2 \
|
||||
-lgnutls \
|
||||
-lnettle \
|
||||
-lhogweed \
|
||||
-lgmp \
|
||||
-lgcrypt \
|
||||
-lgpg-error \
|
||||
-lgsasl \
|
||||
-lnettle \
|
||||
-lidn \
|
||||
-lintl \
|
||||
-lprotobuf
|
||||
@@ -404,15 +403,16 @@ unix:!mac {
|
||||
# QMAKE_CXXFLAGS += -ffunction-sections -fdata-sections
|
||||
# QMAKE_LFLAGS += -Wl,--gc-sections
|
||||
INCLUDEPATH += $${PREFIX}/include
|
||||
LIBPATH += lib
|
||||
QMAKE_LIBDIR += lib
|
||||
!android{
|
||||
LIBPATH += $${PREFIX}/lib /opt/gsasl/lib
|
||||
LIB_DIRS = $${PREFIX}/lib \
|
||||
$${PREFIX}/lib64
|
||||
$${PREFIX}/lib64 \
|
||||
$$system(qmake -query QT_INSTALL_LIBS)
|
||||
}
|
||||
android{
|
||||
LIBPATH += $${PREFIX}/lib/armv5
|
||||
LIB_DIRS = $${PREFIX}/lib/armv5
|
||||
LIBPATH += $${PREFIX}/lib/armv7
|
||||
LIB_DIRS = $${PREFIX}/lib/armv7
|
||||
}
|
||||
BOOST_FS = boost_filesystem \
|
||||
boost_filesystem-mt
|
||||
@@ -427,7 +427,7 @@ unix:!mac {
|
||||
BOOST_RANDOM = boost_random \
|
||||
boost_random-mt
|
||||
|
||||
# searching in $PREFIX/lib and $PREFIX/lib64
|
||||
# searching in $PREFIX/lib, $PREFIX/lib64 and $$system(qmake -query QT_INSTALL_LIBS)
|
||||
# to override the default '/usr' pass PREFIX
|
||||
# variable to qmake.
|
||||
for(dir, LIB_DIRS):exists($$dir) {
|
||||
@@ -596,6 +596,7 @@ mac {
|
||||
INCLUDEPATH += /Developer/SDKs/MacOSX10.6.sdk/usr/include/
|
||||
INCLUDEPATH += /Library/Frameworks/SDL.framework/Headers
|
||||
INCLUDEPATH += /Library/Frameworks/SDL_mixer.framework/Headers
|
||||
INCLUDEPATH += /usr/local/include
|
||||
}
|
||||
OTHER_FILES += docs/infomessage-id-desc.txt
|
||||
official_server {
|
||||
@@ -634,7 +635,8 @@ gui_800x480 {
|
||||
|
||||
android{
|
||||
# Use old boost::filesystem, because the new version requires std::wstring.
|
||||
DEFINES += BOOST_FILESYSTEM_VERSION=2
|
||||
DEFINES += BOOST_FILESYSTEM_VERSION=3
|
||||
DEFINES += TIXML_USE_STL
|
||||
# sqlite3 is included directly.
|
||||
INCLUDEPATH += src/third_party/sqlite3
|
||||
|
||||
|
||||
+20
-9
@@ -27,8 +27,8 @@ INCLUDEPATH += . \
|
||||
src/engine/local_engine \
|
||||
src/engine/network_engine \
|
||||
src/config \
|
||||
src/third_party/asn1 \
|
||||
src/core
|
||||
src/core \
|
||||
src/third_party/websocketpp
|
||||
|
||||
DEPENDPATH += . \
|
||||
src \
|
||||
@@ -42,7 +42,7 @@ DEPENDPATH += . \
|
||||
src/core/common \
|
||||
src/engine/local_engine \
|
||||
src/engine/network_engine \
|
||||
src/net/common \
|
||||
src/net/common
|
||||
|
||||
# Input
|
||||
HEADERS += \
|
||||
@@ -75,7 +75,9 @@ HEADERS += \
|
||||
src/net/senderhelper.h \
|
||||
src/net/sendercallback.h \
|
||||
src/net/serverexception.h \
|
||||
src/net/serveracceptinterface.h \
|
||||
src/net/serveraccepthelper.h \
|
||||
src/net/serveracceptwebhelper.h \
|
||||
src/net/servergame.h \
|
||||
src/net/servergamestate.h \
|
||||
src/net/serverlobbythread.h \
|
||||
@@ -100,7 +102,6 @@ HEADERS += \
|
||||
src/net/uploadhelper.h \
|
||||
src/net/downloaderthread.h \
|
||||
src/net/downloadhelper.h \
|
||||
src/net/internalchatcleanerpacket.h \
|
||||
src/engine/local_engine/cardsvalue.h \
|
||||
src/engine/local_engine/localboard.h \
|
||||
src/engine/local_engine/localenginefactory.h \
|
||||
@@ -129,9 +130,15 @@ HEADERS += \
|
||||
src/gui/qttoolsinterface.h \
|
||||
src/gui/generic/serverguiwrapper.h \
|
||||
src/net/receivebuffer.h \
|
||||
src/net/asioreceivebuffer.h \
|
||||
src/net/webreceivebuffer.h \
|
||||
src/net/sendbuffer.h \
|
||||
src/net/asiosendbuffer.h \
|
||||
src/net/websendbuffer.h \
|
||||
src/net/servermanagerfactory.h \
|
||||
src/net/uploadcallback.h
|
||||
src/net/uploadcallback.h \
|
||||
src/net/websocket_defs.h \
|
||||
src/net/websocketdata.h
|
||||
|
||||
SOURCES += \
|
||||
src/engine/game.cpp \
|
||||
@@ -180,7 +187,8 @@ SOURCES += \
|
||||
src/net/common/senderhelper.cpp \
|
||||
src/net/common/sendercallback.cpp \
|
||||
src/net/common/serverexception.cpp \
|
||||
src/net/common/serveraccepthelper.cpp \
|
||||
src/net/common/serveracceptinterface.cpp \
|
||||
src/net/common/serveracceptwebhelper.cpp \
|
||||
src/net/common/servergame.cpp \
|
||||
src/net/common/servergamestate.cpp \
|
||||
src/net/common/serverlobbythread.cpp \
|
||||
@@ -201,11 +209,14 @@ SOURCES += \
|
||||
src/net/common/transferhelper.cpp \
|
||||
src/net/common/uploaderthread.cpp \
|
||||
src/net/common/uploadhelper.cpp \
|
||||
src/net/common/internalchatcleanerpacket.cpp \
|
||||
src/gui/generic/serverguiwrapper.cpp \
|
||||
src/gui/qttoolsinterface.cpp \
|
||||
src/net/common/sendbuffer.cpp \
|
||||
src/net/common/asiosendbuffer.cpp \
|
||||
src/net/common/websendbuffer.cpp \
|
||||
src/net/common/receivebuffer.cpp \
|
||||
src/net/common/asioreceivebuffer.cpp \
|
||||
src/net/common/webreceivebuffer.cpp \
|
||||
src/net/common/uploadcallback.cpp
|
||||
|
||||
!android:!android_test{
|
||||
@@ -250,12 +261,12 @@ mac{
|
||||
INCLUDEPATH += /Developer/SDKs/MacOSX10.6.sdk/usr/include/
|
||||
INCLUDEPATH += /Library/Frameworks/SDL.framework/Headers
|
||||
INCLUDEPATH += /Library/Frameworks/SDL_mixer.framework/Headers
|
||||
INCLUDEPATH += /opt/local/include
|
||||
INCLUDEPATH += /usr/local/include
|
||||
}
|
||||
|
||||
android{
|
||||
# Use old boost::filesystem, because the new version requires std::wstring.
|
||||
DEFINES += BOOST_FILESYSTEM_VERSION=2
|
||||
DEFINES += BOOST_FILESYSTEM_VERSION=3
|
||||
# sqlite3 is included directly.
|
||||
INCLUDEPATH += src/third_party/sqlite3
|
||||
SOURCES += src/third_party/sqlite3/sqlite3.c
|
||||
|
||||
+9
-80
@@ -18,89 +18,16 @@ QT -= core \
|
||||
# PRECOMPILED_HEADER = src/pch_lib.h
|
||||
|
||||
INCLUDEPATH += . \
|
||||
src \
|
||||
src/third_party/asn1
|
||||
src
|
||||
DEPENDPATH += . \
|
||||
src \
|
||||
src/third_party/asn1
|
||||
src
|
||||
|
||||
# Input
|
||||
HEADERS += src/third_party/asn1/asn_application.h \
|
||||
src/third_party/asn1/asn_codecs.h \
|
||||
src/third_party/asn1/asn_codecs_prim.h \
|
||||
src/third_party/asn1/asn_internal.h \
|
||||
src/third_party/asn1/asn_SEQUENCE_OF.h \
|
||||
src/third_party/asn1/asn_SET_OF.h \
|
||||
src/third_party/asn1/asn_system.h \
|
||||
src/third_party/asn1/ber_decoder.h \
|
||||
src/third_party/asn1/ber_tlv_length.h \
|
||||
src/third_party/asn1/ber_tlv_tag.h \
|
||||
src/third_party/asn1/BIT_STRING.h \
|
||||
src/third_party/asn1/BOOLEAN.h \
|
||||
src/third_party/asn1/constraints.h \
|
||||
src/third_party/asn1/constr_CHOICE.h \
|
||||
src/third_party/asn1/constr_SEQUENCE.h \
|
||||
src/third_party/asn1/constr_SEQUENCE_OF.h \
|
||||
src/third_party/asn1/constr_SET_OF.h \
|
||||
src/third_party/asn1/constr_TYPE.h \
|
||||
src/third_party/asn1/der_encoder.h \
|
||||
src/third_party/asn1/INTEGER.h \
|
||||
src/third_party/asn1/NativeEnumerated.h \
|
||||
src/third_party/asn1/NativeInteger.h \
|
||||
src/third_party/asn1/OCTET_STRING.h \
|
||||
src/third_party/asn1/per_decoder.h \
|
||||
src/third_party/asn1/per_encoder.h \
|
||||
src/third_party/asn1/per_opentype.h \
|
||||
src/third_party/asn1/per_support.h \
|
||||
src/third_party/asn1/UTF8String.h \
|
||||
src/third_party/asn1/xer_decoder.h \
|
||||
src/third_party/asn1/xer_encoder.h \
|
||||
src/third_party/asn1/xer_support.h \
|
||||
src/third_party/asn1/ChatCleanerMessage.h \
|
||||
src/third_party/asn1/CleanerChatTypeLobby.h \
|
||||
src/third_party/asn1/CleanerChatTypeGame.h \
|
||||
src/third_party/asn1/CleanerChatType.h \
|
||||
src/third_party/asn1/CleanerInitMessage.h \
|
||||
src/third_party/asn1/CleanerInitAckMessage.h \
|
||||
src/third_party/asn1/CleanerChatRequestMessage.h \
|
||||
src/third_party/asn1/CleanerChatReplyMessage.h
|
||||
HEADERS += src/third_party/protobuf/pokerth.pb.h
|
||||
SOURCES += src/third_party/asn1/ChatCleanerMessage.c \
|
||||
src/third_party/asn1/CleanerChatTypeLobby.c \
|
||||
src/third_party/asn1/CleanerChatTypeGame.c \
|
||||
src/third_party/asn1/CleanerChatType.c \
|
||||
src/third_party/asn1/CleanerInitMessage.c \
|
||||
src/third_party/asn1/CleanerInitAckMessage.c \
|
||||
src/third_party/asn1/CleanerChatRequestMessage.c \
|
||||
src/third_party/asn1/CleanerChatReplyMessage.c \
|
||||
src/third_party/asn1/xer_support.c \
|
||||
src/third_party/asn1/xer_encoder.c \
|
||||
src/third_party/asn1/xer_decoder.c \
|
||||
src/third_party/asn1/UTF8String.c \
|
||||
src/third_party/asn1/per_support.c \
|
||||
src/third_party/asn1/per_opentype.c \
|
||||
src/third_party/asn1/per_encoder.c \
|
||||
src/third_party/asn1/per_decoder.c \
|
||||
src/third_party/asn1/OCTET_STRING.c \
|
||||
src/third_party/asn1/NativeInteger.c \
|
||||
src/third_party/asn1/NativeEnumerated.c \
|
||||
src/third_party/asn1/INTEGER.c \
|
||||
src/third_party/asn1/der_encoder.c \
|
||||
src/third_party/asn1/constraints.c \
|
||||
src/third_party/asn1/constr_TYPE.c \
|
||||
src/third_party/asn1/constr_SET_OF.c \
|
||||
src/third_party/asn1/constr_SEQUENCE_OF.c \
|
||||
src/third_party/asn1/constr_SEQUENCE.c \
|
||||
src/third_party/asn1/constr_CHOICE.c \
|
||||
src/third_party/asn1/BOOLEAN.c \
|
||||
src/third_party/asn1/BIT_STRING.c \
|
||||
src/third_party/asn1/ber_tlv_tag.c \
|
||||
src/third_party/asn1/ber_tlv_length.c \
|
||||
src/third_party/asn1/ber_decoder.c \
|
||||
src/third_party/asn1/asn_SET_OF.c \
|
||||
src/third_party/asn1/asn_SEQUENCE_OF.c \
|
||||
src/third_party/asn1/asn_codecs_prim.c
|
||||
SOURCES += src/third_party/protobuf/pokerth.pb.cc
|
||||
|
||||
HEADERS += src/third_party/protobuf/pokerth.pb.h \
|
||||
src/third_party/protobuf/chatcleaner.pb.h
|
||||
SOURCES += src/third_party/protobuf/pokerth.pb.cc \
|
||||
src/third_party/protobuf/chatcleaner.pb.cc
|
||||
win32 {
|
||||
DEFINES += CURL_STATICLIB
|
||||
DEFINES += _WIN32_WINNT=0x0501
|
||||
@@ -108,6 +35,7 @@ win32 {
|
||||
unix : !mac {
|
||||
INCLUDEPATH += $${PREFIX}/include
|
||||
system(protoc pokerth.proto --cpp_out=src/third_party/protobuf)
|
||||
system(protoc chatcleaner.proto --cpp_out=src/third_party/protobuf)
|
||||
system(protoc pokerth.proto --java_out=tests/src)
|
||||
}
|
||||
mac {
|
||||
@@ -123,4 +51,5 @@ mac {
|
||||
INCLUDEPATH += /Developer/SDKs/MacOSX10.6.sdk/usr/include/
|
||||
INCLUDEPATH += /Library/Frameworks/SDL.framework/Headers
|
||||
INCLUDEPATH += /Library/Frameworks/SDL_mixer.framework/Headers
|
||||
INCLUDEPATH += /usr/local/include
|
||||
}
|
||||
|
||||
+4
-4
@@ -30,7 +30,6 @@ INCLUDEPATH += . \
|
||||
src/engine/local_engine \
|
||||
src/engine/network_engine \
|
||||
src/config \
|
||||
src/third_party/asn1 \
|
||||
src/core \
|
||||
|
||||
DEPENDPATH += . \
|
||||
@@ -131,7 +130,7 @@ win32 {
|
||||
debug:LIBPATH += debug/lib
|
||||
release:LIBPATH += release/lib
|
||||
|
||||
LIBS += -lssl -lcrypto -lssh2 -lgnutls -lnettle -lhogweed -lgmp -lgcrypt -lgpg-error -lgsasl -lidn -lintl -lprotobuf -ltinyxml -lsqlite3 -lntlm
|
||||
LIBS += -lssl -lcrypto -lssh2 -lgnutls -lhogweed -lgmp -lgcrypt -lgpg-error -lgsasl -lnettle -lidn -lintl -lprotobuf -ltinyxml -lsqlite3 -lntlm
|
||||
LIBS += -lboost_thread_win32-mt
|
||||
LIBS += -lboost_filesystem-mt
|
||||
LIBS += -lboost_regex-mt
|
||||
@@ -176,7 +175,7 @@ unix : !mac {
|
||||
|
||||
LIBPATH += lib $${PREFIX}/lib /opt/gsasl/lib
|
||||
INCLUDEPATH += $${PREFIX}/include
|
||||
LIB_DIRS = $${PREFIX}/lib $${PREFIX}/lib64
|
||||
LIB_DIRS = $${PREFIX}/lib $${PREFIX}/lib64 $$system(qmake -query QT_INSTALL_LIBS)
|
||||
BOOST_FS = boost_filesystem boost_filesystem-mt
|
||||
BOOST_THREAD = boost_thread boost_thread-mt
|
||||
BOOST_PROGRAM_OPTIONS = boost_program_options boost_program_options-mt
|
||||
@@ -186,7 +185,7 @@ unix : !mac {
|
||||
BOOST_RANDOM = boost_random boost_random-mt
|
||||
|
||||
#
|
||||
# searching in $PREFIX/lib and $PREFIX/lib64
|
||||
# searching in $PREFIX/lib, $PREFIX/lib64 and $$system(qmake -query QT_INSTALL_LIBS)
|
||||
# to override the default '/usr' pass PREFIX
|
||||
# variable to qmake.
|
||||
#
|
||||
@@ -316,6 +315,7 @@ mac {
|
||||
RC_FILE = pokerth.icns
|
||||
LIBPATH += /Developer/SDKs/MacOSX10.6.sdk/usr/lib
|
||||
INCLUDEPATH += /Developer/SDKs/MacOSX10.6.sdk/usr/include/
|
||||
INCLUDEPATH += /usr/local/include
|
||||
}
|
||||
|
||||
official_server {
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
* as that of the covered work. *
|
||||
*****************************************************************************/
|
||||
#include "cleanerconfig.h"
|
||||
#include <QtCore>
|
||||
|
||||
#include <tinyxml.h>
|
||||
|
||||
#define MODUS 0711
|
||||
@@ -46,8 +48,6 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <QtCore>
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
|
||||
@@ -32,9 +32,10 @@
|
||||
|
||||
#include <QtNetwork>
|
||||
#include <QtCore>
|
||||
#include <QtEndian>
|
||||
#include <cstdlib>
|
||||
#include <string>
|
||||
#include <third_party/asn1/ChatCleanerMessage.h>
|
||||
#include <third_party/protobuf/chatcleaner.pb.h>
|
||||
|
||||
#include "messagefilter.h"
|
||||
#include "cleanerconfig.h"
|
||||
@@ -82,6 +83,9 @@ void CleanerServer::newCon()
|
||||
connect(tcpSocket, SIGNAL(readyRead()), this, SLOT(onRead()));
|
||||
connect(tcpSocket, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(socketStateChanged(QAbstractSocket::SocketState)));
|
||||
blockConnection = true;
|
||||
#if QT_VERSION >= 0x050100
|
||||
tcpServer->pauseAccepting();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,23 +95,38 @@ void CleanerServer::onRead()
|
||||
bool error = bytesRead < 1;
|
||||
if (!error) {
|
||||
m_recvBufUsed += bytesRead;
|
||||
|
||||
asn_dec_rval_t retVal;
|
||||
bool valid;
|
||||
do {
|
||||
// Try to decode the packets.
|
||||
InternalChatCleanerPacket recvMsg;
|
||||
retVal = ber_decode(0, &asn_DEF_ChatCleanerMessage, (void **)recvMsg.GetMsgPtr(), m_recvBuf, m_recvBufUsed);
|
||||
if(retVal.code == RC_OK) {
|
||||
if (retVal.consumed < m_recvBufUsed) {
|
||||
m_recvBufUsed -= retVal.consumed;
|
||||
memmove(m_recvBuf, m_recvBuf + retVal.consumed, m_recvBufUsed);
|
||||
} else
|
||||
valid = false;
|
||||
if (m_recvBufUsed >= CLEANER_NET_HEADER_SIZE) {
|
||||
// Read the size of the packet (first 4 bytes in network byte order).
|
||||
uint32_t nativeVal;
|
||||
memcpy(&nativeVal, &m_recvBuf[0], sizeof(uint32_t));
|
||||
size_t packetSize = qFromBigEndian(nativeVal);
|
||||
if (packetSize > MAX_CLEANER_PACKET_SIZE) {
|
||||
m_recvBufUsed = 0;
|
||||
|
||||
// Handle the packets.
|
||||
error = handleMessage(recvMsg);
|
||||
qDebug() << "Invalid packet size: " << packetSize;
|
||||
} else if (m_recvBufUsed >= packetSize + CLEANER_NET_HEADER_SIZE) {
|
||||
try {
|
||||
// Try to decode the packet.
|
||||
boost::shared_ptr<ChatCleanerMessage> recvMsg(ChatCleanerMessage::default_instance().New());
|
||||
if (recvMsg->ParseFromArray(&m_recvBuf[CLEANER_NET_HEADER_SIZE], static_cast<int>(packetSize))) {
|
||||
m_recvBufUsed -= (packetSize + CLEANER_NET_HEADER_SIZE);
|
||||
if (m_recvBufUsed) {
|
||||
memmove(m_recvBuf, m_recvBuf + packetSize + CLEANER_NET_HEADER_SIZE, m_recvBufUsed);
|
||||
}
|
||||
} while (!error && retVal.code == RC_OK);
|
||||
}
|
||||
// Handle the packet.
|
||||
error = handleMessage(*recvMsg);
|
||||
valid = true;
|
||||
} catch (const exception &e) {
|
||||
// Reset buffer on error.
|
||||
m_recvBufUsed = 0;
|
||||
qDebug() << "Exception while decoding packet: " << e.what();
|
||||
}
|
||||
}
|
||||
}
|
||||
} while (valid && !error);
|
||||
}
|
||||
|
||||
if (error) {
|
||||
@@ -128,71 +147,58 @@ void CleanerServer::onRead()
|
||||
tcpSocket->write(checkMessage.toAscii().data(), checkMessage.length());*/
|
||||
}
|
||||
|
||||
bool CleanerServer::handleMessage(InternalChatCleanerPacket &msg)
|
||||
bool CleanerServer::handleMessage(ChatCleanerMessage &msg)
|
||||
{
|
||||
bool error = true;
|
||||
if (msg.GetMsg()->present == ChatCleanerMessage_PR_cleanerInitMessage) {
|
||||
CleanerInitMessage_t *netInit = &msg.GetMsg()->choice.cleanerInitMessage;
|
||||
if (netInit->requestedVersion == CLEANER_PROTOCOL_VERSION) {
|
||||
string tmpClientSecret((const char *)netInit->clientSecret.buf, netInit->clientSecret.size);
|
||||
if (clientSecret == QString::fromStdString(tmpClientSecret)) {
|
||||
if (msg.messagetype() == ChatCleanerMessage::Type_CleanerInitMessage) {
|
||||
const CleanerInitMessage &netInit = msg.cleanerinitmessage();
|
||||
if (netInit.requestedversion() == CLEANER_PROTOCOL_VERSION) {
|
||||
if (clientSecret == QString::fromStdString(netInit.clientsecret())) {
|
||||
error = false;
|
||||
|
||||
InternalChatCleanerPacket tmpAck;
|
||||
tmpAck.GetMsg()->present = ChatCleanerMessage_PR_cleanerInitAckMessage;
|
||||
CleanerInitAckMessage_t *netAck = &tmpAck.GetMsg()->choice.cleanerInitAckMessage;
|
||||
netAck->serverVersion = CLEANER_PROTOCOL_VERSION;
|
||||
string tmpServerSecret(serverSecret.toStdString());
|
||||
OCTET_STRING_fromBuf(&netAck->serverSecret,
|
||||
tmpServerSecret.c_str(),
|
||||
tmpServerSecret.length());
|
||||
sendMessageToClient(tmpAck);
|
||||
boost::shared_ptr<ChatCleanerMessage> tmpAck(ChatCleanerMessage::default_instance().New());
|
||||
tmpAck->set_messagetype(ChatCleanerMessage::Type_CleanerInitAckMessage);
|
||||
CleanerInitAckMessage *netAck = tmpAck->mutable_cleanerinitackmessage();
|
||||
netAck->set_serverversion(CLEANER_PROTOCOL_VERSION);
|
||||
netAck->set_serversecret(serverSecret.toStdString());
|
||||
sendMessageToClient(*tmpAck);
|
||||
} else
|
||||
qDebug() << "Invalid client secret.";
|
||||
} else
|
||||
qDebug() << "Invalid client version: " << netInit->requestedVersion;
|
||||
} else if (msg.GetMsg()->present == ChatCleanerMessage_PR_cleanerChatRequestMessage) {
|
||||
qDebug() << "Invalid client version: " << netInit.requestedversion();
|
||||
} else if (msg.messagetype() == ChatCleanerMessage::Type_CleanerChatRequestMessage) {
|
||||
error = false;
|
||||
CleanerChatRequestMessage_t *netRequest = &msg.GetMsg()->choice.cleanerChatRequestMessage;
|
||||
unsigned playerId = netRequest->playerId;
|
||||
QString nick(QString::fromUtf8(
|
||||
string((const char *)netRequest->playerName.buf, netRequest->playerName.size).c_str()));
|
||||
QString message(QString::fromUtf8(
|
||||
string((const char *)netRequest->chatMessage.buf, netRequest->chatMessage.size).c_str()));
|
||||
unsigned gameId = 0;
|
||||
if (netRequest->cleanerChatType.present == CleanerChatType_PR_cleanerChatTypeGame) {
|
||||
gameId = netRequest->cleanerChatType.choice.cleanerChatTypeGame.gameId;
|
||||
}
|
||||
const CleanerChatRequestMessage &netRequest = msg.cleanerchatrequestmessage();
|
||||
unsigned playerId = netRequest.playerid();
|
||||
QString nick(QString::fromUtf8(netRequest.playername().c_str()));
|
||||
QString message(QString::fromUtf8(netRequest.chatmessage().c_str()));
|
||||
unsigned gameId = netRequest.gameid();
|
||||
|
||||
QStringList checkreturn = myMessageFilter->check(gameId, playerId, nick, message);
|
||||
QString checkAction = checkreturn.at(0);
|
||||
QString checkMessage = checkreturn.at(1);
|
||||
|
||||
if (!checkAction.isEmpty()) {
|
||||
InternalChatCleanerPacket tmpReply;
|
||||
tmpReply.GetMsg()->present = ChatCleanerMessage_PR_cleanerChatReplyMessage;
|
||||
CleanerChatReplyMessage_t *netReply = &tmpReply.GetMsg()->choice.cleanerChatReplyMessage;
|
||||
netReply->requestId = netRequest->requestId;
|
||||
netReply->cleanerChatType = netRequest->cleanerChatType;
|
||||
netReply->playerId = netRequest->playerId;
|
||||
boost::shared_ptr<ChatCleanerMessage> tmpReply(ChatCleanerMessage::default_instance().New());
|
||||
tmpReply->set_messagetype(ChatCleanerMessage::Type_CleanerChatReplyMessage);
|
||||
CleanerChatReplyMessage *netReply = tmpReply->mutable_cleanerchatreplymessage();
|
||||
netReply->set_requestid(netRequest.requestid());
|
||||
netReply->set_gameid(netRequest.gameid());
|
||||
netReply->set_cleanerchattype(netRequest.cleanerchattype());
|
||||
netReply->set_playerid(netRequest.playerid());
|
||||
|
||||
if(checkAction == "warn") {
|
||||
netReply->cleanerActionType = cleanerActionType_cleanerActionWarning;
|
||||
netReply->set_cleaneractiontype(CleanerChatReplyMessage_CleanerActionType_cleanerActionWarning);
|
||||
} else if (checkAction == "kick") {
|
||||
netReply->cleanerActionType = cleanerActionType_cleanerActionKick;
|
||||
netReply->set_cleaneractiontype(CleanerChatReplyMessage_CleanerActionType_cleanerActionKick);
|
||||
} else if (checkAction == "kickban") {
|
||||
netReply->cleanerActionType = cleanerActionType_cleanerActionBan;
|
||||
netReply->set_cleaneractiontype(CleanerChatReplyMessage_CleanerActionType_cleanerActionBan);
|
||||
} else if (checkAction == "mute") {
|
||||
netReply->cleanerActionType = cleanerActionType_cleanerActionMute;
|
||||
netReply->set_cleaneractiontype(CleanerChatReplyMessage_CleanerActionType_cleanerActionMute);
|
||||
}
|
||||
|
||||
string tmpCheck(checkMessage.toUtf8());
|
||||
netReply->cleanerText =
|
||||
OCTET_STRING_new_fromBuf(
|
||||
&asn_DEF_OCTET_STRING,
|
||||
(const char *)tmpCheck.c_str(),
|
||||
tmpCheck.length());
|
||||
sendMessageToClient(tmpReply);
|
||||
netReply->set_cleanertext(checkMessage.toUtf8());
|
||||
sendMessageToClient(*tmpReply);
|
||||
}
|
||||
}
|
||||
return error;
|
||||
@@ -200,9 +206,13 @@ bool CleanerServer::handleMessage(InternalChatCleanerPacket &msg)
|
||||
|
||||
void CleanerServer::socketStateChanged(QAbstractSocket::SocketState state)
|
||||
{
|
||||
|
||||
qDebug() << "Socket state changed to: " << QAbstractSocket::UnconnectedState;
|
||||
if(state == QAbstractSocket::UnconnectedState) blockConnection = false;
|
||||
qDebug() << "Socket state changed to: " << state;
|
||||
if (state == QAbstractSocket::UnconnectedState) {
|
||||
blockConnection = false;
|
||||
#if QT_VERSION >= 0x050100
|
||||
tcpServer->resumeAccepting();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void CleanerServer::refreshConfig()
|
||||
@@ -217,14 +227,13 @@ void CleanerServer::refreshConfig()
|
||||
myMessageFilter->refreshConfig();
|
||||
}
|
||||
|
||||
void CleanerServer::sendMessageToClient(InternalChatCleanerPacket &msg)
|
||||
void CleanerServer::sendMessageToClient(ChatCleanerMessage &msg)
|
||||
{
|
||||
unsigned char buf[MAX_CLEANER_PACKET_SIZE];
|
||||
asn_enc_rval_t e = der_encode_to_buffer(&asn_DEF_ChatCleanerMessage, msg.GetMsg(), buf, MAX_CLEANER_PACKET_SIZE);
|
||||
|
||||
if (e.encoded == -1)
|
||||
qDebug() << "Failed to encode chat cleaner packet: " << msg.GetMsg()->present;
|
||||
else
|
||||
tcpSocket->write((const char *)buf, e.encoded);
|
||||
uint32_t packetSize = msg.ByteSize();
|
||||
google::protobuf::uint8 *buf = new google::protobuf::uint8[packetSize + CLEANER_NET_HEADER_SIZE];
|
||||
*((uint32_t *)buf) = qToBigEndian(packetSize);
|
||||
msg.SerializeWithCachedSizesToArray(&buf[CLEANER_NET_HEADER_SIZE]);
|
||||
tcpSocket->write((const char *)buf, packetSize + CLEANER_NET_HEADER_SIZE);
|
||||
delete[] buf;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,10 +33,14 @@
|
||||
|
||||
#include <QtCore>
|
||||
#include <QtNetwork>
|
||||
#include <net/internalchatcleanerpacket.h>
|
||||
|
||||
#define CLEANER_NET_HEADER_SIZE 4
|
||||
#define MAX_CLEANER_PACKET_SIZE 512
|
||||
#define CLEANER_PROTOCOL_VERSION 2
|
||||
|
||||
class MessageFilter;
|
||||
class CleanerConfig;
|
||||
class ChatCleanerMessage;
|
||||
|
||||
class CleanerServer: public QObject
|
||||
{
|
||||
@@ -49,10 +53,10 @@ public:
|
||||
private slots:
|
||||
void newCon();
|
||||
void onRead();
|
||||
bool handleMessage(InternalChatCleanerPacket &msg);
|
||||
bool handleMessage(ChatCleanerMessage &msg);
|
||||
void socketStateChanged(QAbstractSocket::SocketState);
|
||||
void refreshConfig();
|
||||
void sendMessageToClient(InternalChatCleanerPacket &msg);
|
||||
void sendMessageToClient(ChatCleanerMessage &msg);
|
||||
|
||||
private:
|
||||
QTcpServer *tcpServer;
|
||||
@@ -66,7 +70,7 @@ private:
|
||||
QString serverSecret;
|
||||
|
||||
unsigned char m_recvBuf[2*MAX_CLEANER_PACKET_SIZE];
|
||||
unsigned m_recvBufUsed;
|
||||
size_t m_recvBufUsed;
|
||||
|
||||
int secondsSinceLastConfigChange;
|
||||
};
|
||||
|
||||
@@ -33,7 +33,9 @@
|
||||
|
||||
#include <QtCore>
|
||||
#include <stdlib.h>
|
||||
#ifndef Q_MOC_RUN
|
||||
#include <third_party/boost/timers.hpp>
|
||||
#endif
|
||||
|
||||
class BadWordCheck;
|
||||
class TextFloodCheck;
|
||||
|
||||
@@ -32,7 +32,9 @@
|
||||
#define TEXTFLOODCHECK_H
|
||||
|
||||
#include <QtCore>
|
||||
#ifndef Q_MOC_RUN
|
||||
#include <third_party/boost/timers.hpp>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ ConfigFile::ConfigFile(char *argv0, bool readonly) : noWriteAccess(readonly)
|
||||
myConfigState = OK;
|
||||
|
||||
// !!!! Revisionsnummer der Configdefaults !!!!!
|
||||
configRev = 98;
|
||||
configRev = 104;
|
||||
|
||||
//standard defaults
|
||||
logOnOffDefault = "1";
|
||||
@@ -150,9 +150,9 @@ ConfigFile::ConfigFile(char *argv0, bool readonly) : noWriteAccess(readonly)
|
||||
configList.push_back(ConfigInfo("AppDataDir", CONFIG_TYPE_STRING, myQtToolsInterface->getDataPathStdString(myArgv0)));
|
||||
#endif
|
||||
configList.push_back(ConfigInfo("Language", CONFIG_TYPE_INT, myQtToolsInterface->getDefaultLanguage()));
|
||||
/*configList.push_back(ConfigInfo("InternetServerAddressIRCChannelUpdateDone", CONFIG_TYPE_INT, "1"));*/ //HACK
|
||||
configList.push_back(ConfigInfo("ShowLeftToolBox", CONFIG_TYPE_INT, "1"));
|
||||
configList.push_back(ConfigInfo("ShowCountryFlagInAvatar", CONFIG_TYPE_INT, "1"));
|
||||
configList.push_back(ConfigInfo("ShowPingStateInAvatar", CONFIG_TYPE_INT, "1"));
|
||||
configList.push_back(ConfigInfo("ShowRightToolBox", CONFIG_TYPE_INT, "1"));
|
||||
configList.push_back(ConfigInfo("ShowFadeOutCardsAnimation", CONFIG_TYPE_INT, "1"));
|
||||
configList.push_back(ConfigInfo("ShowFlipCardsAnimation", CONFIG_TYPE_INT, "1"));
|
||||
@@ -161,6 +161,8 @@ ConfigFile::ConfigFile(char *argv0, bool readonly) : noWriteAccess(readonly)
|
||||
configList.push_back(ConfigInfo("DontTranslateInternationalPokerStringsFromStyle", CONFIG_TYPE_INT, "0"));
|
||||
configList.push_back(ConfigInfo("DisableSplashScreenOnStartup", CONFIG_TYPE_INT, "0"));
|
||||
configList.push_back(ConfigInfo("AccidentallyCallBlocker", CONFIG_TYPE_INT, "1"));
|
||||
configList.push_back(ConfigInfo("DontHideAvatarsOfIgnored", CONFIG_TYPE_INT, "0"));
|
||||
configList.push_back(ConfigInfo("DisableChatEmoticons", CONFIG_TYPE_INT, "0"));
|
||||
configList.push_back(ConfigInfo("AntiPeekMode", CONFIG_TYPE_INT, "0"));
|
||||
configList.push_back(ConfigInfo("AlternateFKeysUserActionMode", CONFIG_TYPE_INT, "0"));
|
||||
configList.push_back(ConfigInfo("EnableBetInputFocusSwitch", CONFIG_TYPE_INT, "0"));
|
||||
@@ -218,7 +220,11 @@ ConfigFile::ConfigFile(char *argv0, bool readonly) : noWriteAccess(readonly)
|
||||
configList.push_back(ConfigInfo("ServerPassword", CONFIG_TYPE_STRING, ""));
|
||||
configList.push_back(ConfigInfo("ServerUseIpv6", CONFIG_TYPE_INT, "0"));
|
||||
configList.push_back(ConfigInfo("ServerUseSctp", CONFIG_TYPE_INT, "0"));
|
||||
configList.push_back(ConfigInfo("ServerUseWebSocket", CONFIG_TYPE_INT, "0"));
|
||||
configList.push_back(ConfigInfo("ServerPort", CONFIG_TYPE_INT, "7234"));
|
||||
configList.push_back(ConfigInfo("ServerWebSocketPort", CONFIG_TYPE_INT, "7233"));
|
||||
configList.push_back(ConfigInfo("ServerWebSocketResource", CONFIG_TYPE_STRING, ""));
|
||||
configList.push_back(ConfigInfo("ServerWebSocketOrigin", CONFIG_TYPE_STRING, ""));
|
||||
configList.push_back(ConfigInfo("ServerUsePutAvatars", CONFIG_TYPE_INT, "0"));
|
||||
configList.push_back(ConfigInfo("ServerPutAvatarsAddress", CONFIG_TYPE_STRING, ""));
|
||||
configList.push_back(ConfigInfo("ServerPutAvatarsUser", CONFIG_TYPE_STRING, ""));
|
||||
@@ -236,6 +242,7 @@ ConfigFile::ConfigFile(char *argv0, bool readonly) : noWriteAccess(readonly)
|
||||
configList.push_back(ConfigInfo("InternetGamePassword", CONFIG_TYPE_STRING, ""));
|
||||
configList.push_back(ConfigInfo("InternetGameType", CONFIG_TYPE_INT, "0"));
|
||||
configList.push_back(ConfigInfo("InternetGameName", CONFIG_TYPE_STRING, "My Online Game"));
|
||||
configList.push_back(ConfigInfo("InternetGameAllowSpectators", CONFIG_TYPE_INT, "1"));
|
||||
configList.push_back(ConfigInfo("UseLobbyChat", CONFIG_TYPE_INT, "1"));
|
||||
configList.push_back(ConfigInfo("UseAdminIRC", CONFIG_TYPE_INT, "0"));
|
||||
configList.push_back(ConfigInfo("AdminIRCServerAddress", CONFIG_TYPE_STRING, "chat.freenode.net"));
|
||||
|
||||
@@ -35,7 +35,9 @@
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
#ifndef Q_MOC_RUN
|
||||
#include <boost/thread.hpp>
|
||||
#endif
|
||||
|
||||
enum ConfigState { NONEXISTING, OLD, OK };
|
||||
enum ConfigType { CONFIG_TYPE_INT, CONFIG_TYPE_STRING, CONFIG_TYPE_INT_LIST, CONFIG_TYPE_STRING_LIST };
|
||||
|
||||
@@ -435,7 +435,6 @@ AvatarManager::RemoveOldAvatarCacheEntries()
|
||||
// Count files and record age.
|
||||
AvatarList removeList;
|
||||
TimeAvatarMap timeMap;
|
||||
unsigned fileCount = 0;
|
||||
{
|
||||
AvatarMap::const_iterator i = m_cachedAvatars.begin();
|
||||
AvatarMap::const_iterator end = m_cachedAvatars.end();
|
||||
@@ -448,7 +447,6 @@ AvatarManager::RemoveOldAvatarCacheEntries()
|
||||
// Only consider files with MD5 as file name.
|
||||
MD5Buf tmpBuf;
|
||||
if (exists(filePath) && tmpBuf.FromString(basename(filePath))) {
|
||||
++fileCount;
|
||||
timeMap.insert(TimeAvatarMap::value_type(last_write_time(filePath), i->first));
|
||||
keepFile = true;
|
||||
}
|
||||
|
||||
+9
-6
@@ -220,8 +220,9 @@ void Game::startHand()
|
||||
boost::shared_ptr<PlayerInterface> Game::getPlayerByUniqueId(unsigned id)
|
||||
{
|
||||
boost::shared_ptr<PlayerInterface> tmpPlayer;
|
||||
PlayerListIterator i = getSeatsList()->begin();
|
||||
PlayerListIterator end = getSeatsList()->end();
|
||||
PlayerList tmpList = getSeatsList();
|
||||
PlayerListIterator i = tmpList->begin();
|
||||
PlayerListIterator end = tmpList->end();
|
||||
while (i != end) {
|
||||
if ((*i)->getMyUniqueID() == id) {
|
||||
tmpPlayer = *i;
|
||||
@@ -235,8 +236,9 @@ boost::shared_ptr<PlayerInterface> Game::getPlayerByUniqueId(unsigned id)
|
||||
boost::shared_ptr<PlayerInterface> Game::getPlayerByNumber(int number)
|
||||
{
|
||||
boost::shared_ptr<PlayerInterface> tmpPlayer;
|
||||
PlayerListIterator i = getSeatsList()->begin();
|
||||
PlayerListIterator end = getSeatsList()->end();
|
||||
PlayerList tmpList = getSeatsList();
|
||||
PlayerListIterator i = tmpList->begin();
|
||||
PlayerListIterator end = tmpList->end();
|
||||
while (i != end) {
|
||||
if ((*i)->getMyID() == number) {
|
||||
tmpPlayer = *i;
|
||||
@@ -258,8 +260,9 @@ boost::shared_ptr<PlayerInterface> Game::getCurrentPlayer()
|
||||
boost::shared_ptr<PlayerInterface> Game::getPlayerByName(const std::string &name)
|
||||
{
|
||||
boost::shared_ptr<PlayerInterface> tmpPlayer;
|
||||
PlayerListIterator i = getSeatsList()->begin();
|
||||
PlayerListIterator end = getSeatsList()->end();
|
||||
PlayerList tmpList = getSeatsList();
|
||||
PlayerListIterator i = tmpList->begin();
|
||||
PlayerListIterator end = tmpList->end();
|
||||
while (i != end) {
|
||||
if ((*i)->getMyName() == name) {
|
||||
tmpPlayer = *i;
|
||||
|
||||
@@ -1142,11 +1142,9 @@ std::string CardsValue::determineHandName(int myCardsValueInt, PlayerList active
|
||||
// 4.there are still same hands
|
||||
if(equal) {
|
||||
different = false;
|
||||
equal = false;
|
||||
// third kicker?
|
||||
for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); ) {
|
||||
if((*it) == myCardsValueInt) {
|
||||
equal = true;
|
||||
++it;
|
||||
} else {
|
||||
different = true;
|
||||
|
||||
+7
-16
@@ -42,11 +42,11 @@
|
||||
#define HTML_LOG 0
|
||||
|
||||
#define POKERTH_VERSION_MAJOR 1
|
||||
#define POKERTH_VERSION_MINOR 01
|
||||
#define POKERTH_VERSION_MINOR 10
|
||||
#define POKERTH_VERSION ((POKERTH_VERSION_MAJOR << 8) | POKERTH_VERSION_MINOR)
|
||||
|
||||
#define POKERTH_BETA_REVISION 0
|
||||
#define POKERTH_BETA_RELEASE_STRING "1.0.1"
|
||||
#define POKERTH_BETA_REVISION 4
|
||||
#define POKERTH_BETA_RELEASE_STRING "1.1 beta4"
|
||||
|
||||
#define SQLITE_LOG_VERSION 1
|
||||
|
||||
@@ -64,7 +64,10 @@ enum ServerMode {
|
||||
enum ServerTransportProtocol {
|
||||
TRANSPORT_PROTOCOL_TCP = 1,
|
||||
TRANSPORT_PROTOCOL_SCTP = 2,
|
||||
TRANSPORT_PROTOCOL_TCP_SCTP = 3
|
||||
TRANSPORT_PROTOCOL_TCP_SCTP = 3,
|
||||
TRANSPORT_PROTOCOL_WEBSOCKET = 4,
|
||||
TRANSPORT_PROTOCOL_TCP_WEBSOCKET = 5,
|
||||
TRANSPORT_PROTOCOL_TCP_SCTP_WEBSOCKET = 7
|
||||
};
|
||||
|
||||
enum GameState {
|
||||
@@ -176,16 +179,4 @@ enum NetTimeoutReason {
|
||||
NETWORK_TIMEOUT_KICK_AFTER_AUTOFOLD
|
||||
};
|
||||
|
||||
struct ServerStats {
|
||||
ServerStats()
|
||||
: numberOfPlayersOnServer(0), numberOfGamesOpen(0), totalPlayersEverLoggedIn(0),
|
||||
totalGamesEverCreated(0), maxGamesOpen(0), maxPlayersLoggedIn(0) {}
|
||||
unsigned numberOfPlayersOnServer;
|
||||
unsigned numberOfGamesOpen;
|
||||
unsigned totalPlayersEverLoggedIn;
|
||||
unsigned totalGamesEverCreated;
|
||||
unsigned maxGamesOpen;
|
||||
unsigned maxPlayersLoggedIn;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
+11
-7
@@ -35,8 +35,9 @@
|
||||
|
||||
#include <list>
|
||||
#include <string>
|
||||
#ifndef Q_MOC_RUN
|
||||
#include <third_party/boost/timers.hpp>
|
||||
|
||||
#endif
|
||||
|
||||
typedef std::list<unsigned> PlayerIdList;
|
||||
|
||||
@@ -71,13 +72,14 @@ enum AfterManualBlindsMode {
|
||||
|
||||
// For the sake of simplicity, this is a struct.
|
||||
struct GameData {
|
||||
GameData() : gameType(GAME_TYPE_NORMAL), maxNumberOfPlayers(0), startMoney(0),
|
||||
firstSmallBlind(0), raiseIntervalMode(RAISE_ON_HANDNUMBER),
|
||||
raiseSmallBlindEveryHandsValue(8), raiseSmallBlindEveryMinutesValue(1),
|
||||
raiseMode(DOUBLE_BLINDS), afterManualBlindsMode(AFTERMB_DOUBLE_BLINDS),
|
||||
afterMBAlwaysRaiseValue(0), guiSpeed(4), delayBetweenHandsSec(6),
|
||||
playerActionTimeoutSec(20) {}
|
||||
GameData() : gameType(GAME_TYPE_NORMAL), allowSpectators(true),
|
||||
maxNumberOfPlayers(0), startMoney(0), firstSmallBlind(0),
|
||||
raiseIntervalMode(RAISE_ON_HANDNUMBER), raiseSmallBlindEveryHandsValue(8),
|
||||
raiseSmallBlindEveryMinutesValue(1), raiseMode(DOUBLE_BLINDS),
|
||||
afterManualBlindsMode(AFTERMB_DOUBLE_BLINDS), afterMBAlwaysRaiseValue(0),
|
||||
guiSpeed(4), delayBetweenHandsSec(6), playerActionTimeoutSec(20) {}
|
||||
GameType gameType;
|
||||
bool allowSpectators;
|
||||
int maxNumberOfPlayers;
|
||||
int startMoney;
|
||||
int firstSmallBlind;
|
||||
@@ -100,6 +102,8 @@ struct GameInfo {
|
||||
GameMode mode;
|
||||
unsigned adminPlayerId;
|
||||
PlayerIdList players;
|
||||
PlayerIdList spectators;
|
||||
PlayerIdList spectatorsDuringGame;
|
||||
bool isPasswordProtected;
|
||||
};
|
||||
|
||||
|
||||
@@ -58,70 +58,50 @@ void ServerGuiWrapper::setSession(boost::shared_ptr<Session> session)
|
||||
}
|
||||
|
||||
void ServerGuiWrapper::refreshSet() const {}
|
||||
|
||||
void ServerGuiWrapper::refreshCash() const {}
|
||||
|
||||
void ServerGuiWrapper::refreshAction(int /*playerID*/, int /*playerAction*/) const {}
|
||||
|
||||
void ServerGuiWrapper::refreshChangePlayer() const {}
|
||||
|
||||
void ServerGuiWrapper::refreshAll() const {}
|
||||
|
||||
void ServerGuiWrapper::refreshPot() const {}
|
||||
void ServerGuiWrapper::refreshGroupbox(int /*playerID*/, int /*status*/) const {}
|
||||
void ServerGuiWrapper::refreshPlayerName() const {}
|
||||
void ServerGuiWrapper::refreshButton() const {}
|
||||
void ServerGuiWrapper::refreshGameLabels(GameState /*state*/) const {}
|
||||
|
||||
void ServerGuiWrapper::setPlayerAvatar(int /*myUniqueID*/, const std::string &/*myAvatar*/) const {};
|
||||
|
||||
void ServerGuiWrapper::waitForGuiUpdateDone() const {}
|
||||
|
||||
void ServerGuiWrapper::dealBeRoCards(int /*myBeRoID*/) {}
|
||||
void ServerGuiWrapper::dealHoleCards() {}
|
||||
void ServerGuiWrapper::dealFlopCards() {}
|
||||
void ServerGuiWrapper::dealTurnCard() {}
|
||||
void ServerGuiWrapper::dealRiverCard() {}
|
||||
|
||||
void ServerGuiWrapper::nextPlayerAnimation() {}
|
||||
|
||||
void ServerGuiWrapper::beRoAnimation2(int /*myBeRoID*/) {}
|
||||
|
||||
void ServerGuiWrapper::preflopAnimation1() {}
|
||||
void ServerGuiWrapper::preflopAnimation2() {}
|
||||
|
||||
void ServerGuiWrapper::flopAnimation1() {}
|
||||
void ServerGuiWrapper::flopAnimation2() {}
|
||||
|
||||
void ServerGuiWrapper::turnAnimation1() {}
|
||||
void ServerGuiWrapper::turnAnimation2() {}
|
||||
|
||||
void ServerGuiWrapper::riverAnimation1() {}
|
||||
void ServerGuiWrapper::riverAnimation2() {}
|
||||
|
||||
void ServerGuiWrapper::postRiverAnimation1() {}
|
||||
void ServerGuiWrapper::postRiverRunAnimation1() {}
|
||||
void ServerGuiWrapper::flipHolecardsAllIn() {}
|
||||
|
||||
void ServerGuiWrapper::nextRoundCleanGui() {}
|
||||
|
||||
void ServerGuiWrapper::meInAction() {}
|
||||
void ServerGuiWrapper::disableMyButtons() {}
|
||||
void ServerGuiWrapper::updateMyButtonsState() {}
|
||||
void ServerGuiWrapper::startTimeoutAnimation(int /*playerNum*/, int /*timeoutSec*/) {}
|
||||
void ServerGuiWrapper::stopTimeoutAnimation(int /*playerNum*/) {}
|
||||
|
||||
void ServerGuiWrapper::startVoteOnKick(unsigned /*playerId*/, unsigned /*voteStarterPlayerId*/, int /*timeoutSec*/, int /*numVotesNeededToKick*/) {}
|
||||
void ServerGuiWrapper::changeVoteOnKickButtonsState(bool /*showHide*/) {}
|
||||
void ServerGuiWrapper::refreshVotesMonitor(int /*currentVotes*/, int /*numVotesNeededToKick*/) {}
|
||||
void ServerGuiWrapper::endVoteOnKick() {}
|
||||
|
||||
void ServerGuiWrapper::logPlayerActionMsg(string /*playerName*/, int /*action*/, int /*setValue*/) {}
|
||||
void ServerGuiWrapper::logNewGameHandMsg(int /*gameID*/, int /*handID*/) {}
|
||||
void ServerGuiWrapper::logPlayerWinsMsg(std::string /*playerName*/, int /*pot*/, bool /*main*/) {}
|
||||
void ServerGuiWrapper::logPlayerSitsOut(std::string /*playerName*/) {}
|
||||
void ServerGuiWrapper::logNewBlindsSetsMsg(int /*sbSet*/, int /*bbSet*/, std::string /*sbName*/, std::string /*bbName*/) {}
|
||||
|
||||
void ServerGuiWrapper::logDealBoardCardsMsg(int /*roundID*/, int /*card1*/, int /*card2*/, int /*card3*/, int /*card4*/, int /*card5*/) {}
|
||||
void ServerGuiWrapper::logFlipHoleCardsMsg(std::string /*playerName*/, int /*card1*/, int /*card2*/, int /*cardsValueInt*/, std::string /*showHas*/) {}
|
||||
void ServerGuiWrapper::logPlayerWinGame(std::string /*playerName*/, int /*gameID*/) {}
|
||||
@@ -176,6 +156,10 @@ void ServerGuiWrapper::SignalNetClientStatsUpdate(const ServerStats &stats)
|
||||
{
|
||||
if (myClientcb) myClientcb->SignalNetClientStatsUpdate(stats);
|
||||
}
|
||||
void ServerGuiWrapper::SignalNetClientPingUpdate(unsigned minPing, unsigned avgPing, unsigned maxPing)
|
||||
{
|
||||
if (myClientcb) myClientcb->SignalNetClientPingUpdate(minPing, avgPing, maxPing);
|
||||
}
|
||||
void ServerGuiWrapper::SignalNetClientShowTimeoutDialog(NetTimeoutReason reason, unsigned remainingSec)
|
||||
{
|
||||
if (myClientcb) myClientcb->SignalNetClientShowTimeoutDialog(reason, remainingSec);
|
||||
@@ -200,6 +184,14 @@ void ServerGuiWrapper::SignalNetClientPlayerLeft(unsigned playerId, const string
|
||||
{
|
||||
if (myClientcb) myClientcb->SignalNetClientPlayerLeft(playerId, playerName, removeReason);
|
||||
}
|
||||
void ServerGuiWrapper::SignalNetClientSpectatorJoined(unsigned playerId, const string &playerName)
|
||||
{
|
||||
if (myClientcb) myClientcb->SignalNetClientSpectatorJoined(playerId, playerName);
|
||||
}
|
||||
void ServerGuiWrapper::SignalNetClientSpectatorLeft(unsigned playerId, const string &playerName, int removeReason)
|
||||
{
|
||||
if (myClientcb) myClientcb->SignalNetClientSpectatorLeft(playerId, playerName, removeReason);
|
||||
}
|
||||
void ServerGuiWrapper::SignalNetClientNewGameAdmin(unsigned playerId, const string &playerName)
|
||||
{
|
||||
if (myClientcb) myClientcb->SignalNetClientNewGameAdmin(playerId, playerName);
|
||||
@@ -228,6 +220,14 @@ void ServerGuiWrapper::SignalNetClientGameListPlayerLeft(unsigned gameId, unsign
|
||||
{
|
||||
if (myClientcb) myClientcb->SignalNetClientGameListPlayerLeft(gameId, playerId);
|
||||
}
|
||||
void ServerGuiWrapper::SignalNetClientGameListSpectatorJoined(unsigned gameId, unsigned playerId)
|
||||
{
|
||||
if (myClientcb) myClientcb->SignalNetClientGameListSpectatorJoined(gameId, playerId);
|
||||
}
|
||||
void ServerGuiWrapper::SignalNetClientGameListSpectatorLeft(unsigned gameId, unsigned playerId)
|
||||
{
|
||||
if (myClientcb) myClientcb->SignalNetClientGameListSpectatorLeft(gameId, playerId);
|
||||
}
|
||||
void ServerGuiWrapper::SignalNetClientGameStart(boost::shared_ptr<Game> game)
|
||||
{
|
||||
if (myClientcb) myClientcb->SignalNetClientGameStart(game);
|
||||
|
||||
@@ -126,12 +126,15 @@ public:
|
||||
void SignalNetClientError(int errorID, int osErrorID);
|
||||
void SignalNetClientNotification(int notificationId);
|
||||
void SignalNetClientStatsUpdate(const ServerStats &stats);
|
||||
void SignalNetClientPingUpdate(unsigned minPing, unsigned avgPing, unsigned maxPing);
|
||||
void SignalNetClientShowTimeoutDialog(NetTimeoutReason reason, unsigned remainingSec);
|
||||
void SignalNetClientRemovedFromGame(int notificationId);
|
||||
void SignalNetClientSelfJoined(unsigned playerId, const std::string &playerName, bool isGameAdmin);
|
||||
void SignalNetClientPlayerJoined(unsigned playerId, const std::string &playerName, bool isGameAdmin);
|
||||
void SignalNetClientPlayerChanged(unsigned playerId, const std::string &newPlayerName);
|
||||
void SignalNetClientPlayerLeft(unsigned playerId, const std::string &playerName, int removeReason);
|
||||
void SignalNetClientSpectatorJoined(unsigned playerId, const std::string &playerName);
|
||||
void SignalNetClientSpectatorLeft(unsigned playerId, const std::string &playerName, int removeReason);
|
||||
void SignalNetClientNewGameAdmin(unsigned playerId, const std::string &playerName);
|
||||
void SignalNetClientGameChatMsg(const std::string &playerName, const std::string &msg);
|
||||
void SignalNetClientLobbyChatMsg(const std::string &playerName, const std::string &msg);
|
||||
@@ -144,6 +147,8 @@ public:
|
||||
void SignalNetClientGameListUpdateAdmin(unsigned gameId, unsigned adminPlayerId);
|
||||
void SignalNetClientGameListPlayerJoined(unsigned gameId, unsigned playerId);
|
||||
void SignalNetClientGameListPlayerLeft(unsigned gameId, unsigned playerId);
|
||||
void SignalNetClientGameListSpectatorJoined(unsigned gameId, unsigned playerId);
|
||||
void SignalNetClientGameListSpectatorLeft(unsigned gameId, unsigned playerId);
|
||||
void SignalNetClientGameStart(boost::shared_ptr<Game> game);
|
||||
|
||||
void SignalNetClientServerListAdd(unsigned serverId);
|
||||
|
||||
+76
-12
@@ -12,7 +12,16 @@
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
@@ -102,7 +111,16 @@
|
||||
<string>Project</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
@@ -117,8 +135,8 @@
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Nimbus Sans L'; font-size:9pt; font-weight:400; font-style:normal;">
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p></body></html></string>
|
||||
</style></head><body style=" font-family:'Liberation Sans'; font-size:9pt; font-weight:400; font-style:normal;">
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Nimbus Sans L';"><br /></p></body></html></string>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
@@ -132,7 +150,16 @@ p, li { white-space: pre-wrap; }
|
||||
<string>Translation</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
@@ -144,11 +171,11 @@ p, li { white-space: pre-wrap; }
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Nimbus Sans L'; font-size:9pt; font-weight:400; font-style:normal;">
|
||||
</style></head><body style=" font-family:'Liberation Sans'; font-size:9pt; font-weight:400; font-style:normal;">
|
||||
<table border="0" style="-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;">
|
||||
<tr>
|
||||
<td style="border: none;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">translator name - mail address</span></p></td></tr></table></body></html></string>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Nimbus Sans L'; font-size:8pt;">translator name - mail address</span></p></td></tr></table></body></html></string>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
@@ -162,7 +189,16 @@ p, li { white-space: pre-wrap; }
|
||||
<string>Thanks to</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
@@ -174,8 +210,8 @@ p, li { white-space: pre-wrap; }
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Nimbus Sans L'; font-size:9pt; font-weight:400; font-style:normal;">
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p></body></html></string>
|
||||
</style></head><body style=" font-family:'Liberation Sans'; font-size:9pt; font-weight:400; font-style:normal;">
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Nimbus Sans L';"><br /></p></body></html></string>
|
||||
</property>
|
||||
<property name="acceptRichText">
|
||||
<bool>false</bool>
|
||||
@@ -195,7 +231,16 @@ p, li { white-space: pre-wrap; }
|
||||
<string>License</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
@@ -213,6 +258,16 @@ p, li { white-space: pre-wrap; }
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_6">
|
||||
<attribute name="title">
|
||||
<string>Third party libs</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QTextBrowser" name="textBrowser_thirdPartyLicenceText"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
@@ -220,7 +275,16 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
|
||||
@@ -34,10 +34,10 @@
|
||||
#include <QtCore>
|
||||
|
||||
#ifdef ANDROID
|
||||
#ifndef ANDROID_TEST
|
||||
#include <QPlatformNativeInterface>
|
||||
#include <jni.h>
|
||||
#endif
|
||||
#ifndef ANDROID_TEST
|
||||
#include "QtGui/5.2.0/QtGui/qpa/qplatformnativeinterface.h"
|
||||
#include <jni.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
aboutPokerthImpl::aboutPokerthImpl(QWidget *parent, ConfigFile *c)
|
||||
@@ -71,8 +71,9 @@ aboutPokerthImpl::aboutPokerthImpl(QWidget *parent, ConfigFile *c)
|
||||
|
||||
#ifdef ANDROID
|
||||
int api = -2;
|
||||
#ifndef ANDROID_TEST
|
||||
JavaVM *currVM = (JavaVM *)QApplication::platformNativeInterface()->nativeResourceForWidget("JavaVM", 0);
|
||||
this->setWindowState(Qt::WindowFullScreen);
|
||||
#ifndef ANDROID_TEST
|
||||
JavaVM *currVM = (JavaVM *)QApplication::platformNativeInterface()->nativeResourceForIntegration("JavaVM");
|
||||
JNIEnv* env;
|
||||
if (currVM->AttachCurrentThread(&env, NULL)<0) {
|
||||
qCritical()<<"AttachCurrentThread failed";
|
||||
@@ -83,7 +84,7 @@ aboutPokerthImpl::aboutPokerthImpl(QWidget *parent, ConfigFile *c)
|
||||
}
|
||||
currVM->DetachCurrentThread();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
label_pokerthVersion->setText(QString(tr("PokerTH %1 for Android (API%2)").arg(POKERTH_BETA_RELEASE_STRING).arg(api)));
|
||||
#else
|
||||
label_pokerthVersion->setText(QString(tr("PokerTH %1").arg(POKERTH_BETA_RELEASE_STRING)));
|
||||
@@ -131,4 +132,14 @@ aboutPokerthImpl::aboutPokerthImpl(QWidget *parent, ConfigFile *c)
|
||||
projectText.append(" Oskar Lindqvist (<a href=mailto:tranberry@pokerth.net>tranberry@pokerth.net</a>)<br>");
|
||||
projectText.append(" - "+tr("initial gui graphics design")+"<br>");
|
||||
textBrowser_2->setHtml(projectText);
|
||||
|
||||
QFile file(QDir::toNativeSeparators(myAppDataPath+"misc/third_party_libs.txt"));
|
||||
QString string;
|
||||
if(file.exists()) {
|
||||
if (file.open( QIODevice::ReadOnly)) {
|
||||
QTextStream stream( &file );
|
||||
string = stream.readAll();
|
||||
textBrowser_thirdPartyLicenceText->setPlainText(string);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
|
||||
changeCompleteBlindsDialogImpl::changeCompleteBlindsDialogImpl(QWidget *parent, ConfigFile *c)
|
||||
: QDialog(parent), myConfig(c), settingsCorrect(TRUE)
|
||||
: QDialog(parent), myConfig(c), settingsCorrect(true)
|
||||
{
|
||||
#ifdef __APPLE__
|
||||
setWindowModality(Qt::ApplicationModal);
|
||||
@@ -43,18 +43,18 @@ changeCompleteBlindsDialogImpl::changeCompleteBlindsDialogImpl(QWidget *parent,
|
||||
#endif
|
||||
setupUi(this);
|
||||
this->installEventFilter(this);
|
||||
#ifdef ANDROID
|
||||
this->setWindowState(Qt::WindowFullScreen);
|
||||
#endif
|
||||
|
||||
connect( pushButton_add, SIGNAL( clicked() ), this, SLOT( addBlindValueToList() ) );
|
||||
connect( pushButton_delete, SIGNAL( clicked() ), this, SLOT( removeBlindFromList() ) );
|
||||
connect( spinBox_firstSmallBlind, SIGNAL( valueChanged(int) ), this, SLOT( updateSpinBoxInputMinimum(int) ) );
|
||||
|
||||
}
|
||||
|
||||
void changeCompleteBlindsDialogImpl::exec()
|
||||
int changeCompleteBlindsDialogImpl::exec()
|
||||
{
|
||||
|
||||
|
||||
QDialog::exec();
|
||||
return QDialog::exec();
|
||||
}
|
||||
|
||||
void changeCompleteBlindsDialogImpl::updateSpinBoxInputMinimum(int value)
|
||||
@@ -88,7 +88,7 @@ void changeCompleteBlindsDialogImpl::sortBlindsList()
|
||||
int i;
|
||||
QList<int> tempIntList;
|
||||
QStringList tempStringList;
|
||||
bool ok = TRUE;
|
||||
bool ok = true;
|
||||
|
||||
for(i=0; i<listWidget_blinds->count(); i++) {
|
||||
// std::cout << listWidget_blinds->item(i)->text().toInt(&ok,10) << "\n";
|
||||
|
||||
@@ -48,7 +48,7 @@ class changeCompleteBlindsDialogImpl: public QDialog, public Ui::changeCompleteB
|
||||
public:
|
||||
changeCompleteBlindsDialogImpl(QWidget *parent = 0, ConfigFile *c = 0);
|
||||
|
||||
void exec();
|
||||
int exec();
|
||||
bool eventFilter(QObject *obj, QEvent *event);
|
||||
|
||||
public slots:
|
||||
|
||||
@@ -43,6 +43,9 @@ changeContentDialogImpl::changeContentDialogImpl(QWidget *parent, ConfigFile *co
|
||||
#endif
|
||||
setupUi(this);
|
||||
this->installEventFilter(this);
|
||||
#ifdef ANDROID
|
||||
this->setWindowState(Qt::WindowFullScreen);
|
||||
#endif
|
||||
|
||||
switch (myType) {
|
||||
case CHANGE_HUMAN_PLAYER_NAME: {
|
||||
@@ -86,7 +89,6 @@ changeContentDialogImpl::changeContentDialogImpl(QWidget *parent, ConfigFile *co
|
||||
}
|
||||
|
||||
connect(this, SIGNAL(accepted ()), this, SLOT(saveContent()));
|
||||
|
||||
}
|
||||
|
||||
void changeContentDialogImpl::saveContent()
|
||||
|
||||
@@ -92,22 +92,11 @@ void ChatTools::receiveMessage(QString playerName, QString message, bool pm)
|
||||
QString tempMsg;
|
||||
|
||||
if(myChatType == INET_LOBBY_CHAT && playerName == "(chat bot)" && message.startsWith(myNick)) {
|
||||
|
||||
tempMsg = QString("<span style=\"font-weight:bold; color:red;\">"+message+"</span>");
|
||||
//play beep sound only in INET-lobby-chat
|
||||
if(myLobby->isVisible() && myConfig->readConfigInt("PlayLobbyChatNotification")) {
|
||||
myLobby->getMyW()->getMySoundEventHandler()->playSound("lobbychatnotify",0);
|
||||
}
|
||||
} else if(message.contains(myNick, Qt::CaseInsensitive)) {
|
||||
|
||||
switch (myChatType) {
|
||||
case INET_LOBBY_CHAT: {
|
||||
tempMsg = QString("<span style=\"font-weight:bold; color:"+myLobby->palette().link().color().name()+";\">"+message+"</span>");
|
||||
//play beep sound only in INET-lobby-chat
|
||||
// TODO dont play when message is from yourself
|
||||
if(myLobby->isVisible() && myConfig->readConfigInt("PlayLobbyChatNotification")) {
|
||||
myLobby->getMyW()->getMySoundEventHandler()->playSound("lobbychatnotify",0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case LAN_LOBBY_CHAT:
|
||||
@@ -157,17 +146,28 @@ void ChatTools::receiveMessage(QString playerName, QString message, bool pm)
|
||||
}
|
||||
|
||||
bool nickFoundOnIgnoreList = false;
|
||||
bool chatBotWarnNickFoundOnIgnoreList = false;
|
||||
list<std::string>::iterator it1;
|
||||
for(it1=ignoreList.begin(); it1 != ignoreList.end(); ++it1) {
|
||||
|
||||
if(playerName == QString::fromUtf8(it1->c_str())) {
|
||||
nickFoundOnIgnoreList = true;
|
||||
}
|
||||
if(myChatType == INET_LOBBY_CHAT && playerName == "(chat bot)" && message.startsWith(QString::fromUtf8(it1->c_str()))) {
|
||||
chatBotWarnNickFoundOnIgnoreList = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(!nickFoundOnIgnoreList) {
|
||||
if(!nickFoundOnIgnoreList && !chatBotWarnNickFoundOnIgnoreList) {
|
||||
//play beep sound as notification
|
||||
if(myChatType == INET_LOBBY_CHAT && message.contains(myNick, Qt::CaseInsensitive) && playerName != myNick) {
|
||||
if(myLobby->isVisible() && myConfig->readConfigInt("PlayLobbyChatNotification")) {
|
||||
myLobby->getMyW()->getMySoundEventHandler()->playSound("lobbychatnotify",0);
|
||||
}
|
||||
}
|
||||
|
||||
if(!myConfig->readConfigInt("DisableChatEmoticons")) {
|
||||
tempMsg = checkForEmotes(tempMsg);
|
||||
}
|
||||
|
||||
if(message.indexOf(QString("/me "))==0) {
|
||||
myTextBrowser->append(tempMsg.replace("/me ","<i>*"+playerName+" ")+"</i>");
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <QtCore>
|
||||
#include <QtWidgets>
|
||||
#include <QtGui>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
|
||||
@@ -39,14 +39,17 @@ connectToServerDialogImpl::connectToServerDialogImpl(QWidget *parent)
|
||||
setWindowFlags(Qt::WindowSystemMenuHint | Qt::CustomizeWindowHint | Qt::Dialog);
|
||||
#endif
|
||||
setupUi(this);
|
||||
#ifdef ANDROID
|
||||
this->setWindowState(Qt::WindowFullScreen);
|
||||
#endif
|
||||
}
|
||||
|
||||
void connectToServerDialogImpl::exec()
|
||||
int connectToServerDialogImpl::exec()
|
||||
{
|
||||
label_actionMessage->setText("");
|
||||
progressBar->setValue(0);
|
||||
|
||||
QDialog::exec();
|
||||
return QDialog::exec();
|
||||
}
|
||||
|
||||
void connectToServerDialogImpl::refresh(int actionID)
|
||||
|
||||
@@ -47,7 +47,7 @@ class connectToServerDialogImpl: public QDialog, public Ui::connectToServerDialo
|
||||
public:
|
||||
connectToServerDialogImpl(QWidget *parent = 0);
|
||||
|
||||
void exec();
|
||||
int exec();
|
||||
|
||||
public slots:
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>303</width>
|
||||
<height>390</height>
|
||||
<width>293</width>
|
||||
<height>410</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -100,7 +100,16 @@
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
@@ -126,14 +135,14 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<item row="4" column="0" colspan="2">
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Maximum number of players:</string>
|
||||
@@ -143,7 +152,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<item row="5" column="1">
|
||||
<widget class="QSpinBox" name="spinBox_quantityPlayers">
|
||||
<property name="minimum">
|
||||
<number>2</number>
|
||||
@@ -156,7 +165,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Start Cash:</string>
|
||||
@@ -166,7 +175,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<item row="6" column="1">
|
||||
<widget class="QSpinBox" name="spinBox_startCash">
|
||||
<property name="suffix">
|
||||
<string/>
|
||||
@@ -188,7 +197,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" colspan="2">
|
||||
<item row="7" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="groupBox_blinds">
|
||||
<property name="title">
|
||||
<string>Blinds</string>
|
||||
@@ -217,7 +226,7 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<item row="8" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
@@ -233,7 +242,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<item row="8" column="1">
|
||||
<widget class="QSpinBox" name="spinBox_netTimeOutPlayerAction">
|
||||
<property name="suffix">
|
||||
<string> s</string>
|
||||
@@ -249,7 +258,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<item row="9" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Delay between hands:</string>
|
||||
@@ -259,7 +268,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<item row="9" column="1">
|
||||
<widget class="QSpinBox" name="spinBox_netDelayBetweenHands">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
@@ -281,6 +290,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="checkBox_allowSpectators">
|
||||
<property name="text">
|
||||
<string>Allow spectators to watch the game</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -289,7 +305,16 @@
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
|
||||
@@ -44,16 +44,16 @@ createInternetGameDialogImpl::createInternetGameDialogImpl(QWidget *parent, Conf
|
||||
#endif
|
||||
setupUi(this);
|
||||
this->installEventFilter(this);
|
||||
#ifdef ANDROID
|
||||
this->setWindowState(Qt::WindowFullScreen);
|
||||
#endif
|
||||
spinBox_netDelayBetweenHands->installEventFilter(this);
|
||||
spinBox_netTimeOutPlayerAction->installEventFilter(this);
|
||||
|
||||
comboBox_gameType->setItemData(0, GAME_TYPE_NORMAL, Qt::UserRole);
|
||||
comboBox_gameType->setItemData(1, GAME_TYPE_REGISTERED_ONLY, Qt::UserRole);
|
||||
comboBox_gameType->setItemData(2, GAME_TYPE_INVITE_ONLY, Qt::UserRole);
|
||||
comboBox_gameType->setItemData(3, GAME_TYPE_RANKING, Qt::UserRole);
|
||||
|
||||
myChangeCompleteBlindsDialog = new changeCompleteBlindsDialogImpl;
|
||||
|
||||
startBlind = new QLabel(tr("<i>First small blind: $%1</i>").arg(RANKING_GAME_START_SBLIND));
|
||||
raiseMode = new QLabel(tr("<i>Double blinds every %1'th hand</i>").arg(RANKING_GAME_RAISE_EVERY_HAND));
|
||||
startBlind->hide();
|
||||
@@ -68,7 +68,6 @@ createInternetGameDialogImpl::createInternetGameDialogImpl(QWidget *parent, Conf
|
||||
connect( pushButton_createGame, SIGNAL( clicked() ), this, SLOT( createGame() ) );
|
||||
connect( checkBox_Password, SIGNAL( toggled(bool) ), this, SLOT( clearGamePassword(bool)) );
|
||||
connect( comboBox_gameType, SIGNAL(currentIndexChanged(int)), this, SLOT( gameTypeChanged() ) );
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -143,7 +142,7 @@ void createInternetGameDialogImpl::callChangeBlindsDialog(bool show)
|
||||
myChangeCompleteBlindsDialog->exec();
|
||||
if(myChangeCompleteBlindsDialog->result() == QDialog::Accepted ) {}
|
||||
else {
|
||||
radioButton_useSavedBlindsSettings->setChecked(TRUE);
|
||||
radioButton_useSavedBlindsSettings->setChecked(true);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -155,57 +154,63 @@ void createInternetGameDialogImpl::gameTypeChanged()
|
||||
switch (comboBox_gameType->currentIndex()) {
|
||||
|
||||
case GAME_TYPE_NORMAL-1: {
|
||||
checkBox_Password->setDisabled(FALSE);
|
||||
spinBox_startCash->setDisabled(FALSE);
|
||||
spinBox_quantityPlayers->setDisabled(FALSE);
|
||||
checkBox_Password->setDisabled(false);
|
||||
spinBox_startCash->setDisabled(false);
|
||||
spinBox_quantityPlayers->setDisabled(false);
|
||||
spinBox_quantityPlayers->setValue(myConfig->readConfigInt("NetNumberOfPlayers"));
|
||||
spinBox_startCash->setValue(myConfig->readConfigInt("NetStartCash"));
|
||||
radioButton_useSavedBlindsSettings->show();
|
||||
radioButton_changeBlindsSettings->show();
|
||||
startBlind->hide();
|
||||
raiseMode->hide();
|
||||
checkBox_allowSpectators->setEnabled(true);
|
||||
checkBox_allowSpectators->setChecked(myConfig->readConfigInt("InternetGameAllowSpectators"));
|
||||
}
|
||||
|
||||
break;
|
||||
case GAME_TYPE_REGISTERED_ONLY-1: {
|
||||
checkBox_Password->setDisabled(FALSE);
|
||||
spinBox_startCash->setDisabled(FALSE);
|
||||
spinBox_quantityPlayers->setDisabled(FALSE);
|
||||
checkBox_Password->setDisabled(false);
|
||||
spinBox_startCash->setDisabled(false);
|
||||
spinBox_quantityPlayers->setDisabled(false);
|
||||
spinBox_quantityPlayers->setValue(myConfig->readConfigInt("NetNumberOfPlayers"));
|
||||
spinBox_startCash->setValue(myConfig->readConfigInt("NetStartCash"));
|
||||
radioButton_useSavedBlindsSettings->show();
|
||||
radioButton_changeBlindsSettings->show();
|
||||
startBlind->hide();
|
||||
raiseMode->hide();
|
||||
checkBox_allowSpectators->setEnabled(true);
|
||||
checkBox_allowSpectators->setChecked(myConfig->readConfigInt("InternetGameAllowSpectators"));
|
||||
}
|
||||
break;
|
||||
case GAME_TYPE_INVITE_ONLY-1: {
|
||||
checkBox_Password->setChecked(FALSE);
|
||||
checkBox_Password->setDisabled(TRUE);
|
||||
spinBox_startCash->setDisabled(FALSE);
|
||||
spinBox_quantityPlayers->setDisabled(FALSE);
|
||||
checkBox_Password->setChecked(false);
|
||||
checkBox_Password->setDisabled(true);
|
||||
spinBox_startCash->setDisabled(false);
|
||||
spinBox_quantityPlayers->setDisabled(false);
|
||||
spinBox_quantityPlayers->setValue(myConfig->readConfigInt("NetNumberOfPlayers"));
|
||||
spinBox_startCash->setValue(myConfig->readConfigInt("NetStartCash"));
|
||||
radioButton_useSavedBlindsSettings->show();
|
||||
radioButton_changeBlindsSettings->show();
|
||||
startBlind->hide();
|
||||
raiseMode->hide();
|
||||
|
||||
checkBox_allowSpectators->setEnabled(true);
|
||||
checkBox_allowSpectators->setChecked(myConfig->readConfigInt("InternetGameAllowSpectators"));
|
||||
}
|
||||
break;
|
||||
case GAME_TYPE_RANKING-1: {
|
||||
checkBox_Password->setChecked(FALSE);
|
||||
checkBox_Password->setDisabled(TRUE);
|
||||
checkBox_Password->setChecked(false);
|
||||
checkBox_Password->setDisabled(true);
|
||||
|
||||
spinBox_startCash->setValue(RANKING_GAME_START_CASH);
|
||||
spinBox_startCash->setDisabled(TRUE);
|
||||
spinBox_startCash->setDisabled(true);
|
||||
spinBox_quantityPlayers->setValue(RANKING_GAME_NUMBER_OF_PLAYERS);
|
||||
spinBox_quantityPlayers->setDisabled(TRUE);
|
||||
spinBox_quantityPlayers->setDisabled(true);
|
||||
radioButton_useSavedBlindsSettings->hide();
|
||||
radioButton_changeBlindsSettings->hide();
|
||||
startBlind->show();
|
||||
raiseMode->show();
|
||||
|
||||
checkBox_allowSpectators->setDisabled(true);
|
||||
checkBox_allowSpectators->setChecked(true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -213,11 +218,11 @@ void createInternetGameDialogImpl::gameTypeChanged()
|
||||
if(comboBox_gameType->currentIndex() == GAME_TYPE_RANKING-1) {
|
||||
//set static values
|
||||
myChangeCompleteBlindsDialog->spinBox_firstSmallBlind->setValue(RANKING_GAME_START_SBLIND);
|
||||
myChangeCompleteBlindsDialog->radioButton_raiseBlindsAtHands->setChecked(TRUE);
|
||||
myChangeCompleteBlindsDialog->radioButton_raiseBlindsAtMinutes->setChecked(FALSE);
|
||||
myChangeCompleteBlindsDialog->radioButton_raiseBlindsAtHands->setChecked(true);
|
||||
myChangeCompleteBlindsDialog->radioButton_raiseBlindsAtMinutes->setChecked(false);
|
||||
myChangeCompleteBlindsDialog->spinBox_raiseSmallBlindEveryHands->setValue(11);
|
||||
myChangeCompleteBlindsDialog->radioButton_alwaysDoubleBlinds->setChecked(TRUE);
|
||||
myChangeCompleteBlindsDialog->radioButton_manualBlindsOrder->setChecked(FALSE);
|
||||
myChangeCompleteBlindsDialog->radioButton_alwaysDoubleBlinds->setChecked(true);
|
||||
myChangeCompleteBlindsDialog->radioButton_manualBlindsOrder->setChecked(false);
|
||||
myChangeCompleteBlindsDialog->listWidget_blinds->clear();
|
||||
} else {
|
||||
//read config values
|
||||
|
||||
@@ -42,9 +42,10 @@ createNetworkGameDialogImpl::createNetworkGameDialogImpl(QWidget *parent, Config
|
||||
#endif
|
||||
setupUi(this);
|
||||
this->installEventFilter(this);
|
||||
|
||||
#ifdef ANDROID
|
||||
this->setWindowState(Qt::WindowFullScreen);
|
||||
#endif
|
||||
myChangeCompleteBlindsDialog = new changeCompleteBlindsDialogImpl;
|
||||
|
||||
fillFormular();
|
||||
|
||||
connect( radioButton_changeBlindsSettings, SIGNAL( clicked(bool) ), this, SLOT( callChangeBlindsDialog(bool) ) );
|
||||
@@ -52,14 +53,13 @@ createNetworkGameDialogImpl::createNetworkGameDialogImpl(QWidget *parent, Config
|
||||
connect( pushButton_cancel, SIGNAL( clicked() ), this, SLOT( cancel() ) );
|
||||
#endif
|
||||
connect( pushButton_createGame, SIGNAL( clicked() ), this, SLOT( createGame() ) );
|
||||
|
||||
}
|
||||
|
||||
|
||||
void createNetworkGameDialogImpl::exec()
|
||||
int createNetworkGameDialogImpl::exec()
|
||||
{
|
||||
fillFormular();
|
||||
QDialog::exec();
|
||||
return QDialog::exec();
|
||||
}
|
||||
|
||||
void createNetworkGameDialogImpl::createGame()
|
||||
@@ -131,7 +131,7 @@ void createNetworkGameDialogImpl::callChangeBlindsDialog(bool show)
|
||||
myChangeCompleteBlindsDialog->exec();
|
||||
if(myChangeCompleteBlindsDialog->result() == QDialog::Accepted ) {}
|
||||
else {
|
||||
radioButton_useSavedBlindsSettings->setChecked(TRUE);
|
||||
radioButton_useSavedBlindsSettings->setChecked(true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ class createNetworkGameDialogImpl: public QDialog, public Ui::createNetworkGameD
|
||||
public:
|
||||
createNetworkGameDialogImpl(QWidget *parent = 0, ConfigFile *c = 0);
|
||||
|
||||
void exec();
|
||||
int exec();
|
||||
changeCompleteBlindsDialogImpl* getChangeCompleteBlindsDialog() {
|
||||
return myChangeCompleteBlindsDialog;
|
||||
}
|
||||
|
||||
+380
-290
@@ -20,15 +20,24 @@
|
||||
<string>Internet Game Lobby</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<property name="leftMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing">
|
||||
<number>7</number>
|
||||
</property>
|
||||
<property name="verticalSpacing">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLineEdit" name="lineEdit_searchForPlayers">
|
||||
<property name="sizePolicy">
|
||||
@@ -88,6 +97,277 @@
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="3">
|
||||
<layout class="QHBoxLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_connectedPlayersCounter">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_runningGamesCounter">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_openGamesCounter">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_rankings">
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_pokerthDotNet">
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QTreeView" name="treeView_GameList">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>400</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::CustomContextMenu</enum>
|
||||
</property>
|
||||
<property name="horizontalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
<property name="showDropIndicator" stdset="0">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="indentation">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="rootIsDecorated">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sortingEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<layout class="QHBoxLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_spectate">
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>181</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_CreateGame">
|
||||
<property name="text">
|
||||
<string>&Create Game</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="resources/pokerth.qrc">
|
||||
<normaloff>:/gfx/list_add.png</normaloff>:/gfx/list_add.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_JoinGame">
|
||||
<property name="text">
|
||||
<string>&Join Game</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="resources/pokerth.qrc">
|
||||
<normaloff>:/gfx/go-next-view.png</normaloff>:/gfx/go-next-view.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="1" rowspan="2">
|
||||
<widget class="QGroupBox" name="groupBox_lobbyChat">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>400</width>
|
||||
<height>223</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>230</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Lobby-Chat</string>
|
||||
</property>
|
||||
<layout class="QGridLayout">
|
||||
<property name="leftMargin">
|
||||
<number>7</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>7</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>7</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QTextBrowser" name="textBrowser_ChatDisplay">
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLineEdit" name="lineEdit_ChatInput"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QComboBox" name="comboBox_nickListFilter">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Sort alphabetically</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Sort by country</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Display idle players</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" rowspan="3">
|
||||
<widget class="QTreeView" name="treeView_NickList">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>165</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>165</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::CustomContextMenu</enum>
|
||||
</property>
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
<property name="rootIsDecorated">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sortingEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2" rowspan="5">
|
||||
<widget class="QGroupBox" name="groupBox_GameInfo">
|
||||
<property name="enabled">
|
||||
@@ -114,28 +394,56 @@
|
||||
<property name="title">
|
||||
<string>Game Info</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<property name="leftMargin">
|
||||
<number>7</number>
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>7</number>
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<property name="horizontalSpacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="verticalSpacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QTabWidget" name="tabWidget_playerSpectators">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab_players">
|
||||
<attribute name="title">
|
||||
<string>Players</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QTreeWidget" name="treeWidget_connectedPlayers">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>221</width>
|
||||
<height>237</height>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
@@ -153,6 +461,9 @@
|
||||
<property name="indentation">
|
||||
<number>15</number>
|
||||
</property>
|
||||
<attribute name="headerVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Connected Players</string>
|
||||
@@ -160,7 +471,45 @@
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_spectators">
|
||||
<attribute name="title">
|
||||
<string>Spectators</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_5">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QTreeWidget" name="treeWidget_connectedSpectators">
|
||||
<attribute name="headerVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string notr="true">1</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QScrollArea" name="scrollArea_gameInfos">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
@@ -176,20 +525,29 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>246</width>
|
||||
<height>168</height>
|
||||
<width>250</width>
|
||||
<height>200</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<layout class="QGridLayout" name="gridLayout1">
|
||||
<property name="leftMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing">
|
||||
<number>-1</number>
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_gameType">
|
||||
<property name="text">
|
||||
@@ -405,7 +763,7 @@
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<item row="2" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_fillUpWithComputerOpponents">
|
||||
@@ -442,7 +800,7 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<item row="3" column="0">
|
||||
<layout class="QHBoxLayout">
|
||||
<property name="spacing">
|
||||
<number>3</number>
|
||||
@@ -532,7 +890,7 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<item row="4" column="0">
|
||||
<layout class="QHBoxLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
@@ -587,272 +945,6 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QTreeView" name="treeView_GameList">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>400</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::CustomContextMenu</enum>
|
||||
</property>
|
||||
<property name="horizontalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
<property name="showDropIndicator" stdset="0">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="indentation">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="rootIsDecorated">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sortingEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<layout class="QHBoxLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_joinAnyGame">
|
||||
<property name="text">
|
||||
<string>Join &any game</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="resources/pokerth.qrc">
|
||||
<normaloff>:/gfx/transform-rotate.png</normaloff>:/gfx/transform-rotate.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>181</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_CreateGame">
|
||||
<property name="text">
|
||||
<string>&Create Game</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="resources/pokerth.qrc">
|
||||
<normaloff>:/gfx/list_add.png</normaloff>:/gfx/list_add.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_JoinGame">
|
||||
<property name="text">
|
||||
<string>&Join Game</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="resources/pokerth.qrc">
|
||||
<normaloff>:/gfx/go-next-view.png</normaloff>:/gfx/go-next-view.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="1" rowspan="2">
|
||||
<widget class="QGroupBox" name="groupBox_lobbyChat">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>400</width>
|
||||
<height>223</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>230</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Lobby-Chat</string>
|
||||
</property>
|
||||
<layout class="QGridLayout">
|
||||
<property name="leftMargin">
|
||||
<number>7</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>7</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>7</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QTextBrowser" name="textBrowser_ChatDisplay">
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLineEdit" name="lineEdit_ChatInput"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="3">
|
||||
<layout class="QHBoxLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_connectedPlayersCounter">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_runningGamesCounter">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_openGamesCounter">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_rankings">
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_pokerthDotNet">
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0" rowspan="3">
|
||||
<widget class="QTreeView" name="treeView_NickList">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>165</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>165</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::CustomContextMenu</enum>
|
||||
</property>
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
<property name="rootIsDecorated">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sortingEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QComboBox" name="comboBox_nickListFilter">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Sort alphabetically</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Sort by country</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Display idle players</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<tabstops>
|
||||
@@ -861,9 +953,7 @@
|
||||
<tabstop>comboBox_nickListFilter</tabstop>
|
||||
<tabstop>comboBox_gameListFilter</tabstop>
|
||||
<tabstop>treeView_GameList</tabstop>
|
||||
<tabstop>pushButton_joinAnyGame</tabstop>
|
||||
<tabstop>pushButton_CreateGame</tabstop>
|
||||
<tabstop>pushButton_JoinGame</tabstop>
|
||||
<tabstop>textBrowser_ChatDisplay</tabstop>
|
||||
<tabstop>lineEdit_ChatInput</tabstop>
|
||||
<tabstop>treeWidget_connectedPlayers</tabstop>
|
||||
|
||||
@@ -53,12 +53,13 @@ gameLobbyDialogImpl::gameLobbyDialogImpl(startWindowImpl *parent, ConfigFile *c)
|
||||
setWindowModality(Qt::ApplicationModal);
|
||||
setWindowFlags(Qt::WindowSystemMenuHint | Qt::CustomizeWindowHint | Qt::Dialog);
|
||||
#elif _WIN32
|
||||
setWindowFlags(Qt::Dialog | Qt::WindowMinimizeButtonHint);
|
||||
// setWindowFlags(Qt::Dialog | Qt::WindowMinimizeButtonHint);
|
||||
#endif
|
||||
|
||||
setupUi(this);
|
||||
myAppDataPath = QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str());
|
||||
|
||||
#ifdef ANDROID
|
||||
this->setWindowState(Qt::WindowFullScreen);
|
||||
#endif
|
||||
//wait start game message
|
||||
waitStartGameMsgBox = new MyMessageBox(this);
|
||||
waitStartGameMsgBox->setText(tr("Starting game. Please wait ..."));
|
||||
@@ -86,17 +87,19 @@ gameLobbyDialogImpl::gameLobbyDialogImpl(startWindowImpl *parent, ConfigFile *c)
|
||||
//HTML stuff
|
||||
QString pokerthDotNet("<a href='http://www.pokerth.net'>http://www.pokerth.net</a>");
|
||||
QString clickToRanking(QString("<a href='http://online-ranking.pokerth.net'>%1</a>").arg(tr("Click here to view the online rankings")));
|
||||
QString clickToSpectate(QString("<a href='http://pokerth.net/live'><b>%1</b></a>").arg(tr("Spectate")));
|
||||
label_pokerthDotNet->setText(pokerthDotNet);
|
||||
label_rankings->setText(clickToRanking);
|
||||
label_spectate->setText(clickToSpectate);
|
||||
|
||||
waitStartGameMsgBoxTimer = new QTimer(this);
|
||||
waitStartGameMsgBoxTimer->setSingleShot(TRUE);
|
||||
waitStartGameMsgBoxTimer->setSingleShot(true);
|
||||
blinkingButtonAnimationTimer = new QTimer(this);
|
||||
blinkingButtonAnimationTimer->setInterval(1000);
|
||||
autoStartTimer = new QTimer(this);
|
||||
autoStartTimer->setInterval(1000);
|
||||
showInfoMsgBoxTimer = new QTimer(this);
|
||||
showInfoMsgBoxTimer->setSingleShot(TRUE);
|
||||
showInfoMsgBoxTimer->setSingleShot(true);
|
||||
|
||||
//fetch button colors for blinking
|
||||
groupBox_GameInfo->setEnabled(true);
|
||||
@@ -111,12 +114,12 @@ gameLobbyDialogImpl::gameLobbyDialogImpl(startWindowImpl *parent, ConfigFile *c)
|
||||
//prepare overlay
|
||||
autoStartTimerOverlay = new QLabel(scrollArea_gameInfos);
|
||||
autoStartTimerOverlay->hide();
|
||||
autoStartTimerOverlay->setWordWrap(TRUE);
|
||||
autoStartTimerOverlay->setWordWrap(true);
|
||||
autoStartTimerOverlay->setMaximumWidth(190);
|
||||
autoStartTimerOverlay->setMinimumWidth(190);
|
||||
autoStartTimerOverlay->setTextFormat(Qt::RichText);
|
||||
autoStartTimerOverlay->setAlignment(Qt::AlignCenter);
|
||||
autoStartTimerOverlay->setAutoFillBackground(TRUE);
|
||||
autoStartTimerOverlay->setAutoFillBackground(true);
|
||||
autoStartTimerOverlay->setFrameStyle(QFrame::StyledPanel);
|
||||
QPalette p;
|
||||
p.setColor(QPalette::Background, QColor(255, 255, 255, 210));
|
||||
@@ -126,9 +129,8 @@ gameLobbyDialogImpl::gameLobbyDialogImpl(startWindowImpl *parent, ConfigFile *c)
|
||||
myGameListModel = new QStandardItemModel(this);
|
||||
myGameListSortFilterProxyModel = new MyGameListSortFilterProxyModel(this);
|
||||
myGameListSortFilterProxyModel->setSourceModel(myGameListModel);
|
||||
myGameListSortFilterProxyModel->setDynamicSortFilter(TRUE);
|
||||
myGameListSortFilterProxyModel->setDynamicSortFilter(true);
|
||||
treeView_GameList->setModel(myGameListSortFilterProxyModel);
|
||||
|
||||
myGameListSelectionModel = treeView_GameList->selectionModel();
|
||||
|
||||
QStringList headerList;
|
||||
@@ -174,12 +176,12 @@ gameLobbyDialogImpl::gameLobbyDialogImpl(startWindowImpl *parent, ConfigFile *c)
|
||||
|
||||
treeView_GameList->setStyleSheet("QTreeView {background-color: white; background-image: url(\""+myAppDataPath +"gfx/gui/misc/background_gamelist.png\"); background-attachment: fixed; background-position: top center ; background-repeat: no-repeat;}");
|
||||
#endif
|
||||
treeView_GameList->setAutoFillBackground(TRUE);
|
||||
treeView_GameList->setAutoFillBackground(true);
|
||||
|
||||
myNickListModel = new QStandardItemModel(this);
|
||||
myNickListSortFilterProxyModel = new MyNickListSortFilterProxyModel(this);
|
||||
myNickListSortFilterProxyModel->setSourceModel(myNickListModel);
|
||||
myNickListSortFilterProxyModel->setDynamicSortFilter(TRUE);
|
||||
myNickListSortFilterProxyModel->setDynamicSortFilter(true);
|
||||
myNickListSortFilterProxyModel->setSortCaseSensitivity(Qt::CaseInsensitive);
|
||||
|
||||
treeView_NickList->setModel(myNickListSortFilterProxyModel);
|
||||
@@ -197,6 +199,8 @@ gameLobbyDialogImpl::gameLobbyDialogImpl(startWindowImpl *parent, ConfigFile *c)
|
||||
nickListContextMenu->addAction(nickListInviteAction);
|
||||
nickListIgnorePlayerAction = new QAction(QIcon(":/gfx/im-ban-user.png"), tr("Ignore player"), nickListContextMenu);
|
||||
nickListContextMenu->addAction(nickListIgnorePlayerAction);
|
||||
nickListUnignorePlayerAction = new QAction(QIcon(":/gfx/dialog_ok_apply.png"), tr("Unignore player"), nickListContextMenu);
|
||||
nickListContextMenu->addAction(nickListUnignorePlayerAction);
|
||||
nickListPlayerInfoSubMenu = nickListContextMenu->addMenu(QIcon(":/gfx/dialog-information.png"), tr("Player infos ..."));
|
||||
nickListPlayerInGameInfo = new QAction(nickListContextMenu);
|
||||
nickListPlayerInfoSubMenu->addAction(nickListPlayerInGameInfo);
|
||||
@@ -219,7 +223,6 @@ gameLobbyDialogImpl::gameLobbyDialogImpl(startWindowImpl *parent, ConfigFile *c)
|
||||
|
||||
connect( pushButton_CreateGame, SIGNAL( clicked() ), this, SLOT( createGame() ) );
|
||||
connect( pushButton_JoinGame, SIGNAL( clicked() ), this, SLOT( joinGame() ) );
|
||||
connect( pushButton_joinAnyGame, SIGNAL( clicked() ), this, SLOT( joinAnyGame() ) );
|
||||
connect( pushButton_StartGame, SIGNAL( clicked() ), this, SLOT( startGame() ) );
|
||||
connect( pushButton_Kick, SIGNAL( clicked() ), this, SLOT( kickPlayer() ) );
|
||||
connect( pushButton_Leave, SIGNAL( clicked() ), this, SLOT( leaveGame() ) );
|
||||
@@ -241,6 +244,7 @@ gameLobbyDialogImpl::gameLobbyDialogImpl(startWindowImpl *parent, ConfigFile *c)
|
||||
connect( treeView_GameList, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT( showGameListContextMenu(QPoint) ) );
|
||||
connect( nickListInviteAction, SIGNAL(triggered()), this, SLOT( invitePlayerToCurrentGame() ));
|
||||
connect( nickListIgnorePlayerAction, SIGNAL(triggered()), this, SLOT( putPlayerOnIgnoreList() ));
|
||||
connect( nickListUnignorePlayerAction, SIGNAL(triggered()), this, SLOT( removePlayerFromIgnoreList() ));
|
||||
connect( nickListOpenPlayerStats1, SIGNAL(triggered()), this, SLOT( openPlayerStats1() ));
|
||||
connect( connectedPlayersListOpenPlayerStats, SIGNAL(triggered()), this, SLOT( openPlayerStats2() ));
|
||||
connect( lineEdit_searchForPlayers, SIGNAL(textChanged(QString)),this, SLOT(searchForPlayerRegExpChanged()));
|
||||
@@ -251,12 +255,10 @@ gameLobbyDialogImpl::gameLobbyDialogImpl(startWindowImpl *parent, ConfigFile *c)
|
||||
lineEdit_searchForPlayers->installEventFilter(this);
|
||||
lineEdit_ChatInput->installEventFilter(this);
|
||||
this->installEventFilter(this);
|
||||
|
||||
clearDialog();
|
||||
|
||||
}
|
||||
|
||||
void gameLobbyDialogImpl::exec()
|
||||
int gameLobbyDialogImpl::exec()
|
||||
{
|
||||
|
||||
if(myConfig->readConfigInt("UseLobbyChat")) {
|
||||
@@ -276,10 +278,11 @@ void gameLobbyDialogImpl::exec()
|
||||
#ifdef ANDROID
|
||||
this->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
|
||||
#endif
|
||||
QDialog::exec();
|
||||
|
||||
int ret = QDialog::exec();
|
||||
waitStartGameMsgBoxTimer->stop();
|
||||
closeAllChildDialogs();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -328,7 +331,7 @@ void gameLobbyDialogImpl::createGame()
|
||||
gameData.raiseMode = MANUAL_BLINDS_ORDER;
|
||||
std::list<int> tempBlindList;
|
||||
int i;
|
||||
bool ok = TRUE;
|
||||
bool ok = true;
|
||||
for(i=0; i<myCreateInternetGameDialog->getChangeCompleteBlindsDialog()->listWidget_blinds->count(); i++) {
|
||||
tempBlindList.push_back(myCreateInternetGameDialog->getChangeCompleteBlindsDialog()->listWidget_blinds->item(i)->text().toInt(&ok,10));
|
||||
}
|
||||
@@ -350,6 +353,7 @@ void gameLobbyDialogImpl::createGame()
|
||||
gameData.delayBetweenHandsSec = myCreateInternetGameDialog->spinBox_netDelayBetweenHands->value();
|
||||
gameData.playerActionTimeoutSec = myCreateInternetGameDialog->spinBox_netTimeOutPlayerAction->value();
|
||||
gameData.gameType = GameType(myCreateInternetGameDialog->comboBox_gameType->itemData(myCreateInternetGameDialog->comboBox_gameType->currentIndex(), Qt::UserRole).toInt());
|
||||
gameData.allowSpectators = myCreateInternetGameDialog->checkBox_allowSpectators->isChecked();
|
||||
|
||||
currentGameName = myCreateInternetGameDialog->lineEdit_gameName->text().simplified();
|
||||
|
||||
@@ -376,17 +380,11 @@ void gameLobbyDialogImpl::createGame()
|
||||
break;
|
||||
}
|
||||
|
||||
showGameDescription(TRUE);
|
||||
showGameDescription(true);
|
||||
|
||||
label_SmallBlind->setText(QString("%L1").arg(gameData.firstSmallBlind));
|
||||
label_StartCash->setText(QString("%L1").arg(gameData.startMoney));
|
||||
|
||||
QTreeWidgetItem *header = treeWidget_connectedPlayers->headerItem();
|
||||
header->setText(0, tr("Connected players - max. %1").arg(gameData.maxNumberOfPlayers));
|
||||
header->setData(0, Qt::UserRole, gameData.maxNumberOfPlayers);
|
||||
|
||||
updateDialogBlinds(gameData);
|
||||
|
||||
label_GameTiming->setText(QString::number(gameData.playerActionTimeoutSec)+" "+tr("sec (action)")+"\n"+QString::number(gameData.delayBetweenHandsSec)+" "+tr("sec (hand delay)"));
|
||||
|
||||
mySession->clientCreateGame(gameData, currentGameName.toUtf8().constData(), myCreateInternetGameDialog->lineEdit_Password->text().toUtf8().constData());
|
||||
@@ -417,37 +415,6 @@ void gameLobbyDialogImpl::joinGame()
|
||||
}
|
||||
}
|
||||
|
||||
void gameLobbyDialogImpl::joinAnyGame()
|
||||
{
|
||||
|
||||
if(comboBox_gameListFilter->currentIndex() != 3 && comboBox_gameListFilter->currentIndex() != 0 && comboBox_gameListFilter->currentIndex() != 5) comboBox_gameListFilter->setCurrentIndex(0);
|
||||
|
||||
bool found = FALSE;
|
||||
|
||||
int it = 0;
|
||||
int gameToJoinId = 0;
|
||||
int mostConnectedPlayers = 0;
|
||||
|
||||
while (myGameListModel->item(it)) {
|
||||
|
||||
int players = myGameListModel->item(it, 1)->data(Qt::DisplayRole).toString().section("/",0,0).toInt();
|
||||
int maxPlayers = myGameListModel->item(it, 1)->data(Qt::DisplayRole).toString().section("/",1,1).toInt();
|
||||
if (myGameListModel->item(it, 2)->data(16) == "open" && myGameListModel->item(it, 4)->data(16) == "nonpriv" && players < maxPlayers) {
|
||||
if(players > mostConnectedPlayers) {
|
||||
mostConnectedPlayers = players;
|
||||
gameToJoinId = it;
|
||||
}
|
||||
found = TRUE;
|
||||
}
|
||||
it++;
|
||||
}
|
||||
|
||||
if(found) {
|
||||
treeView_GameList->setCurrentIndex(myGameListSortFilterProxyModel->mapFromSource(myGameListModel->item(gameToJoinId)->index()));
|
||||
joinGame();
|
||||
}
|
||||
}
|
||||
|
||||
void gameLobbyDialogImpl::refresh(int actionID)
|
||||
{
|
||||
|
||||
@@ -478,7 +445,6 @@ void gameLobbyDialogImpl::refresh(int actionID)
|
||||
treeView_GameList->setColumnWidth(3,25);
|
||||
treeView_GameList->setColumnWidth(4,25);
|
||||
treeView_GameList->setColumnWidth(5,30);
|
||||
|
||||
#endif
|
||||
|
||||
QStringList headerList2;
|
||||
@@ -550,7 +516,7 @@ void gameLobbyDialogImpl::gameSelected(const QModelIndex &index)
|
||||
break;
|
||||
}
|
||||
|
||||
showGameDescription(TRUE);
|
||||
showGameDescription(true);
|
||||
label_SmallBlind->setText(QString("%L1").arg(info.data.firstSmallBlind));
|
||||
label_StartCash->setText(QString("%L1").arg(info.data.startMoney));
|
||||
// label_MaximumNumberOfPlayers->setText(QString::number(info.data.maxNumberOfPlayers));s
|
||||
@@ -568,9 +534,15 @@ void gameLobbyDialogImpl::gameSelected(const QModelIndex &index)
|
||||
++i;
|
||||
}
|
||||
|
||||
QTreeWidgetItem *header = treeWidget_connectedPlayers->headerItem();
|
||||
header->setText(0, tr("Connected players - Max. %1").arg(info.data.maxNumberOfPlayers));
|
||||
header->setData(0, Qt::UserRole, info.data.maxNumberOfPlayers);
|
||||
treeWidget_connectedSpectators->clear();
|
||||
PlayerIdList::const_iterator s = info.spectators.begin();
|
||||
PlayerIdList::const_iterator s_end = info.spectators.end();
|
||||
while (s != s_end) {
|
||||
PlayerInfo playerInfo(mySession->getClientPlayerInfo(*s));
|
||||
addConnectedSpectator(*s, QString::fromUtf8(playerInfo.playerName.c_str()));
|
||||
++s;
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
// Dirty workaround for a Qt redraw bug on Mac OS.
|
||||
treeWidget_connectedPlayers->setFocus();
|
||||
@@ -612,6 +584,22 @@ void gameLobbyDialogImpl::updateGameItem(QList <QStandardItem*> itemList, unsign
|
||||
++i;
|
||||
}
|
||||
|
||||
//reset players iterator
|
||||
i = info.players.begin();
|
||||
end = info.players.end();
|
||||
while (i != end) {
|
||||
//mark players as active
|
||||
int it1 = 0;
|
||||
while (myNickListModel->item(it1)) {
|
||||
if (myNickListModel->item(it1, 0)->data(Qt::UserRole) == *i) {
|
||||
myNickListModel->item(it1, 0)->setData("active", 34);
|
||||
break;
|
||||
}
|
||||
++it1;
|
||||
}
|
||||
++i;
|
||||
}
|
||||
|
||||
QString playerStr;
|
||||
playerStr.sprintf("%u/%u", (unsigned)info.players.size(), (unsigned)info.data.maxNumberOfPlayers);
|
||||
itemList.at(1)->setData(playerStr, Qt::DisplayRole);
|
||||
@@ -674,6 +662,22 @@ void gameLobbyDialogImpl::updateGameItem(QList <QStandardItem*> itemList, unsign
|
||||
|
||||
treeView_GameList->sortByColumn(myConfig->readConfigInt("DlgGameLobbyGameListSortingSection"), (Qt::SortOrder)myConfig->readConfigInt("DlgGameLobbyGameListSortingOrder") );
|
||||
refreshGameStats();
|
||||
|
||||
//mark spactators as active
|
||||
PlayerIdList::const_iterator s = info.spectators.begin();
|
||||
PlayerIdList::const_iterator s_end = info.spectators.end();
|
||||
|
||||
while (s != s_end) {
|
||||
int it2 = 0;
|
||||
while (myNickListModel->item(it2)) {
|
||||
if (myNickListModel->item(it2, 0)->data(Qt::UserRole) == *s) {
|
||||
myNickListModel->item(it2, 0)->setData("active", 34);
|
||||
break;
|
||||
}
|
||||
++it2;
|
||||
}
|
||||
++s;
|
||||
}
|
||||
}
|
||||
|
||||
void gameLobbyDialogImpl::addGame(unsigned gameId)
|
||||
@@ -690,7 +694,6 @@ void gameLobbyDialogImpl::addGame(unsigned gameId)
|
||||
myGameListModel->appendRow(itemList);
|
||||
|
||||
updateGameItem(itemList, gameId);
|
||||
|
||||
}
|
||||
|
||||
void gameLobbyDialogImpl::updateGameMode(unsigned gameId, int /*newMode*/)
|
||||
@@ -743,11 +746,8 @@ void gameLobbyDialogImpl::refreshGameStats()
|
||||
++it;
|
||||
}
|
||||
|
||||
label_openGamesCounter->setText("| "+tr("running games: %1").arg(runningGamesCounter));
|
||||
label_runningGamesCounter->setText("| "+tr("open games: %1").arg(openGamesCounter));
|
||||
|
||||
//refresh joinAnyGameButton state
|
||||
joinAnyGameButtonRefresh();
|
||||
label_openGamesCounter->setText(" | "+tr("running games: %1").arg(runningGamesCounter));
|
||||
label_runningGamesCounter->setText(" | "+tr("open games: %1").arg(openGamesCounter));
|
||||
|
||||
}
|
||||
|
||||
@@ -778,14 +778,15 @@ void gameLobbyDialogImpl::gameAddPlayer(unsigned gameId, unsigned playerId)
|
||||
if (myGameListModel->item(it, 0)->data(Qt::UserRole) == gameId) {
|
||||
QList <QStandardItem*> itemList;
|
||||
itemList << myGameListModel->item(it, 0) << myGameListModel->item(it, 1) << myGameListModel->item(it, 2) << myGameListModel->item(it, 3) << myGameListModel->item(it, 4) << myGameListModel->item(it, 5);
|
||||
|
||||
updateGameItem(itemList, gameId);
|
||||
break;
|
||||
}
|
||||
it++;
|
||||
}
|
||||
}
|
||||
|
||||
//mark player as active
|
||||
void gameLobbyDialogImpl::gameAddSpectator(unsigned /*gameId*/, unsigned playerId)
|
||||
{
|
||||
int it1 = 0;
|
||||
while (myNickListModel->item(it1)) {
|
||||
if (myNickListModel->item(it1, 0)->data(Qt::UserRole) == playerId) {
|
||||
@@ -832,6 +833,19 @@ void gameLobbyDialogImpl::gameRemovePlayer(unsigned gameId, unsigned playerId)
|
||||
}
|
||||
}
|
||||
|
||||
void gameLobbyDialogImpl::gameRemoveSpectator(unsigned, unsigned playerId)
|
||||
{
|
||||
//mark spectator as idle again
|
||||
int it1 = 0;
|
||||
while (myNickListModel->item(it1)) {
|
||||
if (myNickListModel->item(it1, 0)->data(Qt::UserRole) == playerId) {
|
||||
myNickListModel->item(it1, 0)->setData("idle", 34);
|
||||
break;
|
||||
}
|
||||
++it1;
|
||||
}
|
||||
}
|
||||
|
||||
void gameLobbyDialogImpl::updateStats(ServerStats /*stats*/)
|
||||
{
|
||||
refreshPlayerStats();
|
||||
@@ -843,11 +857,7 @@ void gameLobbyDialogImpl::clearDialog()
|
||||
groupBox_GameInfo->setEnabled(false);
|
||||
currentGameName = "";
|
||||
|
||||
QTreeWidgetItem *header = treeWidget_connectedPlayers->headerItem();
|
||||
header->setText(0, tr("Connected players"));
|
||||
header->setData(0, Qt::UserRole, 0);
|
||||
|
||||
showGameDescription(FALSE);
|
||||
showGameDescription(false);
|
||||
label_typeIcon->setText(" ");
|
||||
label_typeText->setText(" ");
|
||||
label_SmallBlind->setText("");
|
||||
@@ -863,6 +873,7 @@ void gameLobbyDialogImpl::clearDialog()
|
||||
myGameListSortFilterProxyModel->clear();
|
||||
treeView_GameList->show();
|
||||
treeWidget_connectedPlayers->clear();
|
||||
treeWidget_connectedSpectators->clear();
|
||||
|
||||
pushButton_Leave->hide();
|
||||
pushButton_Kick->hide();
|
||||
@@ -872,8 +883,6 @@ void gameLobbyDialogImpl::clearDialog()
|
||||
pushButton_CreateGame->show();
|
||||
pushButton_JoinGame->show();
|
||||
pushButton_JoinGame->setEnabled(false);
|
||||
pushButton_joinAnyGame->show();
|
||||
pushButton_joinAnyGame->setEnabled(false);
|
||||
|
||||
QStringList headerList;
|
||||
headerList << tr("Game") << tr("Players") << tr("State") << tr("T") << tr("P") << tr("Time");
|
||||
@@ -911,17 +920,18 @@ void gameLobbyDialogImpl::clearDialog()
|
||||
isGameAdministrator = false;
|
||||
myPlayerId = 0;
|
||||
|
||||
showGameDescription(FALSE);
|
||||
showGameDescription(false);
|
||||
|
||||
label_connectedPlayersCounter->setText(tr("connected players: %1").arg(0));
|
||||
label_openGamesCounter->setText("| "+tr("running games: %1").arg(0));
|
||||
label_runningGamesCounter->setText("| "+tr("open games: %1").arg(0));
|
||||
label_openGamesCounter->setText(" | "+tr("running games: %1").arg(0));
|
||||
label_runningGamesCounter->setText(" | "+tr("open games: %1").arg(0));
|
||||
|
||||
readDialogSettings();
|
||||
}
|
||||
|
||||
void gameLobbyDialogImpl::checkPlayerQuantity()
|
||||
{
|
||||
tabWidget_playerSpectators->setTabText(0, tr("Players (%1)").arg(treeWidget_connectedPlayers->topLevelItemCount()));
|
||||
|
||||
assert(mySession);
|
||||
GameInfo info(mySession->getClientGameInfo(mySession->getClientCurrentGameId()));
|
||||
@@ -935,7 +945,7 @@ void gameLobbyDialogImpl::checkPlayerQuantity()
|
||||
if (treeWidget_connectedPlayers->topLevelItemCount() >= 2) {
|
||||
pushButton_StartGame->setEnabled(true);
|
||||
|
||||
if(treeWidget_connectedPlayers->topLevelItemCount() == treeWidget_connectedPlayers->headerItem()->data(0, Qt::UserRole).toInt()) {
|
||||
if(treeWidget_connectedPlayers->topLevelItemCount() == info.data.maxNumberOfPlayers) {
|
||||
blinkingButtonAnimationTimer->start();
|
||||
} else {
|
||||
blinkingButtonAnimationTimer->stop();
|
||||
@@ -951,7 +961,7 @@ void gameLobbyDialogImpl::checkPlayerQuantity()
|
||||
}
|
||||
|
||||
//general actions
|
||||
if(treeWidget_connectedPlayers->topLevelItemCount() < treeWidget_connectedPlayers->headerItem()->data(0, Qt::UserRole).toInt()) {
|
||||
if(treeWidget_connectedPlayers->topLevelItemCount() < info.data.maxNumberOfPlayers) {
|
||||
autoStartTimerOverlay->hide();
|
||||
autoStartTimer->stop();
|
||||
}
|
||||
@@ -986,12 +996,9 @@ void gameLobbyDialogImpl::blinkingStartButtonAnimation()
|
||||
|
||||
void gameLobbyDialogImpl::joinedNetworkGame(unsigned playerId, QString playerName, bool isGameAdmin)
|
||||
{
|
||||
|
||||
// Update dialog
|
||||
inGame = true;
|
||||
joinedGameDialogUpdate();
|
||||
|
||||
|
||||
myPlayerId = playerId;
|
||||
isGameAdministrator = isGameAdmin;
|
||||
addConnectedPlayer(playerId, playerName, isGameAdmin);
|
||||
@@ -1018,7 +1025,7 @@ void gameLobbyDialogImpl::joinedNetworkGame(unsigned playerId, QString playerNam
|
||||
|
||||
void gameLobbyDialogImpl::addConnectedPlayer(unsigned playerId, QString playerName, bool isGameAdmin)
|
||||
{
|
||||
|
||||
GameInfo info(mySession->getClientGameInfo(mySession->getClientCurrentGameId()));
|
||||
QTreeWidgetItem *item = new QTreeWidgetItem(treeWidget_connectedPlayers, 0);
|
||||
item->setData(0, Qt::UserRole, playerId);
|
||||
item->setData(0, Qt::DisplayRole, playerName);
|
||||
@@ -1026,7 +1033,7 @@ void gameLobbyDialogImpl::addConnectedPlayer(unsigned playerId, QString playerNa
|
||||
if(isGameAdmin) item->setBackground(0, QBrush(QColor(0, 255, 0, 127)));
|
||||
|
||||
if(this->isVisible() && inGame && myConfig->readConfigInt("PlayNetworkGameNotification")) {
|
||||
if(treeWidget_connectedPlayers->topLevelItemCount() < treeWidget_connectedPlayers->headerItem()->data(0, Qt::UserRole).toInt()) {
|
||||
if(treeWidget_connectedPlayers->topLevelItemCount() < info.data.maxNumberOfPlayers) {
|
||||
myW->getMySoundEventHandler()->playSound("playerconnected", 0);
|
||||
} else {
|
||||
myW->getMySoundEventHandler()->playSound("onlinegameready", 0);
|
||||
@@ -1040,6 +1047,17 @@ void gameLobbyDialogImpl::addConnectedPlayer(unsigned playerId, QString playerNa
|
||||
refreshConnectedPlayerAvatars();
|
||||
}
|
||||
|
||||
void gameLobbyDialogImpl::addConnectedSpectator(unsigned spectatorId, QString spectatorName)
|
||||
{
|
||||
|
||||
QTreeWidgetItem *item = new QTreeWidgetItem(treeWidget_connectedSpectators, 0);
|
||||
item->setData(0, Qt::UserRole, spectatorId);
|
||||
item->setData(0, Qt::DisplayRole, spectatorName);
|
||||
tabWidget_playerSpectators->setTabText(1, tr("Spectators (%1)").arg(treeWidget_connectedSpectators->topLevelItemCount()));
|
||||
// if (inGame)
|
||||
// refreshConnectedSpecatatorAvatars();
|
||||
}
|
||||
|
||||
void gameLobbyDialogImpl::updatePlayer(unsigned playerId, QString newPlayerName)
|
||||
{
|
||||
|
||||
@@ -1074,14 +1092,6 @@ void gameLobbyDialogImpl::updatePlayer(unsigned playerId, QString newPlayerName)
|
||||
myNickListModel->item(it1, 0)->setIcon(QIcon(QString(":/cflags/cflags/%1.png").arg(countryString)));
|
||||
myNickListModel->item(it1, 0)->setToolTip(getFullCountryString(countryString.toUpper()));
|
||||
}
|
||||
|
||||
unsigned gameIdOfPlayer = mySession->getGameIdOfPlayer(playerId);
|
||||
if(gameIdOfPlayer) {
|
||||
myNickListModel->item(it1, 0)->setData("active", 34);
|
||||
} else {
|
||||
myNickListModel->item(it1, 0)->setData("idle", 34);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1095,7 +1105,6 @@ void gameLobbyDialogImpl::updatePlayer(unsigned playerId, QString newPlayerName)
|
||||
|
||||
void gameLobbyDialogImpl::removePlayer(unsigned playerId, QString)
|
||||
{
|
||||
|
||||
QTreeWidgetItemIterator it(treeWidget_connectedPlayers);
|
||||
while (*it) {
|
||||
if ((*it)->data(0, Qt::UserRole) == playerId) {
|
||||
@@ -1104,9 +1113,21 @@ void gameLobbyDialogImpl::removePlayer(unsigned playerId, QString)
|
||||
}
|
||||
++it;
|
||||
}
|
||||
|
||||
checkPlayerQuantity();
|
||||
}
|
||||
|
||||
|
||||
void gameLobbyDialogImpl::removeSpectator(unsigned spectatorId, QString)
|
||||
{
|
||||
QTreeWidgetItemIterator it(treeWidget_connectedSpectators);
|
||||
while (*it) {
|
||||
if ((*it)->data(0, Qt::UserRole) == spectatorId) {
|
||||
treeWidget_connectedSpectators->takeTopLevelItem(treeWidget_connectedSpectators->indexOfTopLevelItem(*it));
|
||||
break;
|
||||
}
|
||||
++it;
|
||||
}
|
||||
tabWidget_playerSpectators->setTabText(1, tr("Spectators (%1)").arg(treeWidget_connectedSpectators->topLevelItemCount()));
|
||||
}
|
||||
|
||||
void gameLobbyDialogImpl::playerLeftLobby(unsigned playerId)
|
||||
@@ -1138,15 +1159,7 @@ void gameLobbyDialogImpl::playerJoinedLobby(unsigned playerId, QString /*playerN
|
||||
item->setIcon(QIcon(QString(":/cflags/cflags/%1.png").arg(countryString)));
|
||||
item->setToolTip(getFullCountryString(countryString.toUpper()));
|
||||
}
|
||||
|
||||
unsigned gameIdOfPlayer = mySession->getGameIdOfPlayer(playerId);
|
||||
if(gameIdOfPlayer) {
|
||||
item->setData("active", 34);
|
||||
} else {
|
||||
item->setData("idle", 34);
|
||||
}
|
||||
|
||||
|
||||
myNickListModel->appendRow(item);
|
||||
|
||||
refreshPlayerStats();
|
||||
@@ -1204,7 +1217,6 @@ void gameLobbyDialogImpl::joinedGameDialogUpdate()
|
||||
treeWidget_connectedPlayers->clear();
|
||||
pushButton_CreateGame->hide();
|
||||
pushButton_JoinGame->hide();
|
||||
pushButton_joinAnyGame->hide();
|
||||
pushButton_Leave->show();
|
||||
pushButton_Leave->setEnabled(true);
|
||||
|
||||
@@ -1237,15 +1249,11 @@ void gameLobbyDialogImpl::joinedGameDialogUpdate()
|
||||
break;
|
||||
}
|
||||
|
||||
showGameDescription(TRUE);
|
||||
showGameDescription(true);
|
||||
label_SmallBlind->setText(QString("%L1").arg(info.data.firstSmallBlind));
|
||||
label_StartCash->setText(QString("%L1").arg(info.data.startMoney));
|
||||
updateDialogBlinds(info.data);
|
||||
label_GameTiming->setText(QString::number(info.data.playerActionTimeoutSec)+" "+tr("sec (action)")+"\n"+QString::number(info.data.delayBetweenHandsSec)+" "+tr("sec (hand delay)"));
|
||||
|
||||
QTreeWidgetItem *header = treeWidget_connectedPlayers->headerItem();
|
||||
header->setText(0, tr("Connected players - Max. %1").arg(info.data.maxNumberOfPlayers));
|
||||
header->setData(0, Qt::UserRole, info.data.maxNumberOfPlayers);
|
||||
}
|
||||
|
||||
void gameLobbyDialogImpl::leftGameDialogUpdate()
|
||||
@@ -1258,11 +1266,7 @@ void gameLobbyDialogImpl::leftGameDialogUpdate()
|
||||
groupBox_GameInfo->setEnabled(false);
|
||||
currentGameName = "";
|
||||
|
||||
QTreeWidgetItem *header = treeWidget_connectedPlayers->headerItem();
|
||||
header->setText(0, tr("Connected players"));
|
||||
header->setData(0, Qt::UserRole, 0);
|
||||
|
||||
showGameDescription(FALSE);
|
||||
showGameDescription(false);
|
||||
label_typeIcon->setText(" ");
|
||||
label_typeText->setText(" ");
|
||||
label_SmallBlind->setText("");
|
||||
@@ -1273,6 +1277,7 @@ void gameLobbyDialogImpl::leftGameDialogUpdate()
|
||||
label_GameTiming->setText("");
|
||||
|
||||
treeWidget_connectedPlayers->clear();
|
||||
treeWidget_connectedSpectators->clear();
|
||||
pushButton_StartGame->hide();
|
||||
pushButton_Leave->hide();
|
||||
pushButton_Kick->hide();
|
||||
@@ -1281,8 +1286,6 @@ void gameLobbyDialogImpl::leftGameDialogUpdate()
|
||||
pushButton_CreateGame->show();
|
||||
pushButton_JoinGame->show();
|
||||
pushButton_JoinGame->setEnabled(false);
|
||||
pushButton_joinAnyGame->show();
|
||||
joinAnyGameButtonRefresh();
|
||||
|
||||
lineEdit_ChatInput->setFocus();
|
||||
}
|
||||
@@ -1436,6 +1439,7 @@ void gameLobbyDialogImpl::showGameDescription(bool show)
|
||||
label_gameDesc5->show();
|
||||
label_gameDesc6->show();
|
||||
label_gameDesc7->show();
|
||||
checkPlayerQuantity();
|
||||
} else {
|
||||
label_gameType->hide();
|
||||
label_gameDesc2->hide();
|
||||
@@ -1444,6 +1448,8 @@ void gameLobbyDialogImpl::showGameDescription(bool show)
|
||||
label_gameDesc5->hide();
|
||||
label_gameDesc6->hide();
|
||||
label_gameDesc7->hide();
|
||||
tabWidget_playerSpectators->setTabText(0, tr("Players (%1)").arg(0));
|
||||
tabWidget_playerSpectators->setTabText(1, tr("Spectators (%1)").arg(0));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1464,26 +1470,6 @@ void gameLobbyDialogImpl::hideWaitStartGameMsgBox()
|
||||
waitRejoinStartGameMsgBox->hide();
|
||||
}
|
||||
|
||||
void gameLobbyDialogImpl::joinAnyGameButtonRefresh()
|
||||
{
|
||||
|
||||
int openNonPrivateNonFullGamesCounter = 0;
|
||||
|
||||
int it = 0;
|
||||
while (myGameListModel->item(it)) {
|
||||
|
||||
int players = myGameListModel->item(it, 1)->data(Qt::DisplayRole).toString().section("/",0,0).toInt();
|
||||
int maxPlayers = myGameListModel->item(it, 1)->data(Qt::DisplayRole).toString().section("/",1,1).toInt();
|
||||
if (myGameListModel->item(it, 2)->data(16) == "open" && myGameListModel->item(it, 4)->data(16) == "nonpriv" && players < maxPlayers) {
|
||||
openNonPrivateNonFullGamesCounter++;
|
||||
}
|
||||
++it;
|
||||
}
|
||||
|
||||
if(openNonPrivateNonFullGamesCounter) pushButton_joinAnyGame->setEnabled(TRUE);
|
||||
else pushButton_joinAnyGame->setEnabled(FALSE);
|
||||
}
|
||||
|
||||
void gameLobbyDialogImpl::reject()
|
||||
{
|
||||
myStartWindow->show();
|
||||
@@ -1663,7 +1649,6 @@ void gameLobbyDialogImpl::showNickListContextMenu(QPoint p)
|
||||
unsigned playerUid = myNickListSelectionModel->currentIndex().data(Qt::UserRole).toUInt();
|
||||
|
||||
if(inGame && mySession->getClientGameInfo(mySession->getClientCurrentGameId()).data.gameType == GAME_TYPE_INVITE_ONLY && playerUid != mySession->getClientUniquePlayerId() && !mySession->getClientPlayerInfo(playerUid).isGuest) {
|
||||
|
||||
nickListInviteAction->setEnabled(true);
|
||||
nickListInviteAction->setText(tr("Invite %1").arg(QString::fromUtf8(mySession->getClientPlayerInfo(playerUid).playerName.c_str())));
|
||||
|
||||
@@ -1672,16 +1657,22 @@ void gameLobbyDialogImpl::showNickListContextMenu(QPoint p)
|
||||
nickListInviteAction->setEnabled(false);
|
||||
}
|
||||
|
||||
if(playerUid != mySession->getClientUniquePlayerId() && !mySession->getClientPlayerInfo(playerUid).isGuest) {
|
||||
|
||||
if(playerUid != mySession->getClientUniquePlayerId() && !mySession->getClientPlayerInfo(playerUid).isGuest && !playerIsOnIgnoreList(playerUid)) {
|
||||
nickListIgnorePlayerAction->setEnabled(true);
|
||||
nickListIgnorePlayerAction->setText(tr("Ignore %1").arg(QString::fromUtf8(mySession->getClientPlayerInfo(playerUid).playerName.c_str())));
|
||||
} else {
|
||||
|
||||
nickListIgnorePlayerAction->setEnabled(false);
|
||||
nickListIgnorePlayerAction->setText(tr("Ignore player ..."));
|
||||
}
|
||||
|
||||
if(playerUid != mySession->getClientUniquePlayerId() && !mySession->getClientPlayerInfo(playerUid).isGuest && playerIsOnIgnoreList(playerUid)) {
|
||||
nickListUnignorePlayerAction->setEnabled(true);
|
||||
nickListUnignorePlayerAction->setText(tr("Unignore %1").arg(QString::fromUtf8(mySession->getClientPlayerInfo(playerUid).playerName.c_str())));
|
||||
} else {
|
||||
nickListUnignorePlayerAction->setEnabled(false);
|
||||
nickListUnignorePlayerAction->setText(tr("Unignore player ..."));
|
||||
}
|
||||
|
||||
unsigned gameIdOfPlayer = mySession->getGameIdOfPlayer(playerUid);
|
||||
QString playerInGameInfoString;
|
||||
if(gameIdOfPlayer) {
|
||||
@@ -1692,8 +1683,11 @@ void gameLobbyDialogImpl::showNickListContextMenu(QPoint p)
|
||||
nickListPlayerInGameInfo->setText(playerInGameInfoString);
|
||||
|
||||
//prevent admin to total kickban himself
|
||||
if(playerUid == mySession->getClientUniquePlayerId()) { nickListAdminTotalKickBan->setDisabled(true); }
|
||||
else { nickListAdminTotalKickBan->setEnabled(true); }
|
||||
if(playerUid == mySession->getClientUniquePlayerId()) {
|
||||
nickListAdminTotalKickBan->setDisabled(true);
|
||||
} else {
|
||||
nickListAdminTotalKickBan->setEnabled(true);
|
||||
}
|
||||
|
||||
// check for admin and remove admin actions for non-admins
|
||||
if(!mySession->getClientPlayerInfo(mySession->getClientUniquePlayerId()).isAdmin) {
|
||||
@@ -1713,8 +1707,11 @@ void gameLobbyDialogImpl::showGameListContextMenu(QPoint p)
|
||||
|
||||
assert(mySession);
|
||||
unsigned selectedGameId = myGameListSelectionModel->selectedRows().first().data(Qt::UserRole).toUInt();
|
||||
if(selectedGameId == mySession->getClientCurrentGameId()) { gameListAdminCloseGame->setDisabled(true); }
|
||||
else { gameListAdminCloseGame->setEnabled(true); }
|
||||
if(selectedGameId == mySession->getClientCurrentGameId()) {
|
||||
gameListAdminCloseGame->setDisabled(true);
|
||||
} else {
|
||||
gameListAdminCloseGame->setEnabled(true);
|
||||
}
|
||||
|
||||
// check for admin and remove admin actions for non-admins
|
||||
if(!mySession->getClientPlayerInfo(mySession->getClientUniquePlayerId()).isAdmin) {
|
||||
@@ -1805,21 +1802,32 @@ bool gameLobbyDialogImpl::playerIsOnIgnoreList(unsigned playerId)
|
||||
|
||||
void gameLobbyDialogImpl::putPlayerOnIgnoreList()
|
||||
{
|
||||
|
||||
if(myNickListSelectionModel->currentIndex().isValid()) {
|
||||
|
||||
unsigned playerId = myNickListSelectionModel->currentIndex().data(Qt::UserRole).toUInt();
|
||||
|
||||
if(!playerIsOnIgnoreList(playerId)) {
|
||||
|
||||
myMessageDialogImpl dialog(myConfig, this);
|
||||
if(dialog.exec(INGNORE_PLAYER_QUESTION, tr("You will no longer receive chat messages or game invitations from this user.<br>Do you really want to put player <b>%1</b> on your ignore list?").arg(QString::fromUtf8(mySession->getClientPlayerInfo(playerId).playerName.c_str())), tr("PokerTH - Question"), QPixmap(":/gfx/im-ban-user_64.png"), QDialogButtonBox::Yes|QDialogButtonBox::No, false ) == QDialog::Accepted) {
|
||||
|
||||
if(dialog.exec(IGNORE_PLAYER_QUESTION, tr("You will no longer receive chat messages or game invitations from this user.<br>Do you really want to put player <b>%1</b> on your ignore list?").arg(QString::fromUtf8(mySession->getClientPlayerInfo(playerId).playerName.c_str())), tr("PokerTH - Question"), QPixmap(":/gfx/im-ban-user_64.png"), QDialogButtonBox::Yes|QDialogButtonBox::No, false ) == QDialog::Accepted) {
|
||||
list<std::string> playerIgnoreList = myConfig->readConfigStringList("PlayerIgnoreList");
|
||||
playerIgnoreList.push_back(QString("%1").arg(QString::fromUtf8(mySession->getClientPlayerInfo(playerId).playerName.c_str())).toUtf8().constData());
|
||||
myConfig->writeConfigStringList("PlayerIgnoreList", playerIgnoreList);
|
||||
myConfig->writeBuffer();
|
||||
myChat->refreshIgnoreList();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void gameLobbyDialogImpl::removePlayerFromIgnoreList()
|
||||
{
|
||||
if(myNickListSelectionModel->currentIndex().isValid()) {
|
||||
unsigned playerId = myNickListSelectionModel->currentIndex().data(Qt::UserRole).toUInt();
|
||||
if(playerIsOnIgnoreList(playerId)) {
|
||||
myMessageDialogImpl dialog(myConfig, this);
|
||||
if(dialog.exec(UNIGNORE_PLAYER_QUESTION, tr("You will receive chat messages and game invitations from this user again!<br>Do you really want to remove player <b>%1</b> from your ignore list?").arg(QString::fromUtf8(mySession->getClientPlayerInfo(playerId).playerName.c_str())), tr("PokerTH - Question"), QPixmap(":/gfx/dialog_ok_apply.png"), QDialogButtonBox::Yes|QDialogButtonBox::No, false ) == QDialog::Accepted) {
|
||||
list<std::string> playerIgnoreList = myConfig->readConfigStringList("PlayerIgnoreList");
|
||||
playerIgnoreList.remove(QString("%1").arg(QString::fromUtf8(mySession->getClientPlayerInfo(playerId).playerName.c_str())).toUtf8().constData());
|
||||
myConfig->writeConfigStringList("PlayerIgnoreList", playerIgnoreList);
|
||||
myConfig->writeBuffer();
|
||||
myChat->refreshIgnoreList();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
|
||||
~gameLobbyDialogImpl();
|
||||
|
||||
void exec();
|
||||
int exec();
|
||||
|
||||
ChatTools *getMyChat() {
|
||||
return myChat;
|
||||
@@ -84,7 +84,6 @@ public slots:
|
||||
|
||||
void createGame();
|
||||
void joinGame();
|
||||
void joinAnyGame();
|
||||
void gameSelected(const QModelIndex &);
|
||||
void updateGameItem(QList <QStandardItem*>, unsigned gameId);
|
||||
void addGame(unsigned gameId);
|
||||
@@ -131,7 +130,6 @@ public slots:
|
||||
void showWaitStartGameMsgBox();
|
||||
void hideWaitStartGameMsgBox();
|
||||
void stopWaitStartGameMsgBoxTimer();
|
||||
void joinAnyGameButtonRefresh();
|
||||
void reject();
|
||||
void closeEvent(QCloseEvent *event);
|
||||
void accept();
|
||||
@@ -151,6 +149,7 @@ public slots:
|
||||
void chatInfoPlayerInvitation(unsigned gameId, unsigned playerIdWho, unsigned playerIdFrom);
|
||||
void chatInfoPlayerRejectedInvitation(unsigned gameId, unsigned playerIdWho, DenyGameInvitationReason reason);
|
||||
void putPlayerOnIgnoreList();
|
||||
void removePlayerFromIgnoreList();
|
||||
bool playerIsOnIgnoreList(unsigned playerid);
|
||||
void searchForPlayerRegExpChanged();
|
||||
void showAutoStartTimer();
|
||||
@@ -162,6 +161,10 @@ public slots:
|
||||
void reportBadGameName();
|
||||
void adminActionCloseGame();
|
||||
void adminActionTotalKickBan();
|
||||
void addConnectedSpectator(unsigned spectatorId, QString spectatorName);
|
||||
void removeSpectator(unsigned spectatorId, QString);
|
||||
void gameAddSpectator(unsigned, unsigned);
|
||||
void gameRemoveSpectator(unsigned, unsigned);
|
||||
|
||||
private:
|
||||
|
||||
@@ -203,6 +206,7 @@ private:
|
||||
QMenu *nickListContextMenu;
|
||||
QAction *nickListInviteAction;
|
||||
QAction *nickListIgnorePlayerAction;
|
||||
QAction *nickListUnignorePlayerAction;
|
||||
QMenu *nickListPlayerInfoSubMenu;
|
||||
QMenu *nickListAdminSubMenu;
|
||||
QAction *nickListAdminTotalKickBan;
|
||||
|
||||
@@ -33,6 +33,9 @@
|
||||
|
||||
#include <QtGui>
|
||||
#include <QtCore>
|
||||
#if QT_VERSION >= 0x050000
|
||||
#include <QtWidgets>
|
||||
#endif
|
||||
|
||||
class MyGameListTreeWidget : public QTreeWidget
|
||||
{
|
||||
|
||||
+156
-35
@@ -2235,7 +2235,16 @@ p, li { white-space: pre-wrap; }
|
||||
<string notr="true">QGroupBox {border-style:none;}</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_5">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
@@ -2306,15 +2315,24 @@ p, li { white-space: pre-wrap; }
|
||||
</size>
|
||||
</property>
|
||||
<layout class="QGridLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="verticalSpacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_gameNumber">
|
||||
<property name="alignment">
|
||||
@@ -2556,15 +2574,24 @@ p, li { white-space: pre-wrap; }
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="grid2">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="verticalSpacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="textLabel_Sets">
|
||||
<property name="alignment">
|
||||
@@ -3532,7 +3559,16 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
@@ -3582,7 +3618,16 @@ p, li { white-space: pre-wrap; }
|
||||
</size>
|
||||
</property>
|
||||
<layout class="QGridLayout">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
@@ -3598,7 +3643,16 @@ p, li { white-space: pre-wrap; }
|
||||
<string>Hands</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
@@ -3618,7 +3672,16 @@ p, li { white-space: pre-wrap; }
|
||||
<string>Chat</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
@@ -3650,15 +3713,24 @@ p, li { white-space: pre-wrap; }
|
||||
<string>Kick</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_100">
|
||||
<property name="leftMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="verticalSpacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
@@ -3790,12 +3862,21 @@ p, li { white-space: pre-wrap; }
|
||||
<string>Player info</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout4">
|
||||
<property name="leftMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QPlainTextEdit" name="textEdit_tipInput">
|
||||
<property name="focusPolicy">
|
||||
@@ -3868,15 +3949,24 @@ p, li { white-space: pre-wrap; }
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="verticalSpacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="1" column="0">
|
||||
<layout class="QHBoxLayout">
|
||||
<property name="spacing">
|
||||
@@ -4026,7 +4116,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
@@ -4039,7 +4129,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
@@ -4069,7 +4159,16 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
@@ -4119,15 +4218,24 @@ p, li { white-space: pre-wrap; }
|
||||
</size>
|
||||
</property>
|
||||
<layout class="QGridLayout">
|
||||
<property name="leftMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="verticalSpacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="MyRightTabWidget" name="tabWidget_Right">
|
||||
<property name="focusPolicy">
|
||||
@@ -4141,7 +4249,16 @@ p, li { white-space: pre-wrap; }
|
||||
<string>Log</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
@@ -4251,7 +4368,16 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
@@ -4457,13 +4583,13 @@ p, li { white-space: pre-wrap; }
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="MyMenuBar" name="menubar">
|
||||
<widget class="QMenuBar" name="menubar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1024</width>
|
||||
<height>26</height>
|
||||
<height>19</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuView">
|
||||
@@ -4660,11 +4786,6 @@ p, li { white-space: pre-wrap; }
|
||||
<extends>QPushButton</extends>
|
||||
<header>myactionbutton.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>MyMenuBar</class>
|
||||
<extends>QMenuBar</extends>
|
||||
<header>mymenubar.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>MyTimeoutLabel</class>
|
||||
<extends>QLabel</extends>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -40,10 +40,16 @@
|
||||
#include "game_defs.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
#ifndef Q_MOC_RUN
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#endif
|
||||
|
||||
#include <QtGui>
|
||||
#include <QtCore>
|
||||
#if QT_VERSION >= 0x050000
|
||||
#include <QtWidgets>
|
||||
#endif
|
||||
|
||||
class guiLog;
|
||||
class ChatTools;
|
||||
@@ -127,6 +133,7 @@ signals:
|
||||
void signalRefreshPlayerName();
|
||||
void signalRefreshButton();
|
||||
void signalRefreshGameLabels(int);
|
||||
void signalRefreshSpectatorsDisplay();
|
||||
|
||||
void signalSetPlayerAvatar(int, QString);
|
||||
void signalGuiUpdateDone();
|
||||
@@ -166,6 +173,9 @@ signals:
|
||||
void signalChangeVoteOnKickButtonsState(bool showHide);
|
||||
void signalEndVoteOnKick();
|
||||
void signalNetClientPlayerLeft(unsigned playerId);
|
||||
void signalNetClientSpectatorLeft(unsigned playerId);
|
||||
void signalNetClientSpectatorJoined(unsigned playerId);
|
||||
void signalNetClientPingUpdate(unsigned minPing, unsigned avgPing, unsigned maxPing);
|
||||
|
||||
public slots:
|
||||
|
||||
@@ -347,6 +357,8 @@ public slots:
|
||||
void restoreGameTableGeometry();
|
||||
|
||||
void netClientPlayerLeft(unsigned playerId);
|
||||
void netClientSpectatorLeft(unsigned playerId);
|
||||
void netClientSpectatorJoined(unsigned playerId);
|
||||
void registeredUserMode();
|
||||
void guestUserMode();
|
||||
|
||||
@@ -363,6 +375,8 @@ public slots:
|
||||
void tabsButtonClicked();
|
||||
void tabsButtonClose();
|
||||
#endif
|
||||
void refreshSpectatorsDisplay();
|
||||
void pingUpdate(unsigned, unsigned, unsigned);
|
||||
|
||||
private:
|
||||
|
||||
@@ -429,6 +443,8 @@ private:
|
||||
|
||||
QLabel *playerTipLabelArray[MAX_NUMBER_OF_PLAYERS];
|
||||
QPixmap flipside;
|
||||
QLabel *spectatorIcon;
|
||||
QLabel *spectatorNumberLabel;
|
||||
|
||||
// Dialogs
|
||||
startWindowImpl *myStartWindow;
|
||||
|
||||
@@ -58,6 +58,8 @@ guiLog::guiLog(gameTableImpl* w, ConfigFile *c) : myW(w), myConfig(c), myLogDir(
|
||||
connect(this, SIGNAL(signalLogPlayerLeftMsg(QString, int)), this, SLOT(logPlayerLeftMsg(QString, int)));
|
||||
connect(this, SIGNAL(signalLogPlayerJoinedMsg(QString)), this, SLOT(logPlayerJoinedMsg(QString)));
|
||||
connect(this, SIGNAL(signalLogNewGameAdminMsg(QString)), this, SLOT(logNewGameAdminMsg(QString)));
|
||||
connect(this, SIGNAL(signalLogSpectatorLeftMsg(QString, int)), this, SLOT(logSpectatorLeftMsg(QString, int)));
|
||||
connect(this, SIGNAL(signalLogSpectatorJoinedMsg(QString)), this, SLOT(logSpectatorJoinedMsg(QString)));
|
||||
connect(this, SIGNAL(signalLogPlayerWinGame(QString, int)), this, SLOT(logPlayerWinGame(QString, int)));
|
||||
connect(this, SIGNAL(signalFlushLogAtGame(int)), this, SLOT(flushLogAtGame(int)));
|
||||
connect(this, SIGNAL(signalFlushLogAtHand()), this, SLOT(flushLogAtHand()));
|
||||
@@ -537,6 +539,15 @@ void guiLog::logPlayerJoinedMsg(QString playerName)
|
||||
#endif
|
||||
}
|
||||
|
||||
void guiLog::logSpectatorLeftMsg(QString playerName, int wasKicked)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
void guiLog::logSpectatorJoinedMsg(QString playerName)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
void guiLog::logPlayerWinGame(QString playerName, int gameID)
|
||||
{
|
||||
|
||||
@@ -41,6 +41,9 @@
|
||||
#include <QtCore>
|
||||
#include <QtGui>
|
||||
#include <QtSql>
|
||||
#if QT_VERSION >= 0x050000
|
||||
#include <QtWidgets>
|
||||
#endif
|
||||
|
||||
struct result_struct {
|
||||
char **result_Session;
|
||||
@@ -75,6 +78,8 @@ public slots:
|
||||
void logPlayerLeftMsg(QString playerName, int wasKicked);
|
||||
void logPlayerJoinedMsg(QString playerName);
|
||||
void logNewGameAdminMsg(QString playerName);
|
||||
void logSpectatorLeftMsg(QString playerName, int wasKicked);
|
||||
void logSpectatorJoinedMsg(QString playerName);
|
||||
void logPlayerWinGame(QString playerName, int gameID);
|
||||
void flushLogAtGame(int gameID);
|
||||
void flushLogAtHand();
|
||||
@@ -106,6 +111,8 @@ signals:
|
||||
void signalLogFlipHoleCardsMsg(QString playerName, int card1, int card2, int cardsValueInt = -1, QString showHas = "shows");
|
||||
void signalLogPlayerLeftMsg(QString playerName, int wasKicked);
|
||||
void signalLogPlayerJoinedMsg(QString playerName);
|
||||
void signalLogSpectatorLeftMsg(QString playerName, int wasKicked);
|
||||
void signalLogSpectatorJoinedMsg(QString playerName);
|
||||
void signalLogNewGameAdminMsg(QString playerName);
|
||||
void signalLogPlayerWinGame(QString playerName, int gameID);
|
||||
void signalFlushLogAtGame(int gameID);
|
||||
|
||||
@@ -33,6 +33,9 @@
|
||||
|
||||
#include <QtGui>
|
||||
#include <QtCore>
|
||||
#if QT_VERSION >= 0x050000
|
||||
#include <QtWidgets>
|
||||
#endif
|
||||
|
||||
class GameTableStyleReader;
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
using namespace std;
|
||||
|
||||
MyAvatarLabel::MyAvatarLabel(QGroupBox* parent)
|
||||
: QLabel(parent), voteRunning(FALSE), transparent(FALSE)
|
||||
: QLabel(parent), voteRunning(false), transparent(false), myUniqueId(0), myPingState(0), myAvgPing(0), myMinPing(0), myMaxPing(0)
|
||||
{
|
||||
|
||||
myContextMenu = new QMenu;
|
||||
@@ -52,11 +52,14 @@ MyAvatarLabel::MyAvatarLabel(QGroupBox* parent)
|
||||
myContextMenu->addAction(action_VoteForKick);
|
||||
action_IgnorePlayer = new QAction(QIcon(":/gfx/im-ban-user.png"), tr("Ignore Player"), myContextMenu);
|
||||
myContextMenu->addAction(action_IgnorePlayer);
|
||||
action_UnignorePlayer = new QAction(QIcon(":/gfx/dialog_ok_apply.png"), tr("Unignore Player"), myContextMenu);
|
||||
myContextMenu->addAction(action_UnignorePlayer);
|
||||
action_ReportBadAvatar = new QAction(QIcon(":/gfx/emblem-important.png"), tr("Report inappropriate avatar"), myContextMenu);
|
||||
myContextMenu->addAction(action_ReportBadAvatar);
|
||||
|
||||
connect( action_VoteForKick, SIGNAL ( triggered() ), this, SLOT ( sendTriggerVoteOnKickSignal() ) );
|
||||
connect( action_IgnorePlayer, SIGNAL ( triggered() ), this, SLOT ( putPlayerOnIgnoreList() ) );
|
||||
connect( action_UnignorePlayer, SIGNAL ( triggered() ), this, SLOT ( removePlayerFromIgnoreList() ) );
|
||||
connect( action_ReportBadAvatar, SIGNAL ( triggered() ), this, SLOT ( reportBadAvatar() ) );
|
||||
connect( action_EditTip, SIGNAL( triggered() ), this, SLOT ( startEditTip() ) );
|
||||
}
|
||||
@@ -86,12 +89,13 @@ void MyAvatarLabel::contextMenuEvent ( QContextMenuEvent *event )
|
||||
GameInfo info(myW->getSession()->getClientGameInfo(myW->getSession()->getClientCurrentGameId()));
|
||||
|
||||
if(activePlayerCounter > 2 && !voteRunning && info.data.gameType != GAME_TYPE_RANKING && !myW->getGuestMode()) {
|
||||
setVoteOnKickContextMenuEnabled(TRUE);
|
||||
setVoteOnKickContextMenuEnabled(true);
|
||||
} else {
|
||||
setVoteOnKickContextMenuEnabled(FALSE);
|
||||
setVoteOnKickContextMenuEnabled(false);
|
||||
}
|
||||
|
||||
action_IgnorePlayer->setEnabled(true);
|
||||
action_UnignorePlayer->setDisabled(true);
|
||||
action_EditTip->setEnabled(true);
|
||||
int j=0;
|
||||
for (it_c=seatList->begin(); it_c!=seatList->end(); ++it_c) {
|
||||
@@ -110,9 +114,14 @@ void MyAvatarLabel::contextMenuEvent ( QContextMenuEvent *event )
|
||||
}
|
||||
|
||||
if(myW->getSession()->getGameType() == Session::GAME_TYPE_INTERNET && !((*it_c)->getMyAvatar().empty()) ) {
|
||||
action_ReportBadAvatar->setVisible(TRUE);
|
||||
action_ReportBadAvatar->setVisible(true);
|
||||
} else {
|
||||
action_ReportBadAvatar->setVisible(FALSE);
|
||||
action_ReportBadAvatar->setVisible(false);
|
||||
}
|
||||
|
||||
if(playerIsOnIgnoreList(QString::fromUtf8((*it_c)->getMyName().c_str()))) {
|
||||
action_UnignorePlayer->setEnabled(true);
|
||||
action_IgnorePlayer->setDisabled(true);
|
||||
}
|
||||
}
|
||||
j++;
|
||||
@@ -214,7 +223,7 @@ void MyAvatarLabel::refreshStars()
|
||||
for (seatPlace=0,it_c=seatsList->begin(); it_c!=seatsList->end(); ++it_c, seatPlace++) {
|
||||
for(int i=1; i<=5; i++)myW->playerStarsArray[i][seatPlace]->setText("");
|
||||
if(myW->myStartWindow->getSession()->getGameType() == Session::GAME_TYPE_INTERNET && !myW->getSession()->getClientPlayerInfo((*it_c)->getMyUniqueID()).isGuest && (*it_c)->getMyType() != PLAYER_TYPE_COMPUTER) {
|
||||
if((*it_c)->getMyStayOnTableStatus() == TRUE && (*it_c)->getMyName()!="" && seatPlace!=0) {
|
||||
if((*it_c)->getMyStayOnTableStatus() == true && (*it_c)->getMyName()!="" && seatPlace!=0) {
|
||||
int playerStars=getPlayerRating(QString::fromUtf8((*it_c)->getMyName().c_str()));
|
||||
for(int i=1; i<=5; i++) {
|
||||
myW->playerStarsArray[i][seatPlace]->setText("<a style='color: #"+myW->getMyGameTableStyle()->getRatingStarsColor()+"; "+fontFamily+" font-size: "+fontSize+"px; text-decoration: none;' href='"+QString::fromUtf8((*it_c)->getMyName().c_str())+"\""+QString::number(i)+"'>☆</a>");
|
||||
@@ -234,7 +243,7 @@ void MyAvatarLabel::refreshTooltips()
|
||||
int seatPlace;
|
||||
PlayerList seatsList = currentGame->getSeatsList();
|
||||
for (seatPlace=0,it_c=seatsList->begin(); it_c!=seatsList->end(); ++it_c, seatPlace++) {
|
||||
if((*it_c)->getMyStayOnTableStatus() == TRUE || (*it_c)->getMyActiveStatus()) {
|
||||
if((*it_c)->getMyStayOnTableStatus() == true || (*it_c)->getMyActiveStatus()) {
|
||||
bool computerPlayer = false;
|
||||
if((*it_c)->getMyType() == PLAYER_TYPE_COMPUTER) {
|
||||
computerPlayer = true;
|
||||
@@ -394,7 +403,59 @@ void MyAvatarLabel::paintEvent(QPaintEvent*)
|
||||
else
|
||||
painter.setOpacity(1.0);
|
||||
|
||||
//hide avatar if player is on ignore list
|
||||
boost::shared_ptr<Session> mySession = myW->myStartWindow->getSession();
|
||||
if(!playerIsOnIgnoreList(QString::fromUtf8(mySession->getClientPlayerInfo(myUniqueId).playerName.c_str()))) {
|
||||
painter.drawPixmap(0,0,myPixmap);
|
||||
} else if(myW->getMyConfig()->readConfigInt("DontHideAvatarsOfIgnored")) {
|
||||
painter.drawPixmap(0,0,myPixmap);
|
||||
}
|
||||
|
||||
if(myW->getMyConfig()->readConfigInt("ShowPingStateInAvatar")) {
|
||||
//paint ping state color for network clients
|
||||
if(mySession->isNetworkClientRunning() && myId == 0) {
|
||||
QColor pingColor;
|
||||
if(myAvgPing > 0 && myAvgPing <= 1000) {
|
||||
pingColor.setNamedColor("green");
|
||||
}
|
||||
else if(myAvgPing > 1000 && myAvgPing <= 2000 ) {
|
||||
pingColor.setNamedColor("yellow");
|
||||
}
|
||||
else if(myAvgPing > 2000) {
|
||||
pingColor.setNamedColor("red");
|
||||
}
|
||||
else {
|
||||
pingColor.setNamedColor("white");
|
||||
}
|
||||
QColor pen = pingColor.darker(200);
|
||||
// pen.setAlpha(130);
|
||||
painter.setPen(pen);
|
||||
QColor brush = pingColor;
|
||||
// brush.setAlpha(130);
|
||||
painter.setBrush(brush);
|
||||
painter.setRenderHint(QPainter::Antialiasing);
|
||||
painter.drawEllipse(1, 39, 10, 10);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MyAvatarLabel::refreshPing(unsigned minPing, unsigned avgPing, unsigned maxPing)
|
||||
{
|
||||
myMinPing = minPing;
|
||||
myAvgPing = avgPing;
|
||||
myMaxPing = maxPing;
|
||||
this->update();
|
||||
|
||||
if(myW->getMyConfig()->readConfigInt("ShowPingStateInAvatar")) {
|
||||
QString toolTip = "<b>"+tr("Server response times")+"</b>";
|
||||
toolTip.append("<br>"+tr("Average: ")+QString("%1").arg(myAvgPing)+tr("ms"));
|
||||
toolTip.append("<br>"+tr("Minimum: ")+QString("%1").arg(myMinPing)+tr("ms"));
|
||||
toolTip.append("<br>"+tr("Maximum: ")+QString("%1").arg(myMaxPing)+tr("ms"));
|
||||
this->setToolTip(toolTip);
|
||||
}
|
||||
else {
|
||||
this->setToolTip("");
|
||||
}
|
||||
}
|
||||
|
||||
bool MyAvatarLabel::playerIsOnIgnoreList(QString playerName)
|
||||
@@ -414,7 +475,6 @@ bool MyAvatarLabel::playerIsOnIgnoreList(QString playerName)
|
||||
|
||||
void MyAvatarLabel::putPlayerOnIgnoreList()
|
||||
{
|
||||
|
||||
QStringList list;
|
||||
PlayerListConstIterator it_c;
|
||||
PlayerList seatList = myW->getSession()->getCurrentGame()->getSeatsList();
|
||||
@@ -423,15 +483,34 @@ void MyAvatarLabel::putPlayerOnIgnoreList()
|
||||
}
|
||||
|
||||
if(!playerIsOnIgnoreList(list.at(myId))) {
|
||||
|
||||
myMessageDialogImpl dialog(myW->getMyConfig(), this);
|
||||
if(dialog.exec(INGNORE_PLAYER_QUESTION, tr("You will no longer receive chat messages or game invitations from this user.<br>Do you really want to put player <b>%1</b> on ignore list?").arg(list.at(myId)), tr("PokerTH - Question"), QPixmap(":/gfx/im-ban-user_64.png"), QDialogButtonBox::Yes|QDialogButtonBox::No, false ) == QDialog::Accepted) {
|
||||
|
||||
if(dialog.exec(IGNORE_PLAYER_QUESTION, tr("You will no longer receive chat messages or game invitations from this user.<br>Do you really want to put player <b>%1</b> on ignore list?").arg(list.at(myId)), tr("PokerTH - Question"), QPixmap(":/gfx/im-ban-user_64.png"), QDialogButtonBox::Yes|QDialogButtonBox::No, false ) == QDialog::Accepted) {
|
||||
std::list<std::string> playerIgnoreList = myW->getMyConfig()->readConfigStringList("PlayerIgnoreList");
|
||||
playerIgnoreList.push_back(list.at(myId).toUtf8().constData());
|
||||
myW->getMyConfig()->writeConfigStringList("PlayerIgnoreList", playerIgnoreList);
|
||||
myW->getMyConfig()->writeBuffer();
|
||||
myW->getMyChat()->refreshIgnoreList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void MyAvatarLabel::removePlayerFromIgnoreList()
|
||||
{
|
||||
QStringList list;
|
||||
PlayerListConstIterator it_c;
|
||||
PlayerList seatList = myW->getSession()->getCurrentGame()->getSeatsList();
|
||||
for (it_c=seatList->begin(); it_c!=seatList->end(); ++it_c) {
|
||||
list << QString::fromUtf8((*it_c)->getMyName().c_str());
|
||||
}
|
||||
|
||||
if(playerIsOnIgnoreList(list.at(myId))) {
|
||||
myMessageDialogImpl dialog(myW->getMyConfig(), this);
|
||||
if(dialog.exec(UNIGNORE_PLAYER_QUESTION, tr("You will receive chat messages and game invitations from this user again!<br>Do you really want to remove player <b>%1</b> from your ignore list?").arg(list.at(myId)), tr("PokerTH - Question"), QPixmap(":/gfx/dialog_ok_apply.png"), QDialogButtonBox::Yes|QDialogButtonBox::No, false ) == QDialog::Accepted) {
|
||||
std::list<std::string> playerIgnoreList = myW->getMyConfig()->readConfigStringList("PlayerIgnoreList");
|
||||
playerIgnoreList.remove(list.at(myId).toUtf8().constData());
|
||||
myW->getMyConfig()->writeConfigStringList("PlayerIgnoreList", playerIgnoreList);
|
||||
myW->getMyConfig()->writeBuffer();
|
||||
myW->getMyChat()->refreshIgnoreList();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,6 +35,9 @@
|
||||
#include "startwindowimpl.h"
|
||||
#include <QtGui>
|
||||
#include <QtCore>
|
||||
#if QT_VERSION >= 0x050000
|
||||
#include <QtWidgets>
|
||||
#endif
|
||||
|
||||
class gameTableImpl;
|
||||
class startWindowImpl;
|
||||
@@ -52,6 +55,9 @@ public:
|
||||
void setMyId ( int theValue ) {
|
||||
myId = theValue;
|
||||
}
|
||||
void setMyUniqueId ( int theValue ) {
|
||||
myUniqueId = theValue;
|
||||
}
|
||||
void contextMenuEvent ( QContextMenuEvent * event );
|
||||
QString getPlayerTip(QString);
|
||||
int getPlayerRating(QString);
|
||||
@@ -65,13 +71,14 @@ public slots:
|
||||
void setVoteRunning ( bool theValue ) {
|
||||
voteRunning = theValue;
|
||||
}
|
||||
void setPixmap ( const QPixmap &, const bool = FALSE);
|
||||
void setPixmapAndCountry ( const QPixmap &, QString country, int seatPlace, const bool = FALSE);
|
||||
void setPixmap ( const QPixmap &, const bool = false);
|
||||
void setPixmapAndCountry ( const QPixmap &, QString country, int seatPlace, const bool = false);
|
||||
void setPixmapPath ( const QString theValue) {
|
||||
myPath = theValue;
|
||||
}
|
||||
void paintEvent(QPaintEvent*);
|
||||
void putPlayerOnIgnoreList();
|
||||
void removePlayerFromIgnoreList();
|
||||
bool playerIsOnIgnoreList(QString playerName);
|
||||
void reportBadAvatar();
|
||||
void startEditTip();
|
||||
@@ -80,22 +87,31 @@ public slots:
|
||||
void setPlayerRating(QString);
|
||||
void refreshTooltips();
|
||||
void refreshStars();
|
||||
void refreshPing(unsigned, unsigned, unsigned);
|
||||
|
||||
private:
|
||||
|
||||
gameTableImpl *myW;
|
||||
QMenu *myContextMenu;
|
||||
QAction *action_VoteForKick;
|
||||
QAction *action_IgnorePlayer;
|
||||
QAction *action_UnignorePlayer;
|
||||
QAction *action_ReportBadAvatar;
|
||||
QAction *action_EditTip;
|
||||
|
||||
QPixmap myPixmap;
|
||||
QString myPath;
|
||||
|
||||
int myId;
|
||||
bool myContextMenuEnabled;
|
||||
bool voteRunning;
|
||||
bool transparent;
|
||||
int myId;
|
||||
int myUniqueId;
|
||||
unsigned myPingState;
|
||||
unsigned myAvgPing;
|
||||
unsigned myMinPing;
|
||||
unsigned myMaxPing;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -36,18 +36,18 @@ MyCardsPixmapLabel::MyCardsPixmapLabel(QGroupBox* parent)
|
||||
: QLabel(parent), myW(NULL)
|
||||
{
|
||||
|
||||
this->setMouseTracking(TRUE);
|
||||
this->setMouseTracking(true);
|
||||
|
||||
fadeOutAction = FALSE;
|
||||
flipCardsAction1 = FALSE;
|
||||
flipCardsAction2 = FALSE;
|
||||
fadeOutAction = false;
|
||||
flipCardsAction1 = false;
|
||||
flipCardsAction2 = false;
|
||||
|
||||
mousePress = FALSE;
|
||||
fastFlipCardsFront = FALSE;
|
||||
mousePress = false;
|
||||
fastFlipCardsFront = false;
|
||||
|
||||
// rotationIntervall = 0.03;
|
||||
|
||||
isFlipside = FALSE;
|
||||
isFlipside = false;
|
||||
|
||||
fadeOutTimer = new QTimer;
|
||||
connect(fadeOutTimer, SIGNAL(timeout()), this, SLOT(nextFadeOutFrame()));
|
||||
@@ -78,7 +78,7 @@ void MyCardsPixmapLabel::startFadeOut(int speed)
|
||||
}
|
||||
|
||||
if(speed != 11) {
|
||||
fadeOutAction = TRUE;
|
||||
fadeOutAction = true;
|
||||
frameOpacity = 1.0;
|
||||
fadeOutTimer->start(40);
|
||||
}
|
||||
@@ -89,7 +89,7 @@ void MyCardsPixmapLabel::stopFadeOut()
|
||||
{
|
||||
|
||||
fadeOutTimer->stop();
|
||||
fadeOutAction = FALSE;
|
||||
fadeOutAction = false;
|
||||
frameOpacity = 1.0;
|
||||
update();
|
||||
}
|
||||
@@ -105,7 +105,7 @@ void MyCardsPixmapLabel::nextFadeOutFrame()
|
||||
} else {
|
||||
|
||||
fadeOutTimer->stop();
|
||||
// fadeOutAction = FALSE;
|
||||
// fadeOutAction = false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -115,8 +115,8 @@ void MyCardsPixmapLabel::startFlipCards(int speed, const QPixmap &frontPix, cons
|
||||
|
||||
stopFadeOut();
|
||||
|
||||
stopFlipCards = FALSE;
|
||||
isFlipside = FALSE;
|
||||
stopFlipCards = false;
|
||||
isFlipside = false;
|
||||
|
||||
QLabel::setPixmap(frontPix);
|
||||
|
||||
@@ -140,7 +140,7 @@ void MyCardsPixmapLabel::startFlipCards(int speed, const QPixmap &frontPix, cons
|
||||
}
|
||||
|
||||
if(speed != 11) {
|
||||
flipCardsAction1 = TRUE;
|
||||
flipCardsAction1 = true;
|
||||
flipCardsTimer->start(40);
|
||||
}
|
||||
|
||||
@@ -150,9 +150,9 @@ void MyCardsPixmapLabel::stopFlipCardsAnimation()
|
||||
{
|
||||
|
||||
flipCardsTimer->stop();
|
||||
flipCardsAction1 = FALSE;
|
||||
flipCardsAction2 = FALSE;
|
||||
stopFlipCards = TRUE;
|
||||
flipCardsAction1 = false;
|
||||
flipCardsAction2 = false;
|
||||
stopFlipCards = true;
|
||||
update();
|
||||
}
|
||||
|
||||
@@ -165,15 +165,15 @@ void MyCardsPixmapLabel::nextFlipCardsFrame()
|
||||
update();
|
||||
} else {
|
||||
if(flipCardsAction1) {
|
||||
flipCardsAction1 = FALSE;
|
||||
flipCardsAction2 = TRUE;
|
||||
flipCardsAction1 = false;
|
||||
flipCardsAction2 = true;
|
||||
} else {
|
||||
//dann front vergrößern
|
||||
if (frameFlipCardsAction2Size < 0.95 ) {
|
||||
frameFlipCardsAction2Size += flipCardsScaleIntervall;
|
||||
update();
|
||||
} else {
|
||||
flipCardsAction2 = FALSE;
|
||||
flipCardsAction2 = false;
|
||||
flipCardsTimer->stop();
|
||||
}
|
||||
|
||||
@@ -243,10 +243,10 @@ void MyCardsPixmapLabel::fastFlipCards(bool front)
|
||||
{
|
||||
|
||||
if (front) {
|
||||
fastFlipCardsFront = TRUE;
|
||||
fastFlipCardsFront = true;
|
||||
update();
|
||||
} else {
|
||||
fastFlipCardsFront = FALSE;
|
||||
fastFlipCardsFront = false;
|
||||
update();
|
||||
}
|
||||
}
|
||||
@@ -255,8 +255,8 @@ void MyCardsPixmapLabel::mousePressEvent(QMouseEvent * event)
|
||||
{
|
||||
|
||||
if (!mousePress && objectName().contains("pixmapLabel_card0")) {
|
||||
mousePress = TRUE;
|
||||
myW->mouseOverFlipCards(TRUE);
|
||||
mousePress = true;
|
||||
myW->mouseOverFlipCards(true);
|
||||
|
||||
}
|
||||
|
||||
@@ -267,8 +267,8 @@ void MyCardsPixmapLabel::mouseReleaseEvent(QMouseEvent * event)
|
||||
{
|
||||
|
||||
if (mousePress && objectName().contains("pixmapLabel_card0")) {
|
||||
mousePress = FALSE;
|
||||
myW->mouseOverFlipCards(FALSE);
|
||||
mousePress = false;
|
||||
myW->mouseOverFlipCards(false);
|
||||
}
|
||||
|
||||
QLabel::mouseReleaseEvent(event);
|
||||
|
||||
@@ -35,6 +35,9 @@
|
||||
|
||||
#include <QtGui>
|
||||
#include <QtCore>
|
||||
#if QT_VERSION >= 0x050000
|
||||
#include <QtWidgets>
|
||||
#endif
|
||||
|
||||
class gameTableImpl;
|
||||
|
||||
|
||||
@@ -35,6 +35,9 @@
|
||||
|
||||
#include <QtGui>
|
||||
#include <QtCore>
|
||||
#if QT_VERSION >= 0x050000
|
||||
#include <QtWidgets>
|
||||
#endif
|
||||
|
||||
class gameTableImpl;
|
||||
|
||||
|
||||
@@ -35,6 +35,9 @@
|
||||
|
||||
#include <QtGui>
|
||||
#include <QtCore>
|
||||
#if QT_VERSION >= 0x050000
|
||||
#include <QtWidgets>
|
||||
#endif
|
||||
|
||||
class gameTableImpl;
|
||||
class GameTableStyleReader;
|
||||
|
||||
@@ -33,7 +33,9 @@
|
||||
|
||||
#include <QtGui>
|
||||
#include <QtCore>
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
#include <QtWidgets>
|
||||
#endif
|
||||
|
||||
class MyLeftTabWidget : public QTabWidget
|
||||
{
|
||||
|
||||
@@ -35,6 +35,9 @@
|
||||
|
||||
#include <QtGui>
|
||||
#include <QtCore>
|
||||
#if QT_VERSION >= 0x050000
|
||||
#include <QtWidgets>
|
||||
#endif
|
||||
|
||||
class gameTableImpl;
|
||||
|
||||
@@ -51,7 +54,7 @@ public:
|
||||
|
||||
public slots:
|
||||
|
||||
void setText ( const QString &, bool = FALSE, bool = FALSE, bool = FALSE);
|
||||
void setText ( const QString &, bool = false, bool = false, bool = false);
|
||||
private:
|
||||
|
||||
QString myText;
|
||||
|
||||
@@ -33,6 +33,9 @@
|
||||
|
||||
#include <QtGui>
|
||||
#include <QtCore>
|
||||
#if QT_VERSION >= 0x050000
|
||||
#include <QtWidgets>
|
||||
#endif
|
||||
|
||||
class MyRightTabWidget : public QTabWidget
|
||||
{
|
||||
|
||||
@@ -35,6 +35,9 @@
|
||||
|
||||
#include <QtGui>
|
||||
#include <QtCore>
|
||||
#if QT_VERSION >= 0x050000
|
||||
#include <QtWidgets>
|
||||
#endif
|
||||
|
||||
class gameTableImpl;
|
||||
|
||||
|
||||
@@ -32,6 +32,10 @@
|
||||
#define MYSLIDER_H
|
||||
|
||||
#include <QtGui>
|
||||
#if QT_VERSION >= 0x050000
|
||||
#include <QtWidgets>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This QSlider Extension was sponsored by: AZEVEDO Filipe aka Nox P@sNox <pasnox@gmail.com>
|
||||
* http://pasnox.tuxfamily.org
|
||||
|
||||
@@ -37,7 +37,7 @@ MyStatusLabel::MyStatusLabel(QGroupBox* parent)
|
||||
: QLabel(parent), myW(NULL), mousePress(false)
|
||||
{
|
||||
|
||||
mousePress = FALSE;
|
||||
mousePress = false;
|
||||
|
||||
}
|
||||
|
||||
@@ -49,8 +49,8 @@ void MyStatusLabel::mousePressEvent(QMouseEvent * event)
|
||||
{
|
||||
|
||||
if (!mousePress && objectName().contains("textLabel_Status0")) {
|
||||
mousePress = TRUE;
|
||||
myW->mouseOverFlipCards(TRUE);
|
||||
mousePress = true;
|
||||
myW->mouseOverFlipCards(true);
|
||||
|
||||
}
|
||||
|
||||
@@ -61,8 +61,8 @@ void MyStatusLabel::mouseReleaseEvent(QMouseEvent * event)
|
||||
{
|
||||
|
||||
if (mousePress && objectName().contains("textLabel_Status0")) {
|
||||
mousePress = FALSE;
|
||||
myW->mouseOverFlipCards(FALSE);
|
||||
mousePress = false;
|
||||
myW->mouseOverFlipCards(false);
|
||||
}
|
||||
|
||||
QLabel::mouseReleaseEvent(event);
|
||||
|
||||
@@ -35,6 +35,9 @@
|
||||
|
||||
#include <QtGui>
|
||||
#include <QtCore>
|
||||
#if QT_VERSION >= 0x050000
|
||||
#include <QtWidgets>
|
||||
#endif
|
||||
|
||||
class gameTableImpl;
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
using namespace std;
|
||||
|
||||
MyTimeoutLabel::MyTimeoutLabel(QGroupBox* parent)
|
||||
: QLabel(parent), timeOutAnimation(FALSE), timeOutValue(0), timeOutFrame(0), waitFrames(0), timerIntervall(0), isBeep(0), isBeepPlayed(0)
|
||||
: QLabel(parent), timeOutAnimation(false), timeOutValue(0), timeOutFrame(0), waitFrames(0), timerIntervall(0), isBeep(0), isBeepPlayed(0)
|
||||
{
|
||||
|
||||
timeOutAnimationTimer = new QTimer;
|
||||
@@ -52,7 +52,7 @@ void MyTimeoutLabel::startTimeOutAnimation(int secs, bool beep)
|
||||
{
|
||||
|
||||
if (secs >= 4) { // smaller timeouts may lead to errors/endless loops below
|
||||
isBeepPlayed = FALSE;
|
||||
isBeepPlayed = false;
|
||||
isBeep = beep;
|
||||
|
||||
timeOutValue = secs;
|
||||
@@ -80,7 +80,7 @@ void MyTimeoutLabel::startTimeOutAnimation(int secs, bool beep)
|
||||
realTimer.start();
|
||||
|
||||
// std::cout << timerIntervall << endl;
|
||||
timeOutAnimation = TRUE;
|
||||
timeOutAnimation = true;
|
||||
timeOutAnimationTimer->start(timerIntervall);
|
||||
}
|
||||
}
|
||||
@@ -88,7 +88,7 @@ void MyTimeoutLabel::startTimeOutAnimation(int secs, bool beep)
|
||||
void MyTimeoutLabel::startTimeOutAnimationNow()
|
||||
{
|
||||
|
||||
timeOutAnimation = TRUE;
|
||||
timeOutAnimation = true;
|
||||
timeOutAnimationTimer->start(83);
|
||||
|
||||
}
|
||||
@@ -98,7 +98,7 @@ void MyTimeoutLabel::stopTimeOutAnimation()
|
||||
|
||||
// timeOutAnimationKickOnTimer->stop();
|
||||
timeOutAnimationTimer->stop();
|
||||
timeOutAnimation = FALSE;
|
||||
timeOutAnimation = false;
|
||||
update();
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ void MyTimeoutLabel::nextTimeOutAnimationFrame()
|
||||
//play beep after waitFrames one time
|
||||
if(isBeep && !isBeepPlayed) {
|
||||
myW->getMySoundEventHandler()->playSound("yourturn",0);
|
||||
isBeepPlayed = TRUE;
|
||||
isBeepPlayed = true;
|
||||
}
|
||||
//save gfx ressources and never play more the 10 pps
|
||||
unsigned int realTimerValue = realTimer.elapsed().total_milliseconds();
|
||||
|
||||
@@ -35,7 +35,12 @@
|
||||
|
||||
#include <QtGui>
|
||||
#include <QtCore>
|
||||
#ifndef Q_MOC_RUN
|
||||
#include <third_party/boost/timers.hpp>
|
||||
#endif
|
||||
#if QT_VERSION >= 0x050000
|
||||
#include <QtWidgets>
|
||||
#endif
|
||||
|
||||
class gameTableImpl;
|
||||
|
||||
|
||||
@@ -33,6 +33,9 @@
|
||||
|
||||
#include <QtGui>
|
||||
#include <QtCore>
|
||||
#if QT_VERSION >= 0x050000
|
||||
#include <QtWidgets>
|
||||
#endif
|
||||
|
||||
|
||||
class StartSplash : public QSplashScreen
|
||||
|
||||
@@ -24,7 +24,16 @@
|
||||
</size>
|
||||
</property>
|
||||
<layout class="QGridLayout">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
@@ -139,7 +148,16 @@
|
||||
<string>Project</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
@@ -169,7 +187,16 @@ p, li { white-space: pre-wrap; }
|
||||
<string>Translation</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
@@ -199,7 +226,16 @@ p, li { white-space: pre-wrap; }
|
||||
<string>Thanks to</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
@@ -226,7 +262,16 @@ p, li { white-space: pre-wrap; }
|
||||
<string>License</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
@@ -244,6 +289,16 @@ p, li { white-space: pre-wrap; }
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_6">
|
||||
<attribute name="title">
|
||||
<string>Third party libs</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QTextBrowser" name="textBrowser_thirdPartyLicenceText"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
|
||||
@@ -85,45 +85,45 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="verticalSpacing">
|
||||
<number>7</number>
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
||||
<item row="4" column="0" colspan="2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_23">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Default game name:</string>
|
||||
<string>Maximum number of players:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_gameName">
|
||||
<widget class="QSpinBox" name="spinBox_quantityPlayers">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>400</width>
|
||||
<width>150</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
<property name="minimum">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="inputMethodHints">
|
||||
<set>Qt::ImhNoPredictiveText</set>
|
||||
<property name="maximum">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="maxLength">
|
||||
<number>48</number>
|
||||
<property name="value">
|
||||
<number>10</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -198,7 +198,7 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<item row="7" column="1">
|
||||
<widget class="QGroupBox" name="groupBox_blinds">
|
||||
<property name="title">
|
||||
<string>Blinds</string>
|
||||
@@ -233,7 +233,7 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<item row="7" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<property name="verticalSpacing">
|
||||
<number>10</number>
|
||||
@@ -298,7 +298,103 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2">
|
||||
<item row="2" column="0" colspan="2">
|
||||
<layout class="QHBoxLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_Password">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Password:</string>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_Password">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>400</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="echoMode">
|
||||
<enum>QLineEdit::Password</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_23">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Default game name:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_gameName">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>400</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="inputMethodHints">
|
||||
<set>Qt::ImhNoPredictiveText</set>
|
||||
</property>
|
||||
<property name="maxLength">
|
||||
<number>48</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
@@ -349,93 +445,13 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<layout class="QHBoxLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_Password">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Password:</string>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_Password">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>400</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="echoMode">
|
||||
<enum>QLineEdit::Password</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<widget class="QCheckBox" name="checkBox_allowSpectators">
|
||||
<property name="text">
|
||||
<string>Maximum number of players:</string>
|
||||
<string>Allow spectators to watch the game</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="spinBox_quantityPlayers">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>10</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -472,7 +488,16 @@
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user