GUI: ignore player function added (list in settings - remove button will follow)
This commit is contained in:
+513
-511
File diff suppressed because it is too large
Load Diff
@@ -30,7 +30,7 @@ using namespace std;
|
|||||||
|
|
||||||
ChatTools::ChatTools(QLineEdit* l, ConfigFile *c, ChatType ct, QTextBrowser *b, QTreeWidget *t, gameLobbyDialogImpl *lo) : nickAutoCompletitionCounter(0), myLineEdit(l), myNickTreeWidget(t), myNickStringList(NULL), myTextBrowser(b), myChatType(ct), myConfig(c), myNick(""), myLobby(lo)
|
ChatTools::ChatTools(QLineEdit* l, ConfigFile *c, ChatType ct, QTextBrowser *b, QTreeWidget *t, gameLobbyDialogImpl *lo) : nickAutoCompletitionCounter(0), myLineEdit(l), myNickTreeWidget(t), myNickStringList(NULL), myTextBrowser(b), myChatType(ct), myConfig(c), myNick(""), myLobby(lo)
|
||||||
{
|
{
|
||||||
myNick = QString::fromUtf8(myConfig->readConfigString("MyName").c_str());
|
myNick = QString::fromUtf8(myConfig->readConfigString("MyName").c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
ChatTools::~ChatTools()
|
ChatTools::~ChatTools()
|
||||||
@@ -39,151 +39,159 @@ ChatTools::~ChatTools()
|
|||||||
|
|
||||||
void ChatTools::sendMessage() {
|
void ChatTools::sendMessage() {
|
||||||
|
|
||||||
if(myLineEdit->text().size() && mySession) {
|
if(myLineEdit->text().size() && mySession) {
|
||||||
fillChatLinesHistory(myLineEdit->text());
|
fillChatLinesHistory(myLineEdit->text());
|
||||||
if(myChatType == INGAME_CHAT) {
|
if(myChatType == INGAME_CHAT) {
|
||||||
mySession->sendGameChatMessage(myLineEdit->text().toUtf8().constData());
|
mySession->sendGameChatMessage(myLineEdit->text().toUtf8().constData());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
mySession->sendLobbyChatMessage(myLineEdit->text().toUtf8().constData());
|
mySession->sendLobbyChatMessage(myLineEdit->text().toUtf8().constData());
|
||||||
}
|
}
|
||||||
myLineEdit->setText("");
|
myLineEdit->setText("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatTools::receiveMessage(QString playerName, QString message) {
|
void ChatTools::receiveMessage(QString playerName, QString message) {
|
||||||
|
|
||||||
if(myTextBrowser) {
|
if(myTextBrowser) {
|
||||||
|
|
||||||
message = message.replace("<","<");
|
message = message.replace("<","<");
|
||||||
message = message.replace(">",">");
|
message = message.replace(">",">");
|
||||||
|
|
||||||
//refresh myNick if it was changed during runtime
|
//refresh myNick if it was changed during runtime
|
||||||
myNick = QString::fromUtf8(myConfig->readConfigString("MyName").c_str());
|
myNick = QString::fromUtf8(myConfig->readConfigString("MyName").c_str());
|
||||||
|
|
||||||
QString tempMsg;
|
QString tempMsg;
|
||||||
|
|
||||||
if(message.contains(myNick, Qt::CaseInsensitive)) {
|
if(message.contains(myNick, Qt::CaseInsensitive)) {
|
||||||
|
|
||||||
switch (myChatType) {
|
switch (myChatType) {
|
||||||
case INET_LOBBY_CHAT: {
|
case INET_LOBBY_CHAT: {
|
||||||
tempMsg = QString("<span style=\"font-weight:bold;\">"+message+"</span>");
|
tempMsg = QString("<span style=\"font-weight:bold;\">"+message+"</span>");
|
||||||
//play beep sound only in INET-lobby-chat
|
//play beep sound only in INET-lobby-chat
|
||||||
// TODO dont play when message is from yourself
|
// TODO dont play when message is from yourself
|
||||||
if(myLobby->isVisible() && myConfig->readConfigInt("PlayLobbyChatNotification")) {
|
if(myLobby->isVisible() && myConfig->readConfigInt("PlayLobbyChatNotification")) {
|
||||||
myLobby->getMyW()->getMySDLPlayer()->playSound("lobbychatnotify",0);
|
myLobby->getMyW()->getMySDLPlayer()->playSound("lobbychatnotify",0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case LAN_LOBBY_CHAT: tempMsg = QString("<span style=\"font-weight:bold;\">"+message+"</span>");
|
case LAN_LOBBY_CHAT: tempMsg = QString("<span style=\"font-weight:bold;\">"+message+"</span>");
|
||||||
break;
|
break;
|
||||||
case INGAME_CHAT: tempMsg = QString("<span style=\"color:#"+myStyle->getChatTextNickNotifyColor()+";\">"+message+"</span>");
|
case INGAME_CHAT: tempMsg = QString("<span style=\"color:#"+myStyle->getChatTextNickNotifyColor()+";\">"+message+"</span>");
|
||||||
break;
|
break;
|
||||||
default: tempMsg = message;
|
default: tempMsg = message;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
switch (myChatType) {
|
switch (myChatType) {
|
||||||
case INET_LOBBY_CHAT: tempMsg = QString("<span style=\"font-weight:normal;\">"+message+"</span>");
|
case INET_LOBBY_CHAT: tempMsg = QString("<span style=\"font-weight:normal;\">"+message+"</span>");
|
||||||
break;
|
break;
|
||||||
case LAN_LOBBY_CHAT: tempMsg = QString("<span style=\"font-weight:normal;\">"+message+"</span>");
|
case LAN_LOBBY_CHAT: tempMsg = QString("<span style=\"font-weight:normal;\">"+message+"</span>");
|
||||||
break;
|
break;
|
||||||
case INGAME_CHAT: tempMsg = QString("<span style=\"color:#"+myStyle->getChatLogTextColor()+";\">"+message+"</span>");
|
case INGAME_CHAT: tempMsg = QString("<span style=\"color:#"+myStyle->getChatLogTextColor()+";\">"+message+"</span>");
|
||||||
break;
|
break;
|
||||||
default: tempMsg = message;
|
default: tempMsg = message;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
myTextBrowser->append(playerName + ": " + tempMsg);
|
|
||||||
}
|
|
||||||
|
myTextBrowser->append(playerName + ": " + tempMsg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatTools::clearChat() {
|
void ChatTools::clearChat() {
|
||||||
|
|
||||||
if(myTextBrowser)
|
if(myTextBrowser)
|
||||||
myTextBrowser->clear();
|
myTextBrowser->clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatTools::checkInputLength(QString string) {
|
void ChatTools::checkInputLength(QString string) {
|
||||||
|
|
||||||
if(string.toUtf8().length() > 120) myLineEdit->setMaxLength(string.length());
|
if(string.toUtf8().length() > 120) myLineEdit->setMaxLength(string.length());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatTools::fillChatLinesHistory(QString fillString) {
|
void ChatTools::fillChatLinesHistory(QString fillString) {
|
||||||
|
|
||||||
chatLinesHistory << fillString;
|
chatLinesHistory << fillString;
|
||||||
if(chatLinesHistory.size() > 50) chatLinesHistory.removeFirst();
|
if(chatLinesHistory.size() > 50) chatLinesHistory.removeFirst();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatTools::showChatHistoryIndex(int index) {
|
void ChatTools::showChatHistoryIndex(int index) {
|
||||||
|
|
||||||
if(index <= chatLinesHistory.size()) {
|
if(index <= chatLinesHistory.size()) {
|
||||||
|
|
||||||
// cout << chatLinesHistory.size() << " : " << index << endl;
|
// cout << chatLinesHistory.size() << " : " << index << endl;
|
||||||
if(index > 0)
|
if(index > 0)
|
||||||
myLineEdit->setText(chatLinesHistory.at(chatLinesHistory.size()-(index)));
|
myLineEdit->setText(chatLinesHistory.at(chatLinesHistory.size()-(index)));
|
||||||
else
|
else
|
||||||
myLineEdit->setText("");
|
myLineEdit->setText("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatTools::nickAutoCompletition() {
|
void ChatTools::nickAutoCompletition() {
|
||||||
|
|
||||||
QString myChatString = myLineEdit->text();
|
QString myChatString = myLineEdit->text();
|
||||||
QStringList myChatStringList = myChatString.split(" ");
|
QStringList myChatStringList = myChatString.split(" ");
|
||||||
|
|
||||||
QStringList matchStringList;
|
QStringList matchStringList;
|
||||||
|
|
||||||
if(nickAutoCompletitionCounter == 0) {
|
if(nickAutoCompletitionCounter == 0) {
|
||||||
|
|
||||||
if(myNickTreeWidget) {
|
if(myNickTreeWidget) {
|
||||||
QTreeWidgetItemIterator it(myNickTreeWidget);
|
QTreeWidgetItemIterator it(myNickTreeWidget);
|
||||||
while (*it) {
|
while (*it) {
|
||||||
if ((*it)->text(0).startsWith(myChatStringList.last(), Qt::CaseInsensitive) && myChatStringList.last() != "")
|
if ((*it)->text(0).startsWith(myChatStringList.last(), Qt::CaseInsensitive) && myChatStringList.last() != "")
|
||||||
matchStringList << (*it)->text(0);
|
matchStringList << (*it)->text(0);
|
||||||
++it;
|
++it;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!myNickStringList.isEmpty()) {
|
if(!myNickStringList.isEmpty()) {
|
||||||
|
|
||||||
QStringListIterator it(myNickStringList);
|
QStringListIterator it(myNickStringList);
|
||||||
while (it.hasNext()) {
|
while (it.hasNext()) {
|
||||||
QString next = it.next();
|
QString next = it.next();
|
||||||
if (next.startsWith(myChatStringList.last(), Qt::CaseInsensitive) && myChatStringList.last() != "")
|
if (next.startsWith(myChatStringList.last(), Qt::CaseInsensitive) && myChatStringList.last() != "")
|
||||||
matchStringList << next;
|
matchStringList << next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!matchStringList.isEmpty() || nickAutoCompletitionCounter > 0) {
|
if(!matchStringList.isEmpty() || nickAutoCompletitionCounter > 0) {
|
||||||
|
|
||||||
myChatStringList.removeLast();
|
myChatStringList.removeLast();
|
||||||
|
|
||||||
// cout << nickAutoCompletitionCounter << endl;
|
// cout << nickAutoCompletitionCounter << endl;
|
||||||
|
|
||||||
if(nickAutoCompletitionCounter == 0) {
|
if(nickAutoCompletitionCounter == 0) {
|
||||||
//first one
|
//first one
|
||||||
lastChatString = myChatStringList.join(" ");
|
lastChatString = myChatStringList.join(" ");
|
||||||
lastMatchStringList = matchStringList;
|
lastMatchStringList = matchStringList;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(nickAutoCompletitionCounter == lastMatchStringList.size()) nickAutoCompletitionCounter = 0;
|
if(nickAutoCompletitionCounter == lastMatchStringList.size()) nickAutoCompletitionCounter = 0;
|
||||||
|
|
||||||
// cout << nickAutoCompletitionCounter << "\n";
|
// cout << nickAutoCompletitionCounter << "\n";
|
||||||
|
|
||||||
if(lastChatString == "")
|
if(lastChatString == "")
|
||||||
myLineEdit->setText(lastMatchStringList.at(nickAutoCompletitionCounter)+": ");
|
myLineEdit->setText(lastMatchStringList.at(nickAutoCompletitionCounter)+": ");
|
||||||
else
|
else
|
||||||
myLineEdit->setText(lastChatString+" "+lastMatchStringList.at(nickAutoCompletitionCounter)+" ");
|
myLineEdit->setText(lastChatString+" "+lastMatchStringList.at(nickAutoCompletitionCounter)+" ");
|
||||||
|
|
||||||
nickAutoCompletitionCounter++;
|
nickAutoCompletitionCounter++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatTools::setChatTextEdited() {
|
void ChatTools::setChatTextEdited() {
|
||||||
|
|
||||||
nickAutoCompletitionCounter = 0;
|
nickAutoCompletitionCounter = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ChatTools::refreshIgnoreList()
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,55 +34,56 @@ class gameLobbyDialogImpl;
|
|||||||
|
|
||||||
class ChatTools : public QObject
|
class ChatTools : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ChatTools(QLineEdit*, ConfigFile*, ChatType, QTextBrowser *b = NULL, QTreeWidget *t = NULL, gameLobbyDialogImpl *lo = NULL);
|
ChatTools(QLineEdit*, ConfigFile*, ChatType, QTextBrowser *b = NULL, QTreeWidget *t = NULL, gameLobbyDialogImpl *lo = NULL);
|
||||||
|
|
||||||
~ChatTools();
|
~ChatTools();
|
||||||
|
|
||||||
void setSession(boost::shared_ptr<Session> session) { mySession = session; }
|
void setSession(boost::shared_ptr<Session> session) { mySession = session; }
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
||||||
void sendMessage();
|
void sendMessage();
|
||||||
void receiveMessage(QString playerName, QString message);
|
void receiveMessage(QString playerName, QString message);
|
||||||
void clearChat();
|
void clearChat();
|
||||||
void checkInputLength(QString string);
|
void checkInputLength(QString string);
|
||||||
|
|
||||||
void fillChatLinesHistory(QString fillString);
|
void fillChatLinesHistory(QString fillString);
|
||||||
void showChatHistoryIndex(int index);
|
void showChatHistoryIndex(int index);
|
||||||
int getChatLinesHistorySize() { return chatLinesHistory.size(); }
|
int getChatLinesHistorySize() { return chatLinesHistory.size(); }
|
||||||
|
|
||||||
void nickAutoCompletition();
|
void nickAutoCompletition();
|
||||||
void setChatTextEdited();
|
void setChatTextEdited();
|
||||||
|
|
||||||
void setPlayerNicksList(QStringList value) { myNickStringList = value; }
|
void setPlayerNicksList(QStringList value) { myNickStringList = value; }
|
||||||
void setMyNick ( const QString& theValue ) { myNick = theValue; }
|
void setMyNick ( const QString& theValue ) { myNick = theValue; }
|
||||||
QString getMyNick () { return myNick; }
|
QString getMyNick () { return myNick; }
|
||||||
|
|
||||||
void setMyStyle ( GameTableStyleReader* theValue ) { myStyle = theValue; }
|
void setMyStyle ( GameTableStyleReader* theValue ) { myStyle = theValue; }
|
||||||
|
void refreshIgnoreList();
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
QStringList chatLinesHistory;
|
QStringList chatLinesHistory;
|
||||||
QString lastChatString;
|
QString lastChatString;
|
||||||
QStringList lastMatchStringList;
|
QStringList lastMatchStringList;
|
||||||
int nickAutoCompletitionCounter;
|
int nickAutoCompletitionCounter;
|
||||||
|
|
||||||
QLineEdit *myLineEdit;
|
QLineEdit *myLineEdit;
|
||||||
QTreeWidget *myNickTreeWidget;
|
QTreeWidget *myNickTreeWidget;
|
||||||
QStringList myNickStringList;
|
QStringList myNickStringList;
|
||||||
QTextBrowser *myTextBrowser;
|
QTextBrowser *myTextBrowser;
|
||||||
boost::shared_ptr<Session> mySession;
|
boost::shared_ptr<Session> mySession;
|
||||||
ChatType myChatType;
|
ChatType myChatType;
|
||||||
ConfigFile *myConfig;
|
ConfigFile *myConfig;
|
||||||
|
|
||||||
QString myNick;
|
QString myNick;
|
||||||
|
|
||||||
GameTableStyleReader *myStyle;
|
GameTableStyleReader *myStyle;
|
||||||
gameLobbyDialogImpl *myLobby;
|
gameLobbyDialogImpl *myLobby;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -21,6 +21,8 @@
|
|||||||
#include <net/socket_msg.h>
|
#include <net/socket_msg.h>
|
||||||
#include "mymessagedialogimpl.h"
|
#include "mymessagedialogimpl.h"
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
gameLobbyDialogImpl::gameLobbyDialogImpl(startWindowImpl *parent, ConfigFile *c)
|
gameLobbyDialogImpl::gameLobbyDialogImpl(startWindowImpl *parent, ConfigFile *c)
|
||||||
: QDialog(parent), myW(NULL), myStartWindow(parent), myConfig(c), currentGameName(""), myPlayerId(0), myCurrentGameId(0), isGameAdministrator(false), inGame(false), guestMode(false), blinkingButtonAnimationState(true), myChat(NULL), keyUpCounter(0), infoMsgToShowId(0), currentInvitationGameId(0), inviteDialogIsCurrentlyShown(false)
|
: QDialog(parent), myW(NULL), myStartWindow(parent), myConfig(c), currentGameName(""), myPlayerId(0), myCurrentGameId(0), isGameAdministrator(false), inGame(false), guestMode(false), blinkingButtonAnimationState(true), myChat(NULL), keyUpCounter(0), infoMsgToShowId(0), currentInvitationGameId(0), inviteDialogIsCurrentlyShown(false)
|
||||||
{
|
{
|
||||||
@@ -86,6 +88,8 @@ gameLobbyDialogImpl::gameLobbyDialogImpl(startWindowImpl *parent, ConfigFile *c)
|
|||||||
nickListContextMenu = new QMenu();
|
nickListContextMenu = new QMenu();
|
||||||
nickListInviteAction = new QAction(QIcon(":/gfx/list_add_user.png"), tr("Invite player"), nickListContextMenu);
|
nickListInviteAction = new QAction(QIcon(":/gfx/list_add_user.png"), tr("Invite player"), nickListContextMenu);
|
||||||
nickListContextMenu->addAction(nickListInviteAction);
|
nickListContextMenu->addAction(nickListInviteAction);
|
||||||
|
nickListIgnorePlayerAction = new QAction(QIcon(":/gfx/im-ban-user.png"), tr("Ignore player"), nickListContextMenu);
|
||||||
|
nickListContextMenu->addAction(nickListIgnorePlayerAction);
|
||||||
|
|
||||||
connect( pushButton_CreateGame, SIGNAL( clicked() ), this, SLOT( createGame() ) );
|
connect( pushButton_CreateGame, SIGNAL( clicked() ), this, SLOT( createGame() ) );
|
||||||
connect( pushButton_JoinGame, SIGNAL( clicked() ), this, SLOT( joinGame() ) );
|
connect( pushButton_JoinGame, SIGNAL( clicked() ), this, SLOT( joinGame() ) );
|
||||||
@@ -106,6 +110,7 @@ gameLobbyDialogImpl::gameLobbyDialogImpl(startWindowImpl *parent, ConfigFile *c)
|
|||||||
connect( comboBox_gameListFilter, SIGNAL(currentIndexChanged(int)), this, SLOT(changeGameListFilter(int)));
|
connect( comboBox_gameListFilter, SIGNAL(currentIndexChanged(int)), this, SLOT(changeGameListFilter(int)));
|
||||||
connect( treeWidget_NickList, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT( showNickListContextMenu(QPoint) ) );
|
connect( treeWidget_NickList, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT( showNickListContextMenu(QPoint) ) );
|
||||||
connect( nickListInviteAction, SIGNAL(triggered()), this, SLOT( invitePlayerToCurrentGame() ));
|
connect( nickListInviteAction, SIGNAL(triggered()), this, SLOT( invitePlayerToCurrentGame() ));
|
||||||
|
connect( nickListIgnorePlayerAction, SIGNAL(triggered()), this, SLOT( putPlayerOnIgnoreList() ));
|
||||||
|
|
||||||
lineEdit_ChatInput->installEventFilter(this);
|
lineEdit_ChatInput->installEventFilter(this);
|
||||||
|
|
||||||
@@ -1317,8 +1322,17 @@ void gameLobbyDialogImpl::showNickListContextMenu(QPoint p)
|
|||||||
assert(mySession);
|
assert(mySession);
|
||||||
|
|
||||||
if(inGame && mySession->getClientGameInfo(mySession->getClientCurrentGameId()).data.gameType == GAME_TYPE_INVITE_ONLY && treeWidget_NickList->selectedItems().at(0)->data(0, Qt::UserRole).toUInt() != mySession->getClientUniquePlayerId()) {
|
if(inGame && mySession->getClientGameInfo(mySession->getClientCurrentGameId()).data.gameType == GAME_TYPE_INVITE_ONLY && treeWidget_NickList->selectedItems().at(0)->data(0, Qt::UserRole).toUInt() != mySession->getClientUniquePlayerId()) {
|
||||||
nickListContextMenu->popup(treeWidget_NickList->mapToGlobal(p));
|
|
||||||
|
nickListInviteAction->setEnabled(true);
|
||||||
|
nickListInviteAction->setText(tr("Invite player %1").arg(QString::fromUtf8(mySession->getClientPlayerInfo(treeWidget_NickList->selectedItems().at(0)->data(0, Qt::UserRole).toUInt()).playerName.c_str())));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
nickListInviteAction->setText(tr("Invite player ..."));
|
||||||
|
nickListInviteAction->setEnabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
nickListContextMenu->popup(treeWidget_NickList->mapToGlobal(p));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1365,13 +1379,14 @@ void gameLobbyDialogImpl::showInvitationDialog(unsigned gameId, unsigned playerI
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void gameLobbyDialogImpl::chatInfoPlayerInviation(unsigned gameId, unsigned playerIdWho, unsigned playerIdFrom)
|
void gameLobbyDialogImpl::chatInfoPlayerInvitation(unsigned gameId, unsigned playerIdWho, unsigned playerIdFrom)
|
||||||
{
|
{
|
||||||
textBrowser_ChatDisplay->append(tr("<span style='color:blue;'>Player %1 has been invited to %2 by %3.</span>").arg(QString::fromUtf8(mySession->getClientPlayerInfo(playerIdWho).playerName.c_str())).arg(QString::fromUtf8(mySession->getClientGameInfo(gameId).name.c_str())).arg(QString::fromUtf8(mySession->getClientPlayerInfo(playerIdFrom).playerName.c_str())));
|
textBrowser_ChatDisplay->append(tr("<span style='color:blue;'>Player %1 has been invited to %2 by %3.</span>").arg(QString::fromUtf8(mySession->getClientPlayerInfo(playerIdWho).playerName.c_str())).arg(QString::fromUtf8(mySession->getClientGameInfo(gameId).name.c_str())).arg(QString::fromUtf8(mySession->getClientPlayerInfo(playerIdFrom).playerName.c_str())));
|
||||||
}
|
}
|
||||||
|
|
||||||
void gameLobbyDialogImpl::chatInfoPlayerRejectedInviation(unsigned gameId, unsigned playerIdWho, DenyGameInvitationReason reason)
|
void gameLobbyDialogImpl::chatInfoPlayerRejectedInvitation(unsigned gameId, unsigned playerIdWho, DenyGameInvitationReason reason)
|
||||||
{
|
{
|
||||||
|
|
||||||
QString string;
|
QString string;
|
||||||
if(reason == DENY_GAME_INVITATION_NO) string = tr("<span style='color:red;'>Player %1 has rejected intivation to %2.</span>");
|
if(reason == DENY_GAME_INVITATION_NO) string = tr("<span style='color:red;'>Player %1 has rejected intivation to %2.</span>");
|
||||||
|
|
||||||
@@ -1380,3 +1395,34 @@ void gameLobbyDialogImpl::chatInfoPlayerRejectedInviation(unsigned gameId, unsig
|
|||||||
textBrowser_ChatDisplay->append(string.arg(QString::fromUtf8(mySession->getClientPlayerInfo(playerIdWho).playerName.c_str())).arg(QString::fromUtf8(mySession->getClientGameInfo(gameId).name.c_str())));
|
textBrowser_ChatDisplay->append(string.arg(QString::fromUtf8(mySession->getClientPlayerInfo(playerIdWho).playerName.c_str())).arg(QString::fromUtf8(mySession->getClientGameInfo(gameId).name.c_str())));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool gameLobbyDialogImpl::playerIsOnIgnoreList(unsigned playerId) {
|
||||||
|
|
||||||
|
list<std::string> playerIgnoreList = myConfig->readConfigStringList("PlayerIgnoreList");
|
||||||
|
list<std::string>::iterator it1;
|
||||||
|
for(it1= playerIgnoreList.begin(); it1 != playerIgnoreList.end(); it1++) {
|
||||||
|
|
||||||
|
QString tmpString = QString::fromUtf8(it1->c_str());
|
||||||
|
if(QString("%1").arg(playerId) == tmpString.split(",").at(0)) {
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void gameLobbyDialogImpl::putPlayerOnIgnoreList(unsigned playerId) {
|
||||||
|
|
||||||
|
if(!playerIsOnIgnoreList(playerId)) {
|
||||||
|
|
||||||
|
list<std::string> playerIgnoreList = myConfig->readConfigStringList("PlayerIgnoreList");
|
||||||
|
playerIgnoreList.push_back(QString("%1,%2").arg(playerId).arg(QString::fromUtf8(mySession->getClientPlayerInfo(playerId).playerName.c_str())).toUtf8().constData());
|
||||||
|
myConfig->writeConfigStringList("PlayerIgnoreList", playerIgnoreList);
|
||||||
|
myConfig->writeBuffer();
|
||||||
|
|
||||||
|
myChat->refreshIgnoreList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -106,8 +106,10 @@ public slots:
|
|||||||
void invitePlayerToCurrentGame();
|
void invitePlayerToCurrentGame();
|
||||||
void showInfoMsgBox();
|
void showInfoMsgBox();
|
||||||
void showInvitationDialog(unsigned gameId, unsigned playerIdFrom);
|
void showInvitationDialog(unsigned gameId, unsigned playerIdFrom);
|
||||||
void chatInfoPlayerInviation(unsigned gameId, unsigned playerIdWho, unsigned playerIdFrom);
|
void chatInfoPlayerInvitation(unsigned gameId, unsigned playerIdWho, unsigned playerIdFrom);
|
||||||
void chatInfoPlayerRejectedInviation(unsigned gameId, unsigned playerIdWho, DenyGameInvitationReason reason);
|
void chatInfoPlayerRejectedInvitation(unsigned gameId, unsigned playerIdWho, DenyGameInvitationReason reason);
|
||||||
|
void putPlayerOnIgnoreList(unsigned playerid);
|
||||||
|
bool playerIsOnIgnoreList(unsigned playerid);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
@@ -140,7 +142,7 @@ private:
|
|||||||
MyGameListSortFilterProxyModel *myGameListSortFilterProxyModel;
|
MyGameListSortFilterProxyModel *myGameListSortFilterProxyModel;
|
||||||
QMenu *nickListContextMenu;
|
QMenu *nickListContextMenu;
|
||||||
QAction *nickListInviteAction;
|
QAction *nickListInviteAction;
|
||||||
QAction *ignorePlayerAction;
|
QAction *nickListIgnorePlayerAction;
|
||||||
int infoMsgToShowId;
|
int infoMsgToShowId;
|
||||||
int currentInvitationGameId;
|
int currentInvitationGameId;
|
||||||
bool inviteDialogIsCurrentlyShown;
|
bool inviteDialogIsCurrentlyShown;
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 830 B |
@@ -44,6 +44,7 @@
|
|||||||
<file>ktip.png</file>
|
<file>ktip.png</file>
|
||||||
<file>system_help_64.png</file>
|
<file>system_help_64.png</file>
|
||||||
<file>list_add_user_64.png</file>
|
<file>list_add_user_64.png</file>
|
||||||
|
<file>im-ban-user.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="/cflags">
|
<qresource prefix="/cflags">
|
||||||
<file>cflags/ad.png</file>
|
<file>cflags/ad.png</file>
|
||||||
|
|||||||
+352
-330
@@ -125,7 +125,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QStackedWidget" name="stackedWidget">
|
<widget class="QStackedWidget" name="stackedWidget">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>5</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="page">
|
<widget class="QWidget" name="page">
|
||||||
<layout class="QGridLayout" name="gridLayout_8">
|
<layout class="QGridLayout" name="gridLayout_8">
|
||||||
@@ -1464,319 +1464,384 @@ p, li { white-space: pre-wrap; }
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0" colspan="2">
|
||||||
<widget class="Line" name="line_9">
|
<widget class="Line" name="line_9">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="0" colspan="2">
|
||||||
<widget class="QLabel" name="label_43">
|
<widget class="QTabWidget" name="tabWidget_2">
|
||||||
<property name="text">
|
<property name="currentIndex">
|
||||||
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="tab_2">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Server</string>
|
||||||
|
</attribute>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_18">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QGroupBox" name="groupBox_automaticServerConfig">
|
||||||
|
<property name="title">
|
||||||
|
<string>Automatic Server Configuration URL</string>
|
||||||
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label_18">
|
||||||
|
<property name="text">
|
||||||
|
<string>Serverlist Address:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLineEdit" name="lineEdit_InternetServerListAddress"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QGroupBox" name="groupBox_manualServerConfig">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>116</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Manual Server Configuration</string>
|
||||||
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_4">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label_41">
|
||||||
|
<property name="text">
|
||||||
|
<string>Server Address:</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>lineEdit_InternetServerAddress</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLineEdit" name="lineEdit_InternetServerAddress">
|
||||||
|
<property name="maxLength">
|
||||||
|
<number>60</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_31">
|
||||||
|
<property name="text">
|
||||||
|
<string>Server Port:</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>spinBox_InternetServerPort</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinBox_InternetServerPort">
|
||||||
|
<property name="minimum">
|
||||||
|
<number>80</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>65535</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>7234</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QCheckBox" name="checkBox_useAvatarServer">
|
||||||
|
<property name="text">
|
||||||
|
<string>Avatar Server:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QLineEdit" name="lineEdit_avatarServerAddress"/>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0" colspan="2">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="checkBox_InternetServerUseIpv6">
|
||||||
|
<property name="text">
|
||||||
|
<string>Use IPv6</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_32">
|
||||||
|
<property name="text">
|
||||||
|
<string><a href="http://en.wikipedia.org/wiki/Ipv6">What is this?</a></string>
|
||||||
|
</property>
|
||||||
|
<property name="openExternalLinks">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="checkBox_InternetServerUseSctp">
|
||||||
|
<property name="text">
|
||||||
|
<string>Use SCTP</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_42">
|
||||||
|
<property name="text">
|
||||||
|
<string><a href="http://en.wikipedia.org/wiki/Stream_Control_Transmission_Protocol">What is this?</a></string>
|
||||||
|
</property>
|
||||||
|
<property name="openExternalLinks">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_8">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="tab_5">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Game</string>
|
||||||
|
</attribute>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_5">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label_43">
|
||||||
|
<property name="text">
|
||||||
|
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||||
p, li { white-space: pre-wrap; }
|
p, li { white-space: pre-wrap; }
|
||||||
</style></head><body style="font-weight:400; font-style:normal;">
|
</style></head><body style="font-weight:400; font-style:normal;">
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Note: Default </span><span style=" font-weight:600; font-style:italic;">Game Settings</span><span style=" font-style:italic;"> like "Maximum number of players", "Start Cash" and "Small Blind" will be used </span><span style=" font-weight:600; font-style:italic;">from Network Game Settings.</span></p></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-style:italic;">Note: Default </span><span style=" font-weight:600; font-style:italic;">Game Settings</span><span style=" font-style:italic;"> like "Maximum number of players", "Start Cash" and "Small Blind" will be used </span><span style=" font-weight:600; font-style:italic;">from Network Game Settings.</span></p></body></html></string>
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QGroupBox" name="groupBox_4">
|
|
||||||
<property name="title">
|
|
||||||
<string>Internet Server</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_5">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QGroupBox" name="groupBox_automaticServerConfig">
|
|
||||||
<property name="title">
|
|
||||||
<string>Automatic Server Configuration URL</string>
|
|
||||||
</property>
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_3">
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>4</number>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="bottomMargin">
|
<property name="wordWrap">
|
||||||
<number>6</number>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
</widget>
|
||||||
<widget class="QLabel" name="label_18">
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_23">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Serverlist Address:</string>
|
<string>Default game name:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item>
|
||||||
<widget class="QLineEdit" name="lineEdit_InternetServerListAddress"/>
|
<widget class="QLineEdit" name="lineEdit_internetGameName"/>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</item>
|
||||||
</item>
|
<item row="2" column="0">
|
||||||
<item row="1" column="0">
|
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||||
<widget class="QGroupBox" name="groupBox_manualServerConfig">
|
<item>
|
||||||
<property name="minimumSize">
|
<widget class="QLabel" name="label_17">
|
||||||
<size>
|
<property name="text">
|
||||||
<width>0</width>
|
<string>Default game type:</string>
|
||||||
<height>116</height>
|
</property>
|
||||||
</size>
|
</widget>
|
||||||
</property>
|
</item>
|
||||||
<property name="title">
|
<item>
|
||||||
<string>Manual Server Configuration</string>
|
<widget class="QComboBox" name="comboBox_internetGameType">
|
||||||
</property>
|
<property name="sizePolicy">
|
||||||
<property name="checkable">
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||||
<bool>true</bool>
|
<horstretch>0</horstretch>
|
||||||
</property>
|
<verstretch>0</verstretch>
|
||||||
<property name="checked">
|
</sizepolicy>
|
||||||
<bool>false</bool>
|
</property>
|
||||||
</property>
|
<item>
|
||||||
<layout class="QGridLayout" name="gridLayout_4">
|
<property name="text">
|
||||||
<property name="topMargin">
|
<string>Standard</string>
|
||||||
<number>4</number>
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="resources/pokerth.qrc">
|
||||||
|
<normaloff>:/gfx/player_play.png</normaloff>:/gfx/player_play.png</iconset>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Registered players only</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="resources/pokerth.qrc">
|
||||||
|
<normaloff>:/gfx/registered.png</normaloff>:/gfx/registered.png</iconset>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Invited players only</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="resources/pokerth.qrc">
|
||||||
|
<normaloff>:/gfx/list_add_user.png</normaloff>:/gfx/list_add_user.png</iconset>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Ranking game</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="resources/pokerth.qrc">
|
||||||
|
<normaloff>:/gfx/cup.png</normaloff>:/gfx/cup.png</iconset>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="bottomMargin">
|
<item>
|
||||||
|
<widget class="QCheckBox" name="checkBox_UseInternetGamePassword">
|
||||||
|
<property name="text">
|
||||||
|
<string>Use password for private game:</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="resources/pokerth.qrc">
|
||||||
|
<normaloff>:/gfx/lock.png</normaloff>:/gfx/lock.png</iconset>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="lineEdit_InternetGamePassword">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="echoMode">
|
||||||
|
<enum>QLineEdit::Password</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QCheckBox" name="checkBox_UseLobbyChat">
|
||||||
|
<property name="text">
|
||||||
|
<string>Show lobby chat</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0">
|
||||||
|
<spacer name="spacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>437</width>
|
||||||
|
<height>72</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="tab_6">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Ignored Players</string>
|
||||||
|
</attribute>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_19">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QTreeWidget" name="treeWidget_internetGameIgnoredPlayers">
|
||||||
|
<property name="alternatingRowColors">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="indentation">
|
||||||
<number>5</number>
|
<number>5</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<property name="rootIsDecorated">
|
||||||
<widget class="QLabel" name="label_41">
|
<bool>false</bool>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>Server Address:</string>
|
<property name="sortingEnabled">
|
||||||
</property>
|
<bool>true</bool>
|
||||||
<property name="buddy">
|
</property>
|
||||||
<cstring>lineEdit_InternetServerAddress</cstring>
|
<column>
|
||||||
</property>
|
<property name="text">
|
||||||
</widget>
|
<string>Player</string>
|
||||||
</item>
|
</property>
|
||||||
<item row="0" column="1">
|
</column>
|
||||||
<widget class="QLineEdit" name="lineEdit_InternetServerAddress">
|
</widget>
|
||||||
<property name="maxLength">
|
</item>
|
||||||
<number>60</number>
|
<item row="0" column="1" rowspan="2">
|
||||||
</property>
|
<spacer name="horizontalSpacer_9">
|
||||||
</widget>
|
<property name="orientation">
|
||||||
</item>
|
<enum>Qt::Horizontal</enum>
|
||||||
<item row="1" column="0">
|
</property>
|
||||||
<widget class="QLabel" name="label_31">
|
<property name="sizeHint" stdset="0">
|
||||||
<property name="text">
|
<size>
|
||||||
<string>Server Port:</string>
|
<width>256</width>
|
||||||
</property>
|
<height>218</height>
|
||||||
<property name="buddy">
|
</size>
|
||||||
<cstring>spinBox_InternetServerPort</cstring>
|
</property>
|
||||||
</property>
|
</spacer>
|
||||||
</widget>
|
</item>
|
||||||
</item>
|
<item row="1" column="0">
|
||||||
<item row="1" column="1">
|
<widget class="QPushButton" name="pushButton">
|
||||||
<widget class="QSpinBox" name="spinBox_InternetServerPort">
|
<property name="text">
|
||||||
<property name="minimum">
|
<string>Remove Player</string>
|
||||||
<number>80</number>
|
</property>
|
||||||
</property>
|
<property name="icon">
|
||||||
<property name="maximum">
|
<iconset resource="resources/pokerth.qrc">
|
||||||
<number>65535</number>
|
<normaloff>:/gfx/list-remove.png</normaloff>:/gfx/list-remove.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="value">
|
</widget>
|
||||||
<number>7234</number>
|
</item>
|
||||||
</property>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QCheckBox" name="checkBox_useAvatarServer">
|
|
||||||
<property name="text">
|
|
||||||
<string>Avatar Server:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QLineEdit" name="lineEdit_avatarServerAddress"/>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0" colspan="2">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="checkBox_InternetServerUseIpv6">
|
|
||||||
<property name="text">
|
|
||||||
<string>Use IPv6</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_32">
|
|
||||||
<property name="text">
|
|
||||||
<string><a href="http://en.wikipedia.org/wiki/Ipv6">What is this?</a></string>
|
|
||||||
</property>
|
|
||||||
<property name="openExternalLinks">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="checkBox_InternetServerUseSctp">
|
|
||||||
<property name="text">
|
|
||||||
<string>Use SCTP</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_42">
|
|
||||||
<property name="text">
|
|
||||||
<string><a href="http://en.wikipedia.org/wiki/Stream_Control_Transmission_Protocol">What is this?</a></string>
|
|
||||||
</property>
|
|
||||||
<property name="openExternalLinks">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer_8">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0">
|
<item row="3" column="1">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
<spacer name="verticalSpacer">
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_23">
|
|
||||||
<property name="text">
|
|
||||||
<string>Default game name:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="lineEdit_internetGameName"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="0">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_17">
|
|
||||||
<property name="text">
|
|
||||||
<string>Default game type:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QComboBox" name="comboBox_internetGameType">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Standard</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="resources/pokerth.qrc">
|
|
||||||
<normaloff>:/gfx/player_play.png</normaloff>:/gfx/player_play.png</iconset>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Registered players only</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="resources/pokerth.qrc">
|
|
||||||
<normaloff>:/gfx/registered.png</normaloff>:/gfx/registered.png</iconset>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Invited players only</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="resources/pokerth.qrc">
|
|
||||||
<normaloff>:/gfx/list_add_user.png</normaloff>:/gfx/list_add_user.png</iconset>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Ranking game</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="resources/pokerth.qrc">
|
|
||||||
<normaloff>:/gfx/cup.png</normaloff>:/gfx/cup.png</iconset>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="6" column="0">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="checkBox_UseInternetGamePassword">
|
|
||||||
<property name="text">
|
|
||||||
<string>Use password for private game:</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="resources/pokerth.qrc">
|
|
||||||
<normaloff>:/gfx/lock.png</normaloff>:/gfx/lock.png</iconset>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="lineEdit_InternetGamePassword">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="echoMode">
|
|
||||||
<enum>QLineEdit::Password</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="7" column="0">
|
|
||||||
<widget class="QCheckBox" name="checkBox_UseLobbyChat">
|
|
||||||
<property name="text">
|
|
||||||
<string>Show lobby chat</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="8" column="0">
|
|
||||||
<spacer>
|
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>437</width>
|
<width>20</width>
|
||||||
<height>16</height>
|
<height>121</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
@@ -3452,17 +3517,6 @@ p, li { white-space: pre-wrap; }
|
|||||||
<tabstop>spinBox_serverPort</tabstop>
|
<tabstop>spinBox_serverPort</tabstop>
|
||||||
<tabstop>checkBox_useIpv6</tabstop>
|
<tabstop>checkBox_useIpv6</tabstop>
|
||||||
<tabstop>checkBox_useSctp</tabstop>
|
<tabstop>checkBox_useSctp</tabstop>
|
||||||
<tabstop>groupBox_automaticServerConfig</tabstop>
|
|
||||||
<tabstop>lineEdit_InternetServerListAddress</tabstop>
|
|
||||||
<tabstop>groupBox_manualServerConfig</tabstop>
|
|
||||||
<tabstop>lineEdit_InternetServerAddress</tabstop>
|
|
||||||
<tabstop>spinBox_InternetServerPort</tabstop>
|
|
||||||
<tabstop>checkBox_useAvatarServer</tabstop>
|
|
||||||
<tabstop>lineEdit_avatarServerAddress</tabstop>
|
|
||||||
<tabstop>checkBox_InternetServerUseIpv6</tabstop>
|
|
||||||
<tabstop>checkBox_InternetServerUseSctp</tabstop>
|
|
||||||
<tabstop>checkBox_UseInternetGamePassword</tabstop>
|
|
||||||
<tabstop>lineEdit_InternetGamePassword</tabstop>
|
|
||||||
<tabstop>pushButton_HumanPlayerAvatar</tabstop>
|
<tabstop>pushButton_HumanPlayerAvatar</tabstop>
|
||||||
<tabstop>lineEdit_HumanPlayerName</tabstop>
|
<tabstop>lineEdit_HumanPlayerName</tabstop>
|
||||||
<tabstop>pushButton_Opponent1Avatar</tabstop>
|
<tabstop>pushButton_Opponent1Avatar</tabstop>
|
||||||
@@ -3526,22 +3580,6 @@ p, li { white-space: pre-wrap; }
|
|||||||
</hint>
|
</hint>
|
||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
<connection>
|
|
||||||
<sender>checkBox_UseInternetGamePassword</sender>
|
|
||||||
<signal>toggled(bool)</signal>
|
|
||||||
<receiver>lineEdit_InternetGamePassword</receiver>
|
|
||||||
<slot>setEnabled(bool)</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>402</x>
|
|
||||||
<y>434</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>774</x>
|
|
||||||
<y>436</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
<connection>
|
||||||
<sender>horizontalSlider_soundVolume</sender>
|
<sender>horizontalSlider_soundVolume</sender>
|
||||||
<signal>valueChanged(int)</signal>
|
<signal>valueChanged(int)</signal>
|
||||||
@@ -3590,22 +3628,6 @@ p, li { white-space: pre-wrap; }
|
|||||||
</hint>
|
</hint>
|
||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
<connection>
|
|
||||||
<sender>checkBox_useAvatarServer</sender>
|
|
||||||
<signal>toggled(bool)</signal>
|
|
||||||
<receiver>lineEdit_avatarServerAddress</receiver>
|
|
||||||
<slot>setEnabled(bool)</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>314</x>
|
|
||||||
<y>318</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>366</x>
|
|
||||||
<y>320</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
<connection>
|
||||||
<sender>radioButton_flipsideOwn</sender>
|
<sender>radioButton_flipsideOwn</sender>
|
||||||
<signal>toggled(bool)</signal>
|
<signal>toggled(bool)</signal>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -162,8 +162,8 @@ startWindowImpl::startWindowImpl(ConfigFile *c)
|
|||||||
connect(this, SIGNAL(signalNetClientGameStart(boost::shared_ptr<Game>)), this, SLOT(networkStart(boost::shared_ptr<Game>)));
|
connect(this, SIGNAL(signalNetClientGameStart(boost::shared_ptr<Game>)), this, SLOT(networkStart(boost::shared_ptr<Game>)));
|
||||||
|
|
||||||
connect(this, SIGNAL(signalSelfGameInvitation(unsigned, unsigned)), myGameLobbyDialog, SLOT(showInvitationDialog(unsigned, unsigned)));
|
connect(this, SIGNAL(signalSelfGameInvitation(unsigned, unsigned)), myGameLobbyDialog, SLOT(showInvitationDialog(unsigned, unsigned)));
|
||||||
connect(this, SIGNAL(signalPlayerGameInvitation(unsigned, unsigned, unsigned)), myGameLobbyDialog, SLOT(chatInfoPlayerInviation(unsigned, unsigned, unsigned)));
|
connect(this, SIGNAL(signalPlayerGameInvitation(unsigned, unsigned, unsigned)), myGameLobbyDialog, SLOT(chatInfoPlayerInvitation(unsigned, unsigned, unsigned)));
|
||||||
connect(this, SIGNAL(signalRejectedGameInvitation(unsigned, unsigned, DenyGameInvitationReason)), myGameLobbyDialog, SLOT(chatInfoPlayerRejectedInviation(unsigned, unsigned, DenyGameInvitationReason)));
|
connect(this, SIGNAL(signalRejectedGameInvitation(unsigned, unsigned, DenyGameInvitationReason)), myGameLobbyDialog, SLOT(chatInfoPlayerRejectedInvitation(unsigned, unsigned, DenyGameInvitationReason)));
|
||||||
|
|
||||||
this->show();
|
this->show();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user