add uploadanimation for logfiledialog (#146)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -54,7 +54,9 @@ public slots:
|
||||
void showLogFilePreview(ShowLogMode);
|
||||
void keyPressEvent ( QKeyEvent * event );
|
||||
void uploadFile();
|
||||
|
||||
void uploadInProgressAnimationStart();
|
||||
void uploadInProgressAnimationStop();
|
||||
|
||||
private:
|
||||
ConfigFile *myConfig;
|
||||
guiLog *myGuiLog;
|
||||
|
||||
Reference in New Issue
Block a user