summaryrefslogtreecommitdiff
path: root/noncore/graphics/opie-eye/gui/iconview.cpp
Unidiff
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.cpp63
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 @@
12 12
13#include <qpe/config.h> 13#include <opie2/oconfig.h>
14#include <opie2/okeyconfigwidget.h>
15
14#include <qpe/resource.h> 16#include <qpe/resource.h>
@@ -18,2 +20,3 @@
18 20
21
19#include <qiconview.h> 22#include <qiconview.h>
@@ -29,2 +32,3 @@
29 32
33using Opie::Ui::OKeyConfigItem;
30 34
@@ -98,3 +102,3 @@ namespace {
98 102
99PIconView::PIconView( QWidget* wid, Config* cfg ) 103PIconView::PIconView( QWidget* wid, Opie::Core::OConfig* cfg )
100 : QVBox( wid ), m_cfg( cfg ) 104 : QVBox( wid ), m_cfg( cfg )
@@ -126,2 +130,6 @@ PIconView::PIconView( QWidget* wid, Config* cfg )
126 m_view->setGridY( fontMetrics().height()*2+40 ); 130 m_view->setGridY( fontMetrics().height()*2+40 );
131
132
133 initKeys();
134
127 loadViews(); 135 loadViews();
@@ -134,2 +142,38 @@ PIconView::~PIconView() {
134 } 142 }
143 m_viewManager->save();
144 delete m_viewManager;
145}
146
147Opie::Ui::OKeyConfigManager* PIconView::manager() {
148 return m_viewManager;
149}
150
151void PIconView::initKeys() {
152 Opie::Ui::OKeyPair::List lst;
153 lst.append( Opie::Ui::OKeyPair::upArrowKey() );
154 lst.append( Opie::Ui::OKeyPair::downArrowKey() );
155 lst.append( Opie::Ui::OKeyPair::leftArrowKey() );
156 lst.append( Opie::Ui::OKeyPair::rightArrowKey() );
157 lst.append( Opie::Ui::OKeyPair::returnKey() );
158
159 m_viewManager = new Opie::Ui::OKeyConfigManager(m_cfg, "View-KeyBoard-Config",
160 lst, false,this, "keyconfig name" );
161 m_viewManager->addKeyConfig( OKeyConfigItem(tr("Beam Current Item") , "beam",
162 QString::fromLatin1("beam"), BeamItem,
163 Opie::Ui::OKeyPair(Qt::Key_B, Qt::ShiftButton),
164 this, SLOT(slotBeam())) );
165 m_viewManager->addKeyConfig( OKeyConfigItem(tr("Delete Current Item"), "delete",
166 QString::fromLatin1("trash"), DeleteItem,
167 Opie::Ui::OKeyPair(Qt::Key_D, Qt::ShiftButton),
168 this, SLOT(slotTrash())) );
169 m_viewManager->addKeyConfig( OKeyConfigItem(tr("View Current Item"), "view",
170 QString::fromLatin1("1to1"), ViewItem,
171 Opie::Ui::OKeyPair(Qt::Key_V, Qt::ShiftButton),
172 this, SLOT(slotShowImage())));
173 m_viewManager->addKeyConfig( OKeyConfigItem(tr("Show Image Info") , "info",
174 QString::fromLatin1("DocumentTypeWord"), InfoItem,
175 Opie::Ui::OKeyPair(Qt::Key_I, Qt::ShiftButton ),
176 this, SLOT(slotImageInfo()) ) );
177 m_viewManager->load();
178 m_viewManager->handleWidget( m_view );
135} 179}
@@ -154,2 +198,3 @@ void PIconView::slotChangeDir(const QString& path) {
154 198
199 m_view->setUpdatesEnabled( false );
155 m_view->clear(); 200 m_view->clear();
@@ -157,2 +202,3 @@ void PIconView::slotChangeDir(const QString& path) {
157 addFiles( lister->files() ); 202 addFiles( lister->files() );
203 m_view->setUpdatesEnabled( true );
158 204
@@ -319 +365,14 @@ void PIconView::slotEnd() {
319} 365}
366
367void PIconView::slotShowImage() {
368
369}
370void PIconView::slotShowImage( const QString& ) {
371
372}
373void PIconView::slotImageInfo() {
374
375}
376void PIconView::slotImageInfo( const QString& ) {
377
378}