# Define install locations. Using variables will allow overriding this by the KDE macros later.
set(BIN_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/bin)
-set(DATA_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/apps)
+set(DATA_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/apps/quassel)
set(ICON_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/icons)
set(XDG_APPS_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/applications)
set(HAVE_KDE 1)
set(MOC_DEFINES ${MOC_DEFINES} -DHAVE_KDE)
set(QUASSEL_KDE_LIBRARIES ${KDE4_KDECORE_LIBS} ${KDE4_KDEUI_LIBRARY})
+ set(OXYGEN_ICONS "External")
else(KDE4_FOUND)
message(STATUS "KDE4 not found, disabling KDE integration")
endif(KDE4_FOUND)
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
+#ifndef HAVE_KDE
+
#include "icon.h"
#include "iconloader.h"
}
return *this;
}
+
+#endif
#ifndef ICON_H_
#define ICON_H_
+#ifndef HAVE_KDE
+
#include <QIcon>
/// A very thin wrapper around QIcon
Icon& operator=(const Icon &other);
};
+#else /* HAVE_KDE */
+#include <KIcon>
+class Icon : public KIcon {
+
+ public:
+ inline Icon() : KIcon() {};
+ inline explicit Icon(const QString &iconName) : KIcon(iconName) {};
+ inline explicit Icon(const QIcon& copy) : KIcon(copy) {};
+};
+
+#endif /* HAVE_KDE */
+
#endif
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
+#ifndef HAVE_KDE
+
#include <QCoreApplication>
#include <QDebug>
#include <QDir>
IconLoader *loader = IconLoader::global();
return loader->loadIcon(name, IconLoader::Small, force_size);
}
+
+#endif
#ifndef ICONLOADER_H_
#define ICONLOADER_H_
+#ifndef HAVE_KDE
+
#include <QPixmap>
/// Provides basic facilities to load icons from standard locations or resources
QString IconLoader::theme() const { return _theme; }
+#else /* HAVE_KDE */
+
+#include <KIconLoader>
+class IconLoader : public KIconLoader { Q_OBJECT };
+
+#endif /* HAVE_KDE */
+
#endif