This commit is contained in:
@@ -62,7 +62,7 @@
|
|||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
mainWindowImpl::mainWindowImpl(ConfigFile *c, QMainWindow *parent)
|
mainWindowImpl::mainWindowImpl(ConfigFile *c, QMainWindow *parent)
|
||||||
: QMainWindow(parent), myChat(NULL), myConfig(c), gameSpeed(0), myActionIsBet(0), myActionIsRaise(0), pushButtonBetRaiseIsChecked(FALSE), pushButtonCallCheckIsChecked(FALSE), pushButtonFoldIsChecked(FALSE), pushButtonAllInIsChecked(FALSE), myButtonsAreCheckable(FALSE), breakAfterCurrentHand(FALSE), currentGameOver(FALSE), myLastPreActionBetValue(0)
|
: QMainWindow(parent), myChat(NULL), myConfig(c), gameSpeed(0), myActionIsBet(0), myActionIsRaise(0), pushButtonBetRaiseIsChecked(FALSE), pushButtonCallCheckIsChecked(FALSE), pushButtonFoldIsChecked(FALSE), pushButtonAllInIsChecked(FALSE), myButtonsAreCheckable(FALSE), breakAfterCurrentHand(FALSE), currentGameOver(FALSE), betSliderChangedByInput(FALSE), myLastPreActionBetValue(0)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@@ -3719,21 +3719,26 @@ void mainWindowImpl::quitPokerTH() {
|
|||||||
void mainWindowImpl::changeLineEditBetValue(int value) {
|
void mainWindowImpl::changeLineEditBetValue(int value) {
|
||||||
|
|
||||||
int temp;
|
int temp;
|
||||||
|
if(betSliderChangedByInput) {
|
||||||
if(horizontalSlider_bet->maximum() <= 1000 ) {
|
//prevent interval cutting of lineEdit_betValue input from code below
|
||||||
temp = (int)((value/10)*10);
|
betSliderChangedByInput = FALSE;
|
||||||
if(temp < horizontalSlider_bet->minimum())
|
}
|
||||||
lineEdit_betValue->setText(QString::number(horizontalSlider_bet->minimum()));
|
else {
|
||||||
else
|
if(horizontalSlider_bet->maximum() <= 1000 ) {
|
||||||
lineEdit_betValue->setText(QString::number(temp));
|
temp = (int)((value/10)*10);
|
||||||
}
|
if(temp < horizontalSlider_bet->minimum())
|
||||||
else {
|
lineEdit_betValue->setText(QString::number(horizontalSlider_bet->minimum()));
|
||||||
temp = (int)((value/50)*50);
|
else
|
||||||
if(temp < horizontalSlider_bet->minimum())
|
lineEdit_betValue->setText(QString::number(temp));
|
||||||
lineEdit_betValue->setText(QString::number(horizontalSlider_bet->minimum()));
|
}
|
||||||
else
|
else {
|
||||||
lineEdit_betValue->setText(QString::number(temp));
|
temp = (int)((value/50)*50);
|
||||||
}
|
if(temp < horizontalSlider_bet->minimum())
|
||||||
|
lineEdit_betValue->setText(QString::number(horizontalSlider_bet->minimum()));
|
||||||
|
else
|
||||||
|
lineEdit_betValue->setText(QString::number(temp));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3747,13 +3752,19 @@ void mainWindowImpl::lineEditBetValueChanged(QString valueString) {
|
|||||||
|
|
||||||
if(betValue > horizontalSlider_bet->maximum()) { // print the maximum
|
if(betValue > horizontalSlider_bet->maximum()) { // print the maximum
|
||||||
pushButton_BetRaise->setText(betRaise + " " + QString::number(horizontalSlider_bet->maximum()) + "$");
|
pushButton_BetRaise->setText(betRaise + " " + QString::number(horizontalSlider_bet->maximum()) + "$");
|
||||||
|
betSliderChangedByInput = TRUE;
|
||||||
|
horizontalSlider_bet->setValue(horizontalSlider_bet->maximum());
|
||||||
}
|
}
|
||||||
else { // really print the value
|
else { // really print the value
|
||||||
pushButton_BetRaise->setText(betRaise + " " + valueString + "$");
|
pushButton_BetRaise->setText(betRaise + " " + valueString + "$");
|
||||||
|
betSliderChangedByInput = TRUE;
|
||||||
|
horizontalSlider_bet->setValue(betValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else { // print the minimum
|
else { // print the minimum
|
||||||
pushButton_BetRaise->setText(betRaise + " " + QString::number(horizontalSlider_bet->minimum()) + "$");
|
pushButton_BetRaise->setText(betRaise + " " + QString::number(horizontalSlider_bet->minimum()) + "$");
|
||||||
|
betSliderChangedByInput = TRUE;
|
||||||
|
horizontalSlider_bet->setValue(horizontalSlider_bet->minimum());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -439,17 +439,15 @@ private:
|
|||||||
|
|
||||||
bool myActionIsBet;
|
bool myActionIsBet;
|
||||||
bool myActionIsRaise;
|
bool myActionIsRaise;
|
||||||
|
|
||||||
bool pushButtonBetRaiseIsChecked;
|
bool pushButtonBetRaiseIsChecked;
|
||||||
bool pushButtonCallCheckIsChecked;
|
bool pushButtonCallCheckIsChecked;
|
||||||
bool pushButtonFoldIsChecked;
|
bool pushButtonFoldIsChecked;
|
||||||
bool pushButtonAllInIsChecked;
|
bool pushButtonAllInIsChecked;
|
||||||
bool myButtonsAreCheckable;
|
bool myButtonsAreCheckable;
|
||||||
|
|
||||||
bool breakAfterCurrentHand;
|
bool breakAfterCurrentHand;
|
||||||
bool currentGameOver;
|
bool currentGameOver;
|
||||||
|
|
||||||
bool flipHolecardsAllInAlreadyDone;
|
bool flipHolecardsAllInAlreadyDone;
|
||||||
|
bool betSliderChangedByInput;
|
||||||
|
|
||||||
QColor active;
|
QColor active;
|
||||||
QColor inactive;
|
QColor inactive;
|
||||||
|
|||||||
Reference in New Issue
Block a user