Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
colorEagleStdio
qplanetosm
提交
b527d001
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 搜索 >>
提交
b527d001
编写于
2月 09, 2016
作者:
丁劲犇
😸
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
change containers, to test the new features.
上级
d86c5bd5
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
216 addition
and
135 deletion
+216
-135
test_container/testcontainer.cpp
test_container/testcontainer.cpp
+42
-28
test_container/testcontainer.h
test_container/testcontainer.h
+1
-0
test_container/testcontainer.ui
test_container/testcontainer.ui
+173
-107
未找到文件。
test_container/testcontainer.cpp
浏览文件 @
b527d001
...
...
@@ -8,6 +8,10 @@ testcontainer::testcontainer(QWidget *parent) :
ui
(
new
Ui
::
testcontainer
)
{
ui
->
setupUi
(
this
);
QFont
ft
;
ft
.
setPixelSize
(
9
);
ui
->
tableView_msg
->
setFont
(
ft
);
ui
->
tableView_msg
->
verticalHeader
()
->
setDefaultSectionSize
(
16
);
Qt
::
WindowFlags
flg
=
this
->
windowFlags
();
flg
|=
Qt
::
WindowMinMaxButtonsHint
;
this
->
setWindowFlags
(
flg
);
...
...
@@ -306,6 +310,7 @@ void testcontainer::on_pushButton_test_mark_clicked()
"function=update_icon;name=ID7;"
"lat=1.233;lon=2.28373;"
"scale=2;rotate=0;smooth=1;"
"color_label=255,0,0,128;weight_label=99;size_label=9;"
"icon=default;"
).
toString
();
if
(
res
.
contains
(
"error"
))
...
...
@@ -313,9 +318,9 @@ void testcontainer::on_pushButton_test_mark_clicked()
res
=
ui
->
axWidget_map1
->
dynamicCall
(
"osm_layer_call_function(QString,QString)"
,
"geomarker1"
,
"function=update_props;name=ID7;"
"LABEL=COSCO;EXPRESS=
YangChunHe
;Pero=IMMD;"
"LABEL=COSCO;EXPRESS=
TianTian
;Pero=IMMD;"
"CheckTime=2012-12-30 07:18:32;"
"From=PEKING;To=
YIKH
"
).
toString
();
"From=PEKING;To=
LONDON;CAR=Apple Watch;
"
).
toString
();
if
(
res
.
contains
(
"error"
))
QMessageBox
::
information
(
this
,
"geomarker1::update_props"
,
res
);
...
...
@@ -380,23 +385,26 @@ void testcontainer::timerEvent(QTimerEvent * e)
{
if
(
e
->
timerId
()
==
m_nAnTimer
)
{
static
double
tposlat
=
rand
()
%
1700
/
10.0
-
85
,
tposlon
=
rand
()
%
3600
/
10.0
-
180
;
tposlat
+=
sin
(
tposlon
*
3.14
/
180.0
)
/
5
+
0.1
;
tposlon
-=
cos
(
tposlat
*
3.14
/
180.0
)
/
5
+
0.1
;
if
(
tposlat
>
85
)
tposlat
=
-
85
;
if
(
tposlat
<
-
85
)
tposlat
=
85
;
if
(
tposlon
<
-
180
)
tposlon
=
180
;
if
(
tposlon
>
180
)
tposlon
=
-
180
;
QString
res
=
ui
->
axWidget_map1
->
dynamicCall
(
"osm_layer_call_function(QString,QString)"
,
"geomarker1"
,
"function=exists;name=ID
1
;"
).
toString
();
"function=exists;name=ID
7
;"
).
toString
();
QMap
<
QString
,
QVariant
>
mres
=
string_to_map
(
res
);
if
(
mres
[
"return"
].
toInt
())
{
//Get info of this mark
res
=
ui
->
axWidget_map1
->
dynamicCall
(
"osm_layer_call_function(QString,QString)"
,
"geomarker1"
,
"function=mark;name=ID7"
).
toString
();
QMap
<
QString
,
QVariant
>
mparas
=
string_to_map
(
res
);
double
lat
=
mparas
[
"lat"
].
toDouble
()
+
0.173245467333
;
double
lon
=
mparas
[
"lon"
].
toDouble
()
+
0.245546767673
;
qreal
rot
=
mparas
[
"rotate"
].
toReal
()
+
1.38745738457
;
if
(
rot
>
360
)
rot
=
0
;
if
(
lat
>=
85
)
lat
=
-
85
;
if
(
lon
>=
180
)
lon
=
-
180
;
ui
->
axWidget_map1
->
dynamicCall
(
"osm_layer_call_function(QString,QString)"
,
"geomarker1"
,
QString
(
"function=update_
point;name=ID1;type=1;lat=%1;lon=%2
;"
)
.
arg
(
tpos
lat
)
.
arg
(
tposlon
)
)
.
toString
()
;
QString
(
"function=update_
icon;name=ID7;lat=%1;lon=%2;rotate=%4
;"
)
.
arg
(
lat
)
.
arg
(
lon
).
arg
(
rot
)
);
}
...
...
@@ -407,28 +415,30 @@ void testcontainer::on_pushButton_test_request_clicked()
{
QString
res
=
ui
->
axWidget_map1
->
dynamicCall
(
"osm_layer_call_function(QString,QString)"
,
"geomarker1"
,
"function=mark_names;"
).
toString
();
res
.
replace
(
";"
,
";
\n
"
);
res
.
replace
(
"="
,
"
\t
="
);
QMessageBox
::
information
(
this
,
"geomarker1::mark_names"
,
res
);
slot_message
(
"geomarker1::mark_names:"
+
res
);
QMap
<
QString
,
QVariant
>
mp
=
string_to_map
(
res
);
foreach
(
QString
key
,
mp
.
keys
())
{
res
=
ui
->
axWidget_map1
->
dynamicCall
(
"osm_layer_call_function(QString,QString)"
,
"geomarker1"
,
"function=mark;name="
+
mp
[
key
].
toString
()).
toString
();
slot_message
(
"geomarker1::mark:"
+
res
);
res
=
ui
->
axWidget_map1
->
dynamicCall
(
"osm_layer_call_function(QString,QString)"
,
"geomarker1"
,
"function=props;name="
+
mp
[
key
].
toString
()).
toString
();
slot_message
(
"geomarker1::props:"
+
res
);
}
res
=
ui
->
axWidget_map1
->
dynamicCall
(
"osm_layer_call_function(QString,QString)"
,
"geomarker1"
,
"function=mark;name=ID1"
).
toString
();
res
.
replace
(
";"
,
";
\n
"
);
res
.
replace
(
"="
,
"
\t
="
);
QMessageBox
::
information
(
this
,
"geomarker1::mark"
,
res
);
res
=
ui
->
axWidget_map1
->
dynamicCall
(
"osm_layer_call_function(QString,QString)"
,
"geomarker1"
,
"function=props;name=ID1"
).
toString
();
res
.
replace
(
";"
,
";
\n
"
);
res
.
replace
(
"="
,
"
\t
="
);
QMessageBox
::
information
(
this
,
"geomarker1::props"
,
res
);
}
void
testcontainer
::
on_pushButton_test_cache_clicked
()
{
//Get the address of local cache
QString
res
=
ui
->
axWidget_map1
->
dynamicCall
(
"osm_get_local_cache(QString)"
,
"OSM"
).
toString
();
QMessageBox
::
information
(
this
,
"geomarker1::osm_get_local_cache"
,
res
);
//set it to /
res
=
ui
->
axWidget_map1
->
dynamicCall
(
"osm_set_local_cache(QString, QString)"
,
"OSM"
,
"/OSMCache"
).
toString
();
QMessageBox
::
information
(
this
,
"geomarker1::osm_set_local_cache"
,
res
);
//Get expire Days
res
=
ui
->
axWidget_map1
->
dynamicCall
(
"osm_get_cache_expire_days(QString)"
,
"OSM"
).
toString
();
QMessageBox
::
information
(
this
,
"geomarker1::osm_get_cache_expire_days"
,
res
);
res
=
ui
->
axWidget_map1
->
dynamicCall
(
"osm_set_cache_expire_days(QString,int)"
,
"OSM"
,
res
.
toInt
()
+
1
).
toString
();
...
...
@@ -444,3 +454,7 @@ void testcontainer::on_pushButton_test_xml_clicked()
QMessageBox
::
information
(
this
,
"geomarker1::save_xml"
,
res
);
}
void
testcontainer
::
on_pushButton_test_resource_clicked
()
{
}
test_container/testcontainer.h
浏览文件 @
b527d001
...
...
@@ -38,6 +38,7 @@ protected slots:
void
on_pushButton_test_polygon_clicked
();
void
on_pushButton_test_request_clicked
();
void
on_pushButton_test_xml_clicked
();
void
on_pushButton_test_resource_clicked
();
};
#endif // TESTCONTAINER_H
test_container/testcontainer.ui
浏览文件 @
b527d001
...
...
@@ -6,178 +6,244 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
973
</width>
<width>
1054
</width>
<height>
600
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
<string>
testcontainer
</string>
</property>
<layout
class=
"Q
VBoxLayout"
name=
"vertic
alLayout"
>
<layout
class=
"Q
HBoxLayout"
name=
"horizont
alLayout"
>
<item>
<widget
class=
"QTabWidget"
name=
"tabWidget"
>
<property
name=
"currentIndex"
>
<number>
0
</number>
</property>
<widget
class=
"QWidget"
name=
"tab"
>
<attribute
name=
"title"
>
<string>
Map1
</string>
</attribute>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_3"
>
<item>
<widget
class=
"QAxWidget"
name=
"axWidget_map1"
/>
</item>
</layout>
</widget>
<widget
class=
"QWidget"
name=
"tab_2"
>
<attribute
name=
"title"
>
<string>
Map2
</string>
</attribute>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_2"
>
<item>
<widget
class=
"QAxWidget"
name=
"axWidget_map2"
>
<property
name=
"sizePolicy"
stdset=
"0"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"MinimumExpanding"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</widget>
<widget
class=
"QWidget"
name=
"tab_Message"
>
<attribute
name=
"title"
>
<string>
Message
</string>
</attribute>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_4"
>
<item>
<widget
class=
"QTableView"
name=
"tableView_msg"
>
<property
name=
"minimumSize"
>
<size>
<width>
0
</width>
<height>
0
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<size>
<width>
16777215
</width>
<height>
16777215
</height>
</size>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<item>
<widget
class=
"QPushButton"
name=
"pushButton_test_adds"
>
<layout
class=
"QGridLayout"
name=
"gridLayout"
>
<item
row=
"6"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_3"
>
<property
name=
"text"
>
<string>
test_addr
</string>
<string>
Layer control
</string>
</property>
</widget>
</item>
<item>
<item
row=
"5"
column=
"0"
>
<widget
class=
"QPushButton"
name=
"pushButton_test_navigate"
>
<property
name=
"text"
>
<string>
navigate
</string>
</property>
</widget>
</item>
<item
row=
"3"
column=
"0"
>
<widget
class=
"QPushButton"
name=
"pushButton_test_cache"
>
<property
name=
"text"
>
<string>
test_cache
</string>
<string>
cache Folder
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QPushButton"
name=
"pushButton_test_
autod
l"
>
<item
row=
"15"
column=
"0"
>
<widget
class=
"QPushButton"
name=
"pushButton_test_
xm
l"
>
<property
name=
"text"
>
<string>
test_auto_down
load
</string>
<string>
marks save/
load
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QPushButton"
name=
"pushButton_test_
navigate
"
>
<item
row=
"11"
column=
"0"
>
<widget
class=
"QPushButton"
name=
"pushButton_test_
mark
"
>
<property
name=
"text"
>
<string>
test_navigate
</string>
<string>
add marks
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"Q
PushButton"
name=
"pushButton_test_layers
"
>
<item
row=
"8"
column=
"0"
>
<widget
class=
"Q
Label"
name=
"label_4
"
>
<property
name=
"text"
>
<string>
test_layers
</string>
<string>
Plugin test:
</string>
</property>
</widget>
</item>
<item>
<
spacer
name=
"horizontalSpacer
"
>
<property
name=
"
orientation
"
>
<
enum>
Qt::Horizontal
</enum
>
<item
row=
"0"
column=
"0"
>
<
widget
class=
"QLabel"
name=
"label
"
>
<property
name=
"
text
"
>
<
string>
background osm conn
</string
>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
40
</width>
<height>
20
</height>
</size>
</widget>
</item>
<item
row=
"1"
column=
"1"
>
<widget
class=
"QPushButton"
name=
"pushButton_test_autodl"
>
<property
name=
"text"
>
<string>
connect
</string>
</property>
</
spacer
>
</
widget
>
</item>
<item>
<item
row=
"9"
column=
"1"
>
<widget
class=
"QPushButton"
name=
"pushButton_test_grid_getPolygon"
>
<property
name=
"text"
>
<string>
get polygon
</string>
</property>
</widget>
</item>
<item
row=
"14"
column=
"0"
>
<widget
class=
"QPushButton"
name=
"pushButton_test_resource"
>
<property
name=
"text"
>
<string>
res save/load
</string>
</property>
</widget>
</item>
<item
row=
"9"
column=
"0"
>
<widget
class=
"QPushButton"
name=
"pushButton_test_grid_enable"
>
<property
name=
"text"
>
<string>
grid_measure
</string>
<string>
measure on/off
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QPushButton"
name=
"pushButton_test_
grid_getPolygon
"
>
<item
row=
"1"
column=
"0"
>
<widget
class=
"QPushButton"
name=
"pushButton_test_
adds
"
>
<property
name=
"text"
>
<string>
grid_polygon
</string>
<string>
address
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QPushButton"
name=
"pushButton_test_
mark
"
>
<item
row=
"7"
column=
"0"
>
<widget
class=
"QPushButton"
name=
"pushButton_test_
layers
"
>
<property
name=
"text"
>
<string>
mark
</string>
<string>
enum layers
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"Q
PushButton"
name=
"pushButton_test_line
"
>
<item
row=
"10"
column=
"1"
>
<widget
class=
"Q
Label"
name=
"label_7
"
>
<property
name=
"text"
>
<string>
line
</string>
<string>
geo marker
</string>
</property>
</widget>
</item>
<item>
<item
row=
"7"
column=
"1"
>
<widget
class=
"QPushButton"
name=
"pushButton_test_layer_move"
>
<property
name=
"text"
>
<string>
order a layer
</string>
</property>
</widget>
</item>
<item
row=
"8"
column=
"1"
>
<widget
class=
"QLabel"
name=
"label_5"
>
<property
name=
"text"
>
<string>
Grid measure
</string>
</property>
</widget>
</item>
<item
row=
"10"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_6"
>
<property
name=
"text"
>
<string>
Plugin test:
</string>
</property>
</widget>
</item>
<item
row=
"4"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_2"
>
<property
name=
"text"
>
<string>
Navigate
</string>
</property>
</widget>
</item>
<item
row=
"16"
column=
"0"
>
<spacer
name=
"verticalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
40
</height>
</size>
</property>
</spacer>
</item>
<item
row=
"13"
column=
"0"
>
<widget
class=
"QPushButton"
name=
"pushButton_test_polygon"
>
<property
name=
"text"
>
<string>
polygon
</string>
<string>
add a
polygon
</string>
</property>
</widget>
</item>
<item>
<item
row=
"13"
column=
"1"
>
<widget
class=
"QPushButton"
name=
"pushButton_test_request"
>
<property
name=
"text"
>
<string>
request
</string>
<string>
get info
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QPushButton"
name=
"pushButton_test_
xml
"
>
<item
row=
"11"
column=
"1"
>
<widget
class=
"QPushButton"
name=
"pushButton_test_
line
"
>
<property
name=
"text"
>
<string>
xml
</string>
<string>
add a line
</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget
class=
"QLabel"
name=
"label_mouseMove"
>
<property
name=
"text"
>
<string>
TextLabel
</string>
</property>
</widget>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout"
>
<item>
<widget
class=
"QTabWidget"
name=
"tabWidget"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"MinimumExpanding"
vsizetype=
"MinimumExpanding"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"currentIndex"
>
<number>
0
</number>
</property>
<widget
class=
"QWidget"
name=
"tab"
>
<attribute
name=
"title"
>
<string>
Map1
</string>
</attribute>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_3"
>
<item>
<widget
class=
"QAxWidget"
name=
"axWidget_map1"
/>
</item>
</layout>
</widget>
<widget
class=
"QWidget"
name=
"tab_2"
>
<attribute
name=
"title"
>
<string>
Map2
</string>
</attribute>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_2"
>
<item>
<widget
class=
"QAxWidget"
name=
"axWidget_map2"
>
<property
name=
"sizePolicy"
stdset=
"0"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"MinimumExpanding"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
<item>
<widget
class=
"QTableView"
name=
"tableView_msg"
>
<property
name=
"minimumSize"
>
<size>
<width>
0
</width>
<height>
128
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<size>
<width>
16777215
</width>
<height>
128
</height>
</size>
</property>
</widget>
</item>
<item>
<widget
class=
"QLabel"
name=
"label_mouseMove"
>
<property
name=
"text"
>
<string>
TextLabel
</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录