From fb0626d4c624bdb640628b9c2dad93d62d90885c Mon Sep 17 00:00:00 2001 From: Arno Date: Sat, 24 Jan 2015 21:35:12 +0100 Subject: New: search dialog --- shemov.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'shemov.cpp') diff --git a/shemov.cpp b/shemov.cpp index b7ffc9a..202bd95 100644 --- a/shemov.cpp +++ b/shemov.cpp @@ -36,6 +36,7 @@ #include "archiveview.h" #include "archivecontroller.h" #include "archivebrowser.h" +#include "searchdialog.h" SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, flags), mOpenWithGroupFS(0), mOpenWithGroupAV(0) { //application icon @@ -86,7 +87,7 @@ SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, fla connect(mArchiveBrowser, SIGNAL(sizeChanged(qint64)), this, SLOT(setSize(qint64))); connect(mArchiveBrowser, SIGNAL(itemCountChanged(int)), this, SLOT(updateSelectedCount(int))); - //newmoviewizard + dbanalyzer + newpicsdialog + //newmoviewizard + dbanalyzer + newpicsdialog + searchdialog splash.showMessage(tr("Creating misc. Dialogs..."), Qt::AlignHCenter, Qt::yellow); qApp->processEvents(); mNewMovieWizard = new NewMovieWizard(this); @@ -94,6 +95,8 @@ SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, fla ArchiveController *c = SmGlobals::instance()->archiveController(); connect(mNewMovieWizard, SIGNAL(accepted()), c->archiveTreeModel(), SLOT(refresh())); mNewPicsDialog = new NewPicsDialog(this); + mSearchDialog = new SearchDialog(this); + connect(mSearchDialog, SIGNAL(searchResultClicked(int)), this, SLOT(searchResult(int))); //experimental archive connect(c, SIGNAL(sizeChanged(qint64)), this, SLOT(setSize(qint64))); @@ -397,6 +400,9 @@ void SheMov::createActions(){ connect(mNewPicsA, SIGNAL(triggered()), this, SLOT(newPicsDialog())); mUnpackA = new QAction(QIcon(":/dog_hood.png"), tr("Unpack..."), this); connect(mUnpackA, SIGNAL(triggered()), mFSWidget, SLOT(unpack())); + mSearchDialogA = new QAction(tr("Search..."), this); + mSearchDialogA->setShortcut(tr("CTRL+f")); + connect(mSearchDialogA, SIGNAL(triggered()), mSearchDialog, SLOT(show())); //connnect mQuitA = new QAction(tr("Quit"), this); @@ -718,6 +724,7 @@ void SheMov::createMenus(){ QMenu *fileMenu = new QMenu(tr("&File"), this); fileMenu->addAction(mNewMovieWizardA); fileMenu->addAction(mNewPicsA); + fileMenu->addAction(mSearchDialogA); fileMenu->addSeparator(); fileMenu->addAction(mConsistencyA); QMenu *analyzeMenu = new QMenu(tr("Analyze"), this); @@ -1097,3 +1104,10 @@ void SheMov::skipBack(){ PictureViewer2 *picViewer = SmGlobals::instance()->pictureViewer(); picViewer->skip(-25); } + +void SheMov::searchResult(int seriesPartId){ + mSearchDialog->hide(); + mTab->setCurrentIndex(Movies); + ArchiveController *c = SmGlobals::instance()->archiveController(); + c->setSeriesPart(seriesPartId); +} -- cgit v1.2.3-70-g09d2