Changeset View
Changeset View
Standalone View
Standalone View
libs/flake/KoCanvasResourceManager.cpp
Show First 20 Lines • Show All 113 Lines • ▼ Show 20 Line(s) | 113 | { | |||
---|---|---|---|---|---|
114 | return d->manager.koShapeResource(key); | 114 | return d->manager.koShapeResource(key); | ||
115 | } | 115 | } | ||
116 | 116 | | |||
117 | KoUnit KoCanvasResourceManager::unitResource(int key) const | 117 | KoUnit KoCanvasResourceManager::unitResource(int key) const | ||
118 | { | 118 | { | ||
119 | return resource(key).value<KoUnit>(); | 119 | return resource(key).value<KoUnit>(); | ||
120 | } | 120 | } | ||
121 | 121 | | |||
122 | | ||||
123 | void KoCanvasResourceManager::setActiveStroke(const KoShapeStroke &stroke) | | |||
124 | { | | |||
125 | QVariant v; | | |||
126 | v.setValue(stroke); | | |||
127 | setResource(ActiveStroke, v); | | |||
128 | } | | |||
129 | | ||||
130 | KoShapeStroke KoCanvasResourceManager::activeStroke() const | | |||
131 | { | | |||
132 | if (!d->manager.hasResource(ActiveStroke)) { | | |||
133 | KoShapeStroke empty; | | |||
134 | return empty; | | |||
135 | } | | |||
136 | return resource(ActiveStroke).value<KoShapeStroke>(); | | |||
137 | } | | |||
138 | | ||||
139 | bool KoCanvasResourceManager::boolResource(int key) const | 122 | bool KoCanvasResourceManager::boolResource(int key) const | ||
140 | { | 123 | { | ||
141 | return d->manager.boolResource(key); | 124 | return d->manager.boolResource(key); | ||
142 | } | 125 | } | ||
143 | 126 | | |||
144 | int KoCanvasResourceManager::intResource(int key) const | 127 | int KoCanvasResourceManager::intResource(int key) const | ||
145 | { | 128 | { | ||
146 | return d->manager.intResource(key); | 129 | return d->manager.intResource(key); | ||
▲ Show 20 Lines • Show All 51 Lines • Show Last 20 Lines |