summaryrefslogtreecommitdiff
path: root/noncore/net/wellenreiter/gui
Side-by-side diff
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 @@
#define PIXMAPPATH "/usr/local/share"
+#include <qpixmap.h>
+#include <qiconset.h>
+
namespace Resource
{
@@ -32,4 +35,16 @@ QPixmap loadPixmap( const QString& pix )
return pixmap;
};
+QIconSet loadIconSet( const QString& pix )
+{
+ QString filename;
+ filename.sprintf( "%s/%s.png", (const char*) PIXMAPPATH, (const char*) pix );
+ QPixmap pixmap( filename );
+ if ( pixmap.isNull() )
+ {
+ qDebug( "Wellenreiter::Resource: can't find pixmap " + filename );
+ }
+ return QIconSet( pixmap );
+};
+
};
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 @@
#ifndef RESOURCE_H
#define RESOURCE_H
-#include <qpixmap.h>
+#include <qstring.h>
+
+class QPixmap;
+class QIconSet;
namespace Resource
{
QPixmap loadPixmap( const QString& );
+ QIconSet loadIconSet( const QString& );
}
#endif // RESOURCE_H