Diffstat (limited to 'noncore/graphics/opie-eye/gui/iconview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/graphics/opie-eye/gui/iconview.cpp | 63 |
1 files changed, 61 insertions, 2 deletions
diff --git a/noncore/graphics/opie-eye/gui/iconview.cpp b/noncore/graphics/opie-eye/gui/iconview.cpp index 74a8d0f..b3f0006 100644 --- a/noncore/graphics/opie-eye/gui/iconview.cpp +++ b/noncore/graphics/opie-eye/gui/iconview.cpp @@ -12,3 +12,5 @@ -#include <qpe/config.h> +#include <opie2/oconfig.h> +#include <opie2/okeyconfigwidget.h> + #include <qpe/resource.h> @@ -18,2 +20,3 @@ + #include <qiconview.h> @@ -29,2 +32,3 @@ +using Opie::Ui::OKeyConfigItem; @@ -98,3 +102,3 @@ namespace { -PIconView::PIconView( QWidget* wid, Config* cfg ) +PIconView::PIconView( QWidget* wid, Opie::Core::OConfig* cfg ) : QVBox( wid ), m_cfg( cfg ) @@ -126,2 +130,6 @@ PIconView::PIconView( QWidget* wid, Config* cfg ) m_view->setGridY( fontMetrics().height()*2+40 ); + + + initKeys(); + loadViews(); @@ -134,2 +142,38 @@ PIconView::~PIconView() { } + m_viewManager->save(); + delete m_viewManager; +} + +Opie::Ui::OKeyConfigManager* PIconView::manager() { + return m_viewManager; +} + +void PIconView::initKeys() { + Opie::Ui::OKeyPair::List lst; + lst.append( Opie::Ui::OKeyPair::upArrowKey() ); + lst.append( Opie::Ui::OKeyPair::downArrowKey() ); + lst.append( Opie::Ui::OKeyPair::leftArrowKey() ); + lst.append( Opie::Ui::OKeyPair::rightArrowKey() ); + lst.append( Opie::Ui::OKeyPair::returnKey() ); + + m_viewManager = new Opie::Ui::OKeyConfigManager(m_cfg, "View-KeyBoard-Config", + lst, false,this, "keyconfig name" ); + m_viewManager->addKeyConfig( OKeyConfigItem(tr("Beam Current Item") , "beam", + QString::fromLatin1("beam"), BeamItem, + Opie::Ui::OKeyPair(Qt::Key_B, Qt::ShiftButton), + this, SLOT(slotBeam())) ); + m_viewManager->addKeyConfig( OKeyConfigItem(tr("Delete Current Item"), "delete", + QString::fromLatin1("trash"), DeleteItem, + Opie::Ui::OKeyPair(Qt::Key_D, Qt::ShiftButton), + this, SLOT(slotTrash())) ); + m_viewManager->addKeyConfig( OKeyConfigItem(tr("View Current Item"), "view", + QString::fromLatin1("1to1"), ViewItem, + Opie::Ui::OKeyPair(Qt::Key_V, Qt::ShiftButton), + this, SLOT(slotShowImage()))); + m_viewManager->addKeyConfig( OKeyConfigItem(tr("Show Image Info") , "info", + QString::fromLatin1("DocumentTypeWord"), InfoItem, + Opie::Ui::OKeyPair(Qt::Key_I, Qt::ShiftButton ), + this, SLOT(slotImageInfo()) ) ); + m_viewManager->load(); + m_viewManager->handleWidget( m_view ); } @@ -154,2 +198,3 @@ void PIconView::slotChangeDir(const QString& path) { + m_view->setUpdatesEnabled( false ); m_view->clear(); @@ -157,2 +202,3 @@ void PIconView::slotChangeDir(const QString& path) { addFiles( lister->files() ); + m_view->setUpdatesEnabled( true ); @@ -319 +365,14 @@ void PIconView::slotEnd() { } + +void PIconView::slotShowImage() { + +} +void PIconView::slotShowImage( const QString& ) { + +} +void PIconView::slotImageInfo() { + +} +void PIconView::slotImageInfo( const QString& ) { + +} |