summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dbanalyzer.cpp11
-rw-r--r--dbanalyzer.h4
2 files changed, 15 insertions, 0 deletions
diff --git a/dbanalyzer.cpp b/dbanalyzer.cpp
index 539a1bc..8ebb4b5 100644
--- a/dbanalyzer.cpp
+++ b/dbanalyzer.cpp
@@ -78,6 +78,8 @@ DbAnalyzerDialog::DbAnalyzerDialog(QWidget *parent, Qt::WindowFlags f) : QDialog
//buttons
mCancel = new QPushButton(tr("Cancel"));
connect(mCancel, SIGNAL(clicked()), this, SLOT(cancelAnalyzer()));
+ mRefresh = new QPushButton(tr("Refresh"));
+ connect(mRefresh, SIGNAL(clicked()), this, SLOT(refresh()));
mClose = new QPushButton(tr("Close"));
connect(mClose, SIGNAL(clicked()), this, SLOT(accept()));
mDelete = new QPushButton(tr("Delete..."));
@@ -92,6 +94,7 @@ DbAnalyzerDialog::DbAnalyzerDialog(QWidget *parent, Qt::WindowFlags f) : QDialog
mainLayout->addWidget(mTab);
QHBoxLayout *buttonLayout = new QHBoxLayout;
buttonLayout->addWidget(mCancel);
+ buttonLayout->addWidget(mRefresh);
buttonLayout->addStretch();
buttonLayout->addWidget(mDelete);
buttonLayout->addWidget(mClose);
@@ -106,17 +109,25 @@ DbAnalyzerDialog::DbAnalyzerDialog(QWidget *parent, Qt::WindowFlags f) : QDialog
mAnalyzer->start();
}
+void DbAnalyzerDialog::refresh(){
+ if(!mAnalyzer->isRunning()){
+ mAnalyzer->start();
+ }
+}
+
void DbAnalyzerDialog::cancelAnalyzer(){
mAnalyzer->setCancel(true);
}
void DbAnalyzerDialog::analyzerStarted(){
mCancel->setEnabled(true);
+ mRefresh->setEnabled(false);
mClose->setEnabled(false);
}
void DbAnalyzerDialog::analyzerFinished(){
mCancel->setEnabled(false);
+ mRefresh->setEnabled(true);
mClose->setEnabled(true);
populate(mNoActorsV, mNoActorsM, mAnalyzer->noActors());
populate(mStrayActorsV, mStrayActorsM, mAnalyzer->strayActors());
diff --git a/dbanalyzer.h b/dbanalyzer.h
index 1e47742..4b693e0 100644
--- a/dbanalyzer.h
+++ b/dbanalyzer.h
@@ -29,6 +29,9 @@ class DbAnalyzerDialog : public QDialog {
enum DeleteMode { Actors, Genres };
explicit DbAnalyzerDialog(QWidget *parent = 0, Qt::WindowFlags f = 0);
+ public slots:
+ void refresh();
+
signals:
void partClicked(int seriesPartId, int seriesId);
void delItems(int mode, QList<int> &ids);
@@ -53,6 +56,7 @@ class DbAnalyzerDialog : public QDialog {
QPushButton *mClose;
QPushButton *mCancel;
QPushButton *mDelete;
+ QPushButton *mRefresh;
DbAnalyzer *mAnalyzer;
};