summaryrefslogtreecommitdiffstats
path: root/malloryclient/embeddata.h
blob: a586d0aebbe0749a97762d74f20621b20f52a38b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46

#ifndef EMBEDDATA_H
#define EMBEDDATA_H

#include <tqimage.h>
#include <tqdict.h>
#include <tqmime.h>
#include <tqdragobject.h>

// MXLS: I dunno what I'm doin'!
// TQImage uic_findImage(const TQString& name);

class MimeSourceFactory_KWinMallory : public TQMimeSourceFactory
{
public:
    MimeSourceFactory_KWinMallory() {}
    ~MimeSourceFactory_KWinMallory() {}
    const TQMimeSource* data( const TQString& abs_name ) const {
	const TQMimeSource* d = TQMimeSourceFactory::data( abs_name );
	if ( d || abs_name.isNull() ) return d;
	// TQImage img = uic_findImage( abs_name );
	// if ( !img.isNull() )
	//    ((TQMimeSourceFactory*)this)->setImage( abs_name, img );
	return TQMimeSourceFactory::data( abs_name );
    };
};

static TQMimeSourceFactory* 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