Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

resource.cpp

Go to the documentation of this file.
00001 /**********************************************************************
00002 ** Copyright (C) 2002-2004 Michael 'Mickey' Lauer.  All rights reserved.
00003 **
00004 ** This file is part of Wellenreiter II.
00005 **
00006 ** This file may be distributed and/or modified under the terms of the
00007 ** GNU General Public License version 2 as published by the Free Software
00008 ** Foundation and appearing in the file LICENSE.GPL included in the
00009 ** packaging of this file.
00010 **
00011 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00012 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00013 **
00014 **********************************************************************/
00015 
00016 #include "resource.h"
00017 
00018 #define PIXMAPPATH "/usr/local/share"
00019 
00020 #include <qiconset.h>
00021 
00022 namespace Resource
00023 {
00024 
00025 QPixmap loadPixmap( const QString& pix )
00026 {
00027     QString filename;
00028     filename.sprintf( "%s/%s.png", PIXMAPPATH, pix.local8Bit() );
00029     QPixmap pixmap( filename );
00030     if ( pixmap.isNull() )
00031     {
00032         odebug << "Wellenreiter::Resource: can't find pixmap " + filename << oendl;
00033     }
00034     return pixmap;
00035 };
00036 
00037 QIconSet loadIconSet( const QString& pix )
00038 {
00039     QString filename;
00040     filename.sprintf( "%s/%s.png", PIXMAPPATH, pix.local8Bit() );
00041     QPixmap pixmap( filename );
00042     if ( pixmap.isNull() )
00043     {
00044         odebug << "Wellenreiter::Resource: can't find pixmap " + filename << oendl;
00045     }
00046     return QIconSet( pixmap );
00047 };
00048 
00049 };

Generated on Sat Nov 5 16:16:41 2005 for OPIE by  doxygen 1.4.2