summaryrefslogtreecommitdiff
authorzecke <zecke>2004-03-28 21:18:13 (UTC)
committer zecke <zecke>2004-03-28 21:18:13 (UTC)
commit6fff64e27b026f793141d2b673c862f92172d501 (patch) (unidiff)
tree142c6fc3607bcec2c12cdc056b1e14b6f4db5b40
parent05a5f3a0cfbb5f882d03bf1c7700cdc608b97a2f (diff)
downloadopie-6fff64e27b026f793141d2b673c862f92172d501.zip
opie-6fff64e27b026f793141d2b673c862f92172d501.tar.gz
opie-6fff64e27b026f793141d2b673c862f92172d501.tar.bz2
ReEnable the ImageInfo as Text even if it is wrong.. at least we see it :)
phunk_view.pro add quick-app to the config
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/gui/iconview.cpp3
-rw-r--r--noncore/graphics/opie-eye/phunk_view.pro2
2 files changed, 3 insertions, 2 deletions
diff --git a/noncore/graphics/opie-eye/gui/iconview.cpp b/noncore/graphics/opie-eye/gui/iconview.cpp
index aeaa3c6..74a8d0f 100644
--- a/noncore/graphics/opie-eye/gui/iconview.cpp
+++ b/noncore/graphics/opie-eye/gui/iconview.cpp
@@ -65,48 +65,49 @@ namespace {
65 else if ( !isDir && !_unkPix ) 65 else if ( !isDir && !_unkPix )
66 _unkPix = new QPixmap( Resource::loadPixmap( "UnknownDocument" ) ); 66 _unkPix = new QPixmap( Resource::loadPixmap( "UnknownDocument" ) );
67 } 67 }
68 inline QPixmap* IconViewItem::pixmap()const { 68 inline QPixmap* IconViewItem::pixmap()const {
69 if ( m_isDir ) 69 if ( m_isDir )
70 return _dirPix; 70 return _dirPix;
71 else{ 71 else{
72 if (!m_noInfo && !g_stringInf.contains( m_path ) ) { 72 if (!m_noInfo && !g_stringInf.contains( m_path ) ) {
73 currentView()->dirLister()->imageInfo( m_path ); 73 currentView()->dirLister()->imageInfo( m_path );
74 g_stringInf.insert( m_path, const_cast<IconViewItem*>(this)); 74 g_stringInf.insert( m_path, const_cast<IconViewItem*>(this));
75 } 75 }
76 76
77 m_pix = PPixmapCache::self()->cachedImage( m_path, 64, 64 ); 77 m_pix = PPixmapCache::self()->cachedImage( m_path, 64, 64 );
78 if ( !m_pix && !g_stringPix.contains( m_path )) { 78 if ( !m_pix && !g_stringPix.contains( m_path )) {
79 currentView()->dirLister()->thumbNail( m_path, 64, 64 ); 79 currentView()->dirLister()->thumbNail( m_path, 64, 64 );
80 g_stringPix.insert( m_path, const_cast<IconViewItem*>(this)); 80 g_stringPix.insert( m_path, const_cast<IconViewItem*>(this));
81 } 81 }
82 return m_pix ? m_pix : _unkPix; 82 return m_pix ? m_pix : _unkPix;
83 } 83 }
84 } 84 }
85 inline void IconViewItem::setText( const QString& str ) { 85 inline void IconViewItem::setText( const QString& str ) {
86 QString text = QIconViewItem::text()+"\n"+str; 86 QString text = QIconViewItem::text()+"\n"+str;
87 m_noInfo = true; 87 m_noInfo = true;
88 QIconViewItem::setText( text ); 88 QIconViewItem::setText( text );
89 reCalc();
89 } 90 }
90 91
91 inline void IconViewItem::reCalc() 92 inline void IconViewItem::reCalc()
92 { 93 {
93 calcRect(); 94 calcRect();
94 } 95 }
95} 96}
96 97
97 98
98PIconView::PIconView( QWidget* wid, Config* cfg ) 99PIconView::PIconView( QWidget* wid, Config* cfg )
99 : QVBox( wid ), m_cfg( cfg ) 100 : QVBox( wid ), m_cfg( cfg )
100{ 101{
101 { 102 {
102 QCopEnvelope( "QPE/Application/opie-eye_slave", "refUp()" ); 103 QCopEnvelope( "QPE/Application/opie-eye_slave", "refUp()" );
103 } 104 }
104 m_path = QDir::homeDirPath(); 105 m_path = QDir::homeDirPath();
105 106
106 QHBox *hbox = new QHBox( this ); 107 QHBox *hbox = new QHBox( this );
107 QLabel* lbl = new QLabel( hbox ); 108 QLabel* lbl = new QLabel( hbox );
108 lbl->setText( tr("View as" ) ); 109 lbl->setText( tr("View as" ) );
109 110
110 m_views = new QComboBox( hbox, "View As" ); 111 m_views = new QComboBox( hbox, "View As" );
111 connect( m_views, SIGNAL(activated(int)), 112 connect( m_views, SIGNAL(activated(int)),
112 this, SLOT(slotViewChanged(int)) ); 113 this, SLOT(slotViewChanged(int)) );
@@ -245,49 +246,49 @@ void PIconView::addFolders( const QStringList& lst) {
245 246
246void PIconView::addFiles( const QStringList& lst) { 247void PIconView::addFiles( const QStringList& lst) {
247 QStringList::ConstIterator it; 248 QStringList::ConstIterator it;
248 for (it=lst.begin(); it!= lst.end(); ++it ) 249 for (it=lst.begin(); it!= lst.end(); ++it )
249 (void)new IconViewItem( m_view, m_path+"/"+(*it), (*it) ); 250 (void)new IconViewItem( m_view, m_path+"/"+(*it), (*it) );
250 251
251} 252}
252 253
253void PIconView::slotClicked(QIconViewItem* _it) { 254void PIconView::slotClicked(QIconViewItem* _it) {
254 if(!_it ) 255 if(!_it )
255 return; 256 return;
256 257
257 IconViewItem* it = static_cast<IconViewItem*>(_it); 258 IconViewItem* it = static_cast<IconViewItem*>(_it);
258 if( it->isDir() ) 259 if( it->isDir() )
259 slotChangeDir( it->path() ); 260 slotChangeDir( it->path() );
260 else // view image 261 else // view image
261 ; 262 ;
262} 263}
263 264
264void PIconView::slotThumbInfo( const QString& _path, const QString& str ) { 265void PIconView::slotThumbInfo( const QString& _path, const QString& str ) {
265 if ( g_stringInf.contains( _path ) ) { 266 if ( g_stringInf.contains( _path ) ) {
266 IconViewItem* item = g_stringInf[_path]; 267 IconViewItem* item = g_stringInf[_path];
267 /* if set the view shows nonsens! 268 /* if set the view shows nonsens!
268 I dont know how to fix the format of displayed text :(*/ 269 I dont know how to fix the format of displayed text :(*/
269 //item->setText( str ); 270 item->setText( str );
270 item->repaint(); 271 item->repaint();
271 g_stringInf.remove( _path ); 272 g_stringInf.remove( _path );
272 } 273 }
273} 274}
274void PIconView::slotThumbNail(const QString& _path, const QPixmap &pix) { 275void PIconView::slotThumbNail(const QString& _path, const QPixmap &pix) {
275 if ( g_stringPix.contains( _path ) ) { 276 if ( g_stringPix.contains( _path ) ) {
276 IconViewItem* item = g_stringPix[_path]; 277 IconViewItem* item = g_stringPix[_path];
277 278
278 if (pix.width()>0) { 279 if (pix.width()>0) {
279 PPixmapCache::self()->insertImage( _path, pix, 64, 64 ); 280 PPixmapCache::self()->insertImage( _path, pix, 64, 64 );
280 /* required for a recalculated rectangle. otherwise the view show nonsense! */ 281 /* required for a recalculated rectangle. otherwise the view show nonsense! */
281 item->reCalc(); 282 item->reCalc();
282 } else { 283 } else {
283 PPixmapCache::self()->insertImage(_path,Resource::loadPixmap( "UnknownDocument" ),64,64 ); 284 PPixmapCache::self()->insertImage(_path,Resource::loadPixmap( "UnknownDocument" ),64,64 );
284 } 285 }
285 item->repaint(); 286 item->repaint();
286 g_stringPix.remove( _path ); 287 g_stringPix.remove( _path );
287 } 288 }
288} 289}
289 290
290 291
291void PIconView::slotRename() { 292void PIconView::slotRename() {
292 293
293} 294}
diff --git a/noncore/graphics/opie-eye/phunk_view.pro b/noncore/graphics/opie-eye/phunk_view.pro
index 0bb5679..3547af0 100644
--- a/noncore/graphics/opie-eye/phunk_view.pro
+++ b/noncore/graphics/opie-eye/phunk_view.pro
@@ -1,25 +1,25 @@
1CONFIG += qt warn_on #quick-app 1CONFIG += qt warn_on quick-app
2DESTDIR = $(OPIEDIR)/bin 2DESTDIR = $(OPIEDIR)/bin
3TEMPLATE = app 3TEMPLATE = app
4TARGET = opie-eye 4TARGET = opie-eye
5# the name of the resulting object 5# the name of the resulting object
6 6
7HEADERS = gui/iconview.h gui/filesystem.h gui/mainwindow.h \ 7HEADERS = gui/iconview.h gui/filesystem.h gui/mainwindow.h \
8 lib/imagecache.h impl/dir/dir_dirview.h \ 8 lib/imagecache.h impl/dir/dir_dirview.h \
9 iface/dirview.h iface/dirlister.h iface/ifaceinfo.h \ 9 iface/dirview.h iface/dirlister.h iface/ifaceinfo.h \
10 impl/dir/dir_lister.h impl/dir/dir_ifaceinfo.h \ 10 impl/dir/dir_lister.h impl/dir/dir_ifaceinfo.h \
11 lib/slavemaster.h \ 11 lib/slavemaster.h \
12 iface/slaveiface.h 12 iface/slaveiface.h
13 13
14# A list header files 14# A list header files
15 15
16 16
17SOURCES = gui/iconview.cpp gui/filesystem.cpp gui/mainwindow.cpp \ 17SOURCES = gui/iconview.cpp gui/filesystem.cpp gui/mainwindow.cpp \
18 lib/imagecache.cpp lib/viewmap.cpp \ 18 lib/imagecache.cpp lib/viewmap.cpp \
19 impl/dir/dir_dirview.cpp iface/dirlister.cpp \ 19 impl/dir/dir_dirview.cpp iface/dirlister.cpp \
20 iface/dirview.cpp impl/dir/dir_lister.cpp \ 20 iface/dirview.cpp impl/dir/dir_lister.cpp \
21 impl/dir/dir_ifaceinfo.cpp lib/slavemaster.cpp 21 impl/dir/dir_ifaceinfo.cpp lib/slavemaster.cpp
22# A list of source files 22# A list of source files
23 23
24INTERFACES = 24INTERFACES =
25# list of ui files 25# list of ui files