Changeset View
Changeset View
Standalone View
Standalone View
tools/kpTool_UserNotifications.cpp
Show All 32 Lines | |||||
33 | 33 | | |||
34 | #include <KLocalizedString> | 34 | #include <KLocalizedString> | ||
35 | 35 | | |||
36 | //--------------------------------------------------------------------- | 36 | //--------------------------------------------------------------------- | ||
37 | 37 | | |||
38 | // public static | 38 | // public static | ||
39 | QString kpTool::cancelUserMessage (int mouseButton) | 39 | QString kpTool::cancelUserMessage (int mouseButton) | ||
40 | { | 40 | { | ||
41 | if (mouseButton == 0) | 41 | if (mouseButton == 0) { | ||
42 | return i18n ("Right click to cancel."); | 42 | return i18n ("Right click to cancel."); | ||
43 | else | 43 | } | ||
44 | | ||||
44 | return i18n ("Left click to cancel."); | 45 | return i18n ("Left click to cancel."); | ||
45 | } | 46 | } | ||
46 | 47 | | |||
47 | //--------------------------------------------------------------------- | 48 | //--------------------------------------------------------------------- | ||
48 | 49 | | |||
49 | // public | 50 | // public | ||
50 | QString kpTool::cancelUserMessage () const | 51 | QString kpTool::cancelUserMessage () const | ||
51 | { | 52 | { | ||
Show All 10 Lines | |||||
62 | 63 | | |||
63 | //--------------------------------------------------------------------- | 64 | //--------------------------------------------------------------------- | ||
64 | 65 | | |||
65 | // public | 66 | // public | ||
66 | void kpTool::setUserMessage (const QString &userMessage) | 67 | void kpTool::setUserMessage (const QString &userMessage) | ||
67 | { | 68 | { | ||
68 | d->userMessage = userMessage; | 69 | d->userMessage = userMessage; | ||
69 | 70 | | |||
70 | if (d->userMessage.isEmpty ()) | 71 | if (d->userMessage.isEmpty ()) { | ||
71 | d->userMessage = text (); | 72 | d->userMessage = text (); | ||
72 | else | 73 | } | ||
74 | else { | ||||
73 | d->userMessage.prepend (i18n ("%1: ", text ())); | 75 | d->userMessage.prepend (i18n ("%1: ", text ())); | ||
76 | } | ||||
74 | 77 | | |||
75 | emit userMessageChanged (d->userMessage); | 78 | emit userMessageChanged (d->userMessage); | ||
76 | } | 79 | } | ||
77 | 80 | | |||
78 | //--------------------------------------------------------------------- | 81 | //--------------------------------------------------------------------- | ||
79 | 82 | | |||
80 | // public | 83 | // public | ||
81 | QPoint kpTool::userShapeStartPoint () const | 84 | QPoint kpTool::userShapeStartPoint () const | ||
▲ Show 20 Lines • Show All 81 Lines • Show Last 20 Lines |