Changeset View
Changeset View
Standalone View
Standalone View
commands/imagelib/transforms/kpTransformFlipCommand.cpp
Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Line(s) | 44 | kpTransformFlipCommand::kpTransformFlipCommand (bool actOnSelection, | |||
---|---|---|---|---|---|
47 | : kpCommand (environ), | 47 | : kpCommand (environ), | ||
48 | m_actOnSelection (actOnSelection), | 48 | m_actOnSelection (actOnSelection), | ||
49 | m_horiz (horiz), m_vert (vert) | 49 | m_horiz (horiz), m_vert (vert) | ||
50 | { | 50 | { | ||
51 | } | 51 | } | ||
52 | 52 | | |||
53 | //--------------------------------------------------------------------- | 53 | //--------------------------------------------------------------------- | ||
54 | 54 | | |||
55 | kpTransformFlipCommand::~kpTransformFlipCommand () | 55 | kpTransformFlipCommand::~kpTransformFlipCommand () = default; | ||
56 | { | | |||
57 | } | | |||
58 | 56 | | |||
59 | //--------------------------------------------------------------------- | 57 | //--------------------------------------------------------------------- | ||
60 | // public virtual [base kpCommand] | 58 | // public virtual [base kpCommand] | ||
61 | 59 | | |||
62 | QString kpTransformFlipCommand::name () const | 60 | QString kpTransformFlipCommand::name () const | ||
63 | { | 61 | { | ||
64 | QString opName; | 62 | QString opName; | ||
65 | 63 | | |||
66 | 64 | | |||
67 | #if 1 | 65 | #if 1 | ||
68 | opName = i18n ("Flip"); | 66 | opName = i18n ("Flip"); | ||
69 | #else // re-enable when giving full descriptions for all actions | 67 | #else // re-enable when giving full descriptions for all actions | ||
70 | if (m_horiz && m_vert) | 68 | if (m_horiz && m_vert) | ||
71 | opName = i18n ("Flip horizontally and vertically"); | 69 | opName = i18n ("Flip horizontally and vertically"); | ||
72 | else if (m_horiz) | 70 | else if (m_horiz) | ||
73 | opName = i18n ("Flip horizontally"); | 71 | opName = i18n ("Flip horizontally"); | ||
74 | else if (m_vert) | 72 | else if (m_vert) | ||
75 | opName = i18n ("Flip vertically"); | 73 | opName = i18n ("Flip vertically"); | ||
76 | else | 74 | else | ||
77 | { | 75 | { | ||
78 | qCCritical(kpLogCommands) << "kpTransformFlipCommand::name() not asked to flip" << endl; | 76 | qCCritical(kpLogCommands) << "kpTransformFlipCommand::name() not asked to flip"; | ||
79 | return QString(); | 77 | return QString(); | ||
80 | } | 78 | } | ||
81 | #endif | 79 | #endif | ||
82 | 80 | | |||
83 | 81 | | |||
84 | if (m_actOnSelection) | 82 | if (m_actOnSelection) { | ||
85 | return i18n ("Selection: %1", opName); | 83 | return i18n ("Selection: %1", opName); | ||
86 | else | 84 | } | ||
85 | | ||||
87 | return opName; | 86 | return opName; | ||
88 | } | 87 | } | ||
89 | 88 | | |||
90 | //--------------------------------------------------------------------- | 89 | //--------------------------------------------------------------------- | ||
91 | // public virtual [base kpCommand] | 90 | // public virtual [base kpCommand] | ||
92 | 91 | | |||
93 | kpCommandSize::SizeType kpTransformFlipCommand::size () const | 92 | kpCommandSize::SizeType kpTransformFlipCommand::size () const | ||
94 | { | 93 | { | ||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |