Diffstat (limited to 'noncore/graphics/opie-eye/gui/imageview.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/graphics/opie-eye/gui/imageview.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/noncore/graphics/opie-eye/gui/imageview.cpp b/noncore/graphics/opie-eye/gui/imageview.cpp index ebdfc60..ac6474c 100644 --- a/noncore/graphics/opie-eye/gui/imageview.cpp +++ b/noncore/graphics/opie-eye/gui/imageview.cpp | |||
@@ -24,12 +24,13 @@ ImageView::ImageView(Opie::Core::OConfig *cfg, QWidget* parent, const char* name | |||
24 | QPEApplication::setStylusOperation(viewport(),QPEApplication::RightOnHold); | 24 | QPEApplication::setStylusOperation(viewport(),QPEApplication::RightOnHold); |
25 | initKeys(); | 25 | initKeys(); |
26 | m_slideValue = 5; | 26 | m_slideValue = 5; |
27 | m_gDisplayType = 0; | 27 | m_gDisplayType = 0; |
28 | m_gPrevNext = 0; | 28 | m_gPrevNext = 0; |
29 | m_hGroup = 0; | 29 | m_hGroup = 0; |
30 | closeIfHide = false; | ||
30 | } | 31 | } |
31 | 32 | ||
32 | void ImageView::setMenuActions(QActionGroup*hGroup,QActionGroup*nextprevGroup, QActionGroup*disptypeGroup) | 33 | void ImageView::setMenuActions(QActionGroup*hGroup,QActionGroup*nextprevGroup, QActionGroup*disptypeGroup) |
33 | { | 34 | { |
34 | m_gDisplayType = disptypeGroup; | 35 | m_gDisplayType = disptypeGroup; |
35 | m_gPrevNext = nextprevGroup; | 36 | m_gPrevNext = nextprevGroup; |
@@ -149,13 +150,25 @@ void ImageView::initKeys() | |||
149 | 150 | ||
150 | void ImageView::keyReleaseEvent(QKeyEvent * e) | 151 | void ImageView::keyReleaseEvent(QKeyEvent * e) |
151 | { | 152 | { |
152 | if (!e || e->state()!=0) { | 153 | if (!e || e->state()!=0) { |
153 | return; | 154 | return; |
154 | } | 155 | } |
155 | if (e->key()==Qt::Key_Escape && fullScreen()) emit hideMe(); | 156 | if (e->key()==Qt::Key_Escape) { |
157 | if (fullScreen()) { | ||
158 | emit hideMe(); | ||
159 | } | ||
160 | if (closeIfHide) { | ||
161 | QTimer::singleShot(0, qApp, SLOT(closeAllWindows())); | ||
162 | } | ||
163 | } | ||
164 | } | ||
165 | |||
166 | void ImageView::setCloseIfHide(bool how) | ||
167 | { | ||
168 | closeIfHide = how; | ||
156 | } | 169 | } |
157 | 170 | ||
158 | void ImageView::slotShowImageInfo() | 171 | void ImageView::slotShowImageInfo() |
159 | { | 172 | { |
160 | emit dispImageInfo(m_lastName); | 173 | emit dispImageInfo(m_lastName); |
161 | } | 174 | } |