This commit is contained in:
1 parent
ded7ca7daf
commit
f13311c9e6
10 files changed
+335
-193
No files matched your search
@@ -70,7 +70,7 @@ Log::Log(mainWindowImpl* w, ConfigFile *c) : myW(w), myConfig(c), myLogDir(0), m
|
||||
stream << "</head>\n";
|
||||
stream << "<body style=\"font-size:smaller\">\n";
|
||||
stream << "<img src='logo.png'>\n";
|
||||
stream << "<h3><b>Log-File for PokerTH 0.6 Session started on "+QDate::currentDate().toString("yyyy-MM-dd")+" at "+QTime::currentTime().toString("hh:mm:ss")+"</b></h3>\n";
|
||||
stream << "<h3><b>Log-File for PokerTH 0.6-beta Session started on "+QDate::currentDate().toString("yyyy-MM-dd")+" at "+QTime::currentTime().toString("hh:mm:ss")+"</b></h3>\n";
|
||||
myLogFile->close();
|
||||
|
||||
//Zu alte Dateien löschen!!!
|
||||
|
||||
@@ -53,6 +53,8 @@
|
||||
|
||||
#include <net/socket_msg.h>
|
||||
|
||||
#include "math.h"
|
||||
|
||||
#define FORMATLEFT(X) "<p align='center'>(X)"
|
||||
#define FORMATRIGHT(X) "(X)</p>"
|
||||
|
||||
@@ -75,108 +77,10 @@ mainWindowImpl::mainWindowImpl(ConfigFile *c, QMainWindow *parent)
|
||||
|
||||
setupUi(this);
|
||||
|
||||
//pixmapCardsLabel erstellen und ins Layout einfügen!
|
||||
pixmapLabel_cardBoard0 = new MyCardsPixmapLabel(frame_Board);
|
||||
pixmapLabel_cardBoard0->setObjectName(QString::fromUtf8("pixmapLabel_BoardCard0"));
|
||||
pixmapLabel_cardBoard0->setScaledContents(true);
|
||||
pixmapLabel_cardBoard0->setGeometry(QRect(6, 64, 79, 114));
|
||||
|
||||
pixmapLabel_cardBoard1 = new MyCardsPixmapLabel(frame_Board);
|
||||
pixmapLabel_cardBoard1->setObjectName(QString::fromUtf8("pixmapLabel_BoardCard1"));
|
||||
pixmapLabel_cardBoard1->setScaledContents(true);
|
||||
pixmapLabel_cardBoard1->setGeometry(QRect(95, 64, 79, 114));
|
||||
|
||||
pixmapLabel_cardBoard2 = new MyCardsPixmapLabel(frame_Board);
|
||||
pixmapLabel_cardBoard2->setObjectName(QString::fromUtf8("pixmapLabel_BoardCard2"));
|
||||
pixmapLabel_cardBoard2->setScaledContents(true);
|
||||
pixmapLabel_cardBoard2->setGeometry(QRect(184, 64, 79, 114));
|
||||
|
||||
pixmapLabel_cardBoard3 = new MyCardsPixmapLabel(frame_Board);
|
||||
pixmapLabel_cardBoard3->setObjectName(QString::fromUtf8("pixmapLabel_BoardCard3"));
|
||||
pixmapLabel_cardBoard3->setScaledContents(true);
|
||||
pixmapLabel_cardBoard3->setGeometry(QRect(280, 64, 79, 114));
|
||||
|
||||
pixmapLabel_cardBoard4 = new MyCardsPixmapLabel(frame_Board);
|
||||
pixmapLabel_cardBoard4->setObjectName(QString::fromUtf8("pixmapLabel_BoardCard4"));
|
||||
pixmapLabel_cardBoard4->setScaledContents(true);
|
||||
pixmapLabel_cardBoard4->setGeometry(QRect(376, 64, 79, 114));
|
||||
|
||||
|
||||
pixmapLabel_card0a = new MyCardsPixmapLabel(frame_Cards0);
|
||||
pixmapLabel_card0a->setObjectName(QString::fromUtf8("pixmapLabel_card0a"));
|
||||
pixmapLabel_card0a->setScaledContents(true);
|
||||
pixmapLabel_card0a->setGeometry(QRect(0, 0, 80, 111));
|
||||
// pixmapLabel_card0a->setFocusPolicy(Qt::NoFocus);
|
||||
|
||||
pixmapLabel_card0b = new MyCardsPixmapLabel(frame_Cards0);
|
||||
pixmapLabel_card0b->setObjectName(QString::fromUtf8("pixmapLabel_card0b"));
|
||||
pixmapLabel_card0b->setScaledContents(true);
|
||||
pixmapLabel_card0b->setGeometry(QRect(39, 0, 80, 111));
|
||||
|
||||
//Player0 pixmapCardsLabel needs Myw
|
||||
pixmapLabel_card0b->setMyW(this);
|
||||
pixmapLabel_card0a->setMyW(this);
|
||||
|
||||
pixmapLabel_card1a = new MyCardsPixmapLabel(frame_Cards1);
|
||||
pixmapLabel_card1a->setObjectName(QString::fromUtf8("pixmapLabel_card1a"));
|
||||
pixmapLabel_card1a->setScaledContents(true);
|
||||
pixmapLabel_card1a->setGeometry(QRect(0, 0, 80, 111));
|
||||
|
||||
pixmapLabel_card1b = new MyCardsPixmapLabel(frame_Cards1);
|
||||
pixmapLabel_card1b->setObjectName(QString::fromUtf8("pixmapLabel_card1b"));
|
||||
pixmapLabel_card1b->setScaledContents(true);
|
||||
pixmapLabel_card1b->setGeometry(QRect(39, 0, 80, 111));
|
||||
|
||||
pixmapLabel_card2a = new MyCardsPixmapLabel(frame_Cards2);
|
||||
pixmapLabel_card2a->setObjectName(QString::fromUtf8("pixmapLabel_card2a"));
|
||||
pixmapLabel_card2a->setScaledContents(true);
|
||||
pixmapLabel_card2a->setGeometry(QRect(0, 0, 80, 111));
|
||||
|
||||
pixmapLabel_card2b = new MyCardsPixmapLabel(frame_Cards2);
|
||||
pixmapLabel_card2b->setObjectName(QString::fromUtf8("pixmapLabel_card2b"));
|
||||
pixmapLabel_card2b->setScaledContents(true);
|
||||
pixmapLabel_card2b->setGeometry(QRect(39, 0, 80, 111));
|
||||
|
||||
pixmapLabel_card3a = new MyCardsPixmapLabel(frame_Cards3);
|
||||
pixmapLabel_card3a->setObjectName(QString::fromUtf8("pixmapLabel_card3a"));
|
||||
pixmapLabel_card3a->setScaledContents(true);
|
||||
pixmapLabel_card3a->setGeometry(QRect(0, 0, 80, 111));
|
||||
|
||||
pixmapLabel_card3b = new MyCardsPixmapLabel(frame_Cards3);
|
||||
pixmapLabel_card3b->setObjectName(QString::fromUtf8("pixmapLabel_card3b"));
|
||||
pixmapLabel_card3b->setScaledContents(true);
|
||||
pixmapLabel_card3b->setGeometry(QRect(39, 0, 80, 111));
|
||||
|
||||
pixmapLabel_card4a = new MyCardsPixmapLabel(frame_Cards4);
|
||||
pixmapLabel_card4a->setObjectName(QString::fromUtf8("pixmapLabel_card4a"));
|
||||
pixmapLabel_card4a->setScaledContents(true);
|
||||
pixmapLabel_card4a->setGeometry(QRect(0, 0, 80, 111));
|
||||
|
||||
pixmapLabel_card4b = new MyCardsPixmapLabel(frame_Cards4);
|
||||
pixmapLabel_card4b->setObjectName(QString::fromUtf8("pixmapLabel_card4b"));
|
||||
pixmapLabel_card4b->setScaledContents(true);
|
||||
pixmapLabel_card4b->setGeometry(QRect(39, 0, 80, 111));
|
||||
|
||||
pixmapLabel_card5a = new MyCardsPixmapLabel(frame_Cards5);
|
||||
pixmapLabel_card5a->setObjectName(QString::fromUtf8("pixmapLabel_card5a"));
|
||||
pixmapLabel_card5a->setScaledContents(true);
|
||||
pixmapLabel_card5a->setGeometry(QRect(0, 0, 80, 111));
|
||||
|
||||
pixmapLabel_card5b = new MyCardsPixmapLabel(frame_Cards5);
|
||||
pixmapLabel_card5b->setObjectName(QString::fromUtf8("pixmapLabel_card5b"));
|
||||
pixmapLabel_card5b->setScaledContents(true);
|
||||
pixmapLabel_card5b->setGeometry(QRect(39, 0, 80, 111));
|
||||
|
||||
pixmapLabel_card6a = new MyCardsPixmapLabel(frame_Cards6);
|
||||
pixmapLabel_card6a->setObjectName(QString::fromUtf8("pixmapLabel_card6a"));
|
||||
pixmapLabel_card6a->setScaledContents(true);
|
||||
pixmapLabel_card6a->setGeometry(QRect(0, 0, 80, 111));
|
||||
|
||||
pixmapLabel_card6b = new MyCardsPixmapLabel(frame_Cards6);
|
||||
pixmapLabel_card6b->setObjectName(QString::fromUtf8("pixmapLabel_card6b"));
|
||||
pixmapLabel_card6b->setScaledContents(true);
|
||||
pixmapLabel_card6b->setGeometry(QRect(39, 0, 80, 111));
|
||||
|
||||
|
||||
//Flipside festlegen;
|
||||
flipside = new QPixmap(myAppDataPath +"gfx/cards/default/flipside.png");
|
||||
|
||||
@@ -609,9 +513,11 @@ mainWindowImpl::mainWindowImpl(ConfigFile *c, QMainWindow *parent)
|
||||
connect( pushButton_Fold, SIGNAL( clicked(bool) ), this, SLOT( pushButtonFoldClicked(bool) ) );
|
||||
connect( pushButton_CallCheck, SIGNAL( clicked(bool) ), this, SLOT( pushButtonCallCheckClicked(bool) ) );
|
||||
connect( pushButton_AllIn, SIGNAL( clicked(bool) ), this, SLOT(pushButtonAllInClicked(bool) ) );
|
||||
|
||||
connect ( horizontalSlider_speed, SIGNAL( valueChanged(int)), this, SLOT ( setGameSpeed(int) ) );
|
||||
connect ( pushButton_break, SIGNAL( clicked()), this, SLOT ( breakButtonClicked() ) ); // auch wieder starten!!!!
|
||||
|
||||
connect( horizontalSlider_bet, SIGNAL( valueChanged(int)), this, SLOT ( changeSpinBoxBetValue(int) ) );
|
||||
|
||||
connect( horizontalSlider_speed, SIGNAL( valueChanged(int)), this, SLOT ( setGameSpeed(int) ) );
|
||||
connect( pushButton_break, SIGNAL( clicked()), this, SLOT ( breakButtonClicked() ) ); // auch wieder starten!!!!
|
||||
|
||||
connect( tabWidget_Left, SIGNAL( currentChanged(int) ), this, SLOT( tabSwitchAction() ) );
|
||||
connect( lineEdit_ChatInput, SIGNAL( returnPressed () ), this, SLOT( sendChatMessage() ) );
|
||||
@@ -2015,19 +1921,12 @@ void mainWindowImpl::disableMyButtons() {
|
||||
spinBox_set->setMaximum(currentHand->getSeatsList()->front()->getMyCash());
|
||||
horizontalSlider_bet->setMaximum(currentHand->getSeatsList()->front()->getMyCash());
|
||||
spinBox_set->setValue(0);
|
||||
horizontalSlider_bet->setValue(0);
|
||||
|
||||
pushButton_AllIn->setDisabled(TRUE);
|
||||
horizontalSlider_bet->setDisabled(TRUE);
|
||||
spinBox_set->setDisabled(TRUE);
|
||||
|
||||
// spinBox_set->setDisabled(TRUE);
|
||||
// horizontalSlider_bet->setDisabled(TRUE);
|
||||
// spinBox_set->hide();
|
||||
// pushButton_BetRaise->show();
|
||||
// pushButton_BetRaise->setText("");
|
||||
// pushButton_CallCheck->setText("");
|
||||
// pushButton_Fold->setText("");
|
||||
|
||||
}
|
||||
|
||||
void mainWindowImpl::myBetRaise() {
|
||||
@@ -2038,14 +1937,7 @@ void mainWindowImpl::myBetRaise() {
|
||||
else if(pushButton_BetRaise->text() == "Bet") {
|
||||
myBet();
|
||||
}
|
||||
else {
|
||||
// spinBox_set->setMinimum(0);
|
||||
// horizontalSlider_bet->setMinimum(0);
|
||||
// spinBox_set->setValue(0);
|
||||
// horizontalSlider_bet->setValue(0);
|
||||
// spinBox_set->setDisabled(TRUE);
|
||||
// horizontalSlider_bet->setDisabled(TRUE);
|
||||
}
|
||||
else {}
|
||||
}
|
||||
|
||||
void mainWindowImpl::myCallCheck() {
|
||||
@@ -3663,3 +3555,11 @@ void mainWindowImpl::quitPokerTH() {
|
||||
//
|
||||
// QMainWindow::paintEvent(event);
|
||||
// }
|
||||
|
||||
void mainWindowImpl::changeSpinBoxBetValue(int value) {
|
||||
|
||||
if(spinBox_set->maximum() <= 1000 )
|
||||
spinBox_set->setValue((int)((value/10)*10));
|
||||
else
|
||||
spinBox_set->setValue((int)((value/50)*50));
|
||||
}
|
||||
@@ -319,6 +319,7 @@ public slots:
|
||||
void myButtonsCheckable(bool state);
|
||||
|
||||
void changePlayingMode();
|
||||
void changeSpinBoxBetValue(int);
|
||||
|
||||
void showMaximized ();
|
||||
void quitPokerTH();
|
||||
@@ -333,30 +334,6 @@ private:
|
||||
Chat *myChat;
|
||||
ConfigFile *myConfig;
|
||||
|
||||
//Logo
|
||||
QLabel *label_logoleft;
|
||||
QLabel *label_logoright;
|
||||
|
||||
//MyPixmapCardsLabel
|
||||
MyCardsPixmapLabel *pixmapLabel_cardBoard0;
|
||||
MyCardsPixmapLabel *pixmapLabel_cardBoard1;
|
||||
MyCardsPixmapLabel *pixmapLabel_cardBoard2;
|
||||
MyCardsPixmapLabel *pixmapLabel_cardBoard3;
|
||||
MyCardsPixmapLabel *pixmapLabel_cardBoard4;
|
||||
MyCardsPixmapLabel *pixmapLabel_card0a;
|
||||
MyCardsPixmapLabel *pixmapLabel_card0b;
|
||||
MyCardsPixmapLabel *pixmapLabel_card1a;
|
||||
MyCardsPixmapLabel *pixmapLabel_card1b;
|
||||
MyCardsPixmapLabel *pixmapLabel_card2a;
|
||||
MyCardsPixmapLabel *pixmapLabel_card2b;
|
||||
MyCardsPixmapLabel *pixmapLabel_card3a;
|
||||
MyCardsPixmapLabel *pixmapLabel_card3b;
|
||||
MyCardsPixmapLabel *pixmapLabel_card4a;
|
||||
MyCardsPixmapLabel *pixmapLabel_card4b;
|
||||
MyCardsPixmapLabel *pixmapLabel_card5a;
|
||||
MyCardsPixmapLabel *pixmapLabel_card5b;
|
||||
MyCardsPixmapLabel *pixmapLabel_card6a;
|
||||
MyCardsPixmapLabel *pixmapLabel_card6b;
|
||||
//Timer
|
||||
QTimer *potDistributeTimer;
|
||||
QTimer *timer;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
//
|
||||
//
|
||||
#include "mycardspixmaplabel.h"
|
||||
|
||||
#include "mainwindowimpl.h"
|
||||
// using namespace std;
|
||||
|
||||
MyCardsPixmapLabel::MyCardsPixmapLabel(QFrame* parent)
|
||||
@@ -168,10 +168,10 @@ void MyCardsPixmapLabel::paintEvent(QPaintEvent * event) {
|
||||
|
||||
painter.setOpacity(frameOpacity);
|
||||
// painter.drawRect(this->geometry());
|
||||
if(objectName().contains("pixmapLabel_card"))
|
||||
painter.drawRect(-1,-1,81,112);
|
||||
if(objectName().contains("pixmapLabel_cardBoard"))
|
||||
painter.drawRect(-1,-1,80,115);
|
||||
else
|
||||
painter.drawRect(-1,-1,80,115);
|
||||
painter.drawRect(-1,-1,81,112);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include <QtGui>
|
||||
#include <QtCore>
|
||||
|
||||
#include "mainwindowimpl.h"
|
||||
class mainWindowImpl;
|
||||
|
||||
class MyCardsPixmapLabel : public QLabel
|
||||
{
|
||||
|
||||
@@ -281,7 +281,7 @@ void StartSplash::paintEvent(QPaintEvent * event) {
|
||||
painter.setOpacity(1.0);
|
||||
painter.setFont(versionFont);
|
||||
painter.setPen(QColor(102,153,0));
|
||||
painter.drawText(312,230,100,20,4,"Version 0.6");
|
||||
painter.drawText(295,230,100,20,4,"Version 0.6-beta");
|
||||
painter.setOpacity(opacity);
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user