This commit is contained in:
doitux
2007-02-17 23:27:33 +00:00
parent af6c4dc235
commit 6eb192f846
5 changed files with 36 additions and 7 deletions
@@ -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