Disabling progressbar if stop button is pressed.

This actually had no visible effect on KDE.
This commit is contained in:
Vesa Pikki 2009-07-02 20:23:44 +03:00
parent 8f516a5638
commit 27d630f58d
7 changed files with 33 additions and 8 deletions

View File

@ -65,7 +65,7 @@ MainWindow::MainWindow() :
connect(mUI.mActionRecheck, SIGNAL(triggered()), this, SLOT(ReCheck()));
connect(mUI.mActionStop, SIGNAL(triggered()), mThread, SLOT(Stop()));
connect(mUI.mActionStop, SIGNAL(triggered()), this, SLOT(StopChecking()));
connect(mUI.mActionSave, SIGNAL(triggered()), this, SLOT(Save()));
connect(mUI.mActionAbout, SIGNAL(triggered()), this, SLOT(About()));
@ -362,6 +362,8 @@ void MainWindow::CheckDone()
mUI.mActionSave->setEnabled(true);
}
// Notify user - if the window is not active - that check is ready
QApplication::alert(this, 3000);
}
@ -485,14 +487,14 @@ void MainWindow::About()
void MainWindow::ShowLicense()
{
FileViewDialog *dlg = new FileViewDialog(":COPYING",tr("License"), this);
FileViewDialog *dlg = new FileViewDialog(":COPYING", tr("License"), this);
dlg->resize(570, 400);
dlg->exec();
}
void MainWindow::ShowAuthors()
{
FileViewDialog *dlg = new FileViewDialog(":AUTHORS",tr("Authors"), this);
FileViewDialog *dlg = new FileViewDialog(":AUTHORS", tr("Authors"), this);
dlg->resize(350, 400);
dlg->exec();
}
@ -602,3 +604,9 @@ void MainWindow::AboutToShowViewMenu()
{
mUI.mActionToolbar->setChecked(mUI.mToolBar->isVisible());
}
void MainWindow::StopChecking()
{
mThread->Stop();
mUI.mResults->DisableProgressbar();
}

View File

@ -168,6 +168,12 @@ protected slots:
*/
void AboutToShowViewMenu();
/**
* @brief Slot when stop checking button is pressed
*
*/
void StopChecking();
protected:
/**

View File

@ -98,6 +98,7 @@ void ResultsView::Progress(int value, int max)
else
{
mUI.mProgress->setVisible(true);
mUI.mProgress->setEnabled(true);
}
}
@ -202,3 +203,7 @@ void ResultsView::Translate()
mUI.mTree->Translate();
}
void ResultsView::DisableProgressbar()
{
mUI.mProgress->setEnabled(false);
}

View File

@ -116,6 +116,8 @@ public:
*
*/
void Translate();
void DisableProgressbar();
signals:
/**

View File

@ -98,13 +98,17 @@ signals:
*
*/
void Done();
protected slots:
public slots:
/**
* @brief Slot to stop all threads
*
*/
void Stop();
protected slots:
/**
* @brief Slot that a single thread is done