Main | License | Installation | FAQ | Screenshots | Contact | Links | Sf.net | Freshmeat.net | KDE-Apps.org
Requirements | Design | Modules | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

AnyMealIcons Class Reference


Public Member Functions

 AnyMealIcons (void)
const QMimeSource * data (const QString &abs_name) const

Protected Attributes

KIconLoader iconLoader

Detailed Description

Definition at line 293 of file main.cpp.


Constructor & Destructor Documentation

AnyMealIcons::AnyMealIcons ( void   )  [inline]

Definition at line 296 of file main.cpp.

00296 {}


Member Function Documentation

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   };


Field Documentation

KIconLoader AnyMealIcons::iconLoader [protected]

Definition at line 320 of file main.cpp.

Referenced by data().


The documentation for this class was generated from the following file:

anymeal 0.30 - recipe management software - Make the most of your food! - © Jan Wedekind Sun Sep 14 16:01:28 2008 - GNU Free Documentation License