Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
LittleGrayEagle
qplanetosm
提交
9c047f72
qplanetosm
项目概览
LittleGrayEagle
/
qplanetosm
与 Fork 源项目一致
Fork自
colorEagleStdio / qplanetosm
通知
1
Star
0
Fork
0
代码
文件
提交
分支
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 搜索 >>
提交
9c047f72
编写于
10月 21, 2020
作者:
A
archosm
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add functions to enable rubble-rect selection in geomarker.
上级
4aa10942
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
239 addition
and
106 deletion
+239
-106
documents/zh-CN/Qplanetosm_ActiveX.odt
documents/zh-CN/Qplanetosm_ActiveX.odt
+0
-0
documents/zh-CN/Qplanetosm_ActiveX.pdf
documents/zh-CN/Qplanetosm_ActiveX.pdf
+0
-0
qtvplugin_geomarker/qtvplugin_geomarker.cpp
qtvplugin_geomarker/qtvplugin_geomarker.cpp
+37
-3
qtvplugin_geomarker/qtvplugin_geomarker.h
qtvplugin_geomarker/qtvplugin_geomarker.h
+6
-1
qtvplugin_geomarker/qtvplugin_geomarker.ui
qtvplugin_geomarker/qtvplugin_geomarker.ui
+8
-1
qtvplugin_geomarker/qtvplugin_geomarker_func.cpp
qtvplugin_geomarker/qtvplugin_geomarker_func.cpp
+41
-3
qtvplugin_geomarker/qtvplugin_geomarker_uimethods.cpp
qtvplugin_geomarker/qtvplugin_geomarker_uimethods.cpp
+23
-10
qtvplugin_geomarker/qtvplugin_geomarker_zh_CN.ts
qtvplugin_geomarker/qtvplugin_geomarker_zh_CN.ts
+4
-0
test_container/testcontainer.cpp
test_container/testcontainer.cpp
+2
-0
test_container/testcontainer.h
test_container/testcontainer.h
+3
-0
test_container/testcontainer_linux.cpp
test_container/testcontainer_linux.cpp
+13
-0
test_container/testcontainer_linux.ui
test_container/testcontainer_linux.ui
+102
-88
未找到文件。
documents/zh-CN/Qplanetosm_ActiveX.odt
浏览文件 @
9c047f72
无法预览此类型文件
documents/zh-CN/Qplanetosm_ActiveX.pdf
浏览文件 @
9c047f72
无法预览此类型文件
qtvplugin_geomarker/qtvplugin_geomarker.cpp
浏览文件 @
9c047f72
...
@@ -26,6 +26,7 @@ qtvplugin_geomarker::qtvplugin_geomarker(QWidget *parent) :
...
@@ -26,6 +26,7 @@ qtvplugin_geomarker::qtvplugin_geomarker(QWidget *parent) :
QWidget
(
parent
),
QWidget
(
parent
),
ui
(
new
Ui
::
qtvplugin_geomarker
),
ui
(
new
Ui
::
qtvplugin_geomarker
),
m_currentTools
(
qtvplugin_geomarker
::
TOOLS_DISPLAY_ONLY
),
m_currentTools
(
qtvplugin_geomarker
::
TOOLS_DISPLAY_ONLY
),
m_lastTools
(
qtvplugin_geomarker
::
TOOLS_DISPLAY_ONLY
),
m_sel_ptStart_World
(
0
,
0
),
m_sel_ptStart_World
(
0
,
0
),
m_sel_ptEnd_World
(
0
,
0
)
m_sel_ptEnd_World
(
0
,
0
)
{
{
...
@@ -105,6 +106,11 @@ qtvplugin_geomarker::qtvplugin_geomarker(QWidget *parent) :
...
@@ -105,6 +106,11 @@ qtvplugin_geomarker::qtvplugin_geomarker(QWidget *parent) :
m_nTimerID_refreshUI
=
startTimer
(
2000
);
m_nTimerID_refreshUI
=
startTimer
(
2000
);
m_nTimerID_refreshMap
=
startTimer
(
100
);
m_nTimerID_refreshMap
=
startTimer
(
100
);
ui
->
radioButton_QTV_display
->
setChecked
(
true
);
ui
->
radioButton_QTV_display
->
setChecked
(
true
);
m_sel_lla
.
push_back
(
0
);
m_sel_lla
.
push_back
(
0
);
m_sel_lla
.
push_back
(
0
);
m_sel_lla
.
push_back
(
0
);
}
}
qtvplugin_geomarker
::~
qtvplugin_geomarker
()
qtvplugin_geomarker
::~
qtvplugin_geomarker
()
...
@@ -271,6 +277,7 @@ void qtvplugin_geomarker::cb_paintEvent( QPainter * pImage )
...
@@ -271,6 +277,7 @@ void qtvplugin_geomarker::cb_paintEvent( QPainter * pImage )
switch
(
m_currentTools
)
switch
(
m_currentTools
)
{
{
case
qtvplugin_geomarker
::
TOOLS_RECT_SELECTION
:
case
qtvplugin_geomarker
::
TOOLS_RECT_SELECTION
:
case
qtvplugin_geomarker
::
TOOLS_RECT_MARK
:
{
{
QPen
pen_sel
(
QColor
(
128
,
64
,
0
,
128
));
QPen
pen_sel
(
QColor
(
128
,
64
,
0
,
128
));
pen_sel
.
setWidth
(
3
);
pen_sel
.
setWidth
(
3
);
...
@@ -330,8 +337,16 @@ void qtvplugin_geomarker::set_active(bool ab)
...
@@ -330,8 +337,16 @@ void qtvplugin_geomarker::set_active(bool ab)
{
{
if
(
m_currentTools
==
qtvplugin_geomarker
::
TOOLS_DISPLAY_ONLY
)
if
(
m_currentTools
==
qtvplugin_geomarker
::
TOOLS_DISPLAY_ONLY
)
{
{
ui
->
radioButton_QTV_rect_selection
->
setChecked
(
true
);
if
(
m_lastTools
==
qtvplugin_geomarker
::
TOOLS_RECT_SELECTION
)
m_currentTools
=
qtvplugin_geomarker
::
TOOLS_RECT_SELECTION
;
{
ui
->
radioButton_QTV_rect_selection
->
setChecked
(
true
);
m_currentTools
=
qtvplugin_geomarker
::
TOOLS_RECT_SELECTION
;
}
else
{
ui
->
radioButton_QTV_rect_Mark
->
setChecked
(
true
);
m_currentTools
=
qtvplugin_geomarker
::
TOOLS_RECT_MARK
;
}
}
}
}
}
else
else
...
@@ -370,7 +385,9 @@ QRectF qtvplugin_geomarker::CV_RectWrold2Mkt(QRectF world)
...
@@ -370,7 +385,9 @@ QRectF qtvplugin_geomarker::CV_RectWrold2Mkt(QRectF world)
QRectF
qtvplugin_geomarker
::
current_sel_RectWorld
()
QRectF
qtvplugin_geomarker
::
current_sel_RectWorld
()
{
{
if
(
!
m_pVi
)
return
QRectF
();
if
(
!
m_pVi
)
return
QRectF
();
if
(
m_currentTools
!=
qtvplugin_geomarker
::
TOOLS_RECT_SELECTION
)
if
(
m_currentTools
!=
qtvplugin_geomarker
::
TOOLS_RECT_SELECTION
&&
m_currentTools
!=
qtvplugin_geomarker
::
TOOLS_RECT_MARK
)
return
QRectF
();
return
QRectF
();
if
(
m_sel_ptEnd_World
.
isNull
()
||
m_sel_ptStart_World
.
isNull
())
if
(
m_sel_ptEnd_World
.
isNull
()
||
m_sel_ptStart_World
.
isNull
())
return
QRectF
();
return
QRectF
();
...
@@ -597,6 +614,7 @@ bool qtvplugin_geomarker::cb_mousePressEvent(QMouseEvent * e)
...
@@ -597,6 +614,7 @@ bool qtvplugin_geomarker::cb_mousePressEvent(QMouseEvent * e)
switch
(
m_currentTools
)
switch
(
m_currentTools
)
{
{
case
qtvplugin_geomarker
::
TOOLS_RECT_SELECTION
:
case
qtvplugin_geomarker
::
TOOLS_RECT_SELECTION
:
case
qtvplugin_geomarker
::
TOOLS_RECT_MARK
:
{
{
if
(
e
->
button
()
==
Qt
::
LeftButton
)
if
(
e
->
button
()
==
Qt
::
LeftButton
)
{
{
...
@@ -651,6 +669,7 @@ bool qtvplugin_geomarker::cb_mouseMoveEvent ( QMouseEvent * e )
...
@@ -651,6 +669,7 @@ bool qtvplugin_geomarker::cb_mouseMoveEvent ( QMouseEvent * e )
switch
(
m_currentTools
)
switch
(
m_currentTools
)
{
{
case
qtvplugin_geomarker
::
TOOLS_RECT_SELECTION
:
case
qtvplugin_geomarker
::
TOOLS_RECT_SELECTION
:
case
qtvplugin_geomarker
::
TOOLS_RECT_MARK
:
{
{
if
(
e
->
buttons
()
==
Qt
::
LeftButton
)
if
(
e
->
buttons
()
==
Qt
::
LeftButton
)
{
{
...
@@ -691,12 +710,26 @@ bool qtvplugin_geomarker::cb_mouseReleaseEvent ( QMouseEvent * e )
...
@@ -691,12 +710,26 @@ bool qtvplugin_geomarker::cb_mouseReleaseEvent ( QMouseEvent * e )
{
{
m_sel_ptEnd_World
=
QPointF
(
wx
,
wy
);
m_sel_ptEnd_World
=
QPointF
(
wx
,
wy
);
QRectF
rectSel
=
current_sel_RectWorld
();
QRectF
rectSel
=
current_sel_RectWorld
();
m_pVi
->
CV_World2LLA
(
rectSel
.
left
(),
rectSel
.
top
(),
m_sel_lla
.
data
(),
m_sel_lla
.
data
()
+
1
);
m_pVi
->
CV_World2LLA
(
rectSel
.
right
(),
rectSel
.
bottom
(),
m_sel_lla
.
data
()
+
2
,
m_sel_lla
.
data
()
+
3
);
m_sel_ptStart_World
=
m_sel_ptEnd_World
=
QPointF
();
m_sel_ptStart_World
=
m_sel_ptEnd_World
=
QPointF
();
addSelection
(
rectSel
);
addSelection
(
rectSel
);
scheduleUpdateMap
();
scheduleUpdateMap
();
}
}
}
}
break
;
break
;
case
qtvplugin_geomarker
::
TOOLS_RECT_MARK
:
{
if
(
e
->
button
()
==
Qt
::
LeftButton
)
{
m_sel_ptEnd_World
=
QPointF
(
wx
,
wy
);
QRectF
rectSel
=
current_sel_RectWorld
();
m_pVi
->
CV_World2LLA
(
rectSel
.
left
(),
rectSel
.
top
(),
m_sel_lla
.
data
(),
m_sel_lla
.
data
()
+
1
);
m_pVi
->
CV_World2LLA
(
rectSel
.
right
(),
rectSel
.
bottom
(),
m_sel_lla
.
data
()
+
2
,
m_sel_lla
.
data
()
+
3
);
scheduleUpdateMap
();
}
}
break
;
default:
default:
break
;
break
;
}
}
...
@@ -1171,3 +1204,4 @@ bool qtvplugin_geomarker::cmd_load (QString cmdFile)
...
@@ -1171,3 +1204,4 @@ bool qtvplugin_geomarker::cmd_load (QString cmdFile)
}
}
return
res
;
return
res
;
}
}
qtvplugin_geomarker/qtvplugin_geomarker.h
浏览文件 @
9c047f72
...
@@ -72,7 +72,8 @@ private:
...
@@ -72,7 +72,8 @@ private:
//Enum tools
//Enum tools
enum
enum_tools_selection
{
enum
enum_tools_selection
{
TOOLS_DISPLAY_ONLY
=
0
,
TOOLS_DISPLAY_ONLY
=
0
,
TOOLS_RECT_SELECTION
=
1
TOOLS_RECT_SELECTION
=
1
,
TOOLS_RECT_MARK
=
2
};
};
public:
public:
qtvplugin_geomarker
(
QWidget
*
parent
=
0
);
qtvplugin_geomarker
(
QWidget
*
parent
=
0
);
...
@@ -98,9 +99,11 @@ private:
...
@@ -98,9 +99,11 @@ private:
private:
private:
//current tools here
//current tools here
enum_tools_selection
m_currentTools
;
enum_tools_selection
m_currentTools
;
enum_tools_selection
m_lastTools
;
//selection tool
//selection tool
QPointF
m_sel_ptStart_World
;
QPointF
m_sel_ptStart_World
;
QPointF
m_sel_ptEnd_World
;
QPointF
m_sel_ptEnd_World
;
QVector
<
double
>
m_sel_lla
;
QSet
<
QString
>
m_set_itemNameSelected
;
QSet
<
QString
>
m_set_itemNameSelected
;
QRectF
CV_RectWrold2Mkt
(
QRectF
world
);
QRectF
CV_RectWrold2Mkt
(
QRectF
world
);
QRectF
current_sel_RectWorld
();
QRectF
current_sel_RectWorld
();
...
@@ -199,6 +202,7 @@ private:
...
@@ -199,6 +202,7 @@ private:
//selection methods
//selection methods
QMap
<
QString
,
QVariant
>
func_selection_clear
(
const
QMap
<
QString
,
QVariant
>
&
);
QMap
<
QString
,
QVariant
>
func_selection_clear
(
const
QMap
<
QString
,
QVariant
>
&
);
QMap
<
QString
,
QVariant
>
func_selection_delete
(
const
QMap
<
QString
,
QVariant
>
&
);
QMap
<
QString
,
QVariant
>
func_selection_delete
(
const
QMap
<
QString
,
QVariant
>
&
);
QMap
<
QString
,
QVariant
>
func_selected_rect
(
const
QMap
<
QString
,
QVariant
>
&
);
QMap
<
QString
,
QVariant
>
func_selected_items
(
const
QMap
<
QString
,
QVariant
>
&
);
QMap
<
QString
,
QVariant
>
func_selected_items
(
const
QMap
<
QString
,
QVariant
>
&
);
//style setting
//style setting
QMap
<
QString
,
QVariant
>
func_set_default_style
(
const
QMap
<
QString
,
QVariant
>
&
);
QMap
<
QString
,
QVariant
>
func_set_default_style
(
const
QMap
<
QString
,
QVariant
>
&
);
...
@@ -253,6 +257,7 @@ protected slots:
...
@@ -253,6 +257,7 @@ protected slots:
void
on_pushButton_QTV_collaps_all_clicked
();
void
on_pushButton_QTV_collaps_all_clicked
();
void
on_radioButton_QTV_display_clicked
();
void
on_radioButton_QTV_display_clicked
();
void
on_radioButton_QTV_rect_selection_clicked
();
void
on_radioButton_QTV_rect_selection_clicked
();
void
on_radioButton_QTV_rect_Mark_clicked
();
void
on_pushButton_QTV_sel_clear_clicked
();
void
on_pushButton_QTV_sel_clear_clicked
();
void
on_pushButton_QTV_sel_delselected_clicked
();
void
on_pushButton_QTV_sel_delselected_clicked
();
void
on_pushButton_QTV_style_default_save_clicked
();
void
on_pushButton_QTV_style_default_save_clicked
();
...
...
qtvplugin_geomarker/qtvplugin_geomarker.ui
浏览文件 @
9c047f72
...
@@ -128,6 +128,13 @@
...
@@ -128,6 +128,13 @@
</property>
</property>
</widget>
</widget>
</item>
</item>
<item>
<widget
class=
"QRadioButton"
name=
"radioButton_QTV_rect_Mark"
>
<property
name=
"text"
>
<string>
Rect Mark
</string>
</property>
</widget>
</item>
<item>
<item>
<widget
class=
"QCheckBox"
name=
"checkBox_QTV_hoverEvt_AutoLabel"
>
<widget
class=
"QCheckBox"
name=
"checkBox_QTV_hoverEvt_AutoLabel"
>
<property
name=
"text"
>
<property
name=
"text"
>
...
@@ -202,7 +209,7 @@
...
@@ -202,7 +209,7 @@
<x>
0
</x>
<x>
0
</x>
<y>
0
</y>
<y>
0
</y>
<width>
187
</width>
<width>
187
</width>
<height>
1
77
</height>
<height>
1
51
</height>
</rect>
</rect>
</property>
</property>
<attribute
name=
"icon"
>
<attribute
name=
"icon"
>
...
...
qtvplugin_geomarker/qtvplugin_geomarker_func.cpp
浏览文件 @
9c047f72
...
@@ -84,6 +84,7 @@ void qtvplugin_geomarker::initialBindPluginFuntions()
...
@@ -84,6 +84,7 @@ void qtvplugin_geomarker::initialBindPluginFuntions()
m_map_pluginFunctions
[
"selection_clear"
]
=
std
::
bind
(
&
qtvplugin_geomarker
::
func_selection_clear
,
this
,
std
::
placeholders
::
_1
);
m_map_pluginFunctions
[
"selection_clear"
]
=
std
::
bind
(
&
qtvplugin_geomarker
::
func_selection_clear
,
this
,
std
::
placeholders
::
_1
);
m_map_pluginFunctions
[
"selection_delete"
]
=
std
::
bind
(
&
qtvplugin_geomarker
::
func_selection_delete
,
this
,
std
::
placeholders
::
_1
);
m_map_pluginFunctions
[
"selection_delete"
]
=
std
::
bind
(
&
qtvplugin_geomarker
::
func_selection_delete
,
this
,
std
::
placeholders
::
_1
);
m_map_pluginFunctions
[
"selected_items"
]
=
std
::
bind
(
&
qtvplugin_geomarker
::
func_selected_items
,
this
,
std
::
placeholders
::
_1
);
m_map_pluginFunctions
[
"selected_items"
]
=
std
::
bind
(
&
qtvplugin_geomarker
::
func_selected_items
,
this
,
std
::
placeholders
::
_1
);
m_map_pluginFunctions
[
"selected_rect"
]
=
std
::
bind
(
&
qtvplugin_geomarker
::
func_selected_rect
,
this
,
std
::
placeholders
::
_1
);
m_map_pluginFunctions
[
"set_default_style"
]
=
std
::
bind
(
&
qtvplugin_geomarker
::
func_set_default_style
,
this
,
std
::
placeholders
::
_1
);
m_map_pluginFunctions
[
"set_default_style"
]
=
std
::
bind
(
&
qtvplugin_geomarker
::
func_set_default_style
,
this
,
std
::
placeholders
::
_1
);
m_map_pluginFunctions
[
"default_style"
]
=
std
::
bind
(
&
qtvplugin_geomarker
::
func_default_style
,
this
,
std
::
placeholders
::
_1
);
m_map_pluginFunctions
[
"default_style"
]
=
std
::
bind
(
&
qtvplugin_geomarker
::
func_default_style
,
this
,
std
::
placeholders
::
_1
);
}
}
...
@@ -1473,7 +1474,7 @@ QMap<QString, QVariant> qtvplugin_geomarker::func_set_mod (const QMap<QString
...
@@ -1473,7 +1474,7 @@ QMap<QString, QVariant> qtvplugin_geomarker::func_set_mod (const QMap<QString
ui
->
radioButton_QTV_display
->
setChecked
(
true
);
ui
->
radioButton_QTV_display
->
setChecked
(
true
);
ui
->
toolBox_QTV_marks
->
setCurrentIndex
(
0
);
ui
->
toolBox_QTV_marks
->
setCurrentIndex
(
0
);
m_sel_ptStart_World
=
m_sel_ptEnd_World
=
QPointF
();
m_sel_ptStart_World
=
m_sel_ptEnd_World
=
QPointF
();
m_currentTools
=
qtvplugin_geomarker
::
TOOLS_DISPLAY_ONLY
;
m_
lastTools
=
m_
currentTools
=
qtvplugin_geomarker
::
TOOLS_DISPLAY_ONLY
;
layer_interface
*
pOSM
=
m_pVi
->
layer
(
"OSM"
);
layer_interface
*
pOSM
=
m_pVi
->
layer
(
"OSM"
);
if
(
pOSM
)
if
(
pOSM
)
{
{
...
@@ -1487,7 +1488,17 @@ QMap<QString, QVariant> qtvplugin_geomarker::func_set_mod (const QMap<QString
...
@@ -1487,7 +1488,17 @@ QMap<QString, QVariant> qtvplugin_geomarker::func_set_mod (const QMap<QString
{
{
ui
->
radioButton_QTV_rect_selection
->
setChecked
(
true
);
ui
->
radioButton_QTV_rect_selection
->
setChecked
(
true
);
ui
->
toolBox_QTV_marks
->
setCurrentIndex
(
1
);
ui
->
toolBox_QTV_marks
->
setCurrentIndex
(
1
);
m_currentTools
=
qtvplugin_geomarker
::
TOOLS_RECT_SELECTION
;
m_lastTools
=
m_currentTools
=
qtvplugin_geomarker
::
TOOLS_RECT_SELECTION
;
m_sel_ptStart_World
=
m_sel_ptEnd_World
=
QPointF
();
m_pVi
->
adjust_layers
(
this
);
m_pVi
->
UpdateWindow
();
m_pVi
->
updateLayerGridView
();
}
else
if
(
mod
==
2
)
{
ui
->
radioButton_QTV_rect_Mark
->
setChecked
(
true
);
ui
->
toolBox_QTV_marks
->
setCurrentIndex
(
1
);
m_lastTools
=
m_currentTools
=
qtvplugin_geomarker
::
TOOLS_RECT_MARK
;
m_sel_ptStart_World
=
m_sel_ptEnd_World
=
QPointF
();
m_sel_ptStart_World
=
m_sel_ptEnd_World
=
QPointF
();
m_pVi
->
adjust_layers
(
this
);
m_pVi
->
adjust_layers
(
this
);
m_pVi
->
UpdateWindow
();
m_pVi
->
UpdateWindow
();
...
@@ -1532,7 +1543,34 @@ QMap<QString, QVariant> qtvplugin_geomarker::func_selection_delete(const QMap<
...
@@ -1532,7 +1543,34 @@ QMap<QString, QVariant> qtvplugin_geomarker::func_selection_delete(const QMap<
return
/*std::move*/
(
res
);
return
/*std::move*/
(
res
);
}
}
/**
/**
* @brief func_set_mod is a internal function for plugin call_func "selected_items"
* @brief func_selected_rect is a internal function for plugin call_func "func_selected_rect"
*
* the paraments used by paras is listed below.
* function=func_selected_rect;
* @param paras The key-value style paraments.
* @return QMap<QString, QVariant> if error happens, a property called "error" will store the most possible reason.
* the return value is stored in lat,lon, lat0=??;lat1=??;lon0=??;lon1=??;;
*/
QMap
<
QString
,
QVariant
>
qtvplugin_geomarker
::
func_selected_rect
(
const
QMap
<
QString
,
QVariant
>
&
paras
)
{
QMap
<
QString
,
QVariant
>
res
;
if
(
m_sel_lla
.
size
()
==
4
)
{
res
[
"lat0"
]
=
m_sel_lla
[
0
];
res
[
"lon0"
]
=
m_sel_lla
[
1
];
res
[
"lat1"
]
=
m_sel_lla
[
2
];
res
[
"lon1"
]
=
m_sel_lla
[
3
];
}
else
res
[
"error"
]
=
"NULL area!"
;
//! the mark names will be stored in key-value pairs, with
//! name0=??;name1=??;name2=??...namen-1=??
return
/*std::move*/
(
res
);
}
/**
* @brief func_selected_items is a internal function for plugin call_func "func_selected_items"
*
*
* the paraments used by paras is listed below.
* the paraments used by paras is listed below.
* function=selected_items;
* function=selected_items;
...
...
qtvplugin_geomarker/qtvplugin_geomarker_uimethods.cpp
浏览文件 @
9c047f72
...
@@ -803,12 +803,12 @@ void qtvplugin_geomarker::on_pushButton_QTV_save_clicked()
...
@@ -803,12 +803,12 @@ void qtvplugin_geomarker::on_pushButton_QTV_save_clicked()
{
{
if
(
newfm
.
right
(
3
).
toUpper
()
==
"XML"
)
if
(
newfm
.
right
(
3
).
toUpper
()
==
"XML"
)
{
{
if
(
true
==
xml_save
(
newfm
))
if
(
true
==
xml_save
(
newfm
))
{
{
settings
.
setValue
(
"history/last_save_xml_dir"
,
newfm
);
settings
.
setValue
(
"history/last_save_xml_dir"
,
newfm
);
//QMessageBox::information(this,tr("succeed"),tr("Successfully saved XML file") + newfm);
//QMessageBox::information(this,tr("succeed"),tr("Successfully saved XML file") + newfm);
}
}
else
else
QMessageBox
::
warning
(
this
,
tr
(
"failed"
),
tr
(
"Save XML file"
)
+
newfm
+
tr
(
" Failed"
));
QMessageBox
::
warning
(
this
,
tr
(
"failed"
),
tr
(
"Save XML file"
)
+
newfm
+
tr
(
" Failed"
));
}
}
else
else
...
@@ -835,12 +835,12 @@ void qtvplugin_geomarker::on_pushButton_QTV_load_clicked()
...
@@ -835,12 +835,12 @@ void qtvplugin_geomarker::on_pushButton_QTV_load_clicked()
{
{
if
(
newfm
.
right
(
3
).
toUpper
()
==
"XML"
)
if
(
newfm
.
right
(
3
).
toUpper
()
==
"XML"
)
{
{
if
(
true
==
xml_load
(
newfm
))
if
(
true
==
xml_load
(
newfm
))
{
{
settings
.
setValue
(
"history/last_open_xml_dir"
,
newfm
);
settings
.
setValue
(
"history/last_open_xml_dir"
,
newfm
);
//QMessageBox::information(this,tr("succeed"),tr("Successfully load XML file") + newfm);
//QMessageBox::information(this,tr("succeed"),tr("Successfully load XML file") + newfm);
}
}
else
else
QMessageBox
::
warning
(
this
,
tr
(
"failed"
),
tr
(
"Load XML file"
)
+
newfm
+
tr
(
" Failed"
));
QMessageBox
::
warning
(
this
,
tr
(
"failed"
),
tr
(
"Load XML file"
)
+
newfm
+
tr
(
" Failed"
));
}
}
else
else
...
@@ -930,7 +930,7 @@ void qtvplugin_geomarker::on_radioButton_QTV_display_clicked()
...
@@ -930,7 +930,7 @@ void qtvplugin_geomarker::on_radioButton_QTV_display_clicked()
{
{
if
(
!
m_pVi
)
return
;
if
(
!
m_pVi
)
return
;
m_sel_ptStart_World
=
m_sel_ptEnd_World
=
QPointF
();
m_sel_ptStart_World
=
m_sel_ptEnd_World
=
QPointF
();
m_currentTools
=
qtvplugin_geomarker
::
TOOLS_DISPLAY_ONLY
;
m_
lastTools
=
m_
currentTools
=
qtvplugin_geomarker
::
TOOLS_DISPLAY_ONLY
;
layer_interface
*
pOSM
=
m_pVi
->
layer
(
"OSM"
);
layer_interface
*
pOSM
=
m_pVi
->
layer
(
"OSM"
);
if
(
pOSM
)
if
(
pOSM
)
{
{
...
@@ -946,13 +946,26 @@ void qtvplugin_geomarker::on_radioButton_QTV_display_clicked()
...
@@ -946,13 +946,26 @@ void qtvplugin_geomarker::on_radioButton_QTV_display_clicked()
void
qtvplugin_geomarker
::
on_radioButton_QTV_rect_selection_clicked
()
void
qtvplugin_geomarker
::
on_radioButton_QTV_rect_selection_clicked
()
{
{
if
(
!
m_pVi
)
return
;
if
(
!
m_pVi
)
return
;
m_currentTools
=
qtvplugin_geomarker
::
TOOLS_RECT_SELECTION
;
m_
lastTools
=
m_
currentTools
=
qtvplugin_geomarker
::
TOOLS_RECT_SELECTION
;
m_sel_ptStart_World
=
m_sel_ptEnd_World
=
QPointF
();
m_sel_ptStart_World
=
m_sel_ptEnd_World
=
QPointF
();
m_pVi
->
adjust_layers
(
this
);
m_pVi
->
adjust_layers
(
this
);
m_pVi
->
UpdateWindow
();
m_pVi
->
UpdateWindow
();
m_pVi
->
updateLayerGridView
();
m_pVi
->
updateLayerGridView
();
ui
->
toolBox_QTV_marks
->
setCurrentIndex
(
1
);
ui
->
toolBox_QTV_marks
->
setCurrentIndex
(
1
);
}
}
void
qtvplugin_geomarker
::
on_radioButton_QTV_rect_Mark_clicked
()
{
if
(
!
m_pVi
)
return
;
m_lastTools
=
m_currentTools
=
qtvplugin_geomarker
::
TOOLS_RECT_MARK
;
m_sel_ptStart_World
=
m_sel_ptEnd_World
=
QPointF
();
m_pVi
->
adjust_layers
(
this
);
m_pVi
->
UpdateWindow
();
m_pVi
->
updateLayerGridView
();
ui
->
toolBox_QTV_marks
->
setCurrentIndex
(
1
);
}
void
qtvplugin_geomarker
::
on_pushButton_QTV_sel_clear_clicked
()
void
qtvplugin_geomarker
::
on_pushButton_QTV_sel_clear_clicked
()
{
{
clearSelection
();
clearSelection
();
...
...
qtvplugin_geomarker/qtvplugin_geomarker_zh_CN.ts
浏览文件 @
9c047f72
...
@@ -450,5 +450,9 @@
...
@@ -450,5 +450,9 @@
<
source
>
Load
CMD
file
<
/source
>
<
source
>
Load
CMD
file
<
/source
>
<
translation
>
加载绘图指令文件
<
/translation
>
<
translation
>
加载绘图指令文件
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
source
>
Rect
Mark
<
/source
>
<
translation
>
仅获取选择矩形
<
/translation
>
<
/message
>
<
/context
>
<
/context
>
<
/TS
>
<
/TS
>
test_container/testcontainer.cpp
浏览文件 @
9c047f72
...
@@ -609,3 +609,5 @@ void testcontainer::on_pushButton_QTV_test_10000_clicked()
...
@@ -609,3 +609,5 @@ void testcontainer::on_pushButton_QTV_test_10000_clicked()
}
}
}
}
test_container/testcontainer.h
浏览文件 @
9c047f72
...
@@ -46,6 +46,9 @@ protected slots:
...
@@ -46,6 +46,9 @@ protected slots:
void
on_pushButton_QTV_default_style_clicked
();
void
on_pushButton_QTV_default_style_clicked
();
void
on_osmmap_map_event
(
QMap
<
QString
,
QVariant
>
p
);
void
on_osmmap_map_event
(
QMap
<
QString
,
QVariant
>
p
);
void
on_pushButton_QTV_test_10000_clicked
();
void
on_pushButton_QTV_test_10000_clicked
();
private
slots
:
void
on_pushButton_QTV_test_geo_markMod_clicked
();
void
on_pushButton_QTV_test_geo_selectd_rect_clicked
();
};
};
#endif // TESTCONTAINER_H
#endif // TESTCONTAINER_H
test_container/testcontainer_linux.cpp
浏览文件 @
9c047f72
...
@@ -514,7 +514,20 @@ void testcontainer::on_pushButton_QTV_test_geo_selectionMod_clicked()
...
@@ -514,7 +514,20 @@ void testcontainer::on_pushButton_QTV_test_geo_selectionMod_clicked()
if
(
res
.
contains
(
"error"
))
if
(
res
.
contains
(
"error"
))
QMessageBox
::
information
(
this
,
"geomarker::set_mod"
,
res
);
QMessageBox
::
information
(
this
,
"geomarker::set_mod"
,
res
);
}
}
void
testcontainer
::
on_pushButton_QTV_test_geo_markMod_clicked
()
{
QString
res
=
ui
->
osmmap
->
osm_layer_call_function
(
"geomarker"
/*m_str_markerLayerName*/
,
"function=set_mod;mod=2;"
);
if
(
res
.
contains
(
"error"
))
QMessageBox
::
information
(
this
,
"geomarker::set_mod"
,
res
);
}
void
testcontainer
::
on_pushButton_QTV_test_geo_selectd_rect_clicked
()
{
QString
res
=
ui
->
osmmap
->
osm_layer_call_function
(
"geomarker"
/*m_str_markerLayerName*/
,
"function=selected_rect;"
);
QMessageBox
::
information
(
this
,
"geomarker::selected_rect"
,
res
);
}
void
testcontainer
::
on_pushButton_QTV_test_geo_selected_marks_clicked
()
void
testcontainer
::
on_pushButton_QTV_test_geo_selected_marks_clicked
()
{
{
QString
res
=
ui
->
osmmap
->
osm_layer_call_function
(
"geomarker"
/*m_str_markerLayerName*/
,
QString
res
=
ui
->
osmmap
->
osm_layer_call_function
(
"geomarker"
/*m_str_markerLayerName*/
,
...
...
test_container/testcontainer_linux.ui
浏览文件 @
9c047f72
...
@@ -23,19 +23,18 @@
...
@@ -23,19 +23,18 @@
</property>
</property>
</widget>
</widget>
</item>
</item>
<item
row=
"
6
"
column=
"0"
>
<item
row=
"
20
"
column=
"0"
>
<
widget
class=
"QLabel"
name=
"label_QTV_3
"
>
<
spacer
name=
"verticalSpacer
"
>
<property
name=
"
text
"
>
<property
name=
"
orientation
"
>
<
string>
Layer control
</string
>
<
enum>
Qt::Vertical
</enum
>
</property>
</property>
</widget>
<property
name=
"sizeHint"
stdset=
"0"
>
</item>
<size>
<item
row=
"16"
column=
"1"
>
<width>
20
</width>
<widget
class=
"QPushButton"
name=
"pushButton_QTV_test_geo_clear_sel"
>
<height>
40
</height>
<property
name=
"text"
>
</size>
<string>
clear selection
</string>
</property>
</property>
</
widget
>
</
spacer
>
</item>
</item>
<item
row=
"14"
column=
"0"
>
<item
row=
"14"
column=
"0"
>
<widget
class=
"QPushButton"
name=
"pushButton_QTV_test_resource"
>
<widget
class=
"QPushButton"
name=
"pushButton_QTV_test_resource"
>
...
@@ -44,59 +43,66 @@
...
@@ -44,59 +43,66 @@
</property>
</property>
</widget>
</widget>
</item>
</item>
<item
row=
"
15"
column=
"1
"
>
<item
row=
"
3"
column=
"0
"
>
<widget
class=
"QPushButton"
name=
"pushButton_QTV_test_
geo_selectionMod
"
>
<widget
class=
"QPushButton"
name=
"pushButton_QTV_test_
cache
"
>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
selection mod
</string>
<string>
cache Folder
</string>
</property>
</property>
</widget>
</widget>
</item>
</item>
<item
row=
"
1"
column=
"1
"
>
<item
row=
"
7"
column=
"0
"
>
<widget
class=
"QPushButton"
name=
"pushButton_QTV_test_
autodl
"
>
<widget
class=
"QPushButton"
name=
"pushButton_QTV_test_
layers
"
>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
connect
</string>
<string>
enum layers
</string>
</property>
</property>
</widget>
</widget>
</item>
</item>
<item
row=
"
8
"
column=
"1"
>
<item
row=
"
7
"
column=
"1"
>
<widget
class=
"Q
Label"
name=
"label_QTV_5
"
>
<widget
class=
"Q
PushButton"
name=
"pushButton_QTV_test_layer_move
"
>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
Grid measure
</string>
<string>
order a layer
</string>
</property>
</property>
</widget>
</widget>
</item>
</item>
<item
row=
"1
0
"
column=
"1"
>
<item
row=
"1
1
"
column=
"1"
>
<widget
class=
"Q
Label"
name=
"label_QTV_7
"
>
<widget
class=
"Q
PushButton"
name=
"pushButton_QTV_test_line
"
>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
geo marker
</string>
<string>
add a line
</string>
</property>
</property>
</widget>
</widget>
</item>
</item>
<item
row=
"
10
"
column=
"0"
>
<item
row=
"
5
"
column=
"0"
>
<widget
class=
"Q
Label"
name=
"label_QTV_6
"
>
<widget
class=
"Q
PushButton"
name=
"pushButton_QTV_test_navigate
"
>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
Plugin test:
</string>
<string>
navigate
</string>
</property>
</property>
</widget>
</widget>
</item>
</item>
<item
row=
"
7
"
column=
"1"
>
<item
row=
"
9
"
column=
"1"
>
<widget
class=
"QPushButton"
name=
"pushButton_QTV_test_
layer_move
"
>
<widget
class=
"QPushButton"
name=
"pushButton_QTV_test_
grid_getPolygon
"
>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
order a layer
</string>
<string>
get polygon
</string>
</property>
</property>
</widget>
</widget>
</item>
</item>
<item
row=
"1"
column=
"0"
>
<item
row=
"1
8
"
column=
"0"
>
<widget
class=
"QPushButton"
name=
"pushButton_QTV_test_
adds
"
>
<widget
class=
"QPushButton"
name=
"pushButton_QTV_test_
geo_del_sel
"
>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
address
</string>
<string>
delete selection
</string>
</property>
</property>
</widget>
</widget>
</item>
</item>
<item
row=
"
7
"
column=
"0"
>
<item
row=
"
0
"
column=
"0"
>
<widget
class=
"Q
PushButton"
name=
"pushButton_QTV_test_layers
"
>
<widget
class=
"Q
Label"
name=
"label_qtv
"
>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
enum layers
</string>
<string>
background osm conn
</string>
</property>
</widget>
</item>
<item
row=
"6"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_QTV_3"
>
<property
name=
"text"
>
<string>
Layer control
</string>
</property>
</property>
</widget>
</widget>
</item>
</item>
...
@@ -107,31 +113,45 @@
...
@@ -107,31 +113,45 @@
</property>
</property>
</widget>
</widget>
</item>
</item>
<item
row=
"1
1"
column=
"1
"
>
<item
row=
"1
5"
column=
"0
"
>
<widget
class=
"QPushButton"
name=
"pushButton_QTV_test_
line
"
>
<widget
class=
"QPushButton"
name=
"pushButton_QTV_test_
geo_displayMod
"
>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
add a line
</string>
<string>
display mod
</string>
</property>
</property>
</widget>
</widget>
</item>
</item>
<item
row=
"
5"
column=
"0
"
>
<item
row=
"
18"
column=
"1
"
>
<widget
class=
"QPushButton"
name=
"pushButton_QTV_
test_navigat
e"
>
<widget
class=
"QPushButton"
name=
"pushButton_QTV_
default_styl
e"
>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
navigat
e
</string>
<string>
default_styl
e
</string>
</property>
</property>
</widget>
</widget>
</item>
</item>
<item
row=
"
9
"
column=
"1"
>
<item
row=
"
15
"
column=
"1"
>
<widget
class=
"QPushButton"
name=
"pushButton_QTV_test_g
rid_getPolygon
"
>
<widget
class=
"QPushButton"
name=
"pushButton_QTV_test_g
eo_selectionMod
"
>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
get polygon
</string>
<string>
selection mod
</string>
</property>
</property>
</widget>
</widget>
</item>
</item>
<item
row=
"
9
"
column=
"0"
>
<item
row=
"
8
"
column=
"0"
>
<widget
class=
"Q
PushButton"
name=
"pushButton_QTV_test_grid_enable
"
>
<widget
class=
"Q
Label"
name=
"label_QTV_4
"
>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
measure on/off
</string>
<string>
Plugin test:
</string>
</property>
</widget>
</item>
<item
row=
"17"
column=
"0"
>
<widget
class=
"QPushButton"
name=
"pushButton_QTV_test_geo_selected_marks"
>
<property
name=
"text"
>
<string>
selected_marks
</string>
</property>
</widget>
</item>
<item
row=
"8"
column=
"1"
>
<widget
class=
"QLabel"
name=
"label_QTV_5"
>
<property
name=
"text"
>
<string>
Grid measure
</string>
</property>
</property>
</widget>
</widget>
</item>
</item>
...
@@ -142,86 +162,80 @@
...
@@ -142,86 +162,80 @@
</property>
</property>
</widget>
</widget>
</item>
</item>
<item
row=
"1
1"
column=
"0
"
>
<item
row=
"1
7"
column=
"1
"
>
<widget
class=
"QPushButton"
name=
"pushButton_QTV_test_
mark
"
>
<widget
class=
"QPushButton"
name=
"pushButton_QTV_test_
geo_clear_sel
"
>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
add marks
</string>
<string>
clear selection
</string>
</property>
</property>
</widget>
</widget>
</item>
</item>
<item
row=
"1
5"
column=
"0
"
>
<item
row=
"1
"
column=
"1
"
>
<widget
class=
"QPushButton"
name=
"pushButton_QTV_test_
geo_displayMod
"
>
<widget
class=
"QPushButton"
name=
"pushButton_QTV_test_
autodl
"
>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
display mod
</string>
<string>
connect
</string>
</property>
</property>
</widget>
</widget>
</item>
</item>
<item
row=
"
8
"
column=
"0"
>
<item
row=
"
9
"
column=
"0"
>
<widget
class=
"Q
Label"
name=
"label_QTV_4
"
>
<widget
class=
"Q
PushButton"
name=
"pushButton_QTV_test_grid_enable
"
>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
Plugin test:
</string>
<string>
measure on/off
</string>
</property>
</property>
</widget>
</widget>
</item>
</item>
<item
row=
"
4
"
column=
"0"
>
<item
row=
"
1
"
column=
"0"
>
<widget
class=
"Q
Label"
name=
"label_QTV_2
"
>
<widget
class=
"Q
PushButton"
name=
"pushButton_QTV_test_adds
"
>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
Navigate
</string>
<string>
address
</string>
</property>
</property>
</widget>
</widget>
</item>
</item>
<item
row=
"1
7"
column=
"0
"
>
<item
row=
"1
0"
column=
"1
"
>
<widget
class=
"Q
PushButton"
name=
"pushButton_QTV_test_geo_del_sel
"
>
<widget
class=
"Q
Label"
name=
"label_QTV_7
"
>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
delete selection
</string>
<string>
geo marker
</string>
</property>
</property>
</widget>
</widget>
</item>
</item>
<item
row=
"
0
"
column=
"0"
>
<item
row=
"
4
"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_
qtv
"
>
<widget
class=
"QLabel"
name=
"label_
QTV_2
"
>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
background osm conn
</string>
<string>
Navigate
</string>
</property>
</property>
</widget>
</widget>
</item>
</item>
<item
row=
"19"
column=
"0"
>
<item
row=
"10"
column=
"0"
>
<spacer
name=
"verticalSpacer"
>
<widget
class=
"QLabel"
name=
"label_QTV_6"
>
<property
name=
"orientation"
>
<property
name=
"text"
>
<enum>
Qt::Vertical
</enum>
<string>
Plugin test:
</string>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
40
</height>
</size>
</property>
</property>
</
spacer
>
</
widget
>
</item>
</item>
<item
row=
"1
7"
column=
"1
"
>
<item
row=
"1
1"
column=
"0
"
>
<widget
class=
"QPushButton"
name=
"pushButton_QTV_
default_style
"
>
<widget
class=
"QPushButton"
name=
"pushButton_QTV_
test_mark
"
>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
default_style
</string>
<string>
add marks
</string>
</property>
</property>
</widget>
</widget>
</item>
</item>
<item
row=
"1
6
"
column=
"0"
>
<item
row=
"1
9
"
column=
"0"
>
<widget
class=
"QPushButton"
name=
"pushButton_QTV_test_
geo_selected_marks
"
>
<widget
class=
"QPushButton"
name=
"pushButton_QTV_test_
10000
"
>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
selected_mark
s
</string>
<string>
10000 makr
s
</string>
</property>
</property>
</widget>
</widget>
</item>
</item>
<item
row=
"
3
"
column=
"0"
>
<item
row=
"
16
"
column=
"0"
>
<widget
class=
"QPushButton"
name=
"pushButton_QTV_test_
cache
"
>
<widget
class=
"QPushButton"
name=
"pushButton_QTV_test_
geo_markMod
"
>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
cache Folder
</string>
<string>
Rect Mark mod
</string>
</property>
</property>
</widget>
</widget>
</item>
</item>
<item
row=
"1
8"
column=
"0
"
>
<item
row=
"1
6"
column=
"1
"
>
<widget
class=
"QPushButton"
name=
"pushButton_QTV_test_
10000
"
>
<widget
class=
"QPushButton"
name=
"pushButton_QTV_test_
geo_selectd_rect
"
>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
10000 makrs
</string>
<string>
selected_rect
</string>
</property>
</property>
</widget>
</widget>
</item>
</item>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录