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 | 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 | |||
@@ -27,6 +27,7 @@ ImageView::ImageView(Opie::Core::OConfig *cfg, QWidget* parent, const char* name | |||
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) |
@@ -152,7 +153,19 @@ void ImageView::keyReleaseEvent(QKeyEvent * e) | |||
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() |