1 /***************************************************************************** 2 * PokerTH - The open source texas holdem engine * 3 * Copyright (C) 2006-2012 Felix Hammer, Florian Thauer, Lothar May * 4 * * 5 * This program is free software: you can redistribute it and/or modify * 6 * it under the terms of the GNU Affero General Public License as * 7 * published by the Free Software Foundation, either version 3 of the * 8 * License, or (at your option) any later version. * 9 * * 10 * This program is distributed in the hope that it will be useful, * 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 13 * GNU Affero General Public License for more details. * 14 * * 15 * You should have received a copy of the GNU Affero General Public License * 16 * along with this program. If not, see <http://www.gnu.org/licenses/>. * 17 * * 18 * * 19 * Additional permission under GNU AGPL version 3 section 7 * 20 * * 21 * If you modify this program, or any covered work, by linking or * 22 * combining it with the OpenSSL project's OpenSSL library (or a * 23 * modified version of that library), containing parts covered by the * 24 * terms of the OpenSSL or SSLeay licenses, the authors of PokerTH * 25 * (Felix Hammer, Florian Thauer, Lothar May) grant you additional * 26 * permission to convey the resulting work. * 27 * Corresponding Source for a non-source form of such a combination * 28 * shall include the source code for the parts of OpenSSL used as well * 29 * as that of the covered work. * 30 *****************************************************************************/ 31 #ifndef MYCHANCELABEL_H 32 #define MYCHANCELABEL_H 33 34 #include <vector> 35 36 #include <QtGui> 37 #include <QtCore> 38 #if QT_VERSION >= 0x050000 39 #include <QtWidgets> 40 #endif 41 42 class gameTableImpl; 43 class GameTableStyleReader; 44 45 class MyChanceLabel : public QLabel 46 { 47 Q_OBJECT 48 public: 49 MyChanceLabel(QWidget*); 50 51 ~MyChanceLabel(); 52 setMyW(gameTableImpl * theValue)53 void setMyW ( gameTableImpl* theValue ) 54 { 55 myW = theValue; 56 } setMyStyle(GameTableStyleReader * theValue)57 void setMyStyle ( GameTableStyleReader* theValue ) 58 { 59 myStyle = theValue; 60 } 61 void paintEvent(QPaintEvent * event); 62 void refreshChance(std::vector< std::vector<int> >, bool); 63 void resetChance(); 64 65 private: 66 67 gameTableImpl *myW; 68 GameTableStyleReader *myStyle; 69 int RFChance[2]; 70 int SFChance[2]; 71 int FOAKChance[2]; 72 int FHChance[2]; 73 int FLChance[2]; 74 int STRChance[2]; 75 int TOAKChance[2]; 76 int TPChance[2]; 77 int OPChance[2]; 78 int HCChance[2]; 79 80 bool myFoldState; 81 }; 82 83 #endif 84