This commit is contained in:
@@ -0,0 +1,6 @@
|
|||||||
|
// Copyright information for files in data/* shipped with PokerTH //
|
||||||
|
|
||||||
|
fonts:
|
||||||
|
- c059013l.pfb, n019003l.pfb --> http://sourceforge.net/project/showfiles.php?group_id=3498
|
||||||
|
- VeraBd.ttf --> http://ftp.gnome.org/pub/GNOME/sources/ttf-bitstream-vera/1.10/
|
||||||
|
|
||||||
@@ -2106,13 +2106,10 @@ int mainWindowImpl::getMyCallAmount() {
|
|||||||
int mainWindowImpl::getBetRaisePushButtonValue() {
|
int mainWindowImpl::getBetRaisePushButtonValue() {
|
||||||
|
|
||||||
QString betValueString = pushButton_BetRaise->text().section(" ",1 ,1);
|
QString betValueString = pushButton_BetRaise->text().section(" ",1 ,1);
|
||||||
cout << "test1 " << betValueString.toStdString() << endl;
|
|
||||||
int index = betValueString.indexOf("$");
|
int index = betValueString.indexOf("$");
|
||||||
betValueString.remove(index,index);
|
betValueString.remove(index,index);
|
||||||
cout << "test2 " << betValueString.toStdString() << endl;
|
|
||||||
bool ok;
|
bool ok;
|
||||||
int betValue = betValueString.toInt(&ok,10);
|
int betValue = betValueString.toInt(&ok,10);
|
||||||
cout << "test3 " << betValue << endl;
|
|
||||||
return betValue;
|
return betValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3748,19 +3745,42 @@ void mainWindowImpl::quitPokerTH() {
|
|||||||
|
|
||||||
void mainWindowImpl::changeLineEditBetValue(int value) {
|
void mainWindowImpl::changeLineEditBetValue(int value) {
|
||||||
|
|
||||||
if(horizontalSlider_bet->maximum() <= 1000 )
|
int temp;
|
||||||
lineEdit_betValue->setText(QString::number((int)((value/10)*10)));
|
|
||||||
else
|
if(horizontalSlider_bet->maximum() <= 1000 ) {
|
||||||
lineEdit_betValue->setText(QString::number((int)((value/50)*50)));
|
temp = (int)((value/10)*10);
|
||||||
|
if(temp < horizontalSlider_bet->minimum())
|
||||||
|
lineEdit_betValue->setText(QString::number(horizontalSlider_bet->minimum()));
|
||||||
|
else
|
||||||
|
lineEdit_betValue->setText(QString::number(temp));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
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));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void mainWindowImpl::lineEditBetValueChanged(QString valueString) {
|
void mainWindowImpl::lineEditBetValueChanged(QString valueString) {
|
||||||
|
|
||||||
bool ok;
|
bool ok;
|
||||||
int betValue = QString(valueString).toInt(&ok, 10);
|
int betValue = QString(valueString).toInt(&ok, 10);
|
||||||
if(betValue > horizontalSlider_bet->minimum()) {
|
QString betRaise = pushButton_BetRaise->text().section(" ",0 ,0);
|
||||||
QString betRaise = pushButton_BetRaise->text().section(" ",0 ,0);
|
|
||||||
pushButton_BetRaise->setText(betRaise + " " + valueString + "$");
|
if(betValue >= horizontalSlider_bet->minimum()) {
|
||||||
|
|
||||||
|
if(betValue > horizontalSlider_bet->maximum()) { // print the maximum
|
||||||
|
pushButton_BetRaise->setText(betRaise + " " + QString::number(horizontalSlider_bet->maximum()) + "$");
|
||||||
|
}
|
||||||
|
else { // really print the value
|
||||||
|
pushButton_BetRaise->setText(betRaise + " " + valueString + "$");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else { // print the minimum
|
||||||
|
pushButton_BetRaise->setText(betRaise + " " + QString::number(horizontalSlider_bet->minimum()) + "$");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user