Disabling progressbar if stop button is pressed.
This actually had no visible effect on KDE.
This commit is contained in:
parent
8f516a5638
commit
27d630f58d
|
@ -65,7 +65,7 @@ MainWindow::MainWindow() :
|
||||||
|
|
||||||
connect(mUI.mActionRecheck, SIGNAL(triggered()), this, SLOT(ReCheck()));
|
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.mActionSave, SIGNAL(triggered()), this, SLOT(Save()));
|
||||||
|
|
||||||
connect(mUI.mActionAbout, SIGNAL(triggered()), this, SLOT(About()));
|
connect(mUI.mActionAbout, SIGNAL(triggered()), this, SLOT(About()));
|
||||||
|
@ -362,6 +362,8 @@ void MainWindow::CheckDone()
|
||||||
mUI.mActionSave->setEnabled(true);
|
mUI.mActionSave->setEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Notify user - if the window is not active - that check is ready
|
// Notify user - if the window is not active - that check is ready
|
||||||
QApplication::alert(this, 3000);
|
QApplication::alert(this, 3000);
|
||||||
}
|
}
|
||||||
|
@ -485,14 +487,14 @@ void MainWindow::About()
|
||||||
|
|
||||||
void MainWindow::ShowLicense()
|
void MainWindow::ShowLicense()
|
||||||
{
|
{
|
||||||
FileViewDialog *dlg = new FileViewDialog(":COPYING",tr("License"), this);
|
FileViewDialog *dlg = new FileViewDialog(":COPYING", tr("License"), this);
|
||||||
dlg->resize(570, 400);
|
dlg->resize(570, 400);
|
||||||
dlg->exec();
|
dlg->exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::ShowAuthors()
|
void MainWindow::ShowAuthors()
|
||||||
{
|
{
|
||||||
FileViewDialog *dlg = new FileViewDialog(":AUTHORS",tr("Authors"), this);
|
FileViewDialog *dlg = new FileViewDialog(":AUTHORS", tr("Authors"), this);
|
||||||
dlg->resize(350, 400);
|
dlg->resize(350, 400);
|
||||||
dlg->exec();
|
dlg->exec();
|
||||||
}
|
}
|
||||||
|
@ -602,3 +604,9 @@ void MainWindow::AboutToShowViewMenu()
|
||||||
{
|
{
|
||||||
mUI.mActionToolbar->setChecked(mUI.mToolBar->isVisible());
|
mUI.mActionToolbar->setChecked(mUI.mToolBar->isVisible());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::StopChecking()
|
||||||
|
{
|
||||||
|
mThread->Stop();
|
||||||
|
mUI.mResults->DisableProgressbar();
|
||||||
|
}
|
||||||
|
|
|
@ -168,6 +168,12 @@ protected slots:
|
||||||
*/
|
*/
|
||||||
void AboutToShowViewMenu();
|
void AboutToShowViewMenu();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Slot when stop checking button is pressed
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
void StopChecking();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -98,6 +98,7 @@ void ResultsView::Progress(int value, int max)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mUI.mProgress->setVisible(true);
|
mUI.mProgress->setVisible(true);
|
||||||
|
mUI.mProgress->setEnabled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -202,3 +203,7 @@ void ResultsView::Translate()
|
||||||
mUI.mTree->Translate();
|
mUI.mTree->Translate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ResultsView::DisableProgressbar()
|
||||||
|
{
|
||||||
|
mUI.mProgress->setEnabled(false);
|
||||||
|
}
|
||||||
|
|
|
@ -116,6 +116,8 @@ public:
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void Translate();
|
void Translate();
|
||||||
|
|
||||||
|
void DisableProgressbar();
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -98,13 +98,17 @@ signals:
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void Done();
|
void Done();
|
||||||
protected slots:
|
|
||||||
|
public slots:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Slot to stop all threads
|
* @brief Slot to stop all threads
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void Stop();
|
void Stop();
|
||||||
|
protected slots:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Slot that a single thread is done
|
* @brief Slot that a single thread is done
|
||||||
|
|
Loading…
Reference in New Issue