summaryrefslogtreecommitdiffstats
path: root/shemov.cpp
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2015-01-24 21:35:12 +0100
committerArno <am@disconnect.de>2015-01-24 21:35:12 +0100
commitfb0626d4c624bdb640628b9c2dad93d62d90885c (patch)
tree008e7aa0d6791e73503b2468a89c9bedc47610b2 /shemov.cpp
parenta152afc1005c72e16208f15d84a6c2b24d32f578 (diff)
downloadSheMov-fb0626d4c624bdb640628b9c2dad93d62d90885c.tar.gz
SheMov-fb0626d4c624bdb640628b9c2dad93d62d90885c.tar.bz2
SheMov-fb0626d4c624bdb640628b9c2dad93d62d90885c.zip
New: search dialog
Diffstat (limited to 'shemov.cpp')
-rw-r--r--shemov.cpp16
1 files changed, 15 insertions, 1 deletions
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);
+}