Merge branch 'master' of github.com:/pokerth/pokerth
This commit is contained in:
@@ -563,16 +563,6 @@ void gameLobbyDialogImpl::updateGameItem(QList <QStandardItem*> itemList, unsign
|
||||
PlayerIdList::const_iterator 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;
|
||||
}
|
||||
|
||||
if(myPlayerId == *i) {
|
||||
itemList.at(0)->setData( "MeInThisGame", 16);
|
||||
itemList.at(0)->setBackground(QBrush(QColor(0, 255, 0, 127)));
|
||||
@@ -594,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);
|
||||
|
||||
@@ -4583,7 +4583,7 @@ 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>
|
||||
@@ -4786,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>
|
||||
|
||||
@@ -43,7 +43,6 @@
|
||||
#include "mynamelabel.h"
|
||||
#include "mychancelabel.h"
|
||||
#include "mytimeoutlabel.h"
|
||||
#include "mymenubar.h"
|
||||
#include "guilog.h"
|
||||
#include "chattools.h"
|
||||
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
/*****************************************************************************
|
||||
* PokerTH - The open source texas holdem engine *
|
||||
* Copyright (C) 2006-2012 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. *
|
||||
*****************************************************************************/
|
||||
#include "mymenubar.h"
|
||||
|
||||
MyMenuBar::MyMenuBar(QMainWindow* parent)
|
||||
: QMenuBar(parent)
|
||||
{
|
||||
#if (QT_VERSION >= 0x040501)
|
||||
this->setAttribute(Qt::WA_TranslucentBackground);
|
||||
this->setStyleSheet("QMenuBar { border-width: 0px; border-style: none;} ");
|
||||
#endif
|
||||
}
|
||||
|
||||
void MyMenuBar::paintEvent(QPaintEvent *e)
|
||||
{
|
||||
|
||||
QMenuBar::paintEvent(e);
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
/*****************************************************************************
|
||||
* PokerTH - The open source texas holdem engine *
|
||||
* Copyright (C) 2006-2012 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. *
|
||||
*****************************************************************************/
|
||||
#ifndef MYMENUBAR_H
|
||||
#define MYMENUBAR_H
|
||||
|
||||
#include <QtGui>
|
||||
#include <QtCore>
|
||||
#if QT_VERSION >= 0x050000
|
||||
#include <QtWidgets>
|
||||
#endif
|
||||
|
||||
class MyMenuBar : public QMenuBar
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
MyMenuBar(QMainWindow*);
|
||||
|
||||
void paintEvent(QPaintEvent * event);
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -54,7 +54,16 @@
|
||||
</size>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<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">
|
||||
@@ -2749,7 +2758,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">
|
||||
@@ -4262,7 +4280,16 @@ p, li { white-space: pre-wrap; }
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<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">
|
||||
@@ -4621,13 +4648,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>800</width>
|
||||
<height>20</height>
|
||||
<height>19</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
@@ -4781,11 +4808,6 @@ p, li { white-space: pre-wrap; }
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>Slider</class>
|
||||
<extends>QSlider</extends>
|
||||
<header>myslider.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>MySetLabel</class>
|
||||
<extends>QLabel</extends>
|
||||
@@ -4811,11 +4833,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>
|
||||
@@ -4826,6 +4843,11 @@ p, li { white-space: pre-wrap; }
|
||||
<extends>QLabel</extends>
|
||||
<header>mynamelabel.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>Slider</class>
|
||||
<extends>QSlider</extends>
|
||||
<header>myslider.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>MyCashLabel</class>
|
||||
<extends>QLabel</extends>
|
||||
|
||||
@@ -1409,6 +1409,7 @@ void GameTableStyleReader::setCardHolderStyle(QLabel *l, int bero)
|
||||
|
||||
void GameTableStyleReader::setMenuBarStyle(QMenuBar *mb)
|
||||
{
|
||||
mb->setAttribute(Qt::WA_TranslucentBackground);
|
||||
mb->setStyleSheet("QMenuBar { background-color: #"+MenuBgColor+"; font-size:12px; border-width: 0px;} QMenuBar::item { background: transparent; color: #"+MenuTextColor+"; } QMenuBar::item:selected { background: #"+MenuTextColor+"; color: #"+MenuBgColor+"; } QMenuBar::item:pressed { background: #"+MenuTextColor+"; color: #"+MenuBgColor+"; }");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user