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 | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/noncore/graphics/opie-eye/gui/imageview.cpp b/noncore/graphics/opie-eye/gui/imageview.cpp index c7e48cb..86db732 100644 --- a/noncore/graphics/opie-eye/gui/imageview.cpp +++ b/noncore/graphics/opie-eye/gui/imageview.cpp | |||
@@ -78,25 +78,25 @@ void ImageView::nextSlide() | |||
78 | if (isHidden()) { | 78 | if (isHidden()) { |
79 | delete m_slideTimer; | 79 | delete m_slideTimer; |
80 | m_slideTimer = 0; | 80 | m_slideTimer = 0; |
81 | return; | 81 | return; |
82 | } | 82 | } |
83 | emit dispNext(); | 83 | emit dispNext(); |
84 | m_slideTimer->start(m_slideValue*1000,true); | 84 | m_slideTimer->start(m_slideValue*1000,true); |
85 | } | 85 | } |
86 | void ImageView::initKeys() | 86 | void ImageView::initKeys() |
87 | { | 87 | { |
88 | odebug << "init imageview keys" << oendl; | 88 | odebug << "init imageview keys" << oendl; |
89 | if (!m_cfg) { | 89 | if (!m_cfg) { |
90 | m_cfg = new Opie::Core::OConfig("phunkview"); | 90 | m_cfg = new Opie::Core::OConfig("opie-eye"); |
91 | m_cfg->setGroup("image_view_keys" ); | 91 | m_cfg->setGroup("image_view_keys" ); |
92 | } | 92 | } |
93 | Opie::Core::OKeyPair::List lst; | 93 | Opie::Core::OKeyPair::List lst; |
94 | lst.append( Opie::Core::OKeyPair::upArrowKey() ); | 94 | lst.append( Opie::Core::OKeyPair::upArrowKey() ); |
95 | lst.append( Opie::Core::OKeyPair::downArrowKey() ); | 95 | lst.append( Opie::Core::OKeyPair::downArrowKey() ); |
96 | lst.append( Opie::Core::OKeyPair::leftArrowKey() ); | 96 | lst.append( Opie::Core::OKeyPair::leftArrowKey() ); |
97 | lst.append( Opie::Core::OKeyPair::rightArrowKey() ); | 97 | lst.append( Opie::Core::OKeyPair::rightArrowKey() ); |
98 | lst.append( Opie::Core::OKeyPair(Qt::Key_Escape,0)); | 98 | lst.append( Opie::Core::OKeyPair(Qt::Key_Escape,0)); |
99 | 99 | ||
100 | m_viewManager = new Opie::Core::OKeyConfigManager(m_cfg, "image_view_keys", | 100 | m_viewManager = new Opie::Core::OKeyConfigManager(m_cfg, "image_view_keys", |
101 | lst, false,this, "image_view_keys" ); | 101 | lst, false,this, "image_view_keys" ); |
102 | 102 | ||
@@ -181,31 +181,31 @@ void ImageView::contentsMousePressEvent ( QMouseEvent * e) | |||
181 | if (m_hGroup) { | 181 | if (m_hGroup) { |
182 | m_hGroup->removeFrom(m); | 182 | m_hGroup->removeFrom(m); |
183 | } | 183 | } |
184 | if (m_gPrevNext) { | 184 | if (m_gPrevNext) { |
185 | m_gPrevNext->removeFrom(m); | 185 | m_gPrevNext->removeFrom(m); |
186 | } | 186 | } |
187 | if (m_gDisplayType) { | 187 | if (m_gDisplayType) { |
188 | m_gDisplayType->removeFrom(m); | 188 | m_gDisplayType->removeFrom(m); |
189 | } | 189 | } |
190 | delete m; | 190 | delete m; |
191 | } | 191 | } |
192 | 192 | ||
193 | void ImageView::setFullScreen(bool how) | 193 | void ImageView::setFullScreen(bool how,bool force) |
194 | { | 194 | { |
195 | m_isFullScreen = how; | 195 | m_isFullScreen = how; |
196 | if (how) { | 196 | if (how) { |
197 | m_ignore_next_in = true; | 197 | m_ignore_next_in = true; |
198 | setFixedSize(qApp->desktop()->size()); | 198 | setFixedSize(qApp->desktop()->size()); |
199 | showFullScreen(); | 199 | if (force) showFullScreen(); |
200 | } else { | 200 | } else { |
201 | setMinimumSize(10,10); | 201 | setMinimumSize(10,10); |
202 | } | 202 | } |
203 | } | 203 | } |
204 | 204 | ||
205 | void ImageView::focusInEvent(QFocusEvent *) | 205 | void ImageView::focusInEvent(QFocusEvent *) |
206 | { | 206 | { |
207 | // Always do it here, no matter the size. | 207 | // Always do it here, no matter the size. |
208 | odebug << "Focus in (view)" << oendl; | 208 | odebug << "Focus in (view)" << oendl; |
209 | //if (fullScreen()) parentWidget()->showNormal(); | 209 | //if (fullScreen()) parentWidget()->showNormal(); |
210 | if (m_ignore_next_in){m_ignore_next_in=false;return;} | 210 | if (m_ignore_next_in){m_ignore_next_in=false;return;} |
211 | if (fullScreen()) enableFullscreen(); | 211 | if (fullScreen()) enableFullscreen(); |
@@ -225,14 +225,13 @@ void ImageView::enableFullscreen() | |||
225 | if (m_ignore_next_in) {m_ignore_next_in = false;return;} | 225 | if (m_ignore_next_in) {m_ignore_next_in = false;return;} |
226 | 226 | ||
227 | setUpdatesEnabled(false); | 227 | setUpdatesEnabled(false); |
228 | // This is needed because showNormal() forcefully changes the window | 228 | // This is needed because showNormal() forcefully changes the window |
229 | // style to WSTyle_TopLevel. | 229 | // style to WSTyle_TopLevel. |
230 | reparent(0, WStyle_Customize | WStyle_NoBorder, QPoint(0,0)); | 230 | reparent(0, WStyle_Customize | WStyle_NoBorder, QPoint(0,0)); |
231 | // Enable fullscreen. | 231 | // Enable fullscreen. |
232 | /* this is the trick - I don't now why, but after a showFullScreen QTE toggles the focus | 232 | /* this is the trick - I don't now why, but after a showFullScreen QTE toggles the focus |
233 | * so we must block it here! */ | 233 | * so we must block it here! */ |
234 | m_ignore_next_in = true; | 234 | m_ignore_next_in = true; |
235 | showFullScreen(); | 235 | showFullScreen(); |
236 | setUpdatesEnabled(true); | 236 | setUpdatesEnabled(true); |
237 | |||
238 | } | 237 | } |