This commit is contained in:
@@ -97,7 +97,7 @@ public:
|
||||
|
||||
//connectToServerDialog
|
||||
virtual void showActionConnectToServerDialog(int actionID) =0;
|
||||
virtual void showErrorConnectToServerDialog(int errorID) =0;
|
||||
virtual void showErrorConnectToServerDialog(int errorID, int osErrorID) =0;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ connectToServerDialogImpl::connectToServerDialogImpl(QWidget *parent)
|
||||
|
||||
void connectToServerDialogImpl::refresh(int actionID) {
|
||||
|
||||
int maxStateNumber = 10;
|
||||
int maxStateNumber = 4;
|
||||
|
||||
switch (actionID) {
|
||||
|
||||
@@ -50,16 +50,45 @@ void connectToServerDialogImpl::refresh(int actionID) {
|
||||
}
|
||||
|
||||
progressBar->setValue(actionID*(100/maxStateNumber));
|
||||
|
||||
if (actionID*(100/maxStateNumber == 100)) { QTimer::singleShot(500, this, SLOT(hide())); }
|
||||
}
|
||||
|
||||
void connectToServerDialogImpl::error(int errorID) {
|
||||
void connectToServerDialogImpl::error(int errorID, int osErrorID) {
|
||||
|
||||
if(errorID) {
|
||||
if(osErrorID) {
|
||||
QMessageBox::warning(this, tr("Connection Error"),
|
||||
tr("An Operating System Error occured during Connection"),
|
||||
QMessageBox::Close);
|
||||
}
|
||||
|
||||
switch (errorID) {
|
||||
|
||||
case 0: { QMessageBox::warning(this, tr("Connection Error"),
|
||||
tr("Error0 occured during Connection"),
|
||||
QMessageBox::Close); }
|
||||
break;
|
||||
case 1: {QMessageBox::warning(this, tr("Connection Error"),
|
||||
tr("Error1 occured during Connection"),
|
||||
QMessageBox::Close); }
|
||||
break;
|
||||
case 2: { QMessageBox::warning(this, tr("Connection Error"),
|
||||
tr("Error2 occured during Connection"),
|
||||
QMessageBox::Close); }
|
||||
break;
|
||||
case 3: { QMessageBox::warning(this, tr("Connection Error"),
|
||||
tr("Error3 occured during Connection"),
|
||||
QMessageBox::Close); }
|
||||
break;
|
||||
case 4: { QMessageBox::warning(this, tr("Connection Error"),
|
||||
tr("Error4 occured during Connection"),
|
||||
QMessageBox::Close); }
|
||||
break;
|
||||
default: { QMessageBox::warning(this, tr("Connection Error"),
|
||||
tr("DEFAULT ERROR"),
|
||||
QMessageBox::Close); }
|
||||
}
|
||||
|
||||
this->reject();
|
||||
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ public:
|
||||
public slots:
|
||||
|
||||
void refresh(int actionID);
|
||||
void error(int errorID);
|
||||
void error(int errorID, int osErrorID);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -91,4 +91,4 @@ void GuiWrapper::logPlayerActionMsg(string playerName, int action, int setValue)
|
||||
void GuiWrapper::logNewGameHandMsg(int gameID, int handID) { myLog->logNewGameHandMsg(gameID, handID); }
|
||||
|
||||
void GuiWrapper::showActionConnectToServerDialog(int actionID) { myConnectToServerDialog->refresh(actionID); }
|
||||
void GuiWrapper::showErrorConnectToServerDialog(int errorID) { myConnectToServerDialog->error(errorID); }
|
||||
void GuiWrapper::showErrorConnectToServerDialog(int errorID, int osErrorID) { myConnectToServerDialog->error(errorID, osErrorID); }
|
||||
|
||||
@@ -88,7 +88,7 @@ public:
|
||||
void logNewGameHandMsg(int gameID, int handID) ;
|
||||
|
||||
void showActionConnectToServerDialog(int actionID);
|
||||
void showErrorConnectToServerDialog(int errorID);
|
||||
void showErrorConnectToServerDialog(int errorID, int osErrorID);
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user