Changeset View
Changeset View
Standalone View
Standalone View
commands/imagelib/effects/kpEffectBlurSharpenCommand.cpp
Show All 40 Lines | 38 | kpEffectBlurSharpenCommand::kpEffectBlurSharpenCommand (kpEffectBlurSharpen::Type type, | |||
---|---|---|---|---|---|
41 | kpCommandEnvironment *environ) | 41 | kpCommandEnvironment *environ) | ||
42 | : kpEffectCommandBase (kpEffectBlurSharpenCommand::nameForType (type), | 42 | : kpEffectCommandBase (kpEffectBlurSharpenCommand::nameForType (type), | ||
43 | actOnSelection, environ), | 43 | actOnSelection, environ), | ||
44 | m_type (type), | 44 | m_type (type), | ||
45 | m_strength (strength) | 45 | m_strength (strength) | ||
46 | { | 46 | { | ||
47 | } | 47 | } | ||
48 | 48 | | |||
49 | kpEffectBlurSharpenCommand::~kpEffectBlurSharpenCommand () | 49 | kpEffectBlurSharpenCommand::~kpEffectBlurSharpenCommand () = default; | ||
50 | { | | |||
51 | } | | |||
52 | 50 | | |||
53 | 51 | | |||
54 | // public static | 52 | // public static | ||
55 | QString kpEffectBlurSharpenCommand::nameForType (kpEffectBlurSharpen::Type type) | 53 | QString kpEffectBlurSharpenCommand::nameForType (kpEffectBlurSharpen::Type type) | ||
56 | { | 54 | { | ||
57 | if (type == kpEffectBlurSharpen::Blur) | 55 | switch (type) { | ||
58 | return i18n ("Soften"); | 56 | case kpEffectBlurSharpen::Blur: return i18n ("Soften"); | ||
59 | else if (type == kpEffectBlurSharpen::Sharpen) | 57 | case kpEffectBlurSharpen::Sharpen: return i18n ("Sharpen"); | ||
60 | return i18n ("Sharpen"); | 58 | default: return QString(); | ||
61 | else | 59 | } | ||
62 | return QString(); | | |||
63 | } | 60 | } | ||
64 | 61 | | |||
65 | 62 | | |||
66 | // protected virtual [base kpEffectCommandBase] | 63 | // protected virtual [base kpEffectCommandBase] | ||
67 | kpImage kpEffectBlurSharpenCommand::applyEffect (const kpImage &image) | 64 | kpImage kpEffectBlurSharpenCommand::applyEffect (const kpImage &image) | ||
68 | { | 65 | { | ||
69 | return kpEffectBlurSharpen::applyEffect (image, m_type, m_strength); | 66 | return kpEffectBlurSharpen::applyEffect (image, m_type, m_strength); | ||
70 | } | 67 | } | ||
71 | 68 | |