summaryrefslogtreecommitdiffstats
path: root/malloryclient/embeddata.h
diff options
context:
space:
mode:
authorMavridis Philippe <[email protected]>2024-10-03 20:32:40 +0300
committerMavridis Philippe <[email protected]>2024-10-03 20:32:40 +0300
commit19097d1bb96f8d52743121fb8f00d90029f1dfc0 (patch)
tree30a179f283f71a8bb8e6f9db9c9b3a3ce9198376 /malloryclient/embeddata.h
downloadtwin-style-mallory-19097d1bb96f8d52743121fb8f00d90029f1dfc0.tar.gz
twin-style-mallory-19097d1bb96f8d52743121fb8f00d90029f1dfc0.zip
Initial commit
Sourced from https://www.pling.com/p/1100385 Signed-off-by: Mavridis Philippe <[email protected]>
Diffstat (limited to 'malloryclient/embeddata.h')
-rw-r--r--malloryclient/embeddata.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/malloryclient/embeddata.h b/malloryclient/embeddata.h
new file mode 100644
index 0000000..0f9ed56
--- /dev/null
+++ b/malloryclient/embeddata.h
@@ -0,0 +1,46 @@
+
+#ifndef EMBEDDATA_H
+#define EMBEDDATA_H
+
+#include <qimage.h>
+#include <qdict.h>
+#include <qmime.h>
+#include <qdragobject.h>
+
+// MXLS: I dunno what I'm doin'!
+// QImage uic_findImage(const QString& name);
+
+class MimeSourceFactory_KWinMallory : public QMimeSourceFactory
+{
+public:
+ MimeSourceFactory_KWinMallory() {}
+ ~MimeSourceFactory_KWinMallory() {}
+ const QMimeSource* data( const QString& abs_name ) const {
+ const QMimeSource* d = QMimeSourceFactory::data( abs_name );
+ if ( d || abs_name.isNull() ) return d;
+ // QImage img = uic_findImage( abs_name );
+ // if ( !img.isNull() )
+ // ((QMimeSourceFactory*)this)->setImage( abs_name, img );
+ return QMimeSourceFactory::data( abs_name );
+ };
+};
+
+static QMimeSourceFactory* factory = 0;
+
+void qInitImages_KWinMallory();
+
+void qCleanupImages_KWinMallory();
+
+class StaticInitImages_KWinMallory
+{
+public:
+ StaticInitImages_KWinMallory() { qInitImages_KWinMallory(); }
+#if defined(Q_OS_SCO) || defined(Q_OS_UNIXWARE)
+ ~StaticInitImages_KWinMallory() { }
+#else
+ ~StaticInitImages_KWinMallory() { qCleanupImages_KWinMallory(); }
+#endif
+};
+
+static StaticInitImages_KWinMallory staticImages;
+#endif