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
@@ -18,4 +18,7 @@
#define PIXMAPPATH "/usr/local/share"
+#include <qpixmap.h>
+#include <qiconset.h>
+
namespace Resource
{
@@ -33,3 +36,15 @@ QPixmap loadPixmap( const QString& pix )
};
+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
@@ -17,9 +17,13 @@
#define RESOURCE_H
-#include <qpixmap.h>
+#include <qstring.h>
+
+class QPixmap;
+class QIconSet;
namespace Resource
{
QPixmap loadPixmap( const QString& );
+ QIconSet loadIconSet( const QString& );
}