summaryrefslogtreecommitdiff
path: root/noncore/graphics
authorzecke <zecke>2004-07-24 18:46:24 (UTC)
committer zecke <zecke>2004-07-24 18:46:24 (UTC)
commit69df55bd0b74c7e59ff40390e2f1d902f882491f (patch) (side-by-side diff)
treeefb617312c1e77ca3990487d727bd283516a2702 /noncore/graphics
parent5a8963dff615da61611f5cc4bf410e7a6eeef55b (diff)
downloadopie-69df55bd0b74c7e59ff40390e2f1d902f882491f.zip
opie-69df55bd0b74c7e59ff40390e2f1d902f882491f.tar.gz
opie-69df55bd0b74c7e59ff40390e2f1d902f882491f.tar.bz2
Try to get the Keyup Event inside the IconView to not 'move'
forward later. Long Return press triggers autorepeat
Diffstat (limited to 'noncore/graphics') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/gui/iconview.cpp19
-rw-r--r--noncore/graphics/opie-eye/gui/iconview.h1
2 files changed, 20 insertions, 0 deletions
diff --git a/noncore/graphics/opie-eye/gui/iconview.cpp b/noncore/graphics/opie-eye/gui/iconview.cpp
index 211314b..652acc9 100644
--- a/noncore/graphics/opie-eye/gui/iconview.cpp
+++ b/noncore/graphics/opie-eye/gui/iconview.cpp
@@ -435,12 +435,15 @@ void PIconView::addFiles( const QStringList& lst) {
for (it=lst.begin(); it!= lst.end(); ++it ) {
m_pix = PPixmapCache::self()->cachedImage( pre+(*it), 64, 64 );
_iv = new IconViewItem( m_view, pre+(*it), (*it) );
if (m_mode==3) {
_iv->setTextOnly(true);
_iv->setPixmap(QPixmap());
+
+
+
} else {
if (m_pix) _iv->setPixmap(*m_pix);
}
}
}
@@ -457,12 +460,28 @@ void PIconView::slotClicked(QIconViewItem* _it) {
slotChangeDir( it->path() );
else // view image
slotShowImage();
}
/*
+ * Return was pressed. which is triggered by the keydown
+ * handler. The problem is that the key up will be handled
+ * by the ImageDisplayer and goes to the next image
+ */
+void PIconView::slotRetrun( QIconViewItem *_it ) {
+ if(!_it )
+ return;
+
+ IconViewItem* it = static_cast<IconViewItem*>(_it);
+ if( it->isDir() )
+ slotChangeDir( it->path() );
+ else
+ QTimer::singleShot(0, this, SLOT(slotShowImage()) );
+}
+
+/*
* got thumb info add to the cache if items is visible
* we later need update after processing of slave is done
*/
void PIconView::slotThumbInfo( const QString& _path, const QString& str ) {
IconViewItem* item = g_stringInf[_path];
if (!item )
diff --git a/noncore/graphics/opie-eye/gui/iconview.h b/noncore/graphics/opie-eye/gui/iconview.h
index 14ad168..a424c5c 100644
--- a/noncore/graphics/opie-eye/gui/iconview.h
+++ b/noncore/graphics/opie-eye/gui/iconview.h
@@ -73,12 +73,13 @@ private slots:
void slotEnd();
/* for performance reasons make it inline in the future */
void addFolders( const QStringList& );
void addFiles( const QStringList& );
void slotClicked(QIconViewItem* );
+ void slotRetrun(QIconViewItem* );
/**/
void slotThumbInfo(const QString&, const QString&);
void slotThumbNail(const QString&, const QPixmap&);
void slotChangeMode( int );