DAWorkbench
0.0.1
DAWorkbench API
载入中...
搜索中...
未找到
DAStandardNodeTextGraphicsItem.h
1
#ifndef DASTANDARDNODETEXTGRAPHICSITEM_H
2
#define DASTANDARDNODETEXTGRAPHICSITEM_H
3
#include "DAWorkFlowAPI.h"
4
#include "DAAbstractNodeGraphicsItem.h"
5
namespace
DA
6
{
7
class
DAGraphicsStandardTextItem;
12
class
DAWORKFLOW_API
DAStandardNodeTextGraphicsItem
:
public
DAAbstractNodeGraphicsItem
13
{
14
Q_OBJECT
15
DA_DECLARE_PRIVATE(
DAStandardNodeTextGraphicsItem
)
16
public
:
20
enum
21
{
22
Type = DA::ItemType_GraphicsStandardTextItem
23
};
24
int
type()
const override
25
{
26
return
(Type);
27
}
28
29
public
:
30
DAStandardNodeTextGraphicsItem
(
DAAbstractNode
* n, QGraphicsItem* p =
nullptr
);
31
~DAStandardNodeTextGraphicsItem
();
32
// 设置编辑模式
33
// 设置编辑模式
34
void
setEditable(
bool
on =
true
);
35
bool
isEditable()
const
;
36
// 自动调整大小
37
void
setAutoAdjustSize(
bool
on);
38
bool
isAutoAdjustSize()
const
;
39
// 文本
40
void
setText(
const
QString& v);
41
QString getText()
const
;
42
// 字体
43
void
setFont(
const
QFont& v);
44
QFont getFont()
const
;
45
// 设置尺寸这里的尺寸是不包括旋转和缩放的辅助控制,如果构造函数中需要设置默认大小,使用changeBodySize
46
void
setBodySize(
const
QSizeF& s)
override
;
47
// 获取内部的文本item
48
DAGraphicsStandardTextItem
* textItem()
const
;
49
};
50
}
// end DA
51
#endif
// DASTANDARDNODETEXTGRAPHICSITEM_H
DA::DAAbstractNodeGraphicsItem
这是节点的基类,workflow所有节点都继承此类 作为一个节点的QGraphicsItem,此item应该由DAAbstractNode创建
Definition
DAAbstractNodeGraphicsItem.h:47
DA::DAAbstractNode
节点对应的基类
Definition
DAAbstractNode.h:50
DA::DAGraphicsStandardTextItem
QGraphicsTextItem是一个非常复杂的item,里面包含了QWidgetTextControl多达3000行,暂时不尝试写一个类似的控件
Definition
DAGraphicsStandardTextItem.h:20
DA::DAStandardNodeTextGraphicsItem
标准的可resize的GraphicsTextItem,可以作为需要输入文本内容的节点显示
Definition
DAStandardNodeTextGraphicsItem.h:13
DA
序列化类都是带异常的,使用中需要处理异常
Definition
AppMainWindow.cpp:44
src
DAWorkFlow
DAStandardNodeTextGraphicsItem.h
制作者
1.9.8