16#ifndef KDSME_UTIL_OBJECTHELPER_H
17#define KDSME_UTIL_OBJECTHELPER_H
19#include "kdsme_core_export.h"
33namespace ObjectHelper {
73template<
class FilterType,
class ItemType>
89template<
class C,
class P>
94 d.erase(std::remove_if(std::begin(d), std::end(d),
predicate), std::end(d));
112 return static_cast<T *
>(
object);
KDSME_CORE_EXPORT QString toString(const QPointF &point)
KDSME_CORE_EXPORT QString displayString(const QObject *object, DisplayOption option=NoStrip)
KDSME_CORE_EXPORT int depth(const QObject *root, const QObject *object)
KDSME_CORE_EXPORT QString className(const QObject *object, DisplayOption option=NoStrip)
KDSME_CORE_EXPORT int stringToEnum(const QMetaObject *metaObject, const char *name, const char *key)
C filter(const C &source, const P &predicate)
KDSME_CORE_EXPORT bool descendantOf(const QObject *ascendant, const QObject *object)
T * findParentOfType(QObject *object)
KDSME_CORE_EXPORT QString addressToString(const void *p)
KDSME_CORE_EXPORT const char * enumToString(const QMetaObject *metaObject, const char *name, int value)
QList< FilterType > copy_if_type(const QList< ItemType > &list)