Diffstat (limited to 'noncore/graphics/opie-eye/gui/imageview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/graphics/opie-eye/gui/imageview.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/noncore/graphics/opie-eye/gui/imageview.cpp b/noncore/graphics/opie-eye/gui/imageview.cpp index fbc4494..8e7f982 100644 --- a/noncore/graphics/opie-eye/gui/imageview.cpp +++ b/noncore/graphics/opie-eye/gui/imageview.cpp | |||
@@ -4,24 +4,25 @@ | |||
4 | #include <opie2/oconfig.h> | 4 | #include <opie2/oconfig.h> |
5 | #include <opie2/okeyconfigwidget.h> | 5 | #include <opie2/okeyconfigwidget.h> |
6 | 6 | ||
7 | #include <qpe/resource.h> | 7 | #include <qpe/resource.h> |
8 | 8 | ||
9 | using namespace Opie::Core; | 9 | using namespace Opie::Core; |
10 | 10 | ||
11 | ImageView::ImageView(Opie::Core::OConfig *cfg, QWidget* parent, const char* name, WFlags fl ) | 11 | ImageView::ImageView(Opie::Core::OConfig *cfg, QWidget* parent, const char* name, WFlags fl ) |
12 | : Opie::MM::OImageScrollView(parent,name,fl) | 12 | : Opie::MM::OImageScrollView(parent,name,fl) |
13 | { | 13 | { |
14 | m_viewManager = 0; | 14 | m_viewManager = 0; |
15 | m_cfg = cfg; | 15 | m_cfg = cfg; |
16 | m_isFullScreen = false; | ||
16 | initKeys(); | 17 | initKeys(); |
17 | } | 18 | } |
18 | 19 | ||
19 | ImageView::~ImageView() | 20 | ImageView::~ImageView() |
20 | { | 21 | { |
21 | if (m_viewManager) { | 22 | if (m_viewManager) { |
22 | delete m_viewManager; | 23 | delete m_viewManager; |
23 | } | 24 | } |
24 | } | 25 | } |
25 | 26 | ||
26 | Opie::Core::OKeyConfigManager* ImageView::manager() | 27 | Opie::Core::OKeyConfigManager* ImageView::manager() |
27 | { | 28 | { |
@@ -36,48 +37,44 @@ void ImageView::initKeys() | |||
36 | odebug << "init imageview keys" << oendl; | 37 | odebug << "init imageview keys" << oendl; |
37 | if (!m_cfg) { | 38 | if (!m_cfg) { |
38 | m_cfg = new Opie::Core::OConfig("phunkview"); | 39 | m_cfg = new Opie::Core::OConfig("phunkview"); |
39 | m_cfg->setGroup("image_view_keys" ); | 40 | m_cfg->setGroup("image_view_keys" ); |
40 | } | 41 | } |
41 | Opie::Core::OKeyPair::List lst; | 42 | Opie::Core::OKeyPair::List lst; |
42 | lst.append( Opie::Core::OKeyPair::upArrowKey() ); | 43 | lst.append( Opie::Core::OKeyPair::upArrowKey() ); |
43 | lst.append( Opie::Core::OKeyPair::downArrowKey() ); | 44 | lst.append( Opie::Core::OKeyPair::downArrowKey() ); |
44 | lst.append( Opie::Core::OKeyPair::leftArrowKey() ); | 45 | lst.append( Opie::Core::OKeyPair::leftArrowKey() ); |
45 | lst.append( Opie::Core::OKeyPair::rightArrowKey() ); | 46 | lst.append( Opie::Core::OKeyPair::rightArrowKey() ); |
46 | lst.append( Opie::Core::OKeyPair(Qt::Key_N,0)); | 47 | lst.append( Opie::Core::OKeyPair(Qt::Key_N,0)); |
47 | lst.append( Opie::Core::OKeyPair(Qt::Key_P,0)); | 48 | lst.append( Opie::Core::OKeyPair(Qt::Key_P,0)); |
49 | lst.append( Opie::Core::OKeyPair(Qt::Key_F,0)); | ||
48 | 50 | ||
49 | m_viewManager = new Opie::Core::OKeyConfigManager(m_cfg, "image_view_keys", | 51 | m_viewManager = new Opie::Core::OKeyConfigManager(m_cfg, "image_view_keys", |
50 | lst, false,this, "image_view_keys" ); | 52 | lst, false,this, "image_view_keys" ); |
51 | m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("View Image Info"), "imageviewinfo", | 53 | m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("View Image Info"), "imageviewinfo", |
52 | Resource::loadPixmap("1to1"), ViewInfo, | 54 | Resource::loadPixmap("1to1"), ViewInfo, |
53 | Opie::Core::OKeyPair(Qt::Key_I,Qt::ShiftButton), | 55 | Opie::Core::OKeyPair(Qt::Key_I,0), |
54 | this, SLOT(slotShowImageInfo()))); | 56 | this, SLOT(slotShowImageInfo()))); |
55 | #if 0 | ||
56 | m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Next image"), "nextimage", | ||
57 | Resource::loadPixmap("next"), ViewInfo, | ||
58 | Opie::Core::OKeyPair(Qt::Key_N,0), | ||
59 | this, SLOT(slotDispNext()))); | ||
60 | #endif | ||
61 | m_viewManager->handleWidget( this ); | 57 | m_viewManager->handleWidget( this ); |
62 | m_viewManager->load(); | 58 | m_viewManager->load(); |
63 | } | 59 | } |
64 | 60 | ||
65 | void ImageView::keyReleaseEvent(QKeyEvent * e) | 61 | void ImageView::keyReleaseEvent(QKeyEvent * e) |
66 | { | 62 | { |
67 | if (!e || e->state()!=0) { | 63 | if (!e || e->state()!=0) { |
68 | return; | 64 | return; |
69 | } | 65 | } |
70 | if (e->key()==Qt::Key_N) slotDispNext(); | 66 | if (e->key()==Qt::Key_N) slotDispNext(); |
71 | if (e->key()==Qt::Key_P) slotDispPrev(); | 67 | if (e->key()==Qt::Key_P) slotDispPrev(); |
68 | if (e->key()==Qt::Key_F) emit toggleFullScreen(); | ||
72 | } | 69 | } |
73 | 70 | ||
74 | void ImageView::slotDispNext() | 71 | void ImageView::slotDispNext() |
75 | { | 72 | { |
76 | emit dispNext(); | 73 | emit dispNext(); |
77 | } | 74 | } |
78 | 75 | ||
79 | void ImageView::slotDispPrev() | 76 | void ImageView::slotDispPrev() |
80 | { | 77 | { |
81 | emit dispPrev(); | 78 | emit dispPrev(); |
82 | } | 79 | } |
83 | 80 | ||