Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_asl_callback_object_catcher.cpp File Reference
#include "kis_asl_callback_object_catcher.h"
#include <QHash>
#include <QColor>
#include <QPointF>
#include <QString>
#include <KoColor.h>
#include "kis_debug.h"

Go to the source code of this file.

Classes

struct  EnumMapping
 
struct  KisAslCallbackObjectCatcher::Private
 
struct  UnitFloatMapping
 
struct  UnitRectMapping
 

Typedefs

typedef QHash< QString, ASLCallbackBoolean > MapHashBoolean
 
typedef QHash< QString, ASLCallbackColor > MapHashColor
 
typedef QHash< QString, ASLCallbackCurve > MapHashCurve
 
typedef QHash< QString, ASLCallbackDouble > MapHashDouble
 
typedef QHash< QString, EnumMapping > MapHashEnum
 
typedef QHash< QString, ASLCallbackGradient > MapHashGradient
 
typedef QHash< QString, ASLCallbackInteger > MapHashInt
 
typedef QHash< QString, ASLCallbackPattern > MapHashPattern
 
typedef QHash< QString, ASLCallbackPatternRef > MapHashPatternRef
 
typedef QHash< QString, ASLCallbackPoint > MapHashPoint
 
typedef QHash< QString, ASLCallbackRawData > MapHashRawData
 
typedef QHash< QString, ASLCallbackRect > MapHashRect
 
typedef QHash< QString, ASLCallbackString > MapHashText
 
typedef QHash< QString, ASLCallbackTransform > MapHashTransform
 
typedef QHash< QString, UnitFloatMapping > MapHashUnitFloat
 
typedef QHash< QString, UnitRectMapping > MapHashUnitRect
 

Functions

template<class HashType , typename T >
void passToCallback (const QString &path, const HashType &hash, const T &value)
 
template<class HashType , typename T1 , typename T2 >
void passToCallback (const QString &path, const HashType &hash, const T1 &value1, const T2 &value2)
 

Typedef Documentation

◆ MapHashBoolean

typedef QHash<QString, ASLCallbackBoolean> MapHashBoolean

Definition at line 62 of file kis_asl_callback_object_catcher.cpp.

◆ MapHashColor

typedef QHash<QString, ASLCallbackColor> MapHashColor

Definition at line 63 of file kis_asl_callback_object_catcher.cpp.

◆ MapHashCurve

typedef QHash<QString, ASLCallbackCurve> MapHashCurve

Definition at line 65 of file kis_asl_callback_object_catcher.cpp.

◆ MapHashDouble

typedef QHash<QString, ASLCallbackDouble> MapHashDouble

Definition at line 19 of file kis_asl_callback_object_catcher.cpp.

◆ MapHashEnum

typedef QHash<QString, EnumMapping> MapHashEnum

Definition at line 33 of file kis_asl_callback_object_catcher.cpp.

◆ MapHashGradient

typedef QHash<QString, ASLCallbackGradient> MapHashGradient

Definition at line 68 of file kis_asl_callback_object_catcher.cpp.

◆ MapHashInt

typedef QHash<QString, ASLCallbackInteger> MapHashInt

Definition at line 20 of file kis_asl_callback_object_catcher.cpp.

◆ MapHashPattern

typedef QHash<QString, ASLCallbackPattern> MapHashPattern

Definition at line 66 of file kis_asl_callback_object_catcher.cpp.

◆ MapHashPatternRef

typedef QHash<QString, ASLCallbackPatternRef> MapHashPatternRef

Definition at line 67 of file kis_asl_callback_object_catcher.cpp.

◆ MapHashPoint

typedef QHash<QString, ASLCallbackPoint> MapHashPoint

Definition at line 64 of file kis_asl_callback_object_catcher.cpp.

◆ MapHashRawData

typedef QHash<QString, ASLCallbackRawData> MapHashRawData

Definition at line 69 of file kis_asl_callback_object_catcher.cpp.

◆ MapHashRect

typedef QHash<QString, ASLCallbackRect> MapHashRect

Definition at line 71 of file kis_asl_callback_object_catcher.cpp.

◆ MapHashText

typedef QHash<QString, ASLCallbackString> MapHashText

Definition at line 61 of file kis_asl_callback_object_catcher.cpp.

◆ MapHashTransform

typedef QHash<QString, ASLCallbackTransform> MapHashTransform

Definition at line 70 of file kis_asl_callback_object_catcher.cpp.

◆ MapHashUnitFloat

typedef QHash<QString, UnitFloatMapping> MapHashUnitFloat

Definition at line 58 of file kis_asl_callback_object_catcher.cpp.

◆ MapHashUnitRect

typedef QHash<QString, UnitRectMapping> MapHashUnitRect

Definition at line 59 of file kis_asl_callback_object_catcher.cpp.

Function Documentation

◆ passToCallback() [1/2]

template<class HashType , typename T >
void passToCallback ( const QString & path,
const HashType & hash,
const T & value )
inline

Definition at line 104 of file kis_asl_callback_object_catcher.cpp.

105{
106 typename HashType::const_iterator it = hash.constFind(path);
107 if (it != hash.constEnd()) {
108 (*it)(value);
109 } else {
110 warnKrita << "Unhandled:" << path << typeid(hash).name() << value;
111 }
112}
float value(const T *src, size_t ch)
#define warnKrita
Definition kis_debug.h:94
const char * name(StandardAction id)

References value(), and warnKrita.

◆ passToCallback() [2/2]

template<class HashType , typename T1 , typename T2 >
void passToCallback ( const QString & path,
const HashType & hash,
const T1 & value1,
const T2 & value2 )
inline

Definition at line 115 of file kis_asl_callback_object_catcher.cpp.

116{
117 typename HashType::const_iterator it = hash.constFind(path);
118 if (it != hash.constEnd()) {
119 (*it)(value1, value2);
120 } else {
121 warnKrita << "Unhandled:" << path << typeid(hash).name() << value1 << value2;
122 }
123}

References warnKrita.