|
@@ -21,14 +21,19 @@
|
|
|
#ifndef __ctkIconEnginePlugin_h
|
|
|
#define __ctkIconEnginePlugin_h
|
|
|
|
|
|
-#include "ctkWidgetsExport.h"
|
|
|
// Qt includes
|
|
|
+#if QT_VERSION >= 0x050000
|
|
|
# include <QIconEngine>
|
|
|
# include <QIconEnginePlugin>
|
|
|
+#else
|
|
|
+# include <QIconEngineV2>
|
|
|
+# include <QIconEnginePluginV2>
|
|
|
+#endif
|
|
|
|
|
|
// CTK includes
|
|
|
#include "ctkPimpl.h"
|
|
|
#include "ctkPixmapIconEngine.h"
|
|
|
+#include "ctkWidgetsExport.h"
|
|
|
|
|
|
class ctkIconEnginePluginPrivate;
|
|
|
class ctkIconEnginePrivate;
|
|
@@ -43,15 +48,23 @@ class ctkIconEnginePrivate;
|
|
|
/// don't forget to declare in the cpp file:
|
|
|
/// Q_EXPORT_PLUGIN2(yourpluginName, ctkIconEnginePlugin)
|
|
|
class CTK_WIDGETS_EXPORT ctkIconEnginePlugin
|
|
|
+// Can't use QT_VERSION_CHECK macro for Qt 4 moc parsing
|
|
|
+#if QT_VERSION >= 0x050000
|
|
|
: public QIconEnginePlugin
|
|
|
+#else
|
|
|
+ : public QIconEnginePluginV2
|
|
|
+#endif
|
|
|
{
|
|
|
Q_OBJECT;
|
|
|
public:
|
|
|
ctkIconEnginePlugin(QObject* parent = 0);
|
|
|
virtual ~ctkIconEnginePlugin();
|
|
|
|
|
|
- virtual QIconEngine* create(const QString& filename);
|
|
|
-
|
|
|
+#if QT_VERSION >= 0x050000
|
|
|
+ virtual QIconEngine* create(const QString& filename=QString());
|
|
|
+#else
|
|
|
+ virtual QIconEngineV2* create(const QString& filename=QString());
|
|
|
+#endif
|
|
|
/// Support all the Qt image formats by default
|
|
|
virtual QStringList keys()const;
|
|
|
|