Diffstat (limited to 'noncore/net/wellenreiter/gui') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/gui/resource.cpp | 15 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/resource.h | 6 |
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 | |||
20 | namespace Resource | 23 | namespace Resource |
21 | { | 24 | { |
22 | 25 | ||
@@ -32,4 +35,16 @@ QPixmap loadPixmap( const QString& pix ) | |||
32 | return pixmap; | 35 | return pixmap; |
33 | }; | 36 | }; |
34 | 37 | ||
38 | QIconSet 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 | |||
21 | class QPixmap; | ||
22 | class QIconSet; | ||
20 | 23 | ||
21 | namespace Resource | 24 | namespace 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 |