summaryrefslogtreecommitdiffstats
path: root/shemov.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'shemov.cpp')
-rw-r--r--shemov.cpp142
1 files changed, 76 insertions, 66 deletions
diff --git a/shemov.cpp b/shemov.cpp
index 6857b39..f9859be 100644
--- a/shemov.cpp
+++ b/shemov.cpp
@@ -596,72 +596,82 @@ void SheMov::createActions(){
mPlaySelectedArchiveFilesA = new QAction(tr("Play selected...."), this);
connect(mPlaySelectedArchiveFilesA, SIGNAL(triggered()), mATree->filesWidget(), SLOT(playSelected()));
- //picture widget
- // delete + edit
- mPWDeletePicFromA = new QAction(QIcon(":/huge_balls_pierced.png"), tr("Delete..."), this);
- mPicWidget->picView()->addAction(mPWDeletePicFromA);
- connect(mPWDeletePicFromA, SIGNAL(triggered()), mPicWidget->picView(), SLOT(deletePics()));
- mPWEditPicMappingsA = new QAction(QIcon(":/squirting_nipple.png"), tr("Edit mappings..."), this);
- mPicWidget->picView()->addAction(mPWEditPicMappingsA);
- connect(mPWEditPicMappingsA, SIGNAL(triggered()), mPicWidget->picView(), SIGNAL(editPicsMappings()));
- QAction *pvSep1 = new QAction(this);
- pvSep1->setSeparator(true);
- mPicWidget->picView()->addAction(pvSep1);
-
- // viewer actions
- PictureViewer2 *picViewer = SmGlobals::instance()->pictureViewer();
- mPVToggleA = new QAction(QIcon(":/dick_in_cage.png"), tr("Show/Hide Picture Viewer"), this);
- mPVToggleA->setCheckable(true);
- mPVToggleA->setData(PictureViewer2::HideAction);
- connect(mPVToggleA, SIGNAL(toggled(bool)), picViewer, SLOT(setVisible(bool)));
- mPVToggleA->setChecked(false);
- mPicWidget->picView()->addAction(mPVToggleA);
- picViewer->addAction(mPVToggleA);
-
- //add or replace pictures: pictureviewer
- QSignalMapper *PVAddMapper = new QSignalMapper(this);
- mPVAddA = new QAction(QIcon(":/used_tampon.png"), tr("Add selected"), this);
- connect(mPVAddA, SIGNAL(triggered()), PVAddMapper, SLOT(map()));
- PVAddMapper->setMapping(mPVAddA, false);
- mPicWidget->picView()->addAction(mPVAddA);
- mPVReplaceA = new QAction(QIcon(":/clean_tampon.png"), tr("Replace with selected"), this);
- connect(mPVReplaceA, SIGNAL(triggered()), PVAddMapper, SLOT(map()));
- PVAddMapper->setMapping(mPVReplaceA, true);
- mPicWidget->picView()->addAction(mPVReplaceA);
- connect(PVAddMapper, SIGNAL(mapped(int)), mPicWidget->picView(), SLOT(setPVData(int)));
-
- //select all from current, see tabChanged(int)
- mPVSelectAllA = new QAction(QIcon(":/blue_syringe.png"), tr("Select all pics"), this);
- picViewer->addAction(mPVSelectAllA);
-
- //slide
- QAction *pvSep2 = new QAction(this);
- pvSep2->setSeparator(true);
- mPicWidget->picView()->addAction(pvSep2);
- mPVSlideA = new QAction(QIcon(":/chastity_belt_with_cuffs.png"), tr("Slide"), this);
- mPVSlideA->setCheckable(true);
- mPVSlideA->setData(PictureViewer2::SlideAction);
- connect(mPVSlideA, SIGNAL(toggled(bool)), picViewer, SLOT(slide(bool)));
- connect(mPVSlideA, SIGNAL(toggled(bool)), this, SLOT(setSlide(bool)));
- QAction *pv2Sep1 = new QAction(this);
- pv2Sep1->setSeparator(true);
- picViewer->addAction(pv2Sep1);
- picViewer->addAction(mPVSlideA);
-
- //shuffle
- QAction *pvSep3 = new QAction(this);
- pvSep3->setSeparator(true);
- mPicWidget->picView()->addAction(pvSep3);
- mPVShuffleA = new QAction(QIcon(":/bizarre_amputee.png"), tr("Shuffle"), this);
- connect(mPVShuffleA, SIGNAL(triggered()), picViewer, SLOT(shuffle()));
- picViewer->addAction(mPVShuffleA);
-
- // refresh
- mPWRefreshA = new QAction(QIcon(":/huge_bra.png"), tr("Refresh"), this);
- mPicWidget->picView()->addAction(mPWRefreshA);
- connect(mPWRefreshA, SIGNAL(triggered()), mPicWidget->picView(), SLOT(refresh()));
- mPicWidget->setPicViewerAction(mPVToggleA);
- picViewer->initActions();
+ /* very unfortunate naming of variables:
+ * picViewer: the actual PictureViewer2 window
+ * picView: the picture files TreeView
+ * First: the Treeview -> picView */
+
+ // Delete... + Edit Mappings...
+ mPWDeletePicFromA = new QAction(QIcon(":/huge_balls_pierced.png"), tr("Delete..."), this);
+ mPicWidget->picView()->addAction(mPWDeletePicFromA);
+ connect(mPWDeletePicFromA, SIGNAL(triggered()), mPicWidget->picView(), SLOT(deletePics()));
+ mPWEditPicMappingsA = new QAction(QIcon(":/squirting_nipple.png"), tr("Edit mappings..."), this);
+ mPicWidget->picView()->addAction(mPWEditPicMappingsA);
+ connect(mPWEditPicMappingsA, SIGNAL(triggered()), mPicWidget->picView(), SIGNAL(editPicsMappings()));
+ mPicWidget->picView()->addAction(createSeparator());
+
+ // Show/Hide Picture Viewer
+ PictureViewer2 *picViewer = SmGlobals::instance()->pictureViewer();
+ mPVToggleA = new QAction(QIcon(":/dick_in_cage.png"), tr("Show/Hide Picture Viewer"), this);
+ mPVToggleA->setCheckable(true);
+ mPVToggleA->setData(PictureViewer2::HideAction);
+ connect(mPVToggleA, SIGNAL(toggled(bool)), picViewer, SLOT(setVisible(bool)));
+ mPVToggleA->setChecked(false);
+ mPicWidget->picView()->addAction(mPVToggleA);
+
+ // Add selected + Replace with selected
+ QSignalMapper *PVAddMapper = new QSignalMapper(this);
+ mPVAddA = new QAction(QIcon(":/used_tampon.png"), tr("Add selected"), this);
+ connect(mPVAddA, SIGNAL(triggered()), PVAddMapper, SLOT(map()));
+ PVAddMapper->setMapping(mPVAddA, false);
+ mPicWidget->picView()->addAction(mPVAddA);
+ mPVReplaceA = new QAction(QIcon(":/clean_tampon.png"), tr("Replace with selected"), this);
+ connect(mPVReplaceA, SIGNAL(triggered()), PVAddMapper, SLOT(map()));
+ PVAddMapper->setMapping(mPVReplaceA, true);
+ mPicWidget->picView()->addAction(mPVReplaceA);
+ connect(PVAddMapper, SIGNAL(mapped(int)), mPicWidget->picView(), SLOT(setPVData(int)));
+
+ // Refresh
+ mPicWidget->picView()->addAction(createSeparator());
+ mPWRefreshA = new QAction(QIcon(":/huge_bra.png"), tr("Refresh"), this);
+ mPicWidget->picView()->addAction(mPWRefreshA);
+ connect(mPWRefreshA, SIGNAL(triggered()), mPicWidget->picView(), SLOT(refresh()));
+ mPicWidget->setPicViewerAction(mPVToggleA);
+
+ /* Now the context menu for the actual Viewer
+ * picViewer -> PictureViewer2 */
+
+ // Show/Hide Picture Viewer
+ picViewer->addAction(mPVToggleA);
+
+ // Select all pics
+ mPVSelectAllA = new QAction(QIcon(":/blue_syringe.png"), tr("Select all pics"), this);
+ picViewer->addAction(mPVSelectAllA);
+
+ // Slide
+ mPVSlideA = new QAction(QIcon(":/chastity_belt_with_cuffs.png"), tr("Slide"), this);
+ mPVSlideA->setCheckable(true);
+ mPVSlideA->setData(PictureViewer2::SlideAction);
+ connect(mPVSlideA, SIGNAL(toggled(bool)), picViewer, SLOT(slide(bool)));
+ connect(mPVSlideA, SIGNAL(toggled(bool)), this, SLOT(setSlide(bool)));
+ picViewer->addAction(createSeparator());
+ picViewer->addAction(mPVSlideA);
+
+ // Shuffle
+ mPVShuffleA = new QAction(QIcon(":/bizarre_amputee.png"), tr("Shuffle"), this);
+ connect(mPVShuffleA, SIGNAL(triggered()), picViewer, SLOT(shuffle()));
+ picViewer->addAction(mPVShuffleA);
+ picViewer->addAction(createSeparator());
+
+ // Copy to...
+ mPVCopyToA = new QAction(tr("Copy to..."), this);
+ connect(mPVCopyToA, SIGNAL(triggered()), picViewer, SLOT(copyCurrent()));
+ picViewer->addAction(mPVCopyToA);
+
+ // assign actions to PictureViewer2 members, so they can be toggled from within
+ picViewer->initActions();
+
+ /* picView(er) END Actions! */
//don't add actions with checkable(true) unless you know what you're doing!
mPicActionGroup = new QActionGroup(this);