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 | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/noncore/graphics/opie-eye/gui/imageview.cpp b/noncore/graphics/opie-eye/gui/imageview.cpp index 994fe12..b919ca8 100644 --- a/noncore/graphics/opie-eye/gui/imageview.cpp +++ b/noncore/graphics/opie-eye/gui/imageview.cpp | |||
@@ -37,49 +37,48 @@ ImageView::ImageView(Opie::Core::OConfig *cfg, QWidget* parent, const char* name | |||
37 | if (min>320) { | 37 | if (min>320) { |
38 | // bigscreen | 38 | // bigscreen |
39 | setMinimumSize(min/3,min/3); | 39 | setMinimumSize(min/3,min/3); |
40 | } else { | 40 | } else { |
41 | setMinimumSize(10,10); | 41 | setMinimumSize(10,10); |
42 | } | 42 | } |
43 | connect(this,SIGNAL(incBrightness()),this,SLOT(slotIncBrightness())); | 43 | connect(this,SIGNAL(incBrightness()),this,SLOT(slotIncBrightness())); |
44 | connect(this,SIGNAL(decBrightness()),this,SLOT(slotDecBrightness())); | 44 | connect(this,SIGNAL(decBrightness()),this,SLOT(slotDecBrightness())); |
45 | 45 | ||
46 | m_sysChannel = new QCopChannel( "QPE/System", this ); | 46 | m_sysChannel = new QCopChannel( "QPE/System", this ); |
47 | connect( m_sysChannel, SIGNAL( received(const QCString&,const QByteArray&) ), | 47 | connect( m_sysChannel, SIGNAL( received(const QCString&,const QByteArray&) ), |
48 | this, SLOT( systemMessage(const QCString&,const QByteArray&) ) ); | 48 | this, SLOT( systemMessage(const QCString&,const QByteArray&) ) ); |
49 | setKeyCompression(true); | ||
49 | } | 50 | } |
50 | 51 | ||
51 | void ImageView::slotIncBrightness() | 52 | void ImageView::slotIncBrightness() |
52 | { | 53 | { |
53 | int lb = Intensity()+5; | 54 | int lb = Intensity()+5; |
54 | if (lb>100) lb=100; | 55 | if (lb>100) lb=100; |
55 | setIntensity(lb,true); | 56 | setIntensity(lb,true); |
56 | } | 57 | } |
57 | 58 | ||
58 | void ImageView::slotDecBrightness() | 59 | void ImageView::slotDecBrightness() |
59 | { | 60 | { |
60 | int lb = Intensity()-5; | 61 | int lb = Intensity()-5; |
61 | if (lb<-100) lb=-100; | 62 | if (lb<-100) lb=-100; |
62 | setIntensity(lb,true); | 63 | setIntensity(lb,true); |
63 | } | 64 | } |
64 | 65 | ||
65 | void ImageView::systemMessage( const QCString& msg, const QByteArray& data ) | 66 | void ImageView::systemMessage( const QCString& msg, const QByteArray& data ) |
66 | { | 67 | { |
67 | int _newrotation; | 68 | int _newrotation; |
68 | QDataStream stream( data, IO_ReadOnly ); | 69 | QDataStream stream( data, IO_ReadOnly ); |
69 | odebug << "received system message: " << msg << oendl; | ||
70 | if ( msg == "setCurrentRotation(int)" ) | 70 | if ( msg == "setCurrentRotation(int)" ) |
71 | { | 71 | { |
72 | stream >> _newrotation; | 72 | stream >> _newrotation; |
73 | odebug << "received setCurrentRotation(" << _newrotation << ")" << oendl; | ||
74 | if (!fullScreen()) { | 73 | if (!fullScreen()) { |
75 | m_rotation = _newrotation; | 74 | m_rotation = _newrotation; |
76 | return; | 75 | return; |
77 | } | 76 | } |
78 | } | 77 | } |
79 | } | 78 | } |
80 | 79 | ||
81 | void ImageView::setMenuActions(QActionGroup*hGroup,QActionGroup*nextprevGroup, QActionGroup*disptypeGroup,QActionGroup*brightGroup) | 80 | void ImageView::setMenuActions(QActionGroup*hGroup,QActionGroup*nextprevGroup, QActionGroup*disptypeGroup,QActionGroup*brightGroup) |
82 | { | 81 | { |
83 | m_gDisplayType = disptypeGroup; | 82 | m_gDisplayType = disptypeGroup; |
84 | m_gPrevNext = nextprevGroup; | 83 | m_gPrevNext = nextprevGroup; |
85 | m_hGroup = hGroup; | 84 | m_hGroup = hGroup; |
@@ -227,25 +226,24 @@ void ImageView::setCloseIfHide(bool how) | |||
227 | } | 226 | } |
228 | 227 | ||
229 | void ImageView::slotShowImageInfo() | 228 | void ImageView::slotShowImageInfo() |
230 | { | 229 | { |
231 | emit dispImageInfo(m_lastName); | 230 | emit dispImageInfo(m_lastName); |
232 | } | 231 | } |
233 | 232 | ||
234 | void ImageView::contentsMousePressEvent ( QMouseEvent * e) | 233 | void ImageView::contentsMousePressEvent ( QMouseEvent * e) |
235 | { | 234 | { |
236 | if (e->button()==1) { | 235 | if (e->button()==1) { |
237 | return OImageScrollView::contentsMousePressEvent(e); | 236 | return OImageScrollView::contentsMousePressEvent(e); |
238 | } | 237 | } |
239 | odebug << "Popup " << oendl; | ||
240 | QPopupMenu *m = new QPopupMenu(this); | 238 | QPopupMenu *m = new QPopupMenu(this); |
241 | if (!m) return; | 239 | if (!m) return; |
242 | if (m_hGroup) { | 240 | if (m_hGroup) { |
243 | m_hGroup->addTo(m); | 241 | m_hGroup->addTo(m); |
244 | } | 242 | } |
245 | if (fullScreen()) { | 243 | if (fullScreen()) { |
246 | if (m_gPrevNext) { | 244 | if (m_gPrevNext) { |
247 | m->insertSeparator(); | 245 | m->insertSeparator(); |
248 | m_gPrevNext->addTo(m); | 246 | m_gPrevNext->addTo(m); |
249 | } | 247 | } |
250 | if (m_gDisplayType) { | 248 | if (m_gDisplayType) { |
251 | m->insertSeparator(); | 249 | m->insertSeparator(); |
@@ -280,25 +278,24 @@ void ImageView::setFullScreen(bool how,bool force) | |||
280 | m_ignore_next_in = true; | 278 | m_ignore_next_in = true; |
281 | // setFixedSize(qApp->desktop()->size()); | 279 | // setFixedSize(qApp->desktop()->size()); |
282 | setGeometry(0,0,qApp->desktop()->size().width(),qApp->desktop()->size().height()); | 280 | setGeometry(0,0,qApp->desktop()->size().width(),qApp->desktop()->size().height()); |
283 | if (force) showFullScreen(); | 281 | if (force) showFullScreen(); |
284 | } else { | 282 | } else { |
285 | // setMinimumSize(10,10); | 283 | // setMinimumSize(10,10); |
286 | } | 284 | } |
287 | } | 285 | } |
288 | 286 | ||
289 | void ImageView::focusInEvent(QFocusEvent *) | 287 | void ImageView::focusInEvent(QFocusEvent *) |
290 | { | 288 | { |
291 | // Always do it here, no matter the size. | 289 | // Always do it here, no matter the size. |
292 | odebug << "Focus in (view)" << oendl; | ||
293 | //if (fullScreen()) parentWidget()->showNormal(); | 290 | //if (fullScreen()) parentWidget()->showNormal(); |
294 | if (m_ignore_next_in){m_ignore_next_in=false;return;} | 291 | if (m_ignore_next_in){m_ignore_next_in=false;return;} |
295 | if (fullScreen()) enableFullscreen(); | 292 | if (fullScreen()) enableFullscreen(); |
296 | } | 293 | } |
297 | 294 | ||
298 | void ImageView::hide() | 295 | void ImageView::hide() |
299 | { | 296 | { |
300 | if (fullScreen()) { | 297 | if (fullScreen()) { |
301 | m_ignore_next_in = true; | 298 | m_ignore_next_in = true; |
302 | showNormal(); | 299 | showNormal(); |
303 | } | 300 | } |
304 | QWidget::hide(); | 301 | QWidget::hide(); |