author | zecke <zecke> | 2004-04-02 19:28:09 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-04-02 19:28:09 (UTC) |
commit | 97bdc55663590ba430a4f322ad97aab9f4c02bf3 (patch) (unidiff) | |
tree | 8d340684ac97907b73d6b8abf995116f58680cdd | |
parent | 09d1ebb55ab44ebd129ff44b83b6b20054df77aa (diff) | |
download | opie-97bdc55663590ba430a4f322ad97aab9f4c02bf3.zip opie-97bdc55663590ba430a4f322ad97aab9f4c02bf3.tar.gz opie-97bdc55663590ba430a4f322ad97aab9f4c02bf3.tar.bz2 |
-Fix realignment of the items but now it updates too often
-Fix slave not to include <qt></qt> for iconViewName
-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 | |||
@@ -14,2 +14,3 @@ | |||
14 | #include <opie2/okeyconfigwidget.h> | 14 | #include <opie2/okeyconfigwidget.h> |
15 | #include <opie2/odebug.h> | ||
15 | 16 | ||
@@ -44,3 +45,4 @@ namespace { | |||
44 | void setText( const QString& ); | 45 | void setText( const QString& ); |
45 | void reCalc(); | 46 | |
47 | |||
46 | private: | 48 | private: |
@@ -72,2 +74,6 @@ namespace { | |||
72 | inline QPixmap* IconViewItem::pixmap()const { | 74 | inline QPixmap* IconViewItem::pixmap()const { |
75 | qWarning( "Name is " + m_path.right( 15 ) + " rect is %d %d %d %d | %d %d", | ||
76 | rect().x(),rect().y(),rect().width(),rect().height(), | ||
77 | iconView()->contentsX(), iconView()->contentsY()); | ||
78 | |||
73 | if ( m_isDir ) | 79 | if ( m_isDir ) |
@@ -92,8 +98,2 @@ namespace { | |||
92 | QIconViewItem::setText( text ); | 98 | QIconViewItem::setText( text ); |
93 | reCalc(); | ||
94 | } | ||
95 | |||
96 | inline void IconViewItem::reCalc() | ||
97 | { | ||
98 | calcRect(); | ||
99 | } | 99 | } |
@@ -124,3 +124,2 @@ PIconView::PIconView( QWidget* wid, Opie::Core::OConfig* cfg ) | |||
124 | m_view->setItemTextPos( QIconView::Right ); | 124 | m_view->setItemTextPos( QIconView::Right ); |
125 | m_view->setResizeMode(QIconView::Adjust); | ||
126 | 125 | ||
@@ -128,3 +127,3 @@ PIconView::PIconView( QWidget* wid, Opie::Core::OConfig* cfg ) | |||
128 | int viewerWidth = dw-style().scrollBarExtent().width(); | 127 | int viewerWidth = dw-style().scrollBarExtent().width(); |
129 | m_view->setGridX( viewerWidth-2*m_view->spacing() ); | 128 | m_view->setGridX( viewerWidth-3*m_view->spacing()); |
130 | m_view->setGridY( fontMetrics().height()*2+40 ); | 129 | m_view->setGridY( fontMetrics().height()*2+40 ); |
@@ -198,3 +197,3 @@ void PIconView::slotChangeDir(const QString& path) { | |||
198 | 197 | ||
199 | m_view->setUpdatesEnabled( false ); | 198 | m_view->viewport()->setUpdatesEnabled( false ); |
200 | m_view->clear(); | 199 | m_view->clear(); |
@@ -202,3 +201,3 @@ void PIconView::slotChangeDir(const QString& path) { | |||
202 | addFiles( lister->files() ); | 201 | addFiles( lister->files() ); |
203 | m_view->setUpdatesEnabled( true ); | 202 | m_view->viewport()->setUpdatesEnabled( true ); |
204 | 203 | ||
@@ -316,3 +315,2 @@ void PIconView::slotThumbInfo( const QString& _path, const QString& str ) { | |||
316 | item->setText( str ); | 315 | item->setText( str ); |
317 | item->repaint(); | ||
318 | g_stringInf.remove( _path ); | 316 | g_stringInf.remove( _path ); |
@@ -327,3 +325,2 @@ void PIconView::slotThumbNail(const QString& _path, const QPixmap &pix) { | |||
327 | /* required for a recalculated rectangle. otherwise the view show nonsense! */ | 325 | /* required for a recalculated rectangle. otherwise the view show nonsense! */ |
328 | item->reCalc(); | ||
329 | } else { | 326 | } else { |
@@ -331,3 +328,2 @@ void PIconView::slotThumbNail(const QString& _path, const QPixmap &pix) { | |||
331 | } | 328 | } |
332 | item->repaint(); | ||
333 | g_stringPix.remove( _path ); | 329 | g_stringPix.remove( _path ); |
@@ -359,3 +355,3 @@ void PIconView::slotBeamDone( Ir* ir) { | |||
359 | void PIconView::slotStart() { | 355 | void PIconView::slotStart() { |
360 | m_view->setUpdatesEnabled( false ); | 356 | m_view->viewport()->setUpdatesEnabled( false ); |
361 | } | 357 | } |
@@ -363,3 +359,4 @@ void PIconView::slotStart() { | |||
363 | void PIconView::slotEnd() { | 359 | void PIconView::slotEnd() { |
364 | m_view->setUpdatesEnabled( true ); | 360 | m_view->arrangeItemsInGrid( ); |
361 | m_view->viewport()->setUpdatesEnabled( true ); | ||
365 | } | 362 | } |
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 | |||
@@ -111,3 +111,3 @@ void PMainWindow::slotConfig() { | |||
111 | lst.insert( view, _wid ); | 111 | lst.insert( view, _wid ); |
112 | wid->addTab( _wid, QString::null, inf->name() ); | 112 | wid->addTab( _wid, "fileopen", inf->name() ); |
113 | } | 113 | } |
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 | |||
@@ -288,4 +288,5 @@ QString GifSlave::iconViewName(const QString& str) { | |||
288 | QString GifSlave::fullImageInfo( const QString& str) { | 288 | QString GifSlave::fullImageInfo( const QString& str) { |
289 | QString st; | 289 | QString st = "<qt>"; |
290 | get_gif_info(QFile::encodeName( str ).data(), st, true ); | 290 | get_gif_info(QFile::encodeName( str ).data(), st, true ); |
291 | st.append( "</qt>" ); | ||
291 | return st; | 292 | 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 | |||
@@ -1302,3 +1302,3 @@ QString JpegSlave::iconViewName( const QString& path) { | |||
1302 | QString tag; | 1302 | QString tag; |
1303 | tag = QObject::tr( "<qt>Comment: %1\n" ).arg( ImageInfo.getComment() ); | 1303 | tag = QObject::tr( "Comment: %1\n" ).arg( ImageInfo.getComment() ); |
1304 | { | 1304 | { |
@@ -1314,3 +1314,2 @@ QString JpegSlave::iconViewName( const QString& path) { | |||
1314 | tag += compression_to_string( ImageInfo.getCompressionLevel() ); | 1314 | tag += compression_to_string( ImageInfo.getCompressionLevel() ); |
1315 | tag += QObject::tr( "</qt>" ); | ||
1316 | 1315 | ||
@@ -1329,3 +1328,3 @@ QString JpegSlave::fullImageInfo( const QString& path) { | |||
1329 | QString tag, tmp; | 1328 | QString tag, tmp; |
1330 | tag = QObject::tr( "Comment: %1\n" ).arg( ImageInfo.getComment() ); | 1329 | tag = QObject::tr( "<qt>Comment: %1\n" ).arg( ImageInfo.getComment() ); |
1331 | 1330 | ||
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 | |||
@@ -197,4 +197,5 @@ QString PNGSlave::iconViewName( const QString& path) { | |||
197 | QString PNGSlave::fullImageInfo( const QString& path) { | 197 | QString PNGSlave::fullImageInfo( const QString& path) { |
198 | QString str; | 198 | QString str = "<qt>"; |
199 | read_comment( path, true, str ); | 199 | read_comment( path, true, str ); |
200 | str += "</qt>"; | ||
200 | return str; | 201 | return str; |