Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
colorEagleStdio
qplanetosm
提交
62414339
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 搜索 >>
提交
62414339
编写于
1月 03, 2016
作者:
丁劲犇
😸
浏览文件
操作
浏览文件
下载
差异文件
Merge region mark features from develop
上级
04d5fe1f
80768d78
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
341 addition
and
12 deletion
+341
-12
qtvplugin_geomarker/geographicspolygonitem.cpp
qtvplugin_geomarker/geographicspolygonitem.cpp
+120
-0
qtvplugin_geomarker/geographicspolygonitem.h
qtvplugin_geomarker/geographicspolygonitem.h
+26
-0
qtvplugin_geomarker/qtvplugin_geomarker.cpp
qtvplugin_geomarker/qtvplugin_geomarker.cpp
+50
-0
qtvplugin_geomarker/qtvplugin_geomarker.h
qtvplugin_geomarker/qtvplugin_geomarker.h
+4
-0
qtvplugin_geomarker/qtvplugin_geomarker.pro
qtvplugin_geomarker/qtvplugin_geomarker.pro
+4
-2
qtvplugin_geomarker/qtvplugin_geomarker.ui
qtvplugin_geomarker/qtvplugin_geomarker.ui
+6
-9
qtvplugin_geomarker/qtvplugin_geomarker_uimethods.cpp
qtvplugin_geomarker/qtvplugin_geomarker_uimethods.cpp
+114
-0
qtvplugin_grid/qtvplugin_grid.cpp
qtvplugin_grid/qtvplugin_grid.cpp
+17
-1
未找到文件。
qtvplugin_geomarker/geographicspolygonitem.cpp
0 → 100644
浏览文件 @
62414339
#include "geographicspolygonitem.h"
#include "../qtviewer_planetosm/osmtiles/viewer_interface.h"
#include <assert.h>
#include <QGraphicsSceneMouseEvent>
#include <math.h>
namespace
QTVP_GEOMARKER
{
geoGraphicsPolygonItem
::
geoGraphicsPolygonItem
(
QString
name
,
QTVOSM
::
viewer_interface
*
pVi
,
const
QPolygonF
&
lla_polygon
)
:
QGraphicsPolygonItem
(
0
)
,
geoItemBase
(
name
,
QTVP_GEOMARKER
::
ITEAMTYPE_REGION
,
pVi
)
{
assert
(
vi
()
!=
0
);
m_llap
=
lla_polygon
;
unwarrp
();
QPolygonF
wp
;
foreach
(
const
QPointF
&
pt
,
m_llap
)
{
double
px
,
py
;
vi
()
->
CV_LLA2World
(
pt
.
y
(),
pt
.
x
(),
&
px
,
&
py
);
wp
<<
QPointF
(
px
,
py
);
}
setPolygon
(
wp
);
}
void
geoGraphicsPolygonItem
::
unwarrp
()
{
int
sz
=
m_llap
.
size
();
if
(
sz
<
2
)
return
;
if
(
m_llap
.
first
()
!=
m_llap
.
last
())
{
++
sz
;
m_llap
.
push_back
(
m_llap
.
first
());
}
for
(
int
i
=
1
;
i
<
sz
;
++
i
)
{
qreal
m_lon1
=
m_llap
[
i
-
1
].
x
();
qreal
m_lon2
=
m_llap
[
i
].
x
();
while
(
m_lon2
-
m_lon1
<
-
180
)
m_lon2
+=
360
;
while
(
m_lon2
-
m_lon1
>
180
)
m_lon2
-=
360
;
while
(
m_lon1
<
-
180
)
{
m_lon1
+=
360
;
m_lon2
+=
360
;
}
while
(
m_lon1
>
180
)
{
m_lon1
-=
360
;
m_lon2
-=
360
;
}
m_llap
[
i
-
1
].
setX
(
m_lon1
);
m_llap
[
i
].
setX
(
m_lon2
);
}
}
void
geoGraphicsPolygonItem
::
adjust_coords
(
int
nNewLevel
)
{
if
(
vi
()
&&
nNewLevel
!=
level
())
{
double
ratio
=
pow
(
2.0
,(
nNewLevel
-
level
()));
QPolygonF
p
=
this
->
polygon
();
int
sz
=
p
.
size
();
for
(
int
i
=
0
;
i
<
sz
;
++
i
)
{
qreal
x
=
p
[
i
].
x
()
*
ratio
;
qreal
y
=
p
[
i
].
y
()
*
ratio
;
p
[
i
].
setX
(
x
);
p
[
i
].
setY
(
y
);
}
this
->
setPolygon
(
p
);
}
}
void
geoGraphicsPolygonItem
::
mousePressEvent
(
QGraphicsSceneMouseEvent
*
event
)
{
QGraphicsPolygonItem
::
mousePressEvent
(
event
);
bool
bshow
=
this
->
props_visible
();
this
->
show_props
(
!
bshow
);
//event->accept();
}
QPointF
geoGraphicsPolygonItem
::
label_pos
()
{
QPolygonF
p
=
this
->
polygon
();
int
sz
=
p
.
size
();
double
x
=
0
,
y
=
0
;
for
(
int
i
=
0
;
i
<
sz
;
++
i
)
{
x
+=
p
[
i
].
x
();
y
+=
p
[
i
].
y
();
}
if
(
sz
)
{
x
/=
sz
;
y
/=
sz
;
}
return
QPointF
(
x
,
y
);
}
void
geoGraphicsPolygonItem
::
setGeoPolygon
(
const
QPolygonF
&
lla_polygon
)
{
m_llap
=
lla_polygon
;
unwarrp
();
QPolygonF
wp
;
foreach
(
const
QPointF
&
pt
,
m_llap
)
{
double
px
,
py
;
vi
()
->
CV_LLA2World
(
pt
.
y
(),
pt
.
x
(),
&
px
,
&
py
);
wp
<<
QPointF
(
px
,
py
);
}
setPolygon
(
wp
);
adjustLabelPos
();
}
}
qtvplugin_geomarker/geographicspolygonitem.h
0 → 100644
浏览文件 @
62414339
#ifndef GEOGRAPHICSPOLYGONITEM_H
#define GEOGRAPHICSPOLYGONITEM_H
#include <QGraphicsPolygonItem>
#include <QPolygonF>
#include "geoitembase.h"
namespace
QTVP_GEOMARKER
{
class
geoGraphicsPolygonItem
:
public
QGraphicsPolygonItem
,
public
geoItemBase
{
protected:
QPolygonF
m_llap
;
void
unwarrp
();
protected:
void
mousePressEvent
(
QGraphicsSceneMouseEvent
*
event
);
public:
explicit
geoGraphicsPolygonItem
(
QString
name
,
QTVOSM
::
viewer_interface
*
pVi
,
const
QPolygonF
&
lla_polygon
);
public:
QPolygonF
llas
()
const
{
return
m_llap
;}
void
setGeoPolygon
(
const
QPolygonF
&
lla_polygon
);
void
adjust_coords
(
int
nNewLevel
);
QPointF
label_pos
();
};
}
#endif // GEOGRAPHICSPOLYGONITEM_H
qtvplugin_geomarker/qtvplugin_geomarker.cpp
浏览文件 @
62414339
...
...
@@ -14,6 +14,7 @@
#include "geographicsellipseitem.h"
#include "geographicsrectitem.h"
#include "geographicslineitem.h"
#include "geographicspolygonitem.h"
QMutex
mutex_instances
;
QMap
<
viewer_interface
*
,
qtvplugin_geomarker
*
>
map_instances
;
QMap
<
QString
,
int
>
count_instances
;
...
...
@@ -413,3 +414,52 @@ void qtvplugin_geomarker::update_line(const QString & name,double lat1, double l
}
}
void
qtvplugin_geomarker
::
update_region
(
const
QString
&
name
,
const
QPolygonF
latlons
,
const
QColor
&
colorEdge
,
const
QColor
&
colorFill
,
int
width
)
{
//Get raw Item by name
QTVP_GEOMARKER
::
geoItemBase
*
base
=
m_pScene
->
geoitem_by_name
(
name
);
//Get Props
QStringList
propNames
;
QVariantList
propValues
;
if
(
base
)
{
propNames
=
base
->
prop_names
();
propValues
=
base
->
prop_values
();
}
//type convertion to T
QTVP_GEOMARKER
::
geoGraphicsPolygonItem
*
pitem
=
base
?
dynamic_cast
<
QTVP_GEOMARKER
::
geoGraphicsPolygonItem
*>
(
base
)
:
0
;
if
(
!
pitem
)
pitem
=
new
QTVP_GEOMARKER
::
geoGraphicsPolygonItem
(
name
,
this
->
m_pVi
,
latlons
);
Qt
::
PenStyle
pst
[]
=
{
Qt
::
NoPen
,
Qt
::
SolidLine
,
Qt
::
DashLine
,
Qt
::
DotLine
,
Qt
::
DashDotLine
,
Qt
::
DashDotDotLine
,
Qt
::
CustomDashLine
};
int
ptdd
=
ui
->
comboBox_linePad
->
currentIndex
();
if
(
ptdd
<
0
||
ptdd
>=
7
)
ptdd
=
1
;
pitem
->
setPen
(
QPen
(
QBrush
(
colorEdge
),
width
,
pst
[
ptdd
]));
pitem
->
setBrush
(
QColor
(
colorFill
));
if
(
false
==
this
->
m_pScene
->
addItem
(
pitem
,
0
))
{
if
(
base
!=
pitem
)
delete
pitem
;
}
else
{
int
cs
=
propNames
.
size
();
for
(
int
i
=
0
;
i
<
cs
&&
base
!=
pitem
;
++
i
)
{
pitem
->
set_prop_data
(
propNames
.
first
(),
propValues
.
first
());
propNames
.
pop_front
();
propValues
.
pop_front
();
}
}
}
qtvplugin_geomarker/qtvplugin_geomarker.h
浏览文件 @
62414339
...
...
@@ -58,6 +58,7 @@ private:
template
<
class
T
>
void
update_point
(
const
QString
&
name
,
double
lat
,
double
lon
,
const
QColor
&
colorEdge
,
const
QColor
&
colorFill
,
int
width
,
int
height
);
void
update_line
(
const
QString
&
name
,
double
lat1
,
double
lon1
,
double
lat2
,
double
lon2
,
const
QColor
&
color
,
int
width
);
void
update_region
(
const
QString
&
name
,
const
QPolygonF
latlons
,
const
QColor
&
colorEdge
,
const
QColor
&
colorFill
,
int
width
);
protected:
layer_interface
*
load_initial_plugin
(
QString
strSLibPath
,
viewer_interface
*
ptrviewer
);
QWidget
*
load_prop_window
();
...
...
@@ -84,6 +85,8 @@ protected slots:
void
on_radioButton_tool_polygon_toggled
(
bool
);
void
on_toolButton_selColor_pointEdge_clicked
();
void
on_toolButton_selColor_pointcolorFill_clicked
();
void
on_toolButton_selColor_regionEdge_clicked
();
void
on_toolButton_selColor_regionFill_clicked
();
void
on_tableView_marks_doubleClicked
(
const
QModelIndex
&
index
);
void
on_pushButton_prop_update_clicked
();
void
on_pushButton_prop_delete_clicked
();
...
...
@@ -91,6 +94,7 @@ protected slots:
void
on_pushButton_pickToLine1_clicked
();
void
on_pushButton_pickToLine2_clicked
();
void
on_toolButton_selColor_clicked
();
void
on_pushButton_getRegion_clicked
();
};
template
<
class
T
>
...
...
qtvplugin_geomarker/qtvplugin_geomarker.pro
浏览文件 @
62414339
...
...
@@ -19,7 +19,8 @@ SOURCES += \
geographicsscene
.
cpp
\
geographicsrectitem
.
cpp
\
qtvplugin_geomarker_uimethods
.
cpp
\
geographicslineitem
.
cpp
geographicslineitem
.
cpp
\
geographicspolygonitem
.
cpp
HEADERS
+=
\
..
/
qtviewer_planetosm
/
osmtiles
/
layer_interface
.
h
\
...
...
@@ -29,7 +30,8 @@ HEADERS +=\
geoitembase
.
h
\
geographicsscene
.
h
\
geographicsrectitem
.
h
\
geographicslineitem
.
h
geographicslineitem
.
h
\
geographicspolygonitem
.
h
FORMS
+=
\
qtvplugin_geomarker
.
ui
...
...
qtvplugin_geomarker/qtvplugin_geomarker.ui
浏览文件 @
62414339
...
...
@@ -433,7 +433,11 @@
</widget>
</item>
<item>
<widget
class=
"QListView"
name=
"listView_corners"
/>
<widget
class=
"QPlainTextEdit"
name=
"plainTextEdit_corners"
>
<property
name=
"lineWrapMode"
>
<enum>
QPlainTextEdit::NoWrap
</enum>
</property>
</widget>
</item>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_5"
>
...
...
@@ -493,19 +497,12 @@
</spacer>
</item>
<item>
<widget
class=
"QPushButton"
name=
"pushButton"
>
<widget
class=
"QPushButton"
name=
"pushButton
_getRegion
"
>
<property
name=
"text"
>
<string>
Call Region Get
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QPushButton"
name=
"pushButton_Update"
>
<property
name=
"text"
>
<string>
Save Data
</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
...
...
qtvplugin_geomarker/qtvplugin_geomarker_uimethods.cpp
浏览文件 @
62414339
...
...
@@ -3,8 +3,13 @@
#include <QSettings>
#include <QColorDialog>
#include <QSet>
#include <QMap>
#include <QRegExp>
#include <QDebug>
#include "geographicsellipseitem.h"
#include "geographicsrectitem.h"
#include "geographicslineitem.h"
#include "geographicspolygonitem.h"
void
qtvplugin_geomarker
::
timerEvent
(
QTimerEvent
*
e
)
{
...
...
@@ -91,6 +96,22 @@ void qtvplugin_geomarker::on_toolButton_selColor_pointcolorFill_clicked()
if
(
col
.
isValid
())
ui
->
lineEdit_PointColorFill
->
setText
(
color2string
(
col
));
}
void
qtvplugin_geomarker
::
on_toolButton_selColor_regionEdge_clicked
()
{
QString
str
=
ui
->
lineEdit_RegionColorEdge
->
text
();
QColor
col
=
QColorDialog
::
getColor
(
string2color
(
str
),
this
,
tr
(
"Select Color"
),
QColorDialog
::
ShowAlphaChannel
|
QColorDialog
::
DontUseNativeDialog
);
if
(
col
.
isValid
())
ui
->
lineEdit_RegionColorEdge
->
setText
(
color2string
(
col
));
}
void
qtvplugin_geomarker
::
on_toolButton_selColor_regionFill_clicked
()
{
QString
str
=
ui
->
lineEdit_RegionColorFill
->
text
();
QColor
col
=
QColorDialog
::
getColor
(
string2color
(
str
),
this
,
tr
(
"Select Color"
),
QColorDialog
::
ShowAlphaChannel
|
QColorDialog
::
DontUseNativeDialog
);
if
(
col
.
isValid
())
ui
->
lineEdit_RegionColorFill
->
setText
(
color2string
(
col
));
}
void
qtvplugin_geomarker
::
on_pushButton_pickToLine1_clicked
()
{
...
...
@@ -146,6 +167,10 @@ void qtvplugin_geomarker::SaveSettingsToIni()
settings
.
setValue
(
"ui/lineEdit_lineColor"
,
ui
->
lineEdit_lineColor
->
text
());
settings
.
setValue
(
"ui/comboBox_linePad"
,
ui
->
comboBox_linePad
->
currentIndex
());
settings
.
setValue
(
"ui/lineEdit_RegionColorEdge"
,
ui
->
lineEdit_RegionColorEdge
->
text
());
settings
.
setValue
(
"ui/lineEdit_RegionColorFill"
,
ui
->
lineEdit_RegionColorFill
->
text
());
settings
.
setValue
(
"ui/plainTextEdit_corners"
,
ui
->
plainTextEdit_corners
->
toPlainText
());
}
void
qtvplugin_geomarker
::
loadSettingsFromIni
()
...
...
@@ -215,6 +240,13 @@ void qtvplugin_geomarker::loadSettingsFromIni()
int
comboBox_linePad
=
settings
.
value
(
"ui/comboBox_linePad"
,
1
).
toInt
();
ui
->
comboBox_linePad
->
setCurrentIndex
(
comboBox_linePad
);
QString
lineEdit_RegionColorEdge
=
settings
.
value
(
"ui/lineEdit_RegionColorEdge"
,
"0"
).
toString
();
ui
->
lineEdit_RegionColorEdge
->
setText
(
lineEdit_RegionColorEdge
);
QString
lineEdit_RegionColorFill
=
settings
.
value
(
"ui/lineEdit_RegionColorFill"
,
"0"
).
toString
();
ui
->
lineEdit_RegionColorFill
->
setText
(
lineEdit_RegionColorFill
);
QString
plainTextEdit_corners
=
settings
.
value
(
"ui/plainTextEdit_corners"
,
"0"
).
toString
();
ui
->
plainTextEdit_corners
->
setPlainText
(
plainTextEdit_corners
);
}
void
qtvplugin_geomarker
::
on_pushButton_update_clicked
()
{
...
...
@@ -248,6 +280,31 @@ void qtvplugin_geomarker::on_pushButton_update_clicked()
}
else
if
(
ui
->
radioButton_tool_polygon
->
isChecked
())
{
QColor
colorEdge
(
string2color
(
ui
->
lineEdit_RegionColorEdge
->
text
()));
QColor
colorFill
(
string2color
(
ui
->
lineEdit_RegionColorFill
->
text
()));
int
width
=
ui
->
spinBox_lineWidth
->
value
();
QPolygonF
latlons
;
QString
strPlainTexts
=
ui
->
plainTextEdit_corners
->
toPlainText
();
strPlainTexts
.
remove
(
' '
);
strPlainTexts
.
remove
(
'\n'
);
strPlainTexts
.
remove
(
'\r'
);
strPlainTexts
.
remove
(
'\015'
);
strPlainTexts
.
remove
(
'\012'
);
QStringList
lst
=
strPlainTexts
.
split
(
QRegExp
(
"[,;]"
),
QString
::
SkipEmptyParts
);
//qDebug()<<lst;
int
c
=
0
;
QPointF
ll
;
foreach
(
QString
s
,
lst
)
{
if
(
c
%
2
==
0
)
ll
.
setY
(
s
.
toDouble
());
else
ll
.
setX
(
s
.
toDouble
());
if
((
++
c
)
%
2
==
0
)
latlons
.
push_back
(
ll
);
}
if
(
latlons
.
size
())
update_region
(
name
,
latlons
,
colorEdge
,
colorFill
,
width
);
}
else
...
...
@@ -317,6 +374,30 @@ void qtvplugin_geomarker::on_tableView_marks_doubleClicked(const QModelIndex & i
}
}
void
qtvplugin_geomarker
::
on_pushButton_getRegion_clicked
()
{
if
(
!
m_pVi
)
return
;
QString
strGridName
=
QString
(
"grid%1"
).
arg
(
m_nInstance
);
layer_interface
*
pif
=
m_pVi
->
layer
(
strGridName
);
if
(
pif
)
{
QMap
<
QString
,
QVariant
>
inPara
,
outPara
;
inPara
[
"function"
]
=
"get_region"
;
outPara
=
pif
->
call_func
(
inPara
);
QString
strPlainText
=
""
;
if
(
outPara
.
contains
(
"size"
))
{
int
nsz
=
outPara
[
"size"
].
toInt
();
for
(
int
i
=
0
;
i
<
nsz
;
++
i
)
{
QString
latkey
=
QString
(
"lat%1"
).
arg
(
i
);
QString
lonkey
=
QString
(
"lon%1"
).
arg
(
i
);
strPlainText
+=
QString
(
"%1,%2;
\n
"
).
arg
(
outPara
[
latkey
].
toDouble
(),
0
,
'f'
,
14
).
arg
(
outPara
[
lonkey
].
toDouble
(),
0
,
'f'
,
14
);
}
}
ui
->
plainTextEdit_corners
->
setPlainText
(
strPlainText
);
}
}
void
qtvplugin_geomarker
::
refreshItemUI
(
QString
markname
)
{
QString
name
=
markname
;
...
...
@@ -360,8 +441,41 @@ void qtvplugin_geomarker::refreshItemUI(QString markname)
}
break
;
case
QTVP_GEOMARKER
::
ITEAMTYPE_LINE
:
{
QTVP_GEOMARKER
::
geoGraphicsLineItem
*
pitem
=
dynamic_cast
<
QTVP_GEOMARKER
::
geoGraphicsLineItem
*>
(
item
);
if
(
!
pitem
)
break
;
ui
->
lineEdit_lineLat1
->
setText
(
QString
(
"%1"
).
arg
(
pitem
->
lat1
(),
0
,
'f'
,
14
));
ui
->
lineEdit_lineLat2
->
setText
(
QString
(
"%1"
).
arg
(
pitem
->
lat2
(),
0
,
'f'
,
14
));
ui
->
lineEdit_lineLon1
->
setText
(
QString
(
"%1"
).
arg
(
pitem
->
lon1
(),
0
,
'f'
,
14
));
ui
->
lineEdit_lineLon2
->
setText
(
QString
(
"%1"
).
arg
(
pitem
->
lon2
(),
0
,
'f'
,
14
));
QColor
color
=
pitem
->
pen
().
color
();
ui
->
lineEdit_lineColor
->
setText
(
color2string
(
color
));
int
width
=
pitem
->
pen
().
width
();
ui
->
spinBox_point_width
->
setValue
(
width
);
Qt
::
PenStyle
st
=
pitem
->
pen
().
style
();
ui
->
comboBox_linePad
->
setCurrentIndex
((
int
)
st
);
}
break
;
case
QTVP_GEOMARKER
::
ITEAMTYPE_REGION
:
{
QTVP_GEOMARKER
::
geoGraphicsPolygonItem
*
pitem
=
dynamic_cast
<
QTVP_GEOMARKER
::
geoGraphicsPolygonItem
*>
(
item
);
if
(
!
pitem
)
break
;
QPolygonF
pol
=
pitem
->
llas
();
QString
strPlainText
;
foreach
(
QPointF
p
,
pol
)
strPlainText
+=
QString
(
"%1,%2
\n
"
).
arg
(
p
.
y
(),
0
,
'f'
,
14
).
arg
(
p
.
x
(),
0
,
'f'
,
14
);
ui
->
plainTextEdit_corners
->
setPlainText
(
strPlainText
);
QColor
color
=
pitem
->
pen
().
color
();
ui
->
lineEdit_RegionColorEdge
->
setText
(
color2string
(
color
));
int
width
=
pitem
->
pen
().
width
();
ui
->
spinBox_point_width
->
setValue
(
width
);
Qt
::
PenStyle
st
=
pitem
->
pen
().
style
();
ui
->
comboBox_linePad
->
setCurrentIndex
((
int
)
st
);
QColor
colorFill
=
pitem
->
brush
().
color
();
ui
->
lineEdit_RegionColorFill
->
setText
(
color2string
(
colorFill
));
}
break
;
default:
break
;
...
...
qtvplugin_grid/qtvplugin_grid.cpp
浏览文件 @
62414339
...
...
@@ -623,8 +623,24 @@ double qtvplugin_grid::CalDistance(double dLatStart,double dLatEnd,double dLonSt
return
dist
;
}
QMap
<
QString
,
QVariant
>
qtvplugin_grid
::
call_func
(
const
QMap
<
QString
,
QVariant
>
/*paras*/
)
QMap
<
QString
,
QVariant
>
qtvplugin_grid
::
call_func
(
const
QMap
<
QString
,
QVariant
>
paras
)
{
QMap
<
QString
,
QVariant
>
res
;
if
(
paras
.
contains
(
"function"
))
{
QString
funct
=
paras
[
"function"
].
toString
();
if
(
funct
==
"get_region"
)
{
int
Count
=
m_list_points
.
size
();
res
[
"size"
]
=
Count
;
for
(
int
i
=
0
;
i
<
Count
;
++
i
)
{
QString
latkey
=
QString
(
"lat%1"
).
arg
(
i
);
QString
lonkey
=
QString
(
"lon%1"
).
arg
(
i
);
res
[
latkey
]
=
m_list_points
[
i
].
x
();
res
[
lonkey
]
=
m_list_points
[
i
].
y
();
}
}
}
return
std
::
move
(
res
);
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录