From 27d2b736a8fc33bc2f98212ebde25d97fcefac16 Mon Sep 17 00:00:00 2001 From: Arno Date: Sat, 17 Dec 2011 10:37:15 +0100 Subject: Make DbAnalyzerDialog non-modal Make DbAnalyzerdialg a member of Shemov, so it can be shown non-modal. So actors/genres can be edited while the dialog is open. It also has the nice side effect that we can refresh the views after deleting stray items. --- shemov.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'shemov.cpp') diff --git a/shemov.cpp b/shemov.cpp index 5b8b789..265c52c 100644 --- a/shemov.cpp +++ b/shemov.cpp @@ -79,9 +79,12 @@ SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, fla connect(mATree->seriesWidget()->seriesTree()->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), this, SLOT(updateSelectionCount(QItemSelection,QItemSelection))); connect(this, SIGNAL(configChanged()), mATree, SLOT(readSettings())); - //newmoviewizard + //newmoviewizard + dbanalyzer mNewMovieWizard = new NewMovieWizard(this); connect(mNewMovieWizard, SIGNAL(seriesAdded(QString,int)), mATree->seriesWidget(), SLOT(seriesAdded(QString,int))); + mDbAnalyzerDialog = new DbAnalyzerDialog(this); + connect(mDbAnalyzerDialog, SIGNAL(partClicked(int, int)), mATree, SLOT(selectMoviePart(int, int))); + connect(mDbAnalyzerDialog, SIGNAL(delItems(int,QList&)), this, SLOT(analyzeDelete(int,QList&))); QVBoxLayout *mainLayout = new QVBoxLayout; mainLayout->addWidget(mTab); @@ -985,10 +988,7 @@ void SheMov::checkConsistency(){ } void SheMov::analyzeDb(){ - DbAnalyzerDialog d(this); - connect(&d, SIGNAL(partClicked(int, int)), mATree, SLOT(selectMoviePart(int, int))); - connect(&d, SIGNAL(delItems(int,QList&)), this, SLOT(analyzeDelete(int,QList&))); - d.exec(); + mDbAnalyzerDialog->show(); } void SheMov::analyzeDelete(int mode, QList &ids){ @@ -1010,6 +1010,7 @@ void SheMov::analyzeDelete(int mode, QList &ids){ } Q_ASSERT(model); model->deleteItems(ids); + mDbAnalyzerDialog->refresh(); } void SheMov::toggleHover(QObject *object){ -- cgit v1.2.3-70-g09d2