Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
colorEagleStdio
qplanetosm
提交
6182305f
qplanetosm
项目概览
colorEagleStdio
/
qplanetosm
通知
118
Star
10
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
qplanetosm
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
6182305f
编写于
1月 19, 2018
作者:
丁劲犇
😸
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add a item hover auto show labels function.
上级
c7456382
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
50 addition
and
11 deletion
+50
-11
qtvplugin_geomarker/qtvplugin_geomarker.cpp
qtvplugin_geomarker/qtvplugin_geomarker.cpp
+32
-1
qtvplugin_geomarker/qtvplugin_geomarker.ui
qtvplugin_geomarker/qtvplugin_geomarker.ui
+15
-9
qtvplugin_geomarker/qtvplugin_geomarker_uimethods.cpp
qtvplugin_geomarker/qtvplugin_geomarker_uimethods.cpp
+3
-1
未找到文件。
qtvplugin_geomarker/qtvplugin_geomarker.cpp
浏览文件 @
6182305f
...
...
@@ -473,7 +473,38 @@ void qtvplugin_geomarker::addSelection(QRectF rectWorld)
bool
qtvplugin_geomarker
::
cb_event
(
const
QMap
<
QString
,
QVariant
>
para
)
{
return
false
;
if
(
para
[
"source"
]
==
this
->
get_name
()
&&
para
[
"name"
]
==
"ITEM_MOUSE_ENTER"
)
{
if
(
ui
->
checkBox_QTV_hoverEvt_AutoLabel
->
isChecked
())
{
const
QString
key
=
para
[
"id"
].
toString
();
if
(
key
.
length
())
{
QTVP_GEOMARKER
::
geoItemBase
*
base
=
m_pScene
->
geoitem_by_name
(
key
);
if
(
base
)
{
base
->
show_props
(
true
);
scheduleUpdateMap
();
}
}
}
}
if
(
para
[
"source"
]
==
this
->
get_name
()
&&
para
[
"name"
]
==
"ITEM_MOUSE_LEAVE"
)
{
if
(
ui
->
checkBox_QTV_hoverEvt_AutoLabel
->
isChecked
())
{
const
QString
key
=
para
[
"id"
].
toString
();
if
(
key
.
length
())
{
QTVP_GEOMARKER
::
geoItemBase
*
base
=
m_pScene
->
geoitem_by_name
(
key
);
if
(
base
)
{
base
->
show_props
(
false
);
scheduleUpdateMap
();
}
}
}
}
return
false
;
}
/*! qtvplugin_geomarker::cb_mouseXXXEvent tranfer mouse events from main view to
...
...
qtvplugin_geomarker/qtvplugin_geomarker.ui
浏览文件 @
6182305f
...
...
@@ -6,8 +6,8 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
5
47
</width>
<height>
4
65
</height>
<width>
5
59
</width>
<height>
4
49
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
...
...
@@ -128,6 +128,13 @@
</property>
</widget>
</item>
<item>
<widget
class=
"QCheckBox"
name=
"checkBox_QTV_hoverEvt_AutoLabel"
>
<property
name=
"text"
>
<string>
Auto Collapse Labels
</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
...
...
@@ -150,7 +157,7 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
1
60
</width>
<width>
1
73
</width>
<height>
194
</height>
</rect>
</property>
...
...
@@ -194,8 +201,8 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
1
74
</width>
<height>
1
86
</height>
<width>
1
87
</width>
<height>
1
77
</height>
</rect>
</property>
<attribute
name=
"icon"
>
...
...
@@ -351,7 +358,7 @@
<string>
Delete
</string>
</property>
<property
name=
"icon"
>
<iconset
resource=
"
../qtvplugin_grid/
resources.qrc"
>
<iconset
resource=
"resources.qrc"
>
<normaloff>
:/icons/delete-21.png
</normaloff>
:/icons/delete-21.png
</iconset>
</property>
</widget>
...
...
@@ -710,7 +717,7 @@
<string>
add
</string>
</property>
<property
name=
"icon"
>
<iconset
resource=
"
../qtvplugin_grid/
resources.qrc"
>
<iconset
resource=
"resources.qrc"
>
<normaloff>
:/icons/Add to favourites.png
</normaloff>
:/icons/Add to favourites.png
</iconset>
</property>
</widget>
...
...
@@ -1057,7 +1064,7 @@
<string>
Delete Prop
</string>
</property>
<property
name=
"icon"
>
<iconset
resource=
"
../qtvplugin_grid/
resources.qrc"
>
<iconset
resource=
"resources.qrc"
>
<normaloff>
:/icons/delete-21.png
</normaloff>
:/icons/delete-21.png
</iconset>
</property>
</widget>
...
...
@@ -1086,7 +1093,6 @@
</layout>
</widget>
<resources>
<include
location=
"../qtvplugin_grid/resources.qrc"
/>
<include
location=
"resources.qrc"
/>
</resources>
<connections/>
...
...
qtvplugin_geomarker/qtvplugin_geomarker_uimethods.cpp
浏览文件 @
6182305f
...
...
@@ -179,6 +179,7 @@ void qtvplugin_geomarker::ini_save()
settings
.
setValue
(
"ui/lineEdit_QTV_icon_scale"
,
ui
->
lineEdit_QTV_icon_scale
->
text
());
settings
.
setValue
(
"ui/checkBox_QTV_multiline"
,
ui
->
checkBox_QTV_multiline
->
isChecked
()
?-
1
:
0
);
settings
.
setValue
(
"ui/checkBox_QTV_acceptHoverEvent"
,
ui
->
checkBox_QTV_acceptHoverEvent
->
isChecked
()
?-
1
:
0
);
settings
.
setValue
(
"ui/checkBox_QTV_hoverEvt_AutoLabel"
,
ui
->
checkBox_QTV_hoverEvt_AutoLabel
->
isChecked
()
?-
1
:
0
);
}
void
qtvplugin_geomarker
::
ini_load
()
...
...
@@ -276,7 +277,8 @@ void qtvplugin_geomarker::ini_load()
int
checkBox_QTV_acceptHoverEvent
=
settings
.
value
(
"ui/checkBox_QTV_acceptHoverEvent"
,
0
).
toInt
();
ui
->
checkBox_QTV_acceptHoverEvent
->
setChecked
(
checkBox_QTV_acceptHoverEvent
?
true
:
false
);
}
int
checkBox_QTV_hoverEvt_AutoLabel
=
settings
.
value
(
"ui/checkBox_QTV_hoverEvt_AutoLabel"
,
1
).
toInt
();
ui
->
checkBox_QTV_hoverEvt_AutoLabel
->
setChecked
(
checkBox_QTV_hoverEvt_AutoLabel
?
true
:
false
);}
void
qtvplugin_geomarker
::
style_save
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录