22 #include <tdeglobal.h>
23 #include <kinstance.h>
24 #include <kiconloader.h>
26 #include "kmimesourcefactory.h"
28 class KMimeSourceFactoryPrivate
31 inline KMimeSourceFactoryPrivate (
TDEIconLoader* loader) : m_iconLoader(loader), m_instance(0L) {}
35 Q_ASSERT(m_instance || m_iconLoader);
40 return m_instance->iconLoader();
48 : TQMimeSourceFactory (),
49 d (new KMimeSourceFactoryPrivate (loader))
63 const int pos = absOrRelName.find (
'|');
66 myContext = absOrRelName.left (pos);
67 myName = absOrRelName.right (absOrRelName.length() - myContext.length() - 1);
72 if (myContext ==
"desktop")
76 else if (myContext ==
"toolbar")
80 else if (myContext ==
"maintoolbar")
84 else if (myContext ==
"small")
88 else if (myContext ==
"user")
94 result = TQMimeSourceFactory::makeAbsolute (absOrRelName, context);
99 void KMimeSourceFactory::setInstance(
TDEInstance *instance)
101 d->m_instance = instance;
104 void KMimeSourceFactory::virtual_hook(
int,
void* )
KMimeSourceFactory(TDEIconLoader *loader=TDEGlobal::iconLoader())
Constructor.
virtual TQString makeAbsolute(const TQString &abs_or_rel_name, const TQString &context) const
This function is maps an absolute or relative name for a resource to the absolute one.
virtual ~KMimeSourceFactory()
Destructor.
@ MainToolbar
Main toolbar icons.
Access to KDE global objects for use in shared libraries.