From 0cdf34c82044a27f1abfe8bd8dce213efa173da8 Mon Sep 17 00:00:00 2001 From: Arno Date: Sat, 17 Mar 2012 12:36:16 +0100 Subject: Randomize selection for pictureviewer std::random_shuffle available files in PictureViewer2. Add action to View menu and reuse an icon. --- shemov.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'shemov.cpp') diff --git a/shemov.cpp b/shemov.cpp index a828e04..18cacee 100644 --- a/shemov.cpp +++ b/shemov.cpp @@ -645,10 +645,16 @@ void SheMov::createActions(){ mPVSlideA->setCheckable(true); connect(mPVSlideA, SIGNAL(triggered()), mPicWidget->picView()->PV(), SLOT(slide())); mPicWidget->picView()->addAction(mPVSlideA); + QAction *pv2Sep1 = new QAction(this); + pv2Sep1->setSeparator(true); + mPicWidget->picView()->PV()->addAction(pv2Sep1); mPicWidget->picView()->PV()->addAction(mPVSlideA); 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()), mPicWidget->picView()->PV(), SLOT(shuffle())); + mPicWidget->picView()->PV()->addAction(mPVShuffleA); // refresh mPWRefreshA = new QAction(QIcon(":/huge_bra.png"), tr("Refresh"), this); @@ -783,6 +789,7 @@ void SheMov::createMenus(){ mPicViewMenu->addAction(mPVAddA); mPicViewMenu->addAction(mPVReplaceA); mPicViewMenu->addSeparator(); + mPicViewMenu->addAction(mPVShuffleA); mPicViewMenu->addAction(mPWRefreshA); mViewPicMenuA = menuBar()->addMenu(mPicViewMenu); -- cgit v1.2.3-70-g09d2