small gui fixes

This commit is contained in:
doitux
2007-12-13 00:38:24 +00:00
parent 04fb4cf948
commit ea890d87e4
2 changed files with 27 additions and 21 deletions
+24 -19
View File
@@ -2025,14 +2025,16 @@ void mainWindowImpl::disableMyButtons() {
HandInterface *currentHand = mySession->getCurrentGame()->getCurrentHand(); HandInterface *currentHand = mySession->getCurrentGame()->getCurrentHand();
clearMyButtons();
//clear userWidgets //clear userWidgets
pushButton_AllIn->setDisabled(TRUE);
horizontalSlider_bet->setDisabled(TRUE);
lineEdit_betValue->setDisabled(TRUE);
horizontalSlider_bet->setMinimum(0); horizontalSlider_bet->setMinimum(0);
horizontalSlider_bet->setMaximum(currentHand->getSeatsList()->front()->getMyCash()); horizontalSlider_bet->setMaximum(currentHand->getSeatsList()->front()->getMyCash());
lineEdit_betValue->clear(); lineEdit_betValue->clear();
horizontalSlider_bet->setValue(0); horizontalSlider_bet->setValue(0);
pushButton_AllIn->setDisabled(TRUE);
horizontalSlider_bet->setDisabled(TRUE);
lineEdit_betValue->setDisabled(TRUE);
#ifdef _WIN32 #ifdef _WIN32
QString humanPlayerButtonFontSize = "13"; QString humanPlayerButtonFontSize = "13";
@@ -3711,28 +3713,31 @@ void mainWindowImpl::changeLineEditBetValue(int value) {
void mainWindowImpl::lineEditBetValueChanged(QString valueString) { void mainWindowImpl::lineEditBetValueChanged(QString valueString) {
bool ok; if(horizontalSlider_bet->isEnabled()) {
int betValue = QString(valueString).toInt(&ok, 10);
QString betRaise = pushButton_BetRaise->text().section(" ",0 ,0);
if(betValue >= horizontalSlider_bet->minimum()) { bool ok;
int betValue = QString(valueString).toInt(&ok, 10);
QString betRaise = pushButton_BetRaise->text().section(" ",0 ,0);
if(betValue > horizontalSlider_bet->maximum()) { // print the maximum if(betValue >= horizontalSlider_bet->minimum()) {
pushButton_BetRaise->setText(betRaise + " $" + QString::number(horizontalSlider_bet->maximum()));
betSliderChangedByInput = TRUE; if(betValue > horizontalSlider_bet->maximum()) { // print the maximum
horizontalSlider_bet->setValue(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
pushButton_BetRaise->setText(betRaise + " $" + valueString);
betSliderChangedByInput = TRUE;
horizontalSlider_bet->setValue(betValue);
}
} }
else { // really print the value else { // print the minimum
pushButton_BetRaise->setText(betRaise + " $" + valueString); pushButton_BetRaise->setText(betRaise + " $" + QString::number(horizontalSlider_bet->minimum()));
betSliderChangedByInput = TRUE; betSliderChangedByInput = TRUE;
horizontalSlider_bet->setValue(betValue); horizontalSlider_bet->setValue(horizontalSlider_bet->minimum());
} }
} }
else { // print the minimum
pushButton_BetRaise->setText(betRaise + " $" + QString::number(horizontalSlider_bet->minimum()));
betSliderChangedByInput = TRUE;
horizontalSlider_bet->setValue(horizontalSlider_bet->minimum());
}
} }
void mainWindowImpl::leaveCurrentNetworkGame() { void mainWindowImpl::leaveCurrentNetworkGame() {
@@ -44,6 +44,7 @@ settingsDialogImpl::settingsDialogImpl(QWidget *parent, ConfigFile *c, selectAva
if (myConfig->readConfigInt("CLA_NoWriteAccess")) { groupBox_logOnOff->setDisabled(TRUE); } if (myConfig->readConfigInt("CLA_NoWriteAccess")) { groupBox_logOnOff->setDisabled(TRUE); }
comboBox_switchLanguage->addItem(tr("Bulgarian"),"bg");
comboBox_switchLanguage->addItem(tr("Dutch"),"nl"); comboBox_switchLanguage->addItem(tr("Dutch"),"nl");
comboBox_switchLanguage->addItem(tr("English"),"en"); comboBox_switchLanguage->addItem(tr("English"),"en");
comboBox_switchLanguage->addItem(tr("French"),"fr"); comboBox_switchLanguage->addItem(tr("French"),"fr");