PixMap.cpp

Go to the documentation of this file.
00001 #include <qapplication.h>
00002 #include <qimage.h>
00003 #include <qpixmap.h>
00004 
00005 int small_display_cache = -1;
00006 
00007 int small_display_p () {
00008     if( small_display_cache < 0 ) {
00009         QWidget *d = QApplication::desktop();
00010         small_display_cache = ( d->width() * d->height() < 100000 );
00011     }
00012     return small_display_cache;
00013 }
00014 
00015 QPixmap small_pixmap( const char *xpm[] ) {
00016     QImage qim( xpm );
00017     QPixmap pm;
00018     pm.convertFromImage( qim.smoothScale( 12, 12 ) );
00019     return pm;
00020 }

Generated on Sun Mar 1 17:30:47 2009 for toMOTko by  doxygen 1.5.6