|
Krita Source Code Documentation
|
The LineEditAction class defines an action with a user text input. More...
#include <TagActions.h>
Inheritance diagram for LineEditAction:Public Member Functions | |
| bool | closeParentOnTrigger () |
| void | setCloseParentOnTrigger (bool closeParent) |
| void | setIcon (const QIcon &icon) |
| void | setPlaceholderText (const QString &clickMessage) |
| void | setText (const QString &text) |
| void | setVisible (bool showAction) |
| ~LineEditAction () override | |
Protected Slots | |
| virtual void | onTriggered () |
| onTriggered defines additional behaviour for the action | |
| void | slotActionTriggered () |
| slotActionTriggered defines all behaviour expressed when the widget is triggered | |
| QString | userText () |
| userText getter for the text inside the edit box | |
Protected Member Functions | |
| LineEditAction (QObject *parent) | |
Private Attributes | |
| QPushButton * | m_AddButton |
| bool | m_closeParentOnTrigger |
| QLineEdit * | m_editBox |
| QLabel * | m_label |
The LineEditAction class defines an action with a user text input.
A line edit QWidgetAction. Default behavior: Closes its parent upon triggering. This is a base for all tag/resources actions that needs a user text input (for example create new tag or rename tag)
This is a base for all tag/resources actions that needs a user text input (for example create new tag or rename tag). By default it closes its parent upon triggering and clears the content, but it can be disabled.
Definition at line 72 of file TagActions.h.
|
protected |
Definition at line 49 of file TagActions.cpp.
References connect(), koIcon, m_AddButton, m_editBox, m_label, and slotActionTriggered().
|
override |
Definition at line 71 of file TagActions.cpp.
| bool LineEditAction::closeParentOnTrigger | ( | ) |
Definition at line 86 of file TagActions.cpp.
References m_closeParentOnTrigger.
|
inlineprotectedvirtualslot |
onTriggered defines additional behaviour for the action
This function is called in slotActionTriggered() before the widget is closed and cleared.
Definition at line 104 of file TagActions.h.
| void LineEditAction::setCloseParentOnTrigger | ( | bool | closeParent | ) |
Definition at line 81 of file TagActions.cpp.
References m_closeParentOnTrigger.
| void LineEditAction::setIcon | ( | const QIcon & | icon | ) |
Definition at line 75 of file TagActions.cpp.
References m_label.
| void LineEditAction::setPlaceholderText | ( | const QString & | clickMessage | ) |
Definition at line 106 of file TagActions.cpp.
References m_editBox.
| void LineEditAction::setText | ( | const QString & | text | ) |
Definition at line 111 of file TagActions.cpp.
References m_editBox.
| void LineEditAction::setVisible | ( | bool | showAction | ) |
Definition at line 116 of file TagActions.cpp.
|
protectedslot |
slotActionTriggered defines all behaviour expressed when the widget is triggered
It contains logic for closing the widget and calls onTriggered() to make sure behaviours defined in classes inheriting LineEditAction are called.
Definition at line 92 of file TagActions.cpp.
References m_closeParentOnTrigger, m_editBox, onTriggered(), and userText().
|
protectedslot |
userText getter for the text inside the edit box
Definition at line 128 of file TagActions.cpp.
References m_editBox.
|
private |
Definition at line 116 of file TagActions.h.
|
private |
Definition at line 113 of file TagActions.h.
|
private |
Definition at line 115 of file TagActions.h.
|
private |
Definition at line 114 of file TagActions.h.