Running astyle.
This commit is contained in:
@@ -21,8 +21,8 @@
|
|||||||
#include <QtCore>
|
#include <QtCore>
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
#include <QPlatformNativeInterface>
|
#include <QPlatformNativeInterface>
|
||||||
#include <jni.h>
|
#include <jni.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
aboutPokerthImpl::aboutPokerthImpl(QWidget *parent, ConfigFile *c)
|
aboutPokerthImpl::aboutPokerthImpl(QWidget *parent, ConfigFile *c)
|
||||||
@@ -79,8 +79,7 @@ aboutPokerthImpl::aboutPokerthImpl(QWidget *parent, ConfigFile *c)
|
|||||||
int api = -2;
|
int api = -2;
|
||||||
if (currVM->AttachCurrentThread(&env, NULL)<0) {
|
if (currVM->AttachCurrentThread(&env, NULL)<0) {
|
||||||
qCritical()<<"AttachCurrentThread failed";
|
qCritical()<<"AttachCurrentThread failed";
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
jclass jclassApplicationClass = env->FindClass("android/os/Build$VERSION");
|
jclass jclassApplicationClass = env->FindClass("android/os/Build$VERSION");
|
||||||
if (jclassApplicationClass) {
|
if (jclassApplicationClass) {
|
||||||
api = env->GetStaticIntField(jclassApplicationClass, env->GetStaticFieldID(jclassApplicationClass,"SDK_INT", "I"));
|
api = env->GetStaticIntField(jclassApplicationClass, env->GetStaticFieldID(jclassApplicationClass,"SDK_INT", "I"));
|
||||||
|
|||||||
@@ -119,12 +119,10 @@ bool changeCompleteBlindsDialogImpl::eventFilter(QObject *obj, QEvent *event)
|
|||||||
}
|
}
|
||||||
event->ignore();
|
event->ignore();
|
||||||
return false;
|
return false;
|
||||||
}
|
} else if (event->type() == QEvent::KeyPress && keyEvent->key() == Qt::Key_Back) {
|
||||||
else if (event->type() == QEvent::KeyPress && keyEvent->key() == Qt::Key_Back) {
|
|
||||||
this->reject();
|
this->reject();
|
||||||
return true;
|
return true;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
// pass the event on to the parent class
|
// pass the event on to the parent class
|
||||||
return QDialog::eventFilter(obj, event);
|
return QDialog::eventFilter(obj, event);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -123,12 +123,10 @@ bool changeContentDialogImpl::eventFilter(QObject *obj, QEvent *event)
|
|||||||
}
|
}
|
||||||
event->ignore();
|
event->ignore();
|
||||||
return false;
|
return false;
|
||||||
}
|
} else if (event->type() == QEvent::KeyPress && keyEvent->key() == Qt::Key_Back) {
|
||||||
else if (event->type() == QEvent::KeyPress && keyEvent->key() == Qt::Key_Back) {
|
|
||||||
this->reject();
|
this->reject();
|
||||||
return true;
|
return true;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
// pass the event on to the parent class
|
// pass the event on to the parent class
|
||||||
return QDialog::eventFilter(obj, event);
|
return QDialog::eventFilter(obj, event);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -315,7 +315,8 @@ unsigned ChatTools::parsePrivateMessageTarget(QString &chatText)
|
|||||||
return playerId;
|
return playerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString ChatTools::checkForEmotes(QString msg) {
|
QString ChatTools::checkForEmotes(QString msg)
|
||||||
|
{
|
||||||
|
|
||||||
msg.replace("0:-)", "<img src=\":emotes/emotes/face-angel.png\" />");
|
msg.replace("0:-)", "<img src=\":emotes/emotes/face-angel.png\" />");
|
||||||
msg.replace("X-(", "<img src=\":emotes/emotes/face-angry.png\" />");
|
msg.replace("X-(", "<img src=\":emotes/emotes/face-angry.png\" />");
|
||||||
|
|||||||
@@ -260,12 +260,10 @@ bool createInternetGameDialogImpl::eventFilter(QObject *obj, QEvent *event)
|
|||||||
}
|
}
|
||||||
event->ignore();
|
event->ignore();
|
||||||
return false;
|
return false;
|
||||||
}
|
} else if (event->type() == QEvent::KeyPress && keyEvent->key() == Qt::Key_Back) {
|
||||||
else if (event->type() == QEvent::KeyPress && keyEvent->key() == Qt::Key_Back) {
|
|
||||||
this->reject();
|
this->reject();
|
||||||
return true;
|
return true;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
// pass the event on to the parent class
|
// pass the event on to the parent class
|
||||||
return QDialog::eventFilter(obj, event);
|
return QDialog::eventFilter(obj, event);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -151,12 +151,10 @@ bool createNetworkGameDialogImpl::eventFilter(QObject *obj, QEvent *event)
|
|||||||
}
|
}
|
||||||
event->ignore();
|
event->ignore();
|
||||||
return false;
|
return false;
|
||||||
}
|
} else if (event->type() == QEvent::KeyPress && keyEvent->key() == Qt::Key_Back) {
|
||||||
else if (event->type() == QEvent::KeyPress && keyEvent->key() == Qt::Key_Back) {
|
|
||||||
this->reject();
|
this->reject();
|
||||||
return true;
|
return true;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
// pass the event on to the parent class
|
// pass the event on to the parent class
|
||||||
return QDialog::eventFilter(obj, event);
|
return QDialog::eventFilter(obj, event);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1878,7 +1878,7 @@ void gameTableImpl::meInAction()
|
|||||||
myActionIsRaise = 0;
|
myActionIsRaise = 0;
|
||||||
myActionIsBet = 0;
|
myActionIsBet = 0;
|
||||||
|
|
||||||
/* if(myConfig->readConfigInt("ShowStatusbarMessages")) {
|
/* if(myConfig->readConfigInt("ShowStatusbarMessages")) {
|
||||||
if ( myConfig->readConfigInt("AlternateFKeysUserActionMode") == 0 ) {
|
if ( myConfig->readConfigInt("AlternateFKeysUserActionMode") == 0 ) {
|
||||||
// // statusBar()->showMessage(tr("F1 - Fold | F2 - Check/Call | F3 - Bet/Raise | F4 - All-In"), 15000);
|
// // statusBar()->showMessage(tr("F1 - Fold | F2 - Check/Call | F3 - Bet/Raise | F4 - All-In"), 15000);
|
||||||
} else {
|
} else {
|
||||||
@@ -3744,14 +3744,12 @@ void gameTableImpl::changeSpinBoxBetValue(int value)
|
|||||||
if(betSliderChangedByInput) {
|
if(betSliderChangedByInput) {
|
||||||
//prevent interval cutting of spinBox_betValue input from code below
|
//prevent interval cutting of spinBox_betValue input from code below
|
||||||
betSliderChangedByInput = FALSE;
|
betSliderChangedByInput = FALSE;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
|
|
||||||
if(horizontalSlider_bet->value() == horizontalSlider_bet->maximum()) {
|
if(horizontalSlider_bet->value() == horizontalSlider_bet->maximum()) {
|
||||||
|
|
||||||
spinBox_betValue->setValue(horizontalSlider_bet->value());
|
spinBox_betValue->setValue(horizontalSlider_bet->value());
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
|
|
||||||
int temp;
|
int temp;
|
||||||
if(horizontalSlider_bet->maximum() <= 1000 ) {
|
if(horizontalSlider_bet->maximum() <= 1000 ) {
|
||||||
@@ -4264,9 +4262,9 @@ void gameTableImpl::restoreGameTableGeometry()
|
|||||||
this->showFullScreen();
|
this->showFullScreen();
|
||||||
#else
|
#else
|
||||||
if(myConfig->readConfigInt("GameTableFullScreenSave")) {
|
if(myConfig->readConfigInt("GameTableFullScreenSave")) {
|
||||||
#ifndef GUI_800x480
|
#ifndef GUI_800x480
|
||||||
if(actionFullScreen->isEnabled()) this->showFullScreen();
|
if(actionFullScreen->isEnabled()) this->showFullScreen();
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
//resize only if style size allow this and if NOT fixed windows size
|
//resize only if style size allow this and if NOT fixed windows size
|
||||||
if(!myGameTableStyle->getIfFixedWindowSize().toInt() && myConfig->readConfigInt("GameTableHeightSave") <= myGameTableStyle->getMaximumWindowHeight().toInt() && myConfig->readConfigInt("GameTableHeightSave") >= myGameTableStyle->getMinimumWindowHeight().toInt() && myConfig->readConfigInt("GameTableWidthSave") <= myGameTableStyle->getMaximumWindowWidth().toInt() && myConfig->readConfigInt("GameTableWidthSave") >= myGameTableStyle->getMinimumWindowWidth().toInt()) {
|
if(!myGameTableStyle->getIfFixedWindowSize().toInt() && myConfig->readConfigInt("GameTableHeightSave") <= myGameTableStyle->getMaximumWindowHeight().toInt() && myConfig->readConfigInt("GameTableHeightSave") >= myGameTableStyle->getMinimumWindowHeight().toInt() && myConfig->readConfigInt("GameTableWidthSave") <= myGameTableStyle->getMaximumWindowWidth().toInt() && myConfig->readConfigInt("GameTableWidthSave") >= myGameTableStyle->getMinimumWindowWidth().toInt()) {
|
||||||
@@ -4390,7 +4388,8 @@ void gameTableImpl::tabsButtonClose()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
void gameTableImpl::checkActionLabelPosition() {
|
void gameTableImpl::checkActionLabelPosition()
|
||||||
|
{
|
||||||
#ifndef GUI_800x480
|
#ifndef GUI_800x480
|
||||||
int i;
|
int i;
|
||||||
if(myCardDeckStyle->getBigIndexesActionBottom() == "1") {
|
if(myCardDeckStyle->getBigIndexesActionBottom() == "1") {
|
||||||
@@ -4399,22 +4398,19 @@ void gameTableImpl::checkActionLabelPosition() {
|
|||||||
if(actionLabelArray[i]->y() == 56) {
|
if(actionLabelArray[i]->y() == 56) {
|
||||||
actionLabelArray[i]->move(actionLabelArray[i]->x(), 80);
|
actionLabelArray[i]->move(actionLabelArray[i]->x(), 80);
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
if(actionLabelArray[i]->y() == 43) {
|
if(actionLabelArray[i]->y() == 43) {
|
||||||
actionLabelArray[i]->move(actionLabelArray[i]->x(), 67);
|
actionLabelArray[i]->move(actionLabelArray[i]->x(), 67);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
for (i=0; i<MAX_NUMBER_OF_PLAYERS; i++) {
|
for (i=0; i<MAX_NUMBER_OF_PLAYERS; i++) {
|
||||||
if(i>=3 && i<=7) {
|
if(i>=3 && i<=7) {
|
||||||
if(actionLabelArray[i]->y() == 80) {
|
if(actionLabelArray[i]->y() == 80) {
|
||||||
actionLabelArray[i]->move(actionLabelArray[i]->x(), 56);
|
actionLabelArray[i]->move(actionLabelArray[i]->x(), 56);
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
if(actionLabelArray[i]->y() == 67) {
|
if(actionLabelArray[i]->y() == 67) {
|
||||||
actionLabelArray[i]->move(actionLabelArray[i]->x(), 43);
|
actionLabelArray[i]->move(actionLabelArray[i]->x(), 43);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,7 +41,9 @@ public slots:
|
|||||||
void regUserToggled(bool);
|
void regUserToggled(bool);
|
||||||
void guestUserToggled(bool);
|
void guestUserToggled(bool);
|
||||||
void okButtonCheck();
|
void okButtonCheck();
|
||||||
void clickLoginButton() { pushButton_login->click(); }
|
void clickLoginButton() {
|
||||||
|
pushButton_login->click();
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|||||||
@@ -30,8 +30,8 @@
|
|||||||
#include <net/uploaderthread.h>
|
#include <net/uploaderthread.h>
|
||||||
|
|
||||||
LogFileDialog::LogFileDialog(QWidget *parent, ConfigFile *c) :
|
LogFileDialog::LogFileDialog(QWidget *parent, ConfigFile *c) :
|
||||||
QDialog(parent), myConfig(c),
|
QDialog(parent), myConfig(c),
|
||||||
ui(new Ui::LogFileDialog)
|
ui(new Ui::LogFileDialog)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
|||||||
@@ -26,8 +26,9 @@
|
|||||||
|
|
||||||
class UploaderThread;
|
class UploaderThread;
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui
|
||||||
class LogFileDialog;
|
{
|
||||||
|
class LogFileDialog;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum ShowLogMode { INIT_VIEW, SELECTED_GAME };
|
enum ShowLogMode { INIT_VIEW, SELECTED_GAME };
|
||||||
@@ -44,7 +45,9 @@ public:
|
|||||||
explicit LogFileDialog(QWidget *parent = 0, ConfigFile *c = 0);
|
explicit LogFileDialog(QWidget *parent = 0, ConfigFile *c = 0);
|
||||||
~LogFileDialog();
|
~LogFileDialog();
|
||||||
|
|
||||||
void setGuiLog(guiLog *g) { myGuiLog = g; }
|
void setGuiLog(guiLog *g) {
|
||||||
|
myGuiLog = g;
|
||||||
|
}
|
||||||
void exec();
|
void exec();
|
||||||
|
|
||||||
virtual void UploadCompleted(const std::string &filename, const std::string &returnMessage);
|
virtual void UploadCompleted(const std::string &filename, const std::string &returnMessage);
|
||||||
@@ -60,8 +63,12 @@ public slots:
|
|||||||
void exportLogToHtml();
|
void exportLogToHtml();
|
||||||
void exportLogToTxt();
|
void exportLogToTxt();
|
||||||
void saveLogFileAs();
|
void saveLogFileAs();
|
||||||
void showLogFilePreviewInit() {showLogFilePreview(INIT_VIEW); }
|
void showLogFilePreviewInit() {
|
||||||
void showLogFilePreviewSelected() {showLogFilePreview(SELECTED_GAME); }
|
showLogFilePreview(INIT_VIEW);
|
||||||
|
}
|
||||||
|
void showLogFilePreviewSelected() {
|
||||||
|
showLogFilePreview(SELECTED_GAME);
|
||||||
|
}
|
||||||
void showLogFilePreview(ShowLogMode);
|
void showLogFilePreview(ShowLogMode);
|
||||||
void keyPressEvent ( QKeyEvent * event );
|
void keyPressEvent ( QKeyEvent * event );
|
||||||
void uploadFile();
|
void uploadFile();
|
||||||
|
|||||||
@@ -100,12 +100,10 @@ bool newGameDialogImpl::eventFilter(QObject *obj, QEvent *event)
|
|||||||
}
|
}
|
||||||
event->ignore();
|
event->ignore();
|
||||||
return false;
|
return false;
|
||||||
}
|
} else if (event->type() == QEvent::KeyPress && keyEvent->key() == Qt::Key_Back) {
|
||||||
else if (event->type() == QEvent::KeyPress && keyEvent->key() == Qt::Key_Back) {
|
|
||||||
this->reject();
|
this->reject();
|
||||||
return true;
|
return true;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
// pass the event on to the parent class
|
// pass the event on to the parent class
|
||||||
return QDialog::eventFilter(obj, event);
|
return QDialog::eventFilter(obj, event);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,12 +15,12 @@ signals:
|
|||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
||||||
void registerSound(const QString&, const QString&){}
|
void registerSound(const QString&, const QString&) {}
|
||||||
void reallyPlaySound(const QString&){}
|
void reallyPlaySound(const QString&) {}
|
||||||
void playSound(const std::string&, int){}
|
void playSound(const std::string&, int) {}
|
||||||
void initAudio(){}
|
void initAudio() {}
|
||||||
void closeAudio(){}
|
void closeAudio() {}
|
||||||
void reInit(){}
|
void reInit() {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ConfigFile *myConfig;
|
ConfigFile *myConfig;
|
||||||
|
|||||||
@@ -166,7 +166,8 @@ void AndroidAudio::startSoundPlayer()
|
|||||||
// qDebug() << "Created Buffer Player";
|
// qDebug() << "Created Buffer Player";
|
||||||
}
|
}
|
||||||
|
|
||||||
void AndroidAudio::playSound(const std::string& name, int i) {
|
void AndroidAudio::playSound(const std::string& name, int i)
|
||||||
|
{
|
||||||
|
|
||||||
if(audioEnabled && myConfig->readConfigInt("PlaySoundEffects")) {
|
if(audioEnabled && myConfig->readConfigInt("PlaySoundEffects")) {
|
||||||
|
|
||||||
|
|||||||
@@ -52,8 +52,7 @@ void SDLPlayer::initAudio()
|
|||||||
if( Mix_OpenAudio(audio_rate, audio_format, audio_channels, audio_buffers) == 0) {
|
if( Mix_OpenAudio(audio_rate, audio_format, audio_channels, audio_buffers) == 0) {
|
||||||
Mix_QuerySpec(&audio_rate, &audio_format, &audio_channels);
|
Mix_QuerySpec(&audio_rate, &audio_format, &audio_channels);
|
||||||
audioEnabled = 1;
|
audioEnabled = 1;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
qDebug() << "Mix_OpenAudio() was not successfull, no sound possible :(";
|
qDebug() << "Mix_OpenAudio() was not successfull, no sound possible :(";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -134,7 +133,8 @@ void SDLPlayer::playSound(string audioString, int playerID)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SDLPlayer::closeAudio()
|
void SDLPlayer::closeAudio()
|
||||||
{ if(audioEnabled) {
|
{
|
||||||
|
if(audioEnabled) {
|
||||||
Mix_HaltChannel(currentChannel);
|
Mix_HaltChannel(currentChannel);
|
||||||
Mix_FreeChunk(sound);
|
Mix_FreeChunk(sound);
|
||||||
sound = NULL;
|
sound = NULL;
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
#include <SDL/SDL_mixer.h>
|
#include <SDL/SDL_mixer.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct Mix_Chunk;
|
struct Mix_Chunk;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@author FThauer FHammer <webmaster@pokerth.net>
|
@author FThauer FHammer <webmaster@pokerth.net>
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
#include "soundevents.h"
|
#include "soundevents.h"
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
#ifdef ANDROID_API8
|
#ifdef ANDROID_API8
|
||||||
#include "androidapi8dummy.h"
|
#include "androidapi8dummy.h"
|
||||||
#else
|
|
||||||
#include "androidaudio.h"
|
|
||||||
#endif
|
|
||||||
#else
|
#else
|
||||||
#include "sdlplayer.h"
|
#include "androidaudio.h"
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#include "sdlplayer.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -22,11 +22,11 @@ SoundEvents::SoundEvents(ConfigFile *c): myConfig(c), lastSBValue(0), lastSBLeve
|
|||||||
{
|
{
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
#ifdef ANDROID_API8
|
#ifdef ANDROID_API8
|
||||||
myPlayer = new AndroidApi8Dummy(myConfig);
|
myPlayer = new AndroidApi8Dummy(myConfig);
|
||||||
#else
|
#else
|
||||||
myPlayer = new AndroidAudio(myConfig);
|
myPlayer = new AndroidAudio(myConfig);
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
myPlayer = new SDLPlayer(myConfig);
|
myPlayer = new SDLPlayer(myConfig);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -4,13 +4,13 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
#ifdef ANDROID_API8
|
#ifdef ANDROID_API8
|
||||||
class AndroidApi8Dummy;
|
class AndroidApi8Dummy;
|
||||||
#else
|
|
||||||
class AndroidAudio;
|
|
||||||
#endif
|
|
||||||
#else
|
#else
|
||||||
class SDLPlayer;
|
class AndroidAudio;
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
class SDLPlayer;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -34,11 +34,11 @@ protected:
|
|||||||
private:
|
private:
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
#ifdef ANDROID_API8
|
#ifdef ANDROID_API8
|
||||||
AndroidApi8Dummy *myPlayer;
|
AndroidApi8Dummy *myPlayer;
|
||||||
#else
|
#else
|
||||||
AndroidAudio *myPlayer;
|
AndroidAudio *myPlayer;
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
SDLPlayer *myPlayer;
|
SDLPlayer *myPlayer;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ startWindowImpl::startWindowImpl(ConfigFile *c, Log *l)
|
|||||||
this->setStatusBar(0);
|
this->setStatusBar(0);
|
||||||
|
|
||||||
#ifdef GUI_800x480
|
#ifdef GUI_800x480
|
||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
this->menubar->hide();
|
this->menubar->hide();
|
||||||
|
|
||||||
//check if custom background picture for the resolution is there. Otherwise create it!
|
//check if custom background picture for the resolution is there. Otherwise create it!
|
||||||
@@ -88,24 +88,22 @@ startWindowImpl::startWindowImpl(ConfigFile *c, Log *l)
|
|||||||
QFile customStartWindowBgFile(customStartWindowBgFileString);
|
QFile customStartWindowBgFile(customStartWindowBgFileString);
|
||||||
if(customStartWindowBgFile.exists()) {
|
if(customStartWindowBgFile.exists()) {
|
||||||
centralwidget->setStyleSheet(".QWidget { background-image: url("+QFileInfo(customStartWindowBgFile).absoluteFilePath()+"); background-position: bottom center; background-origin: content; background-repeat: no-repeat;}");
|
centralwidget->setStyleSheet(".QWidget { background-image: url("+QFileInfo(customStartWindowBgFile).absoluteFilePath()+"); background-position: bottom center; background-origin: content; background-repeat: no-repeat;}");
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
QPixmap pix(":/android/android-data/gfx/gui/misc/startwindowbg_800x480.png");
|
QPixmap pix(":/android/android-data/gfx/gui/misc/startwindowbg_800x480.png");
|
||||||
pix = pix.scaled(screenWidth, screenHeight, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
|
pix = pix.scaled(screenWidth, screenHeight, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
|
||||||
if(pix.save(customStartWindowBgFileString)) {
|
if(pix.save(customStartWindowBgFileString)) {
|
||||||
centralwidget->setStyleSheet(".QWidget { background-image: url("+QFileInfo(customStartWindowBgFile).absoluteFilePath()+"); background-position: bottom center; background-origin: content; background-repeat: no-repeat;}");
|
centralwidget->setStyleSheet(".QWidget { background-image: url("+QFileInfo(customStartWindowBgFile).absoluteFilePath()+"); background-position: bottom center; background-origin: content; background-repeat: no-repeat;}");
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
centralwidget->setStyleSheet(".QWidget { background-image: url(:/android/android-data/gfx/gui/misc/startwindowbg_800x480.png); background-position: bottom center; background-origin: content; background-repeat: no-repeat;}");
|
centralwidget->setStyleSheet(".QWidget { background-image: url(:/android/android-data/gfx/gui/misc/startwindowbg_800x480.png); background-position: bottom center; background-origin: content; background-repeat: no-repeat;}");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
this->showFullScreen();
|
this->showFullScreen();
|
||||||
#else
|
#else
|
||||||
// this->menubar->setStyleSheet("QMenuBar { background-color: #4B4B4B; font-size:20px; border-width: 0px;} QMenuBar::item { color: #F0F0F0; }");
|
// this->menubar->setStyleSheet("QMenuBar { background-color: #4B4B4B; font-size:20px; border-width: 0px;} QMenuBar::item { color: #F0F0F0; }");
|
||||||
this->menubar->hide();
|
this->menubar->hide();
|
||||||
centralwidget->setStyleSheet(".QWidget { background-image: url(\""+myAppDataPath+"gfx/gui/misc/startwindowbg_800x480.png\"); background-position: bottom center; background-origin: content; background-repeat: no-repeat;}");
|
centralwidget->setStyleSheet(".QWidget { background-image: url(\""+myAppDataPath+"gfx/gui/misc/startwindowbg_800x480.png\"); background-position: bottom center; background-origin: content; background-repeat: no-repeat;}");
|
||||||
#endif
|
#endif
|
||||||
pushButtonStart_Local_Game->setStyleSheet("QPushButton { text-align:left; font-weight:bold; padding-left: 3px; padding-bottom: 3px; padding-top: 3px; padding-right: 3px; background-color: #4B4B4B; color: #F0F0F0; font-size:22px; border-width: 0px;}");
|
pushButtonStart_Local_Game->setStyleSheet("QPushButton { text-align:left; font-weight:bold; padding-left: 3px; padding-bottom: 3px; padding-top: 3px; padding-right: 3px; background-color: #4B4B4B; color: #F0F0F0; font-size:22px; border-width: 0px;}");
|
||||||
pushButtonInternet_Game->setStyleSheet("QPushButton { text-align:left; font-weight:bold; padding-left: 3px; padding-bottom: 3px; padding-top: 3px; padding-right: 3px; background-color: #4B4B4B; color: #F0F0F0; font-size:22px; border-width: 0px;}");
|
pushButtonInternet_Game->setStyleSheet("QPushButton { text-align:left; font-weight:bold; padding-left: 3px; padding-bottom: 3px; padding-top: 3px; padding-right: 3px; background-color: #4B4B4B; color: #F0F0F0; font-size:22px; border-width: 0px;}");
|
||||||
pushButton_Create_Network_Game->setStyleSheet("QPushButton { text-align:left; font-weight:bold; padding-left: 3px; padding-bottom: 3px; padding-top: 3px; padding-right: 3px; background-color: #4B4B4B; color: #F0F0F0; font-size:22px; border-width: 0px;}");
|
pushButton_Create_Network_Game->setStyleSheet("QPushButton { text-align:left; font-weight:bold; padding-left: 3px; padding-bottom: 3px; padding-top: 3px; padding-right: 3px; background-color: #4B4B4B; color: #F0F0F0; font-size:22px; border-width: 0px;}");
|
||||||
|
|||||||
@@ -138,8 +138,7 @@ void CardDeckStyleReader::readStyleFile(QString file)
|
|||||||
// set loadedSuccessfull TRUE if everything works
|
// set loadedSuccessfull TRUE if everything works
|
||||||
if(leftItems.isEmpty() && cardsLeft.isEmpty() && PokerTHStyleFileVersion != "" && PokerTHStyleFileVersion.toInt() == POKERTH_CD_STYLE_FILE_VERSION) {
|
if(leftItems.isEmpty() && cardsLeft.isEmpty() && PokerTHStyleFileVersion != "" && PokerTHStyleFileVersion.toInt() == POKERTH_CD_STYLE_FILE_VERSION) {
|
||||||
myState = CD_STYLE_OK;
|
myState = CD_STYLE_OK;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
//check for style file version
|
//check for style file version
|
||||||
if(PokerTHStyleFileVersion != "" && PokerTHStyleFileVersion.toInt() != POKERTH_CD_STYLE_FILE_VERSION) {
|
if(PokerTHStyleFileVersion != "" && PokerTHStyleFileVersion.toInt() != POKERTH_CD_STYLE_FILE_VERSION) {
|
||||||
myState = CD_STYLE_OUTDATED;
|
myState = CD_STYLE_OUTDATED;
|
||||||
@@ -153,8 +152,7 @@ void CardDeckStyleReader::readStyleFile(QString file)
|
|||||||
}
|
}
|
||||||
loadedSuccessfull = 1;
|
loadedSuccessfull = 1;
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
loadedSuccessfull = 0;
|
loadedSuccessfull = 0;
|
||||||
MyMessageBox::warning(myW, tr("Card Deck Style Error"),
|
MyMessageBox::warning(myW, tr("Card Deck Style Error"),
|
||||||
tr("Cannot load card deck style file: %1 \n\nPlease check the style file or choose another style!").arg(currentFileName),
|
tr("Cannot load card deck style file: %1 \n\nPlease check the style file or choose another style!").arg(currentFileName),
|
||||||
|
|||||||
@@ -1253,8 +1253,7 @@ void GameTableStyleReader::readStyleFile(QString file)
|
|||||||
}
|
}
|
||||||
loadedSuccessfull = 1;
|
loadedSuccessfull = 1;
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
loadedSuccessfull = 0;
|
loadedSuccessfull = 0;
|
||||||
MyMessageBox::warning(myW, tr("Game Table Style Error"),
|
MyMessageBox::warning(myW, tr("Game Table Style Error"),
|
||||||
tr("Cannot load game table style file: %1 \n\nPlease check the style file or choose another style!").arg(currentFileName),
|
tr("Cannot load game table style file: %1 \n\nPlease check the style file or choose another style!").arg(currentFileName),
|
||||||
|
|||||||
@@ -1393,8 +1393,7 @@ void
|
|||||||
ClientStateWaitStart::InternalHandlePacket(boost::shared_ptr<ClientThread> client, boost::shared_ptr<NetPacket> tmpPacket)
|
ClientStateWaitStart::InternalHandlePacket(boost::shared_ptr<ClientThread> client, boost::shared_ptr<NetPacket> tmpPacket)
|
||||||
{
|
{
|
||||||
if (tmpPacket->GetMsg()->messagetype() == PokerTHMessage::Type_GameStartInitialMessage
|
if (tmpPacket->GetMsg()->messagetype() == PokerTHMessage::Type_GameStartInitialMessage
|
||||||
|| tmpPacket->GetMsg()->messagetype() == PokerTHMessage::Type_GameStartRejoinMessage)
|
|| tmpPacket->GetMsg()->messagetype() == PokerTHMessage::Type_GameStartRejoinMessage) {
|
||||||
{
|
|
||||||
PlayerIdList tmpPlayerList;
|
PlayerIdList tmpPlayerList;
|
||||||
unsigned tmpHandId = 0;
|
unsigned tmpHandId = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -85,8 +85,7 @@ ReceiveBuffer::ScanPackets()
|
|||||||
uint32_t nativeVal;
|
uint32_t nativeVal;
|
||||||
memcpy(&nativeVal, &recvBuf[0], sizeof(uint32_t));
|
memcpy(&nativeVal, &recvBuf[0], sizeof(uint32_t));
|
||||||
size_t packetSize = ntohl(nativeVal);
|
size_t packetSize = ntohl(nativeVal);
|
||||||
if (recvBufUsed >= packetSize + NET_HEADER_SIZE)
|
if (recvBufUsed >= packetSize + NET_HEADER_SIZE) {
|
||||||
{
|
|
||||||
try {
|
try {
|
||||||
tmpPacket = NetPacket::Create(&recvBuf[NET_HEADER_SIZE], packetSize);
|
tmpPacket = NetPacket::Create(&recvBuf[NET_HEADER_SIZE], packetSize);
|
||||||
if (tmpPacket) {
|
if (tmpPacket) {
|
||||||
|
|||||||
Reference in New Issue
Block a user