summaryrefslogtreecommitdiff
path: root/noncore/graphics/opie-eye/gui/imageview.cpp
Unidiff
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.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/noncore/graphics/opie-eye/gui/imageview.cpp b/noncore/graphics/opie-eye/gui/imageview.cpp
index b919ca8..cda1a96 100644
--- a/noncore/graphics/opie-eye/gui/imageview.cpp
+++ b/noncore/graphics/opie-eye/gui/imageview.cpp
@@ -1,19 +1,19 @@
1#include "imageview.h" 1#include "imageview.h"
2 2
3#include <opie2/odebug.h> 3#include <opie2/odebug.h>
4#include <opie2/oconfig.h> 4#include <opie2/oconfig.h>
5#include <opie2/okeyconfigwidget.h> 5#include <opie2/okeyconfigwidget.h>
6#include <opie2/oresource.h>
6 7
7#include <qpe/resource.h>
8#include <qpe/qpeapplication.h> 8#include <qpe/qpeapplication.h>
9#include <qpe/qcopenvelope_qws.h> 9#include <qpe/qcopenvelope_qws.h>
10 10
11#include <qpopupmenu.h> 11#include <qpopupmenu.h>
12#include <qtimer.h> 12#include <qtimer.h>
13#include <qaction.h> 13#include <qaction.h>
14 14
15using namespace Opie::Core; 15using namespace Opie::Core;
16 16
17ImageView::ImageView(Opie::Core::OConfig *cfg, QWidget* parent, const char* name, WFlags fl ) 17ImageView::ImageView(Opie::Core::OConfig *cfg, QWidget* parent, const char* name, WFlags fl )
18 : Opie::MM::OImageScrollView(parent,name,fl) 18 : Opie::MM::OImageScrollView(parent,name,fl)
19{ 19{
@@ -154,61 +154,61 @@ void ImageView::initKeys()
154 m_viewManager = new Opie::Core::OKeyConfigManager(m_cfg, "image_view_keys", 154 m_viewManager = new Opie::Core::OKeyConfigManager(m_cfg, "image_view_keys",
155 lst, false,this, "image_view_keys" ); 155 lst, false,this, "image_view_keys" );
156 156
157 /** 157 /**
158 * Handle KeyEvents when they're pressed. This avoids problems 158 * Handle KeyEvents when they're pressed. This avoids problems
159 * with 'double next' on Return. 159 * with 'double next' on Return.
160 * The Return press would switch to this view and the return 160 * The Return press would switch to this view and the return
161 * release would emit the dispNext Signal. 161 * release would emit the dispNext Signal.
162 */ 162 */
163 m_viewManager->setEventMask( Opie::Core::OKeyConfigManager::MaskPressed ); 163 m_viewManager->setEventMask( Opie::Core::OKeyConfigManager::MaskPressed );
164 164
165 m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("View Image Info"), "imageviewinfo", 165 m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("View Image Info"), "imageviewinfo",
166 Resource::loadPixmap("1to1"), ViewInfo, 166 Opie::Core::OResource::loadPixmap("1to1", Opie::Core::OResource::SmallIcon),
167 Opie::Core::OKeyPair(Qt::Key_I,0), 167 ViewInfo, Opie::Core::OKeyPair(Qt::Key_I,0),
168 this, SLOT(slotShowImageInfo()))); 168 this, SLOT(slotShowImageInfo())));
169 169
170 m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Toggle autorotate"), "imageautorotate", 170 m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Toggle autorotate"), "imageautorotate",
171 Resource::loadPixmap("rotate"), Autorotate, 171 Opie::Core::OResource::loadPixmap("rotate", Opie::Core::OResource::SmallIcon),
172 Opie::Core::OKeyPair(Qt::Key_R,0), 172 Autorotate, Opie::Core::OKeyPair(Qt::Key_R,0),
173 this, SIGNAL(toggleAutorotate()))); 173 this, SIGNAL(toggleAutorotate())));
174 m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Toggle autoscale"), "imageautoscale", 174 m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Toggle autoscale"), "imageautoscale",
175 Resource::loadPixmap("1to1"), Autoscale, 175 Opie::Core::OResource::loadPixmap("1to1", Opie::Core::OResource::SmallIcon),
176 Opie::Core::OKeyPair(Qt::Key_S,0), 176 Autoscale, Opie::Core::OKeyPair(Qt::Key_S,0),
177 this, SIGNAL(toggleAutoscale()))); 177 this, SIGNAL(toggleAutoscale())));
178 178
179 m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Switch to next image"), "imageshownext", 179 m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Switch to next image"), "imageshownext",
180 Resource::loadPixmap("forward"), ShowNext, 180 Opie::Core::OResource::loadPixmap("forward", Opie::Core::OResource::SmallIcon),
181 Opie::Core::OKeyPair(Qt::Key_Return,0), 181 ShowNext, Opie::Core::OKeyPair(Qt::Key_Return,0),
182 this, SIGNAL(dispNext()))); 182 this, SIGNAL(dispNext())));
183 m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Switch to previous image"), "imageshowprev", 183 m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Switch to previous image"), "imageshowprev",
184 Resource::loadPixmap("back"), ShowPrevious, 184 Opie::Core::OResource::loadPixmap("back", Opie::Core::OResource::SmallIcon),
185 Opie::Core::OKeyPair(Qt::Key_P,0), 185 ShowPrevious, Opie::Core::OKeyPair(Qt::Key_P,0),
186 this, SIGNAL(dispPrev()))); 186 this, SIGNAL(dispPrev())));
187 m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Toggle fullscreen"), "imagefullscreen", 187 m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Toggle fullscreen"), "imagefullscreen",
188 Resource::loadPixmap("fullscreen"), FullScreen, 188 Opie::Core::OResource::loadPixmap("fullscreen", Opie::Core::OResource::SmallIcon),
189 Opie::Core::OKeyPair(Qt::Key_F,0), 189 FullScreen, Opie::Core::OKeyPair(Qt::Key_F,0),
190 this, SIGNAL(toggleFullScreen()))); 190 this, SIGNAL(toggleFullScreen())));
191 m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Toggle thumbnail"), "imagezoomer", 191 m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Toggle thumbnail"), "imagezoomer",
192 Resource::loadPixmap("mag"), Zoomer, 192 Opie::Core::OResource::loadPixmap("mag", Opie::Core::OResource::SmallIcon),
193 Opie::Core::OKeyPair(Qt::Key_T,0), 193 Zoomer, Opie::Core::OKeyPair(Qt::Key_T,0),
194 this, SIGNAL(toggleZoomer()))); 194 this, SIGNAL(toggleZoomer())));
195 195
196 m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Increase brightness"), "incbrightness", 196 m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Increase brightness"), "incbrightness",
197 Resource::loadPixmap("up"), Incbrightness, 197 Opie::Core::OResource::loadPixmap("up", Opie::Core::OResource::SmallIcon),
198 Opie::Core::OKeyPair(Qt::Key_B,0), 198 Incbrightness, Opie::Core::OKeyPair(Qt::Key_B,0),
199 this, SIGNAL(incBrightness()))); 199 this, SIGNAL(incBrightness())));
200 m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Decrease brightness"), "decbrightness", 200 m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Decrease brightness"), "decbrightness",
201 Resource::loadPixmap("down"), Decbrightness, 201 Opie::Core::OResource::loadPixmap("down", Opie::Core::OResource::SmallIcon),
202 Opie::Core::OKeyPair(Qt::Key_D,0), 202 Decbrightness, Opie::Core::OKeyPair(Qt::Key_D,0),
203 this, SIGNAL(decBrightness()))); 203 this, SIGNAL(decBrightness())));
204 m_viewManager->handleWidget( this ); 204 m_viewManager->handleWidget( this );
205 m_viewManager->load(); 205 m_viewManager->load();
206} 206}
207 207
208void ImageView::keyReleaseEvent(QKeyEvent * e) 208void ImageView::keyReleaseEvent(QKeyEvent * e)
209{ 209{
210 if (!e || e->state()!=0) { 210 if (!e || e->state()!=0) {
211 return; 211 return;
212 } 212 }
213 if (e->key()==Qt::Key_Escape) { 213 if (e->key()==Qt::Key_Escape) {
214 if (fullScreen()) { 214 if (fullScreen()) {