-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 @@ -232,69 +232,64 @@ PIconView::PIconView( QWidget* wid, Opie::Core::OConfig* cfg ) calculateGrid(); initKeys(); loadViews(); } void PIconView::setDoccalled(bool how) { m_setDocCalled = how; } /* * Unref the slave and save the keyboard manager */ PIconView::~PIconView() { { QCopEnvelope( "QPE/Application/opie-eye_slave", "refDown()" ); } m_viewManager->save(); delete m_viewManager; } Opie::Core::OKeyConfigManager* PIconView::manager() { return m_viewManager; } /* * init the KeyBoard Shortcuts * called from the c'tor */ void PIconView::initKeys() { Opie::Core::OKeyPair::List lst; - lst.append( Opie::Core::OKeyPair::upArrowKey() ); - lst.append( Opie::Core::OKeyPair::downArrowKey() ); - lst.append( Opie::Core::OKeyPair::leftArrowKey() ); - lst.append( Opie::Core::OKeyPair::rightArrowKey() ); - lst.append( Opie::Core::OKeyPair::returnKey() ); m_viewManager = new Opie::Core::OKeyConfigManager(m_cfg, "View-KeyBoard-Config", lst, false,this, "keyconfig name" ); m_viewManager->addKeyConfig( OKeyConfigItem(tr("Beam Current Item") , "beam", Opie::Core::OResource::loadPixmap("beam", Opie::Core::OResource::SmallIcon), BeamItem, Opie::Core::OKeyPair(Qt::Key_B, Qt::ShiftButton), this, SLOT(slotBeam())) ); m_viewManager->addKeyConfig( OKeyConfigItem(tr("Delete Current Item"), "delete", Opie::Core::OResource::loadPixmap("trash", Opie::Core::OResource::SmallIcon), DeleteItem, Opie::Core::OKeyPair(Qt::Key_D, Qt::ShiftButton), this, SLOT(slotTrash())) ); m_viewManager->addKeyConfig( OKeyConfigItem(tr("View Current Item"), "view", Opie::Core::OResource::loadPixmap("1to1", Opie::Core::OResource::SmallIcon), ViewItem, Opie::Core::OKeyPair(Qt::Key_V, Qt::ShiftButton), this, SLOT(slotShowImage()))); m_viewManager->addKeyConfig( OKeyConfigItem(tr("Show Image Info") , "info", Opie::Core::OResource::loadPixmap("DocumentTypeWord", Opie::Core::OResource::SmallIcon), InfoItem, Opie::Core::OKeyPair(Qt::Key_I, Qt::ShiftButton ), this, SLOT(slotImageInfo()) ) ); m_viewManager->addKeyConfig( OKeyConfigItem(tr("Start slideshow"), "slideshow", Opie::Core::OResource::loadPixmap("1to1", Opie::Core::OResource::SmallIcon), SlideItem, Opie::Core::OKeyPair(Qt::Key_S, Qt::ShiftButton), this, SLOT(slotStartSlide()))); m_viewManager->load(); m_viewManager->handleWidget( m_view ); } /* * change one dir up */ void PIconView::slotDirUp() 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 @@ -34,70 +34,64 @@ imageinfo::imageinfo(Opie::Core::OConfig *cfg,QWidget* parent, const char* name, m_cfg = cfg; init(name); initKeys(); } imageinfo::imageinfo(const QString&_path, QWidget* parent, const char* name, WFlags fl ) : QWidget( parent, name, fl ),currentFile(_path) { m_viewManager = 0; m_cfg = 0; init(name); initKeys(); slotChangeName(_path); } Opie::Core::OKeyConfigManager* imageinfo::manager() { if (!m_viewManager) { initKeys(); } return m_viewManager; } void imageinfo::initKeys() { #if 0 if (!m_cfg) { m_cfg = new Opie::Core::OConfig("phunkview"); m_cfg->setGroup("imageinfo_keys" ); } #endif Opie::Core::OKeyPair::List lst; - lst.append( Opie::Core::OKeyPair::upArrowKey() ); - lst.append( Opie::Core::OKeyPair::downArrowKey() ); - lst.append( Opie::Core::OKeyPair::leftArrowKey() ); - lst.append( Opie::Core::OKeyPair::rightArrowKey() ); - lst.append( Opie::Core::OKeyPair::returnKey() ); - m_viewManager = new Opie::Core::OKeyConfigManager(m_cfg, "imageinfo_keys", lst, false,this, "keyconfig name" ); m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("View Full Image"), "infoview", Opie::Core::OResource::loadPixmap("1to1", Opie::Core::OResource::SmallIcon), ViewItem, Opie::Core::OKeyPair(Qt::Key_V, Qt::ShiftButton), this, SLOT(slotShowImage()))); m_viewManager->load(); m_viewManager->handleWidget( this ); m_viewManager->handleWidget( TextView1 ); } void imageinfo::slotShowImage() { emit dispImage(currentFile); } void imageinfo::init(const char* name) { { QCopEnvelope( "QPE/Application/opie-eye_slave", "refUp()" ); } if ( !name ) setName( "imageinfo" ); resize( 289, 335 ); setCaption( tr( "Image info" ) ); imageinfoLayout = new QVBoxLayout( this ); imageinfoLayout->setSpacing(2); imageinfoLayout->setMargin(4); PixmapLabel1 = new QLabel( this, "PixmapLabel1" ); PixmapLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)5, PixmapLabel1->sizePolicy().hasHeightForWidth() ) ); QWhatsThis::add( PixmapLabel1, tr("Displays an thumbnail of the image") ); 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 @@ -116,68 +116,64 @@ void ImageView::stopSlide() { if (!m_slideTimer) { return; } m_slideTimer->stop(); delete m_slideTimer; m_slideTimer = 0; } void ImageView::nextSlide() { if (!m_slideTimer) { return; } #if 0 if (isHidden()) { delete m_slideTimer; m_slideTimer = 0; return; } #endif emit dispNext(); m_slideTimer->start(m_slideValue*1000,true); } void ImageView::initKeys() { odebug << "init imageview keys" << oendl; if (!m_cfg) { m_cfg = new Opie::Core::OConfig("opie-eye"); m_cfg->setGroup("image_view_keys" ); } Opie::Core::OKeyPair::List lst; - lst.append( Opie::Core::OKeyPair::upArrowKey() ); - lst.append( Opie::Core::OKeyPair::downArrowKey() ); - lst.append( Opie::Core::OKeyPair::leftArrowKey() ); - lst.append( Opie::Core::OKeyPair::rightArrowKey() ); lst.append( Opie::Core::OKeyPair(Qt::Key_Escape,0)); m_viewManager = new Opie::Core::OKeyConfigManager(m_cfg, "image_view_keys", lst, false,this, "image_view_keys" ); /** * Handle KeyEvents when they're pressed. This avoids problems * with 'double next' on Return. * The Return press would switch to this view and the return * release would emit the dispNext Signal. */ m_viewManager->setEventMask( Opie::Core::OKeyConfigManager::MaskPressed ); m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("View Image Info"), "imageviewinfo", Opie::Core::OResource::loadPixmap("1to1", Opie::Core::OResource::SmallIcon), ViewInfo, Opie::Core::OKeyPair(Qt::Key_I,0), this, SLOT(slotShowImageInfo()))); m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Toggle autorotate"), "imageautorotate", Opie::Core::OResource::loadPixmap("rotate", Opie::Core::OResource::SmallIcon), Autorotate, Opie::Core::OKeyPair(Qt::Key_R,0), this, SIGNAL(toggleAutorotate()))); m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Toggle autoscale"), "imageautoscale", Opie::Core::OResource::loadPixmap("1to1", Opie::Core::OResource::SmallIcon), Autoscale, Opie::Core::OKeyPair(Qt::Key_S,0), this, SIGNAL(toggleAutoscale()))); m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Switch to next image"), "imageshownext", Opie::Core::OResource::loadPixmap("forward", Opie::Core::OResource::SmallIcon), ShowNext, Opie::Core::OKeyPair(Qt::Key_Return,0), this, SIGNAL(dispNext()))); m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Switch to previous image"), "imageshowprev", |