summaryrefslogtreecommitdiff
path: root/noncore/net/wellenreiter/gui
Unidiff
Diffstat (limited to 'noncore/net/wellenreiter/gui') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/resource.cpp15
-rw-r--r--noncore/net/wellenreiter/gui/resource.h6
2 files changed, 20 insertions, 1 deletions
diff --git a/noncore/net/wellenreiter/gui/resource.cpp b/noncore/net/wellenreiter/gui/resource.cpp
index 7683329..a39bbcc 100644
--- a/noncore/net/wellenreiter/gui/resource.cpp
+++ b/noncore/net/wellenreiter/gui/resource.cpp
@@ -17,6 +17,9 @@
17 17
18#define PIXMAPPATH "/usr/local/share" 18#define PIXMAPPATH "/usr/local/share"
19 19
20#include <qpixmap.h>
21#include <qiconset.h>
22
20namespace Resource 23namespace Resource
21{ 24{
22 25
@@ -32,4 +35,16 @@ QPixmap loadPixmap( const QString& pix )
32 return pixmap; 35 return pixmap;
33}; 36};
34 37
38QIconSet loadIconSet( const QString& pix )
39{
40 QString filename;
41 filename.sprintf( "%s/%s.png", (const char*) PIXMAPPATH, (const char*) pix );
42 QPixmap pixmap( filename );
43 if ( pixmap.isNull() )
44 {
45 qDebug( "Wellenreiter::Resource: can't find pixmap " + filename );
46 }
47 return QIconSet( pixmap );
48};
49
35}; 50};
diff --git a/noncore/net/wellenreiter/gui/resource.h b/noncore/net/wellenreiter/gui/resource.h
index 6a3cc99..8788c6e 100644
--- a/noncore/net/wellenreiter/gui/resource.h
+++ b/noncore/net/wellenreiter/gui/resource.h
@@ -16,11 +16,15 @@
16#ifndef RESOURCE_H 16#ifndef RESOURCE_H
17#define RESOURCE_H 17#define RESOURCE_H
18 18
19#include <qpixmap.h> 19#include <qstring.h>
20
21class QPixmap;
22class QIconSet;
20 23
21namespace Resource 24namespace Resource
22{ 25{
23 QPixmap loadPixmap( const QString& ); 26 QPixmap loadPixmap( const QString& );
27 QIconSet loadIconSet( const QString& );
24} 28}
25 29
26#endif // RESOURCE_H 30#endif // RESOURCE_H