-rw-r--r-- | noncore/graphics/opie-eye/gui/iconview.cpp | 29 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/gui/mainwindow.cpp | 2 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/slave/gif_slave.cpp | 3 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/slave/jpeg_slave.cpp | 5 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/slave/png_slave.cpp | 3 |
5 files changed, 20 insertions, 22 deletions
diff --git a/noncore/graphics/opie-eye/gui/iconview.cpp b/noncore/graphics/opie-eye/gui/iconview.cpp index b3f0006..ed9fc9c 100644 --- a/noncore/graphics/opie-eye/gui/iconview.cpp +++ b/noncore/graphics/opie-eye/gui/iconview.cpp @@ -13,4 +13,5 @@ #include <opie2/oconfig.h> #include <opie2/okeyconfigwidget.h> +#include <opie2/odebug.h> #include <qpe/resource.h> @@ -43,5 +44,6 @@ namespace { bool isDir()const { return m_isDir; } void setText( const QString& ); - void reCalc(); + + private: mutable QPixmap* m_pix; @@ -71,4 +73,8 @@ namespace { } inline QPixmap* IconViewItem::pixmap()const { + qWarning( "Name is " + m_path.right( 15 ) + " rect is %d %d %d %d | %d %d", + rect().x(),rect().y(),rect().width(),rect().height(), + iconView()->contentsX(), iconView()->contentsY()); + if ( m_isDir ) return _dirPix; @@ -91,10 +97,4 @@ namespace { m_noInfo = true; QIconViewItem::setText( text ); - reCalc(); - } - - inline void IconViewItem::reCalc() - { - calcRect(); } } @@ -123,9 +123,8 @@ PIconView::PIconView( QWidget* wid, Opie::Core::OConfig* cfg ) m_view->setArrangement( QIconView::LeftToRight ); m_view->setItemTextPos( QIconView::Right ); - m_view->setResizeMode(QIconView::Adjust); int dw = QApplication::desktop()->width(); int viewerWidth = dw-style().scrollBarExtent().width(); - m_view->setGridX( viewerWidth-2*m_view->spacing() ); + m_view->setGridX( viewerWidth-3*m_view->spacing()); m_view->setGridY( fontMetrics().height()*2+40 ); @@ -197,9 +196,9 @@ void PIconView::slotChangeDir(const QString& path) { m_path = lister->currentPath(); - m_view->setUpdatesEnabled( false ); + m_view->viewport()->setUpdatesEnabled( false ); m_view->clear(); addFolders( lister->folders() ); addFiles( lister->files() ); - m_view->setUpdatesEnabled( true ); + m_view->viewport()->setUpdatesEnabled( true ); // Also invalidate the cache. We can't cancel the operations anyway @@ -315,5 +314,4 @@ void PIconView::slotThumbInfo( const QString& _path, const QString& str ) { I dont know how to fix the format of displayed text :(*/ item->setText( str ); - item->repaint(); g_stringInf.remove( _path ); } @@ -326,9 +324,7 @@ void PIconView::slotThumbNail(const QString& _path, const QPixmap &pix) { PPixmapCache::self()->insertImage( _path, pix, 64, 64 ); /* required for a recalculated rectangle. otherwise the view show nonsense! */ - item->reCalc(); } else { PPixmapCache::self()->insertImage(_path,Resource::loadPixmap( "UnknownDocument" ),64,64 ); } - item->repaint(); g_stringPix.remove( _path ); } @@ -358,9 +354,10 @@ void PIconView::slotBeamDone( Ir* ir) { void PIconView::slotStart() { - m_view->setUpdatesEnabled( false ); + m_view->viewport()->setUpdatesEnabled( false ); } void PIconView::slotEnd() { - m_view->setUpdatesEnabled( true ); + m_view->arrangeItemsInGrid( ); + m_view->viewport()->setUpdatesEnabled( true ); } diff --git a/noncore/graphics/opie-eye/gui/mainwindow.cpp b/noncore/graphics/opie-eye/gui/mainwindow.cpp index 0314659..83ff4f1 100644 --- a/noncore/graphics/opie-eye/gui/mainwindow.cpp +++ b/noncore/graphics/opie-eye/gui/mainwindow.cpp @@ -110,5 +110,5 @@ void PMainWindow::slotConfig() { _wid->reparent(wid, QPoint() ); lst.insert( view, _wid ); - wid->addTab( _wid, QString::null, inf->name() ); + wid->addTab( _wid, "fileopen", inf->name() ); } diff --git a/noncore/graphics/opie-eye/slave/gif_slave.cpp b/noncore/graphics/opie-eye/slave/gif_slave.cpp index feb69b6..f0dc86e 100644 --- a/noncore/graphics/opie-eye/slave/gif_slave.cpp +++ b/noncore/graphics/opie-eye/slave/gif_slave.cpp @@ -287,6 +287,7 @@ QString GifSlave::iconViewName(const QString& str) { QString GifSlave::fullImageInfo( const QString& str) { - QString st; + QString st = "<qt>"; get_gif_info(QFile::encodeName( str ).data(), st, true ); + st.append( "</qt>" ); return st; } diff --git a/noncore/graphics/opie-eye/slave/jpeg_slave.cpp b/noncore/graphics/opie-eye/slave/jpeg_slave.cpp index 95055fd..086b47f 100644 --- a/noncore/graphics/opie-eye/slave/jpeg_slave.cpp +++ b/noncore/graphics/opie-eye/slave/jpeg_slave.cpp @@ -1301,5 +1301,5 @@ QString JpegSlave::iconViewName( const QString& path) { QString tag; - tag = QObject::tr( "<qt>Comment: %1\n" ).arg( ImageInfo.getComment() ); + tag = QObject::tr( "Comment: %1\n" ).arg( ImageInfo.getComment() ); { // ODP fixme @@ -1313,5 +1313,4 @@ QString JpegSlave::iconViewName( const QString& path) { tag += compression_to_string( ImageInfo.getCompressionLevel() ); - tag += QObject::tr( "</qt>" ); return tag; @@ -1328,5 +1327,5 @@ QString JpegSlave::fullImageInfo( const QString& path) { QString tag, tmp; - tag = QObject::tr( "Comment: %1\n" ).arg( ImageInfo.getComment() ); + tag = QObject::tr( "<qt>Comment: %1\n" ).arg( ImageInfo.getComment() ); tmp = ImageInfo.getCameraMake(); diff --git a/noncore/graphics/opie-eye/slave/png_slave.cpp b/noncore/graphics/opie-eye/slave/png_slave.cpp index 72b93cc..86e1cdc 100644 --- a/noncore/graphics/opie-eye/slave/png_slave.cpp +++ b/noncore/graphics/opie-eye/slave/png_slave.cpp @@ -196,6 +196,7 @@ QString PNGSlave::iconViewName( const QString& path) { QString PNGSlave::fullImageInfo( const QString& path) { - QString str; + QString str = "<qt>"; read_comment( path, true, str ); + str += "</qt>"; return str; } |