Changeset View
Changeset View
Standalone View
Standalone View
libs/image/brushengine/kis_slider_based_paintop_property.h
Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Line(s) | 39 | KisSliderBasedPaintOpProperty(Type type, | |||
---|---|---|---|---|---|
46 | m_max(T(100)), | 46 | m_max(T(100)), | ||
47 | m_singleStep(T(1)), | 47 | m_singleStep(T(1)), | ||
48 | m_pageStep(T(10)), | 48 | m_pageStep(T(10)), | ||
49 | m_exponentRatio(1.0), | 49 | m_exponentRatio(1.0), | ||
50 | m_decimals(2) | 50 | m_decimals(2) | ||
51 | { | 51 | { | ||
52 | } | 52 | } | ||
53 | 53 | | |||
54 | KisSliderBasedPaintOpProperty(const QString &id, | ||||
55 | const QString &name, | ||||
56 | KisPaintOpSettingsSP settings, | ||||
57 | QObject *parent) | ||||
58 | : KisUniformPaintOpProperty(Int, id, name, settings, parent), | ||||
59 | m_min(T(0)), | ||||
60 | m_max(T(100)), | ||||
61 | m_singleStep(T(1)), | ||||
62 | m_pageStep(T(10)), | ||||
63 | m_exponentRatio(1.0), | ||||
64 | m_decimals(2) | ||||
65 | { | ||||
66 | qFatal("Should have never been called!"); | ||||
67 | } | ||||
68 | | ||||
54 | T min() const { | 69 | T min() const { | ||
55 | return m_min; | 70 | return m_min; | ||
56 | } | 71 | } | ||
57 | T max() const { | 72 | T max() const { | ||
58 | return m_max; | 73 | return m_max; | ||
59 | } | 74 | } | ||
60 | void setRange(T min, T max) { | 75 | void setRange(T min, T max) { | ||
61 | m_min = min; | 76 | m_min = min; | ||
▲ Show 20 Lines • Show All 43 Lines • ▼ Show 20 Line(s) | 116 | private: | |||
105 | T m_singleStep; | 120 | T m_singleStep; | ||
106 | T m_pageStep; | 121 | T m_pageStep; | ||
107 | qreal m_exponentRatio; | 122 | qreal m_exponentRatio; | ||
108 | 123 | | |||
109 | int m_decimals; | 124 | int m_decimals; | ||
110 | QString m_suffix; | 125 | QString m_suffix; | ||
111 | }; | 126 | }; | ||
112 | 127 | | |||
128 | #include "kis_callback_based_paintop_property.h" | ||||
129 | | ||||
130 | extern template class KRITAIMAGE_EXPORT KisSliderBasedPaintOpProperty<int>; | ||||
131 | extern template class KRITAIMAGE_EXPORT KisSliderBasedPaintOpProperty<qreal>; | ||||
132 | extern template class KRITAIMAGE_EXPORT KisCallbackBasedPaintopProperty<KisSliderBasedPaintOpProperty<int>>; | ||||
133 | extern template class KRITAIMAGE_EXPORT KisCallbackBasedPaintopProperty<KisSliderBasedPaintOpProperty<qreal>>; | ||||
134 | | ||||
113 | typedef KisSliderBasedPaintOpProperty<int> KisIntSliderBasedPaintOpProperty; | 135 | typedef KisSliderBasedPaintOpProperty<int> KisIntSliderBasedPaintOpProperty; | ||
114 | typedef KisSliderBasedPaintOpProperty<qreal> KisDoubleSliderBasedPaintOpProperty; | 136 | typedef KisSliderBasedPaintOpProperty<qreal> KisDoubleSliderBasedPaintOpProperty; | ||
115 | 137 | | |||
116 | #include "kis_callback_based_paintop_property.h" | 138 | typedef KisCallbackBasedPaintopProperty<KisSliderBasedPaintOpProperty<int>> KisIntSliderBasedPaintOpPropertyCallback; | ||
139 | typedef KisCallbackBasedPaintopProperty<KisSliderBasedPaintOpProperty<qreal>> KisDoubleSliderBasedPaintOpPropertyCallback; | ||||
140 | | ||||
117 | 141 | | |||
118 | typedef KisCallbackBasedPaintopProperty<KisIntSliderBasedPaintOpProperty> KisIntSliderBasedPaintOpPropertyCallback; | | |||
119 | typedef KisCallbackBasedPaintopProperty<KisDoubleSliderBasedPaintOpProperty> KisDoubleSliderBasedPaintOpPropertyCallback; | | |||
120 | 142 | | |||
121 | #endif /* __KIS_SLIDER_BASED_PAINTOP_PROPERTY_H */ | 143 | #endif /* __KIS_SLIDER_BASED_PAINTOP_PROPERTY_H */ |