-rw-r--r-- | noncore/graphics/opie-eye/gui/iconview.cpp | 5 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/gui/imageinfoui.cpp | 6 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/gui/imageview.cpp | 4 |
3 files changed, 0 insertions, 15 deletions
diff --git a/noncore/graphics/opie-eye/gui/iconview.cpp b/noncore/graphics/opie-eye/gui/iconview.cpp index 9365932..ca5746d 100644 --- a/noncore/graphics/opie-eye/gui/iconview.cpp +++ b/noncore/graphics/opie-eye/gui/iconview.cpp | |||
@@ -240,53 +240,48 @@ void PIconView::setDoccalled(bool how) | |||
240 | } | 240 | } |
241 | 241 | ||
242 | /* | 242 | /* |
243 | * Unref the slave and save the keyboard manager | 243 | * Unref the slave and save the keyboard manager |
244 | */ | 244 | */ |
245 | PIconView::~PIconView() { | 245 | PIconView::~PIconView() { |
246 | { | 246 | { |
247 | QCopEnvelope( "QPE/Application/opie-eye_slave", "refDown()" ); | 247 | QCopEnvelope( "QPE/Application/opie-eye_slave", "refDown()" ); |
248 | } | 248 | } |
249 | m_viewManager->save(); | 249 | m_viewManager->save(); |
250 | delete m_viewManager; | 250 | delete m_viewManager; |
251 | } | 251 | } |
252 | 252 | ||
253 | Opie::Core::OKeyConfigManager* PIconView::manager() { | 253 | Opie::Core::OKeyConfigManager* PIconView::manager() { |
254 | return m_viewManager; | 254 | return m_viewManager; |
255 | } | 255 | } |
256 | 256 | ||
257 | 257 | ||
258 | /* | 258 | /* |
259 | * init the KeyBoard Shortcuts | 259 | * init the KeyBoard Shortcuts |
260 | * called from the c'tor | 260 | * called from the c'tor |
261 | */ | 261 | */ |
262 | void PIconView::initKeys() { | 262 | void PIconView::initKeys() { |
263 | Opie::Core::OKeyPair::List lst; | 263 | Opie::Core::OKeyPair::List lst; |
264 | lst.append( Opie::Core::OKeyPair::upArrowKey() ); | ||
265 | lst.append( Opie::Core::OKeyPair::downArrowKey() ); | ||
266 | lst.append( Opie::Core::OKeyPair::leftArrowKey() ); | ||
267 | lst.append( Opie::Core::OKeyPair::rightArrowKey() ); | ||
268 | lst.append( Opie::Core::OKeyPair::returnKey() ); | ||
269 | 264 | ||
270 | m_viewManager = new Opie::Core::OKeyConfigManager(m_cfg, "View-KeyBoard-Config", | 265 | m_viewManager = new Opie::Core::OKeyConfigManager(m_cfg, "View-KeyBoard-Config", |
271 | lst, false,this, "keyconfig name" ); | 266 | lst, false,this, "keyconfig name" ); |
272 | m_viewManager->addKeyConfig( OKeyConfigItem(tr("Beam Current Item") , "beam", | 267 | m_viewManager->addKeyConfig( OKeyConfigItem(tr("Beam Current Item") , "beam", |
273 | Opie::Core::OResource::loadPixmap("beam", Opie::Core::OResource::SmallIcon), | 268 | Opie::Core::OResource::loadPixmap("beam", Opie::Core::OResource::SmallIcon), |
274 | BeamItem, Opie::Core::OKeyPair(Qt::Key_B, Qt::ShiftButton), | 269 | BeamItem, Opie::Core::OKeyPair(Qt::Key_B, Qt::ShiftButton), |
275 | this, SLOT(slotBeam())) ); | 270 | this, SLOT(slotBeam())) ); |
276 | m_viewManager->addKeyConfig( OKeyConfigItem(tr("Delete Current Item"), "delete", | 271 | m_viewManager->addKeyConfig( OKeyConfigItem(tr("Delete Current Item"), "delete", |
277 | Opie::Core::OResource::loadPixmap("trash", Opie::Core::OResource::SmallIcon), | 272 | Opie::Core::OResource::loadPixmap("trash", Opie::Core::OResource::SmallIcon), |
278 | DeleteItem, Opie::Core::OKeyPair(Qt::Key_D, Qt::ShiftButton), | 273 | DeleteItem, Opie::Core::OKeyPair(Qt::Key_D, Qt::ShiftButton), |
279 | this, SLOT(slotTrash())) ); | 274 | this, SLOT(slotTrash())) ); |
280 | m_viewManager->addKeyConfig( OKeyConfigItem(tr("View Current Item"), "view", | 275 | m_viewManager->addKeyConfig( OKeyConfigItem(tr("View Current Item"), "view", |
281 | Opie::Core::OResource::loadPixmap("1to1", Opie::Core::OResource::SmallIcon), | 276 | Opie::Core::OResource::loadPixmap("1to1", Opie::Core::OResource::SmallIcon), |
282 | ViewItem, Opie::Core::OKeyPair(Qt::Key_V, Qt::ShiftButton), | 277 | ViewItem, Opie::Core::OKeyPair(Qt::Key_V, Qt::ShiftButton), |
283 | this, SLOT(slotShowImage()))); | 278 | this, SLOT(slotShowImage()))); |
284 | m_viewManager->addKeyConfig( OKeyConfigItem(tr("Show Image Info") , "info", | 279 | m_viewManager->addKeyConfig( OKeyConfigItem(tr("Show Image Info") , "info", |
285 | Opie::Core::OResource::loadPixmap("DocumentTypeWord", Opie::Core::OResource::SmallIcon), | 280 | Opie::Core::OResource::loadPixmap("DocumentTypeWord", Opie::Core::OResource::SmallIcon), |
286 | InfoItem, Opie::Core::OKeyPair(Qt::Key_I, Qt::ShiftButton ), | 281 | InfoItem, Opie::Core::OKeyPair(Qt::Key_I, Qt::ShiftButton ), |
287 | this, SLOT(slotImageInfo()) ) ); | 282 | this, SLOT(slotImageInfo()) ) ); |
288 | m_viewManager->addKeyConfig( OKeyConfigItem(tr("Start slideshow"), "slideshow", | 283 | m_viewManager->addKeyConfig( OKeyConfigItem(tr("Start slideshow"), "slideshow", |
289 | Opie::Core::OResource::loadPixmap("1to1", Opie::Core::OResource::SmallIcon), | 284 | Opie::Core::OResource::loadPixmap("1to1", Opie::Core::OResource::SmallIcon), |
290 | SlideItem, Opie::Core::OKeyPair(Qt::Key_S, Qt::ShiftButton), | 285 | SlideItem, Opie::Core::OKeyPair(Qt::Key_S, Qt::ShiftButton), |
291 | this, SLOT(slotStartSlide()))); | 286 | this, SLOT(slotStartSlide()))); |
292 | m_viewManager->load(); | 287 | m_viewManager->load(); |
diff --git a/noncore/graphics/opie-eye/gui/imageinfoui.cpp b/noncore/graphics/opie-eye/gui/imageinfoui.cpp index 8f70602..8e31521 100644 --- a/noncore/graphics/opie-eye/gui/imageinfoui.cpp +++ b/noncore/graphics/opie-eye/gui/imageinfoui.cpp | |||
@@ -42,54 +42,48 @@ imageinfo::imageinfo(const QString&_path, QWidget* parent, const char* name, WF | |||
42 | m_viewManager = 0; | 42 | m_viewManager = 0; |
43 | m_cfg = 0; | 43 | m_cfg = 0; |
44 | init(name); | 44 | init(name); |
45 | initKeys(); | 45 | initKeys(); |
46 | slotChangeName(_path); | 46 | slotChangeName(_path); |
47 | } | 47 | } |
48 | 48 | ||
49 | Opie::Core::OKeyConfigManager* imageinfo::manager() | 49 | Opie::Core::OKeyConfigManager* imageinfo::manager() |
50 | { | 50 | { |
51 | if (!m_viewManager) { | 51 | if (!m_viewManager) { |
52 | initKeys(); | 52 | initKeys(); |
53 | } | 53 | } |
54 | return m_viewManager; | 54 | return m_viewManager; |
55 | } | 55 | } |
56 | 56 | ||
57 | void imageinfo::initKeys() | 57 | void imageinfo::initKeys() |
58 | { | 58 | { |
59 | #if 0 | 59 | #if 0 |
60 | if (!m_cfg) { | 60 | if (!m_cfg) { |
61 | m_cfg = new Opie::Core::OConfig("phunkview"); | 61 | m_cfg = new Opie::Core::OConfig("phunkview"); |
62 | m_cfg->setGroup("imageinfo_keys" ); | 62 | m_cfg->setGroup("imageinfo_keys" ); |
63 | } | 63 | } |
64 | #endif | 64 | #endif |
65 | Opie::Core::OKeyPair::List lst; | 65 | Opie::Core::OKeyPair::List lst; |
66 | lst.append( Opie::Core::OKeyPair::upArrowKey() ); | ||
67 | lst.append( Opie::Core::OKeyPair::downArrowKey() ); | ||
68 | lst.append( Opie::Core::OKeyPair::leftArrowKey() ); | ||
69 | lst.append( Opie::Core::OKeyPair::rightArrowKey() ); | ||
70 | lst.append( Opie::Core::OKeyPair::returnKey() ); | ||
71 | |||
72 | m_viewManager = new Opie::Core::OKeyConfigManager(m_cfg, "imageinfo_keys", | 66 | m_viewManager = new Opie::Core::OKeyConfigManager(m_cfg, "imageinfo_keys", |
73 | lst, false,this, "keyconfig name" ); | 67 | lst, false,this, "keyconfig name" ); |
74 | m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("View Full Image"), "infoview", | 68 | m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("View Full Image"), "infoview", |
75 | Opie::Core::OResource::loadPixmap("1to1", Opie::Core::OResource::SmallIcon), | 69 | Opie::Core::OResource::loadPixmap("1to1", Opie::Core::OResource::SmallIcon), |
76 | ViewItem, Opie::Core::OKeyPair(Qt::Key_V, Qt::ShiftButton), | 70 | ViewItem, Opie::Core::OKeyPair(Qt::Key_V, Qt::ShiftButton), |
77 | this, SLOT(slotShowImage()))); | 71 | this, SLOT(slotShowImage()))); |
78 | m_viewManager->load(); | 72 | m_viewManager->load(); |
79 | m_viewManager->handleWidget( this ); | 73 | m_viewManager->handleWidget( this ); |
80 | m_viewManager->handleWidget( TextView1 ); | 74 | m_viewManager->handleWidget( TextView1 ); |
81 | } | 75 | } |
82 | 76 | ||
83 | void imageinfo::slotShowImage() | 77 | void imageinfo::slotShowImage() |
84 | { | 78 | { |
85 | emit dispImage(currentFile); | 79 | emit dispImage(currentFile); |
86 | } | 80 | } |
87 | 81 | ||
88 | void imageinfo::init(const char* name) { | 82 | void imageinfo::init(const char* name) { |
89 | { | 83 | { |
90 | QCopEnvelope( "QPE/Application/opie-eye_slave", "refUp()" ); | 84 | QCopEnvelope( "QPE/Application/opie-eye_slave", "refUp()" ); |
91 | } | 85 | } |
92 | if ( !name ) | 86 | if ( !name ) |
93 | setName( "imageinfo" ); | 87 | setName( "imageinfo" ); |
94 | resize( 289, 335 ); | 88 | resize( 289, 335 ); |
95 | setCaption( tr( "Image info" ) ); | 89 | setCaption( tr( "Image info" ) ); |
diff --git a/noncore/graphics/opie-eye/gui/imageview.cpp b/noncore/graphics/opie-eye/gui/imageview.cpp index cda1a96..ec891a8 100644 --- a/noncore/graphics/opie-eye/gui/imageview.cpp +++ b/noncore/graphics/opie-eye/gui/imageview.cpp | |||
@@ -124,52 +124,48 @@ void ImageView::stopSlide() | |||
124 | 124 | ||
125 | void ImageView::nextSlide() | 125 | void ImageView::nextSlide() |
126 | { | 126 | { |
127 | if (!m_slideTimer) { | 127 | if (!m_slideTimer) { |
128 | return; | 128 | return; |
129 | } | 129 | } |
130 | #if 0 | 130 | #if 0 |
131 | if (isHidden()) { | 131 | if (isHidden()) { |
132 | delete m_slideTimer; | 132 | delete m_slideTimer; |
133 | m_slideTimer = 0; | 133 | m_slideTimer = 0; |
134 | return; | 134 | return; |
135 | } | 135 | } |
136 | #endif | 136 | #endif |
137 | emit dispNext(); | 137 | emit dispNext(); |
138 | m_slideTimer->start(m_slideValue*1000,true); | 138 | m_slideTimer->start(m_slideValue*1000,true); |
139 | } | 139 | } |
140 | void ImageView::initKeys() | 140 | void ImageView::initKeys() |
141 | { | 141 | { |
142 | odebug << "init imageview keys" << oendl; | 142 | odebug << "init imageview keys" << oendl; |
143 | if (!m_cfg) { | 143 | if (!m_cfg) { |
144 | m_cfg = new Opie::Core::OConfig("opie-eye"); | 144 | m_cfg = new Opie::Core::OConfig("opie-eye"); |
145 | m_cfg->setGroup("image_view_keys" ); | 145 | m_cfg->setGroup("image_view_keys" ); |
146 | } | 146 | } |
147 | Opie::Core::OKeyPair::List lst; | 147 | Opie::Core::OKeyPair::List lst; |
148 | lst.append( Opie::Core::OKeyPair::upArrowKey() ); | ||
149 | lst.append( Opie::Core::OKeyPair::downArrowKey() ); | ||
150 | lst.append( Opie::Core::OKeyPair::leftArrowKey() ); | ||
151 | lst.append( Opie::Core::OKeyPair::rightArrowKey() ); | ||
152 | lst.append( Opie::Core::OKeyPair(Qt::Key_Escape,0)); | 148 | lst.append( Opie::Core::OKeyPair(Qt::Key_Escape,0)); |
153 | 149 | ||
154 | m_viewManager = new Opie::Core::OKeyConfigManager(m_cfg, "image_view_keys", | 150 | m_viewManager = new Opie::Core::OKeyConfigManager(m_cfg, "image_view_keys", |
155 | lst, false,this, "image_view_keys" ); | 151 | lst, false,this, "image_view_keys" ); |
156 | 152 | ||
157 | /** | 153 | /** |
158 | * Handle KeyEvents when they're pressed. This avoids problems | 154 | * Handle KeyEvents when they're pressed. This avoids problems |
159 | * with 'double next' on Return. | 155 | * with 'double next' on Return. |
160 | * The Return press would switch to this view and the return | 156 | * The Return press would switch to this view and the return |
161 | * release would emit the dispNext Signal. | 157 | * release would emit the dispNext Signal. |
162 | */ | 158 | */ |
163 | m_viewManager->setEventMask( Opie::Core::OKeyConfigManager::MaskPressed ); | 159 | m_viewManager->setEventMask( Opie::Core::OKeyConfigManager::MaskPressed ); |
164 | 160 | ||
165 | m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("View Image Info"), "imageviewinfo", | 161 | m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("View Image Info"), "imageviewinfo", |
166 | Opie::Core::OResource::loadPixmap("1to1", Opie::Core::OResource::SmallIcon), | 162 | Opie::Core::OResource::loadPixmap("1to1", Opie::Core::OResource::SmallIcon), |
167 | ViewInfo, Opie::Core::OKeyPair(Qt::Key_I,0), | 163 | ViewInfo, Opie::Core::OKeyPair(Qt::Key_I,0), |
168 | this, SLOT(slotShowImageInfo()))); | 164 | this, SLOT(slotShowImageInfo()))); |
169 | 165 | ||
170 | m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Toggle autorotate"), "imageautorotate", | 166 | m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Toggle autorotate"), "imageautorotate", |
171 | Opie::Core::OResource::loadPixmap("rotate", Opie::Core::OResource::SmallIcon), | 167 | Opie::Core::OResource::loadPixmap("rotate", Opie::Core::OResource::SmallIcon), |
172 | Autorotate, Opie::Core::OKeyPair(Qt::Key_R,0), | 168 | Autorotate, Opie::Core::OKeyPair(Qt::Key_R,0), |
173 | this, SIGNAL(toggleAutorotate()))); | 169 | this, SIGNAL(toggleAutorotate()))); |
174 | m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Toggle autoscale"), "imageautoscale", | 170 | m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Toggle autoscale"), "imageautoscale", |
175 | Opie::Core::OResource::loadPixmap("1to1", Opie::Core::OResource::SmallIcon), | 171 | Opie::Core::OResource::loadPixmap("1to1", Opie::Core::OResource::SmallIcon), |