diff options
Diffstat (limited to 'shemov.cpp')
-rw-r--r-- | shemov.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
@@ -253,6 +253,18 @@ void SheMov::createActions(){ //File menu mPlaySelectedFSA = new QAction(tr("Play selected movies..."), this); connect(mPlaySelectedFSA, SIGNAL(triggered()), mFSWidget, SLOT(playSelected())); + mNewMovieWizardA = new QAction(tr("Archive movie..."), this); + connect(mNewMovieWizardA, SIGNAL(triggered()), this, SLOT(newMovieWizard())); + mCleanupMapper = new QSignalMapper(this); + mCleanupGroup = new QActionGroup(this); + QAction *cleanup1 = new QAction(tr("Cleanup actors..."), this); + connect(cleanup1, SIGNAL(triggered()), mCleanupMapper, SLOT(map())); + mCleanupMapper->setMapping(cleanup1, "actors"); + mCleanupGroup->addAction(cleanup1); + QAction *cleanup2 = new QAction(tr("Cleanup genres..."), this); + connect(cleanup2, SIGNAL(triggered()), mCleanupMapper, SLOT(map())); + mCleanupMapper->setMapping(cleanup2, "genres"); + mCleanupGroup->addAction(cleanup2); mQuitA = new QAction(tr("Quit"), this); mQuitA->setShortcut(tr("CTRL+q")); @@ -329,8 +341,6 @@ void SheMov::createActions(){ connect(mCollapseAllSeriesA, SIGNAL(triggered()), mATree->seriesWidget()->seriesTree(), SLOT(collapseAll())); mExpandCurrentA = new QAction(tr("Expand"), this); connect(mExpandCurrentA, SIGNAL(triggered()), mATree->seriesWidget(), SLOT(expandCurrent())); - mNewMovieWizardA = new QAction(tr("Archive movie..."), this); - connect(mNewMovieWizardA, SIGNAL(triggered()), this, SLOT(newMovieWizard())); mAddCoverA = new QAction(tr("Add cover..."), this); connect(mAddCoverA, SIGNAL(triggered()), mATree->seriesWidget(), SLOT(addCover())); @@ -369,6 +379,7 @@ void SheMov::createActions(){ mOpenWithMapperAV = new QSignalMapper(this); connect(mOpenWithMapperFS, SIGNAL(mapped(QString)), mFSWidget, SLOT(playSelected(QString))); connect(mOpenWithMapperAV, SIGNAL(mapped(QString)), mATree, SLOT(playSelected(QString))); + connect(mCleanupMapper, SIGNAL(mapped(QString)), mATree, SLOT(cleanDatabase(QString))); connect(viewMapper, SIGNAL(mapped(int)), mATree, SLOT(setFileViewMode(int))); } @@ -379,6 +390,9 @@ void SheMov::createMenus(){ fileMenu->addAction(mPlaySelectedFSA); fileMenu->addSeparator(); fileMenu->addAction(mNewMovieWizardA); + QMenu *cleanupMenu = new QMenu(tr("Clean database"), this); + cleanupMenu->addActions(mCleanupGroup->actions()); + fileMenu->addMenu(cleanupMenu); fileMenu->addSeparator(); fileMenu->addAction(mQuitA); menuBar()->addMenu(fileMenu); |