Krita Source Code Documentation
Loading...
Searching...
No Matches
NodePropertyAction_p.h
Go to the documentation of this file.
1
/*
2
SPDX-FileCopyrightText: 2006 Gábor Lehel <illissius@gmail.com>
3
4
SPDX-License-Identifier: LGPL-2.0-or-later
5
*/
6
7
#ifndef NODE_PROPERTY_ACTION_P_H
8
#define NODE_PROPERTY_ACTION_P_H
9
10
#include <
kis_node_model.h
>
11
#include <
kis_base_node.h
>
12
13
#include <QPersistentModelIndex>
14
#include <QAction>
15
16
#include "
NodeView.h
"
24
class
NodeView::PropertyAction
:
public
QAction
25
{
26
typedef
QAction
super
;
27
Q_OBJECT
28
KisBaseNode::Property
m_property
;
29
int
m_num
;
30
QPersistentModelIndex
m_index
;
31
32
Q_SIGNALS:
33
void
toggled
(
bool
on,
const
QPersistentModelIndex &index,
int
property );
34
35
public
:
36
PropertyAction
(
int
num,
const
KisBaseNode::Property
&
p
,
const
QPersistentModelIndex &index, QObject *parent = 0 )
37
: QAction( parent ),
m_property
(
p
),
m_num
( num ),
m_index
( index )
38
{
39
connect
(
this
, SIGNAL( triggered(
bool
) ),
this
, SLOT(
slotTriggered
() ) );
40
setText(
m_property
.
name
);
41
setIcon(
m_property
.
state
.toBool() ?
m_property
.
onIcon
:
m_property
.
offIcon
);
42
}
43
44
private
Q_SLOTS:
45
void
slotTriggered
()
46
{
47
m_property
.
state
= !
m_property
.
state
.toBool();
48
setIcon(
m_property
.
state
.toBool() ?
m_property
.
onIcon
:
m_property
.
offIcon
);
49
Q_EMIT
toggled
(
m_property
.
state
.toBool(),
m_index
,
m_num
);
50
}
51
};
52
53
#endif
p
const Params2D p
Definition
KisBezierUtils.cpp:703
NodeView.h
connect
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
NodeView::PropertyAction
Definition
NodePropertyAction_p.h:25
NodeView::PropertyAction::toggled
void toggled(bool on, const QPersistentModelIndex &index, int property)
NodeView::PropertyAction::m_num
int m_num
Definition
NodePropertyAction_p.h:29
NodeView::PropertyAction::slotTriggered
void slotTriggered()
Definition
NodePropertyAction_p.h:45
NodeView::PropertyAction::m_index
QPersistentModelIndex m_index
Definition
NodePropertyAction_p.h:30
NodeView::PropertyAction::m_property
KisBaseNode::Property m_property
Definition
NodePropertyAction_p.h:28
NodeView::PropertyAction::super
QAction super
Definition
NodePropertyAction_p.h:26
NodeView::PropertyAction::PropertyAction
PropertyAction(int num, const KisBaseNode::Property &p, const QPersistentModelIndex &index, QObject *parent=0)
Definition
NodePropertyAction_p.h:36
kis_base_node.h
kis_node_model.h
KisBaseNode::Property
Definition
kis_base_node.h:52
KisBaseNode::Property::name
QString name
Definition
kis_base_node.h:56
KisBaseNode::Property::onIcon
QIcon onIcon
Definition
kis_base_node.h:62
KisBaseNode::Property::offIcon
QIcon offIcon
Definition
kis_base_node.h:63
KisBaseNode::Property::state
QVariant state
Definition
kis_base_node.h:66
plugins
dockers
layerdocker
NodePropertyAction_p.h
Generated at
2025-11-04 02:30:02+01:00
from
Krita
branch
master
, commit
c9dde2e79561a8aea4a7e8d9ac99c98a7bac9e52