KNotifications

knotificationreplyaction.cpp
1 /*
2  This file is part of the KDE Frameworks
3  SPDX-FileCopyrightText: 2021 Kai Uwe Broulik <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7 
8 #include "knotificationreplyaction.h"
9 
10 #include <QString>
11 
12 class KNotificationReplyActionPrivate
13 {
14 public:
15  QString label;
16  QString placeholderText;
17  QString submitButtonText;
18  QString submitButtonIconName;
20 };
21 
23  : QObject()
24  , d(new KNotificationReplyActionPrivate)
25 {
26  d->label = label;
27 }
28 
30 
32 {
33  return d->label;
34 }
35 
37 {
38  if (d->label != label) {
39  d->label = label;
41  }
42 }
43 
45 {
46  return d->placeholderText;
47 }
48 
50 {
51  if (d->placeholderText != placeholderText) {
52  d->placeholderText = placeholderText;
54  }
55 }
56 
58 {
59  return d->submitButtonText;
60 }
61 
63 {
64  if (d->submitButtonText != submitButtonText) {
65  d->submitButtonText = submitButtonText;
67  }
68 }
69 
71 {
72  return d->submitButtonIconName;
73 }
74 
76 {
77  if (d->submitButtonIconName != submitButtonIconName) {
78  d->submitButtonIconName = submitButtonIconName;
80  }
81 }
82 
84 {
85  return d->fallbackBehavior;
86 }
87 
89 {
90  if (d->fallbackBehavior != fallbackBehavior) {
91  d->fallbackBehavior = fallbackBehavior;
93  }
94 }
void labelChanged()
Emitted when label changed.
void submitButtonTextChanged()
Emitted when submitButtonText changed.
Q_EMITQ_EMIT
void fallbackBehaviorChanged()
Emitted when fallbackBehavior changed.
void setSubmitButtonText(const QString &submitButtonText)
Set the label for the button to send the typed reply.
void placeholderTextChanged()
Emitted when placeholderText changed.
KNotificationReplyAction(const QString &label)
Creates a inline reply action with given label.
void setLabel(const QString &label)
Set the label for the action button.
~KNotificationReplyAction() override
Destroys this inline reply action.
FallbackBehavior
Behavior when the notification server does not support inline replies.
@ HideAction
Don't add the reply action (default)
QString label(StandardShortcut id)
void setSubmitButtonIconName(const QString &submitButtonIconName)
Set the icon name for the button to send the typed reply.
void setPlaceholderText(const QString &placeholderText)
Set the placeholder text for the inline reply text field, for example "Reply to Konqi....
void submitButtonIconNameChanged()
Emitted when submitButtonIconName changed.
void setFallbackBehavior(FallbackBehavior fallbackBehavior)
Set the fallback behavior for when the notification server does not support inline replies.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sat Apr 1 2023 04:03:10 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.