14#include <klocalizedstring.h>
26 , m_resource(resource)
50 : QWidgetAction(parent)
51 , m_closeParentOnTrigger(false)
53 QWidget* pWidget =
new QWidget (0);
54 QHBoxLayout* pLayout =
new QHBoxLayout();
63 pWidget->setLayout(pLayout);
64 setDefaultWidget(pWidget);
77 QPixmap pixmap = QPixmap(icon.pixmap(16,16));
99 this->parentWidget()->close();
108 m_editBox->setPlaceholderText(clickMessage);
118 QLayout* currentLayout = defaultWidget()->layout();
120 this->QAction::setVisible(showAction);
122 for(
int i=0;i<currentLayout->count();i++) {
123 currentLayout->itemAt(i)->widget()->setVisible(showAction);
125 defaultWidget()->setVisible(showAction);
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
KisTagSP m_referenceTag
Tag to compare all other tags to.
KisTagSP referenceTag()
referenceTag is a getter for the reference tag
bool operator()(KisTagSP otherTag)
operator () contains comparison logic
void setReferenceTag(KisTagSP referenceTag)
setReferenceTag sets a reference tag in the comparer
CompareWithOtherTagFunctor(KisTagSP referenceTag)
CompareWithOtherTagFunctor defines a default constructor.
The LineEditAction class defines an action with a user text input.
void setPlaceholderText(const QString &clickMessage)
LineEditAction(QObject *parent)
bool closeParentOnTrigger()
bool m_closeParentOnTrigger
virtual void onTriggered()
onTriggered defines additional behaviour for the action
QPushButton * m_AddButton
~LineEditAction() override
void slotActionTriggered()
slotActionTriggered defines all behaviour expressed when the widget is triggered
void setText(const QString &text)
void setIcon(const QIcon &icon)
void setCloseParentOnTrigger(bool closeParent)
void setVisible(bool showAction)
QString userText()
userText getter for the text inside the edit box
void onTriggered() override
void setResource(KoResourceSP resource)
~NewTagResourceAction() override
NewTagResourceAction(KoResourceSP resource, QObject *parent)
void triggered(const QString &newTagName, KoResourceSP resource)
KisTagSP m_tag
m_tag tag associated with the action
SimpleExistingTagAction(KoResourceSP resource, KisTagSP tag, QObject *parent=0)
KoResourceSP m_resource
m_resource resource associated with the action
void triggered(KisTagSP tag, KoResourceSP resource)
~SimpleExistingTagAction() override
#define koIcon(name)
Use these macros for icons without any issues.