Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenCV
opencv
提交
67a98bfd
O
opencv
项目概览
OpenCV
/
opencv
上一次同步 9 个月
通知
994
Star
71100
Fork
55581
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
opencv
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
67a98bfd
编写于
8月 12, 2011
作者:
A
Andrey Kamaev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixed search in html documentation (ticket #1232)
上级
ea971df8
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
38 addition
and
8 deletion
+38
-8
doc/_themes/blue/static/default.css_t
doc/_themes/blue/static/default.css_t
+5
-1
doc/ocv.py
doc/ocv.py
+33
-7
未找到文件。
doc/_themes/blue/static/default.css_t
浏览文件 @
67a98bfd
...
...
@@ -358,4 +358,8 @@ margin-top: 0px;
.toctableopencv colgroup col:nth-child(2)
{
width: 100% !important;
}
\ No newline at end of file
}
div.body ul.search li {
text-align: left;
}
doc/ocv.py
浏览文件 @
67a98bfd
...
...
@@ -215,7 +215,7 @@ class OCVPyObject(ObjectDescription):
signode
[
'ids'
].
append
(
fullname
)
signode
[
'first'
]
=
(
not
self
.
names
)
self
.
state
.
document
.
note_explicit_target
(
signode
)
objects
=
self
.
env
.
domaindata
[
'
py
'
][
'objects'
]
objects
=
self
.
env
.
domaindata
[
'
ocv
'
][
'objects'
]
if
fullname
in
objects
:
self
.
env
.
warn
(
self
.
env
.
docname
,
...
...
@@ -224,7 +224,7 @@ class OCVPyObject(ObjectDescription):
self
.
env
.
doc2path
(
objects
[
fullname
][
0
])
+
', use :noindex: for one of them'
,
self
.
lineno
)
objects
[
fullname
]
=
(
self
.
env
.
docname
,
self
.
objtype
)
objects
.
setdefault
(
fullname
,
(
self
.
env
.
docname
,
self
.
objtype
,
name_cls
[
0
])
)
indextext
=
self
.
get_index_text
(
modname
,
name_cls
)
if
indextext
:
...
...
@@ -669,7 +669,7 @@ class FuncDefExpr(NamedDefExpr):
u
'.'
.
join
(
x
.
get_id
()
for
x
in
self
.
signature
)
or
u
''
,
self
.
const
and
u
'C'
or
u
''
)
def
__unicode__
(
self
):
buf
=
self
.
get_modifiers
()
if
self
.
explicit
:
...
...
@@ -1133,7 +1133,11 @@ class OCVObject(ObjectDescription):
node
+=
nodes
.
Text
(
' '
)
def
add_target_and_index
(
self
,
sigobj
,
sig
,
signode
):
theid
=
sigobj
.
get_id
()
theid
=
sig
#obj.get_id()
theid
=
re
.
sub
(
r
" +"
,
" "
,
theid
)
theid
=
re
.
sub
(
r
"=[^,()]+\([^)]*?\)[^,)]*(,|\))"
,
"
\\
1"
,
theid
)
theid
=
re
.
sub
(
r
"=[^,)]+(,|\))"
,
"
\\
1"
,
theid
)
theid
=
theid
.
replace
(
"( "
,
"("
).
replace
(
" )"
,
")"
)
name
=
unicode
(
sigobj
.
name
)
if
theid
not
in
self
.
state
.
document
.
ids
:
signode
[
'names'
].
append
(
theid
)
...
...
@@ -1141,7 +1145,9 @@ class OCVObject(ObjectDescription):
signode
[
'first'
]
=
(
not
self
.
names
)
self
.
state
.
document
.
note_explicit_target
(
signode
)
self
.
env
.
domaindata
[
'ocv'
][
'objects'
].
setdefault
(
name
,
#self.env.domaindata['ocv']['objects'].setdefault(name,
#(self.env.docname, self.objtype, theid))
self
.
env
.
domaindata
[
'ocv'
][
'objects'
].
setdefault
(
theid
,
(
self
.
env
.
docname
,
self
.
objtype
,
theid
))
indextext
=
self
.
get_index_text
(
name
)
...
...
@@ -1437,7 +1443,7 @@ class OCVDomain(Domain):
raise
DefinitionError
(
''
)
except
DefinitionError
:
refdoc
=
node
.
get
(
'refdoc'
,
fromdocname
)
env
.
warn
(
refdoc
,
'unparseable C++ definition: %r'
%
target
,
env
.
warn
(
refdoc
,
'unparseable
1
C++ definition: %r'
%
target
,
node
.
line
)
return
None
...
...
@@ -1458,6 +1464,26 @@ class OCVDomain(Domain):
def
get_objects
(
self
):
for
refname
,
(
docname
,
type
,
theid
)
in
self
.
data
[
'objects'
].
iteritems
():
yield
(
refname
,
refname
,
type
,
docname
,
refname
,
1
)
def
get_type_name
(
self
,
type
,
primary
=
False
):
"""
Return full name for given ObjType.
"""
if
primary
:
return
type
.
lname
return
{
'class'
:
_
(
'C++ class'
),
'struct'
:
_
(
'C/C++ struct'
),
'function'
:
_
(
'C++ function'
),
'cfunction'
:
_
(
'C function'
),
'jfunction'
:
_
(
'Java method'
),
'pyfunction'
:
_
(
'Python function'
),
'pyoldfunction'
:
_
(
'Legacy Python function'
),
'member'
:
_
(
'C++ member'
),
'type'
:
_
(
'C/C++ type'
),
'namespace'
:
_
(
'C++ namespace'
),
}.
get
(
type
.
lname
,
_
(
'%s %s'
)
%
(
self
.
label
,
type
.
lname
))
def
setup
(
app
):
app
.
add_domain
(
OCVDomain
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录