summaryrefslogtreecommitdiff
path: root/noncore/graphics/opie-eye/gui/iconview.cpp
Side-by-side diff
Diffstat (limited to 'noncore/graphics/opie-eye/gui/iconview.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/gui/iconview.cpp19
1 files changed, 19 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
@@ -429,46 +429,65 @@ void PIconView::addFiles( const QStringList& lst) {
IconViewItem * _iv;
QPixmap*m_pix = 0;
QString pre = "";
if (!m_path.isEmpty()) {
pre = m_path+"/";
}
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);
}
}
}
/*
* user clicked on the item. Change dir or view
*/
void PIconView::slotClicked(QIconViewItem* _it) {
if(!_it )
return;
IconViewItem* it = static_cast<IconViewItem*>(_it);
if( it->isDir() )
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 )
return;
if (m_mode == 2) {
return;
}
if ( item->intersects(QRect( m_view->contentsX(),m_view->contentsY(),