GUI: Lobby changes and invite preperation

This commit is contained in:
doitux
2010-03-27 21:55:34 +00:00
parent 843343ceea
commit 7fdf432fe1
4 changed files with 450 additions and 263 deletions
+416 -243
View File
@@ -64,6 +64,9 @@
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="indentation"> <property name="indentation">
<number>5</number> <number>5</number>
</property> </property>
@@ -304,65 +307,310 @@ p, li { white-space: pre-wrap; }
<property name="title"> <property name="title">
<string>Game Info</string> <string>Game Info</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>3</number>
</property>
<property name="leftMargin">
<number>7</number>
</property>
<property name="topMargin"> <property name="topMargin">
<number>4</number> <number>2</number>
</property>
<property name="rightMargin">
<number>7</number>
</property> </property>
<property name="bottomMargin"> <property name="bottomMargin">
<number>5</number> <number>7</number>
</property> </property>
<property name="verticalSpacing"> <item>
<number>5</number> <widget class="QScrollArea" name="scrollArea">
</property> <property name="minimumSize">
<item row="0" column="0"> <size>
<layout class="QHBoxLayout" name="horizontalLayout"> <width>0</width>
<item> <height>174</height>
<widget class="QLabel" name="label_gameType"> </size>
<property name="text"> </property>
<string>Game type:</string> <property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>248</width>
<height>175</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="verticalSpacing">
<number>2</number>
</property> </property>
</widget> <property name="margin">
</item> <number>2</number>
<item>
<widget class="QLabel" name="label_typeIcon">
<property name="minimumSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property> </property>
<property name="maximumSize"> <item row="2" column="0">
<size> <layout class="QHBoxLayout" name="_3">
<width>16</width> <item>
<height>16</height> <widget class="QLabel" name="label_gameDesc2">
</size> <property name="text">
</property> <string>Start Cash: </string>
<property name="scaledContents"> </property>
<bool>true</bool> <property name="alignment">
</property> <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</widget> </property>
</item> </widget>
<item> </item>
<widget class="QLabel" name="label_typeText"> <item>
<property name="sizePolicy"> <widget class="QLabel" name="label_StartCash">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred"> <property name="sizePolicy">
<horstretch>0</horstretch> <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<verstretch>0</verstretch> <horstretch>0</horstretch>
</sizepolicy> <verstretch>0</verstretch>
</property> </sizepolicy>
<property name="text"> </property>
<string/> <property name="styleSheet">
</property> <string notr="true">QLabel { color:rgb(0, 0, 255); }</string>
</widget> </property>
</item> <property name="alignment">
</layout> <set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set>
</property>
</widget>
</item>
</layout>
</item>
<item row="3" column="0">
<layout class="QHBoxLayout">
<item>
<widget class="QLabel" name="label_gameDesc3">
<property name="text">
<string>First small blind: </string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_SmallBlind">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="styleSheet">
<string notr="true">QLabel { color:rgb(0, 0, 255); }</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set>
</property>
</widget>
</item>
</layout>
</item>
<item row="4" column="0">
<layout class="QHBoxLayout">
<item>
<widget class="QLabel" name="label_gameDesc4">
<property name="text">
<string>Blinds raise interval: </string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_blindsRaiseIntervall">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="styleSheet">
<string notr="true">QLabel { color:rgb(0, 0, 255); }</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item row="5" column="0">
<layout class="QHBoxLayout">
<item>
<widget class="QLabel" name="label_gameDesc5">
<property name="text">
<string>Blinds raise mode: </string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_blindsRaiseMode">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="styleSheet">
<string notr="true">QLabel { color:rgb(0, 0, 255); }</string>
</property>
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item row="6" column="0">
<layout class="QHBoxLayout">
<item>
<widget class="QLabel" name="label_gameDesc6">
<property name="text">
<string>Manual blinds list:</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_blindsList">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="styleSheet">
<string notr="true">QLabel { color:rgb(0, 0, 255); }</string>
</property>
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item row="7" column="0">
<layout class="QHBoxLayout">
<item>
<widget class="QLabel" name="label_gameDesc7">
<property name="text">
<string>Timeout for player action (sec): </string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_TimeoutForPlayerAction">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="styleSheet">
<string notr="true">QLabel { color:rgb(0, 0, 255); }</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label_gameType">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Game type:</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_typeIcon">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_typeText">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item> </item>
<item row="1" column="0"> <item>
<widget class="QTreeWidget" name="treeWidget_connectedPlayers"> <widget class="QTreeWidget" name="treeWidget_connectedPlayers">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>221</width> <width>221</width>
<height>221</height> <height>240</height>
</size> </size>
</property> </property>
<property name="midLineWidth"> <property name="midLineWidth">
@@ -384,227 +632,134 @@ p, li { white-space: pre-wrap; }
</column> </column>
</widget> </widget>
</item> </item>
<item row="2" column="0"> <item>
<widget class="QCheckBox" name="checkBox_fillUpWithComputerOpponents"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="text">
<string>Fill up with computer opponents</string>
</property>
</widget>
</item>
<item row="3" column="0">
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="topMargin">
<number>3</number>
</property>
<property name="bottomMargin">
<number>4</number>
</property>
<item> <item>
<spacer> <widget class="QCheckBox" name="checkBox_fillUpWithComputerOpponents">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Fill up with computer opponents</string>
</property>
<property name="icon">
<iconset resource="resources/pokerth.qrc">
<normaloff>:/gfx/swbuttonlocalgame.png</normaloff>:/gfx/swbuttonlocalgame.png</iconset>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>40</width> <width>0</width>
<height>20</height> <height>21</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
</layout>
</item>
<item>
<layout class="QHBoxLayout">
<property name="spacing">
<number>3</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item> <item>
<widget class="QPushButton" name="pushButton_StartGame"> <widget class="QPushButton" name="pushButton_StartGame">
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>26</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>26</height>
</size>
</property>
<property name="text"> <property name="text">
<string>&amp;Start Game</string> <string>&amp;Start Game</string>
</property> </property>
<property name="icon">
<iconset resource="resources/pokerth.qrc">
<normaloff>:/gfx/dialog_ok_apply.png</normaloff>:/gfx/dialog_ok_apply.png</iconset>
</property>
</widget> </widget>
</item> </item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>26</height>
</size>
</property>
</spacer>
</item>
<item> <item>
<widget class="QPushButton" name="pushButton_Kick"> <widget class="QPushButton" name="pushButton_Kick">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>26</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>26</height>
</size>
</property>
<property name="text"> <property name="text">
<string>&amp;Kick Player</string> <string>&amp;Kick Player</string>
</property> </property>
<property name="icon">
<iconset resource="resources/pokerth.qrc">
<normaloff>:/gfx/editdelete.png</normaloff>:/gfx/editdelete.png</iconset>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>
</item> </item>
<item row="4" column="0"> <item>
<widget class="QScrollArea" name="scrollArea">
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>244</width>
<height>159</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="horizontalSpacing">
<number>1</number>
</property>
<property name="verticalSpacing">
<number>2</number>
</property>
<property name="margin">
<number>3</number>
</property>
<item row="0" column="0">
<layout class="QHBoxLayout" name="_3">
<item>
<widget class="QLabel" name="label_gameDesc2">
<property name="text">
<string>Start Cash: </string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_StartCash">
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0">
<layout class="QHBoxLayout">
<item>
<widget class="QLabel" name="label_gameDesc3">
<property name="text">
<string>First small blind: </string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_SmallBlind">
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
</layout>
</item>
<item row="2" column="0">
<layout class="QHBoxLayout">
<item>
<widget class="QLabel" name="label_gameDesc4">
<property name="text">
<string>Blinds raise interval: </string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_blindsRaiseIntervall">
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set>
</property>
</widget>
</item>
</layout>
</item>
<item row="3" column="0">
<layout class="QHBoxLayout">
<item>
<widget class="QLabel" name="label_gameDesc5">
<property name="text">
<string>Blinds raise mode: </string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_blindsRaiseMode">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item row="4" column="0">
<layout class="QHBoxLayout">
<item>
<widget class="QLabel" name="label_gameDesc6">
<property name="text">
<string>Manual blinds list:</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_blindsList">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item row="5" column="0">
<layout class="QHBoxLayout">
<item>
<widget class="QLabel" name="label_gameDesc7">
<property name="text">
<string>Timeout for player action (sec): </string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_TimeoutForPlayerAction">
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
</layout>
</item>
<item row="6" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
<item row="5" column="0">
<layout class="QHBoxLayout"> <layout class="QHBoxLayout">
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
@@ -620,7 +775,7 @@ p, li { white-space: pre-wrap; }
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>0</width> <width>0</width>
<height>27</height> <height>26</height>
</size> </size>
</property> </property>
</spacer> </spacer>
@@ -633,9 +788,25 @@ p, li { white-space: pre-wrap; }
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize">
<size>
<width>0</width>
<height>26</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>26</height>
</size>
</property>
<property name="text"> <property name="text">
<string>&amp;Leave Game</string> <string>&amp;Leave Game</string>
</property> </property>
<property name="icon">
<iconset resource="resources/pokerth.qrc">
<normaloff>:/gfx/arrow_left_double.png</normaloff>:/gfx/arrow_left_double.png</iconset>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>
@@ -660,6 +831,8 @@ p, li { white-space: pre-wrap; }
<tabstop>pushButton_Kick</tabstop> <tabstop>pushButton_Kick</tabstop>
<tabstop>pushButton_Leave</tabstop> <tabstop>pushButton_Leave</tabstop>
</tabstops> </tabstops>
<resources/> <resources>
<include location="resources/pokerth.qrc"/>
</resources>
<connections/> <connections/>
</ui> </ui>
@@ -79,6 +79,10 @@ 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;}"); 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;}");
treeView_GameList->setAutoFillBackground(TRUE); treeView_GameList->setAutoFillBackground(TRUE);
nickListContextMenu = new QMenu();
nickListInviteAction = new QAction(QIcon(":/gfx/list_add_user.png"), tr("Invite player"), nickListContextMenu);
nickListContextMenu->addAction(nickListInviteAction);
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() ) );
connect( pushButton_joinAnyGame, SIGNAL( clicked() ), this, SLOT( joinAnyGame() ) ); connect( pushButton_joinAnyGame, SIGNAL( clicked() ), this, SLOT( joinAnyGame() ) );
@@ -95,6 +99,8 @@ gameLobbyDialogImpl::gameLobbyDialogImpl(startWindowImpl *parent, ConfigFile *c)
connect( waitStartGameMsgBoxTimer, SIGNAL(timeout()), this, SLOT( showWaitStartGameMsgBox() )); connect( waitStartGameMsgBoxTimer, SIGNAL(timeout()), this, SLOT( showWaitStartGameMsgBox() ));
connect( blinkingButtonAnimationTimer, SIGNAL(timeout()), this, SLOT( blinkingStartButtonAnimation() )); connect( blinkingButtonAnimationTimer, SIGNAL(timeout()), this, SLOT( blinkingStartButtonAnimation() ));
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( nickListInviteAction, SIGNAL(triggered()), this, SLOT( invitePlayerToCurrentGame() ));
lineEdit_ChatInput->installEventFilter(this); lineEdit_ChatInput->installEventFilter(this);
@@ -1065,15 +1071,17 @@ void gameLobbyDialogImpl::hideShowGameDescription(bool show) {
label_gameDesc5->show(); label_gameDesc5->show();
label_gameDesc6->show(); label_gameDesc6->show();
label_gameDesc7->show(); label_gameDesc7->show();
line->show();
} }
else { else {
label_gameType->show(); label_gameType->hide();
label_gameDesc2->hide(); label_gameDesc2->hide();
label_gameDesc3->hide(); label_gameDesc3->hide();
label_gameDesc4->hide(); label_gameDesc4->hide();
label_gameDesc5->hide(); label_gameDesc5->hide();
label_gameDesc6->hide(); label_gameDesc6->hide();
label_gameDesc7->hide(); label_gameDesc7->hide();
line->hide();
} }
} }
@@ -1289,3 +1297,20 @@ void gameLobbyDialogImpl::guestUserMode()
lineEdit_ChatInput->setDisabled(true); lineEdit_ChatInput->setDisabled(true);
guestMode = true; guestMode = true;
} }
void gameLobbyDialogImpl::showNickListContextMenu(QPoint p)
{
if(treeWidget_NickList->topLevelItemCount()) {
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()) {
nickListContextMenu->popup(treeWidget_NickList->mapToGlobal(p));
}
}
}
void gameLobbyDialogImpl::invitePlayerToCurrentGame()
{
qDebug() << "invitePlayer";
}
@@ -55,68 +55,55 @@ public slots:
void createGame(); void createGame();
void joinGame(); void joinGame();
void joinAnyGame(); void joinAnyGame();
void gameSelected(const QModelIndex &, const QModelIndex &); void gameSelected(const QModelIndex &, const QModelIndex &);
void updateGameItem(QList <QStandardItem*>, unsigned gameId); void updateGameItem(QList <QStandardItem*>, unsigned gameId);
void addGame(unsigned gameId); void addGame(unsigned gameId);
void updateGameMode(unsigned gameId, int newMode); void updateGameMode(unsigned gameId, int newMode);
void updateGameAdmin(unsigned gameId, unsigned adminPlayerId); void updateGameAdmin(unsigned gameId, unsigned adminPlayerId);
void removeGame(unsigned gameId); void removeGame(unsigned gameId);
void gameAddPlayer(unsigned gameId, unsigned playerId); void gameAddPlayer(unsigned gameId, unsigned playerId);
void gameRemovePlayer(unsigned gameId, unsigned playerId); void gameRemovePlayer(unsigned gameId, unsigned playerId);
void playerJoinedLobby(unsigned playerId, QString playerName); void playerJoinedLobby(unsigned playerId, QString playerName);
void playerLeftLobby(unsigned playerId); void playerLeftLobby(unsigned playerId);
void updateStats(ServerStats stats); void updateStats(ServerStats stats);
void refreshGameStats();
void refreshGameStats();
void refreshPlayerStats(); void refreshPlayerStats();
void setCurrentGameName ( const QString& theValue ) { currentGameName = theValue; } void setCurrentGameName ( const QString& theValue ) { currentGameName = theValue; }
QString getCurrentGameName() const { return currentGameName; } QString getCurrentGameName() const { return currentGameName; }
gameTableImpl* getMyW() const { return myW; } gameTableImpl* getMyW() const { return myW; }
void checkPlayerQuantity(); void checkPlayerQuantity();
void blinkingStartButtonAnimation(); void blinkingStartButtonAnimation();
void joinedNetworkGame(unsigned, QString, bool); void joinedNetworkGame(unsigned, QString, bool);
void addConnectedPlayer(unsigned, QString, bool); void addConnectedPlayer(unsigned, QString, bool);
void updatePlayer(unsigned, QString); void updatePlayer(unsigned, QString);
void removePlayer(unsigned, QString); void removePlayer(unsigned, QString);
void newGameAdmin(unsigned, QString); void newGameAdmin(unsigned, QString);
void refreshConnectedPlayerAvatars(); void refreshConnectedPlayerAvatars();
void playerSelected(QTreeWidgetItem*, QTreeWidgetItem*); void playerSelected(QTreeWidgetItem*, QTreeWidgetItem*);
void refresh(int actionID); void refresh(int actionID);
void removedFromGame(int reason); void removedFromGame(int reason);
void startGame(); void startGame();
void leaveGame(); void leaveGame();
void kickPlayer(); void kickPlayer();
void joinedGameDialogUpdate(); void joinedGameDialogUpdate();
void leftGameDialogUpdate(); void leftGameDialogUpdate();
void updateDialogBlinds(const GameData &gameData); void updateDialogBlinds(const GameData &gameData);
void clearDialog(); void clearDialog();
void keyPressEvent(QKeyEvent * keyEvent); void keyPressEvent(QKeyEvent * keyEvent);
bool event(QEvent * event); bool event(QEvent * event);
void hideShowGameDescription(bool show); void hideShowGameDescription(bool show);
void showWaitStartGameMsgBox(); void showWaitStartGameMsgBox();
void joinAnyGameButtonRefresh();
void joinAnyGameButtonRefresh();
void reject(); void reject();
void closeEvent(QCloseEvent *event); void closeEvent(QCloseEvent *event);
void writeDialogSettings(int); void writeDialogSettings(int);
void readDialogSettings(); void readDialogSettings();
void changeGameListFilter(int); void changeGameListFilter(int);
void changeGameListSorting(); void changeGameListSorting();
void registeredUserMode(); void registeredUserMode();
void guestUserMode(); void guestUserMode();
void showNickListContextMenu(QPoint);
void invitePlayerToCurrentGame();
private: private:
@@ -146,6 +133,8 @@ private:
QStandardItemModel *myGameListModel; QStandardItemModel *myGameListModel;
QItemSelectionModel *myGameListSelectionModel; QItemSelectionModel *myGameListSelectionModel;
MyGameListSortFilterProxyModel *myGameListSortFilterProxyModel; MyGameListSortFilterProxyModel *myGameListSortFilterProxyModel;
QMenu *nickListContextMenu;
QAction *nickListInviteAction;
protected: protected:
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 501 B