diff --git a/src/gui/qt/gui_800x480/logfiledialog_800x480.ui b/src/gui/qt/gui_800x480/logfiledialog_800x480.ui index 763bb27c..8faaaf24 100644 --- a/src/gui/qt/gui_800x480/logfiledialog_800x480.ui +++ b/src/gui/qt/gui_800x480/logfiledialog_800x480.ui @@ -20,7 +20,99 @@ Dialog - + + + + + + + + + + + 0 + 0 + + + + Game: + + + + + + + + 0 + 0 + + + + + + + + + + + 0 + 0 + + + + + 250 + 16777215 + + + + true + + + QAbstractItemView::ExtendedSelection + + + 5 + + + false + + + true + + + + Log File + + + + + + + + + + + + Preview: + + + + + + + + 0 + 0 + + + + + + + + + @@ -92,28 +184,48 @@ - - + + - + - Preview: + - + - + 0 0 + + Analyse Logfile ... + + + + :/gfx/view-statistics.png:/gfx/view-statistics.png + + + + 32 + 32 + + - + + + + Qt::Horizontal + + + + @@ -129,97 +241,6 @@ - - - - - - - - - 0 - 0 - - - - Game: - - - - - - - - 0 - 0 - - - - - - - - - - - 0 - 0 - - - - - 250 - 16777215 - - - - true - - - QAbstractItemView::ExtendedSelection - - - 5 - - - false - - - true - - - - Log File - - - - - - - - - - Qt::Horizontal - - - - - - - Analyse Logfile ... - - - - :/gfx/view-statistics.png:/gfx/view-statistics.png - - - - 32 - 32 - - - - diff --git a/src/gui/qt/logfiledialog.ui b/src/gui/qt/logfiledialog.ui index 31452b7a..cab073cd 100644 --- a/src/gui/qt/logfiledialog.ui +++ b/src/gui/qt/logfiledialog.ui @@ -14,7 +14,92 @@ Dialog - + + + + + + + + + + + 0 + 0 + + + + Game: + + + + + + + + + + + + + 0 + 0 + + + + + 200 + 16777215 + + + + true + + + QAbstractItemView::ExtendedSelection + + + 5 + + + false + + + true + + + + Log File + + + + + + + + + + + + Preview: + + + + + + + + 0 + 0 + + + + + + + + + @@ -62,119 +147,54 @@ - - + + - + - Preview: + - + - + 0 0 - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - - - - - 0 - 0 - - - - Game: - - - - - - - - 0 - 0 - - - - - - - - - - - 0 - 0 - + + Analyse Logfile ... - + + + :/gfx/view-statistics.png:/gfx/view-statistics.png + + - 200 - 16777215 + 32 + 32 - - true - - - QAbstractItemView::ExtendedSelection - - - 5 - - - false - - - true - - - - Log File - - - + Qt::Horizontal - - - - Analyse Logfile ... + + + + Qt::Horizontal - - - :/gfx/view-statistics.png:/gfx/view-statistics.png + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok diff --git a/src/gui/qt/logfiledialog/logfiledialog.cpp b/src/gui/qt/logfiledialog/logfiledialog.cpp index eb5658b0..9e0da6bb 100644 --- a/src/gui/qt/logfiledialog/logfiledialog.cpp +++ b/src/gui/qt/logfiledialog/logfiledialog.cpp @@ -36,6 +36,9 @@ ui(new Ui::LogFileDialog) { ui->setupUi(this); + ui->label_animation->setMaximumWidth(0); + ui->horizontalLayout_animation->setSpacing(0); + connect( ui->pushButton_deleteLog, SIGNAL(clicked()), this, SLOT (deleteLogFile())); connect( ui->pushButton_exportLogHtml, SIGNAL(clicked()), this, SLOT (exportLogToHtml())); connect( ui->pushButton_exportLogTxt, SIGNAL(clicked()), this, SLOT (exportLogToTxt())); @@ -191,9 +194,15 @@ void LogFileDialog::keyPressEvent ( QKeyEvent * event ) { if (event->key() == Qt::Key_Delete ) { /*Delete*/ if(ui->treeWidget_logFiles->hasFocus()) { - ui->pushButton_deleteLog->click(); + ui->pushButton_deleteLog->click(); } } + else if (event->key() == Qt::Key_N ){ + uploadInProgressAnimationStart(); + } + else if (event->key() == Qt::Key_M ){ + uploadInProgressAnimationStop(); + } } @@ -257,3 +266,24 @@ void LogFileDialog::uploadFile() } } + +void LogFileDialog::uploadInProgressAnimationStart() +{ + ui->pushButton_analyseLogfile->setDisabled(TRUE); + + QMovie *movie = new QMovie(":/gfx/loader.gif"); + ui->label_animation->setMovie(movie); + ui->label_animation->setMaximumWidth(32); + ui->horizontalLayout_animation->setSpacing(-1); + ui->label_animation->setGeometry(0,0,32,32); + movie->start(); +} + +void LogFileDialog::uploadInProgressAnimationStop() +{ + ui->pushButton_analyseLogfile->setDisabled(FALSE); + + ui->label_animation->setMaximumWidth(0); + ui->horizontalLayout_animation->setSpacing(0); + ui->label_animation->setGeometry(0,0,0,0); +} diff --git a/src/gui/qt/logfiledialog/logfiledialog.h b/src/gui/qt/logfiledialog/logfiledialog.h index 244f9d90..5ea7a030 100644 --- a/src/gui/qt/logfiledialog/logfiledialog.h +++ b/src/gui/qt/logfiledialog/logfiledialog.h @@ -54,7 +54,9 @@ public slots: void showLogFilePreview(ShowLogMode); void keyPressEvent ( QKeyEvent * event ); void uploadFile(); - + void uploadInProgressAnimationStart(); + void uploadInProgressAnimationStop(); + private: ConfigFile *myConfig; guiLog *myGuiLog; diff --git a/src/gui/qt/resources/loader.gif b/src/gui/qt/resources/loader.gif new file mode 100644 index 00000000..3288d103 Binary files /dev/null and b/src/gui/qt/resources/loader.gif differ diff --git a/src/gui/qt/resources/pokerth.qrc b/src/gui/qt/resources/pokerth.qrc index 8d255717..16c00c61 100644 --- a/src/gui/qt/resources/pokerth.qrc +++ b/src/gui/qt/resources/pokerth.qrc @@ -1,4 +1,4 @@ - + view-fullscreen.png swbuttoninternetgame.png @@ -58,6 +58,7 @@ preferences-desktop_50x50.png tab-close.png tab-new-background.png + loader.gif cflags/ad.png