Public Member Functions | |
| AnyMealIcons (void) | |
| const QMimeSource * | data (const QString &abs_name) const |
Protected Attributes | |
| KIconLoader | iconLoader |
Definition at line 293 of file main.cpp.
| const QMimeSource* AnyMealIcons::data | ( | const QString & | abs_name | ) | const [inline] |
Definition at line 297 of file main.cpp.
References iconLoader.
00297 { 00298 #ifndef NDEBUG 00299 cerr << "Request for icon \"" << abs_name << "\"." << endl; 00300 #endif 00301 const QMimeSource* d = QMimeSourceFactory::data( abs_name ); 00302 if ( d || abs_name.isNull() ) return d; 00303 QPixmap pixmap( iconLoader.loadIcon( abs_name.left 00304 ( abs_name.length() - 4 ), 00305 KIcon::Toolbar, 32, 00306 KIcon::DefaultState, 0, true ) ); 00307 if ( !pixmap.isNull() ) { 00308 ((QMimeSourceFactory *)this)->setPixmap( abs_name, pixmap ); 00309 } else { 00310 #ifndef NDEBUG 00311 cerr << "Could not find icon \"" << abs_name 00312 << "\" in standard directory." << endl; 00313 #endif 00314 if ( pixmap.load( QString( "icons/hi32-action-" ) + abs_name ) ) 00315 ((QMimeSourceFactory *)this)->setPixmap( abs_name, pixmap ); 00316 else if ( pixmap.load( QString( "icons/hi32-app-" ) + abs_name ) ) 00317 ((QMimeSourceFactory *)this)->setPixmap( abs_name, pixmap ); 00318 }; 00319 return QMimeSourceFactory::data( abs_name ); 00320 };
KIconLoader AnyMealIcons::iconLoader [protected] |