summaryrefslogtreecommitdiffstats
path: root/shemov.cpp
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2012-03-17 15:15:53 +0100
committerArno <am@disconnect.de>2012-03-17 15:15:53 +0100
commit1e14ae6748f271265dd719ac0766a2da3501a21f (patch)
treecf1547eb8a55637a8bf1e9a952ce9d07085e0117 /shemov.cpp
parente595a9be49615c45f40c57e8385e9fd76bb394e8 (diff)
downloadSheMov-1e14ae6748f271265dd719ac0766a2da3501a21f.tar.gz
SheMov-1e14ae6748f271265dd719ac0766a2da3501a21f.tar.bz2
SheMov-1e14ae6748f271265dd719ac0766a2da3501a21f.zip
Add keyboard actions to PictureViewer2
Never, ever forget: QVariant() casts to a valid int! Again, this was a tough one, but maybe I shouldn't drink and program. PictureViewer2 reacts to Escape and Space. Escape hides it and stops the slide timer, Space activates the slide timer.
Diffstat (limited to 'shemov.cpp')
-rw-r--r--shemov.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/shemov.cpp b/shemov.cpp
index 8fbceed..77c9a98 100644
--- a/shemov.cpp
+++ b/shemov.cpp
@@ -619,6 +619,7 @@ void SheMov::createActions(){
// viewer actions
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)), mPicWidget, SLOT(showPicViewer(bool)));
mPVToggleA->setChecked(false);
mPicWidget->picView()->addAction(mPVToggleA);
@@ -644,7 +645,8 @@ void SheMov::createActions(){
mPicWidget->picView()->addAction(pvSep2);
mPVSlideA = new QAction(QIcon(":/chastity_belt_with_cuffs.png"), tr("Slide"), this);
mPVSlideA->setCheckable(true);
- connect(mPVSlideA, SIGNAL(triggered()), mPicWidget->picView()->PV(), SLOT(slide()));
+ mPVSlideA->setData(PictureViewer2::SlideAction);
+ connect(mPVSlideA, SIGNAL(toggled(bool)), mPicWidget->picView()->PV(), SLOT(slide(bool)));
mPicWidget->picView()->addAction(mPVSlideA);
QAction *pv2Sep1 = new QAction(this);
pv2Sep1->setSeparator(true);
@@ -664,6 +666,7 @@ void SheMov::createActions(){
mPicWidget->setPicViewerAction(mPVToggleA);
+ mPicWidget->picView()->PV()->initActions();
//don't add actions with checkable(true) unless you know what you're doing!
mPicActionGroup = new QActionGroup(this);
mPicActionGroup->addAction(mPWDeletePicFromA);