Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
colorEagleStdio
qplanetosm
提交
77fb2e55
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 搜索 >>
提交
77fb2e55
编写于
9月 13, 2018
作者:
丁劲犇
😸
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Code Struct optimise.
上级
0f1a3a1f
变更
16
隐藏空白更改
内联
并排
Showing
16 changed file
with
286 addition
and
177 deletion
+286
-177
.gitignore
.gitignore
+220
-0
qtviewer_planetosm/interface_utils.h
qtviewer_planetosm/interface_utils.h
+46
-0
qtviewer_planetosm/osm_frame_widget.cpp
qtviewer_planetosm/osm_frame_widget.cpp
+1
-1
qtviewer_planetosm/osmtiles/cProjectionMercator.h
qtviewer_planetosm/osmtiles/cProjectionMercator.h
+1
-1
qtviewer_planetosm/osmtiles/layer_interface.h
qtviewer_planetosm/osmtiles/layer_interface.h
+2
-5
qtviewer_planetosm/osmtiles/tilesviewer.cpp
qtviewer_planetosm/osmtiles/tilesviewer.cpp
+3
-2
qtviewer_planetosm/qtaxviewer_planetosm.cpp
qtviewer_planetosm/qtaxviewer_planetosm.cpp
+1
-30
qtviewer_planetosm/qtaxviewer_planetosm.h
qtviewer_planetosm/qtaxviewer_planetosm.h
+0
-3
qtviewer_planetosm/qtviewer_planetosm.pro
qtviewer_planetosm/qtviewer_planetosm.pro
+2
-1
qtviewer_planetosm/qtwidget_planetosm.cpp
qtviewer_planetosm/qtwidget_planetosm.cpp
+1
-29
qtviewer_planetosm/qtwidget_planetosm.h
qtviewer_planetosm/qtwidget_planetosm.h
+1
-2
qtvplugin_geomarker/qtvplugin_geomarker.cpp
qtvplugin_geomarker/qtvplugin_geomarker.cpp
+1
-0
qtvplugin_grid/qtvplugin_grid.cpp
qtvplugin_grid/qtvplugin_grid.cpp
+3
-2
test_container/testcontainer.cpp
test_container/testcontainer.cpp
+3
-49
test_container/testcontainer.h
test_container/testcontainer.h
+0
-5
test_container/testcontainer_linux.cpp
test_container/testcontainer_linux.cpp
+1
-47
未找到文件。
.gitignore
浏览文件 @
77fb2e55
__pycache__
/network
*.qm
# User-specific files
*.suo
*.user
*.sln.docstates
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
build/
bld/
[Bb]in/
[Oo]bj/
# Roslyn cache directories
*.ide/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
#NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile
# Visual Studio profiler
*.psess
*.vsp
*.vspx
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding addin-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# NCrunch
_NCrunch_*
.*crunch*.local.xml
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
## TODO: Comment the next line if you want to checkin your
## web deploy settings but do note that will include unencrypted
## passwords
*.pubxml
# NuGet Packages
packages/*
*.nupkg
## TODO: If the tool you use requires repositories.config
## uncomment the next line
#!packages/repositories.config
# Enable "build/" folder in the NuGet Packages folder since
# NuGet packages use it for MSBuild targets.
# This line needs to be after the ignore of the build folder
# (and the packages folder if the line above has been uncommented)
!packages/build/
# Windows Azure Build Output
csx/
*.build.csdef
# Windows Store app package directory
AppPackages/
# Others
sql/
*.Cache
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.pfx
*.publishsettings
node_modules/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
*.mdf
*.ldf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
# Microsoft Fakes
FakesAssemblies/
# C++ objects and libs
*.slo
*.lo
*.o
*.a
*.la
*.lai
*.so
*.dll
*.dylib
# Qt-es
/.qmake.cache
/.qmake.stash
*.pro.user
*.pro.user.*
*.moc
moc_*.cpp
qrc_*.cpp
ui_*.h
Makefile*
*-build-*
# QtCreator
*.autosave
build-*-Debug
build-*-Release
*.bak
*.qm
*_Saved
\ No newline at end of file
qtviewer_planetosm/interface_utils.h
0 → 100644
浏览文件 @
77fb2e55
#pragma once
#include <QVariant>
#include <QMap>
#include <QString>
#include <QVariant>
#define QTVOSM_DEBUG(MSG) qDebug()<<"QTVOSM Debug>"<< MSG <<"\n\t"<<__FUNCTION__<<":"<<__FILE__<<__LINE__
#define QTVOSM_WARNING(MSG) qWarning()<<"QTVOSM Debug>"<< MSG <<"\n\t"<<__FUNCTION__<<":"<<__FILE__<<__LINE__
#define QTVOSM_FATAL(MSG) qFatal()<<"QTVOSM Debug>"<< MSG <<"\n\t"<<__FUNCTION__<<":"<<__FILE__<<__LINE__
/**
* @brief map_to_string Convert QMap key-value paires to string
* @param m map. m["A"]=12, m["B"] = "Yes"
* @return string , eg: "A=12;B=Yes;"
*/
inline
QString
map_to_string
(
const
QMap
<
QString
,
QVariant
>
&
m
)
{
QString
s
;
for
(
QMap
<
QString
,
QVariant
>::
const_iterator
p
=
m
.
begin
();
p
!=
m
.
end
();
++
p
)
{
s
+=
p
.
key
();
s
+=
"="
;
s
+=
p
.
value
().
toString
();
s
+=
";"
;
}
return
/*std::move*/
(
s
);
}
/*!
* \brief string_to_map Convert string to key-value map
* \param s string, eg: "A=12;B=Yes;"
* \return map. map["A"]=12, map["B"] = "Yes"
*/
inline
QMap
<
QString
,
QVariant
>
string_to_map
(
const
QString
&
s
)
{
QMap
<
QString
,
QVariant
>
res
;
QStringList
lst
=
s
.
split
(
";"
);
foreach
(
QString
s
,
lst
)
{
int
t
=
s
.
indexOf
(
"="
);
if
(
t
>
0
&&
t
<
s
.
size
())
{
QString
name
=
s
.
left
(
t
).
trimmed
();
QString
value
=
s
.
mid
(
t
+
1
).
trimmed
();
res
[
name
]
=
value
;
}
}
return
/*std::move*/
(
res
);
}
qtviewer_planetosm/osm_frame_widget.cpp
浏览文件 @
77fb2e55
...
...
@@ -11,7 +11,7 @@
#include <QSettings>
#include <QMessageBox>
#include "osmtiles/viewer_interface.h"
#include "interface_utils.h"
QMutex
osm_frame_widget
::
m_mutex_proteced
;
/*!
...
...
qtviewer_planetosm/osmtiles/cProjectionMercator.h
浏览文件 @
77fb2e55
...
...
@@ -2,7 +2,7 @@
#include <math.h>
namespace
QTVOSM
{
/*! cProjectionMercator is a toolkit class that turns coordinates between LLA(4326) and Mercator(
900913
)
/*! cProjectionMercator is a toolkit class that turns coordinates between LLA(4326) and Mercator(
3857
)
cProjectionMercator cProjectionMercator.h "qtviewer_planetosm/osmtiles/cProjectionMercator.h"
\author goldenhawking \date 2015-12-11
*/
...
...
qtviewer_planetosm/osmtiles/layer_interface.h
浏览文件 @
77fb2e55
...
...
@@ -7,9 +7,6 @@
#include <QVariant>
#include <QMap>
#define OSMLayerInterface_iid "org.goldenhawkingStudio.OSMViewer_iid.LayerInterface"
#define QTVOSM_DEBUG(MSG) qDebug()<<"QTVOSM Debug>"<< MSG <<"\n\t"<<__FUNCTION__<<":"<<__FILE__<<__LINE__
#define QTVOSM_WARNING(MSG) qWarning()<<"QTVOSM Debug>"<< MSG <<"\n\t"<<__FUNCTION__<<":"<<__FILE__<<__LINE__
#define QTVOSM_FATAL(MSG) qFatal()<<"QTVOSM Debug>"<< MSG <<"\n\t"<<__FUNCTION__<<":"<<__FILE__<<__LINE__
class
osm_frame_widget
;
class
qtaxviewer_planetosm
;
class
qtwidget_planetosm
;
...
...
@@ -95,9 +92,9 @@ namespace QTVOSM
public:
//user-def direct function calls
virtual
QMap
<
QString
,
QVariant
>
call_func
(
const
QMap
<
QString
,
QVariant
>
&
/*paras*/
){
return
(
QMap
<
QString
,
QVariant
>
());}
};
}
Q_DECLARE_INTERFACE
(
QTVOSM
::
layer_interface
,
OSMLayerInterface_iid
)
#endif // LAYER_BASE_H
qtviewer_planetosm/osmtiles/tilesviewer.cpp
浏览文件 @
77fb2e55
...
...
@@ -8,6 +8,7 @@
#include <QFileInfo>
#include <QDir>
#include "layer_interface.h"
#include "interface_utils.h"
namespace
QTVOSM
{
tilesviewer
::
tilesviewer
(
QWidget
*
parent
)
:
QWidget
(
parent
)
...
...
@@ -707,7 +708,7 @@ namespace QTVOSM{
}
/*!
\brief convert Mercator to LLA.Mercator coord is a projection with ID
900913
.
\brief convert Mercator to LLA.Mercator coord is a projection with ID
3857
.
this method is NOT Level releated.
\fn tilesviewer::CV_MK2LLA
...
...
@@ -726,7 +727,7 @@ namespace QTVOSM{
}
/*!
\brief convert LLA to Mercator .Mercator coord is a projection with ID
900913
.
\brief convert LLA to Mercator .Mercator coord is a projection with ID
3857
.
this method is NOT Level releated.
\fn tilesviewer::CV_LLA2MK
...
...
qtviewer_planetosm/qtaxviewer_planetosm.cpp
浏览文件 @
77fb2e55
...
...
@@ -8,6 +8,7 @@
#include <functional>
#include "osmtiles/tilesviewer.h"
#include "osmtiles/layer_tiles.h"
#include "interface_utils.h"
qtaxviewer_planetosm
::
qtaxviewer_planetosm
(
QWidget
*
parent
)
:
osm_frame_widget
(
parent
)
{
...
...
@@ -406,36 +407,6 @@ int qtaxviewer_planetosm::osm_layer_move_bottom(QString layerName)
}
return
0
;
}
QString
qtaxviewer_planetosm
::
map_to_string
(
const
QMap
<
QString
,
QVariant
>
&
m
)
{
QString
s
;
for
(
QMap
<
QString
,
QVariant
>::
const_iterator
p
=
m
.
begin
();
p
!=
m
.
end
();
++
p
)
{
s
+=
p
.
key
();
s
+=
"="
;
s
+=
p
.
value
().
toString
();
s
+=
";"
;
}
return
/*std::move*/
(
s
);
}
QMap
<
QString
,
QVariant
>
qtaxviewer_planetosm
::
string_to_map
(
const
QString
&
s
)
{
QMap
<
QString
,
QVariant
>
res
;
QStringList
lst
=
s
.
split
(
";"
);
foreach
(
QString
s
,
lst
)
{
int
t
=
s
.
indexOf
(
"="
);
if
(
t
>
0
&&
t
<
s
.
size
())
{
QString
name
=
s
.
left
(
t
).
trimmed
();
QString
value
=
s
.
mid
(
t
+
1
).
trimmed
();
res
[
name
]
=
value
;
}
}
return
/*std::move*/
(
res
);
}
/**
* @brief osm_layer_call_function call layers' call_func method from
* outside the ocx ctrl. Please MAKE SURE that this function is called from UI thread,
...
...
qtviewer_planetosm/qtaxviewer_planetosm.h
浏览文件 @
77fb2e55
...
...
@@ -17,9 +17,6 @@
class
qtaxviewer_planetosm
:
public
osm_frame_widget
,
public
QAxBindable
{
Q_OBJECT
private:
QString
map_to_string
(
const
QMap
<
QString
,
QVariant
>
&
m
);
QMap
<
QString
,
QVariant
>
string_to_map
(
const
QString
&
s
);
protected:
QTranslator
qtTranslator
;
QTranslator
appTranslator
;
...
...
qtviewer_planetosm/qtviewer_planetosm.pro
浏览文件 @
77fb2e55
...
...
@@ -30,7 +30,8 @@ HEADERS += osm_frame_widget.h \
osmtiles
/
layer_browser
.
h
\
osmtiles
/
layer_interface
.
h
\
osmtiles
/
viewer_interface
.
h
\
osmtiles
/
layer_tiles_page
.
h
osmtiles
/
layer_tiles_page
.
h
\
interface_utils
.
h
FORMS
+=
osm_frame_widget
.
ui
\
osmtiles
/
layer_tiles_page
.
ui
...
...
qtviewer_planetosm/qtwidget_planetosm.cpp
浏览文件 @
77fb2e55
...
...
@@ -8,7 +8,7 @@
#include <assert.h>
#include "osmtiles/tilesviewer.h"
#include "osmtiles/layer_tiles.h"
#include "interface_utils.h"
qtwidget_planetosm
::
qtwidget_planetosm
(
QWidget
*
parent
)
:
QWidget
(
parent
)
,
m_map_widget
(
0
)
...
...
@@ -381,35 +381,7 @@ int qtwidget_planetosm::osm_layer_move_bottom(QString layerName)
}
return
0
;
}
QString
qtwidget_planetosm
::
map_to_string
(
const
QMap
<
QString
,
QVariant
>
&
m
)
{
QString
s
;
for
(
QMap
<
QString
,
QVariant
>::
const_iterator
p
=
m
.
begin
();
p
!=
m
.
end
();
++
p
)
{
s
+=
p
.
key
();
s
+=
"="
;
s
+=
p
.
value
().
toString
();
s
+=
";"
;
}
return
/*std::move*/
(
s
);
}
QMap
<
QString
,
QVariant
>
qtwidget_planetosm
::
string_to_map
(
const
QString
&
s
)
{
QMap
<
QString
,
QVariant
>
res
;
QStringList
lst
=
s
.
split
(
";"
);
foreach
(
QString
s
,
lst
)
{
int
t
=
s
.
indexOf
(
"="
);
if
(
t
>
0
&&
t
<
s
.
size
())
{
QString
name
=
s
.
left
(
t
).
trimmed
();
QString
value
=
s
.
mid
(
t
+
1
).
trimmed
();
res
[
name
]
=
value
;
}
}
return
/*std::move*/
(
res
);
}
/**
* @brief osm_layer_call_function call layers' call_func method from
* outside the ocx ctrl. Please MAKE SURE that this function is called from UI thread,
...
...
qtviewer_planetosm/qtwidget_planetosm.h
浏览文件 @
77fb2e55
...
...
@@ -35,8 +35,7 @@ public:
//! slots below is designed for widget interfaces
public:
QTVOSM
::
viewer_interface
*
viewer
();
QString
map_to_string
(
const
QMap
<
QString
,
QVariant
>
&
m
);
QMap
<
QString
,
QVariant
>
string_to_map
(
const
QString
&
s
);
QString
osm_get_remote_address
(
QString
layerName
)
const
;
void
osm_set_remote_address
(
QString
layerName
,
QString
addr
);
QString
osm_get_local_cache
(
QString
layerName
)
const
;
...
...
qtvplugin_geomarker/qtvplugin_geomarker.cpp
浏览文件 @
77fb2e55
...
...
@@ -18,6 +18,7 @@
#include "geographicspolygonitem.h"
#include "geographicspixmapitem.h"
#include "geographicsmultilineitem.h"
#include "../qtviewer_planetosm/interface_utils.h"
QMutex
mutex_instances
;
QMap
<
viewer_interface
*
,
qtvplugin_geomarker
*
>
map_instances
;
QMap
<
QString
,
int
>
count_instances
;
...
...
qtvplugin_grid/qtvplugin_grid.cpp
浏览文件 @
77fb2e55
...
...
@@ -13,6 +13,7 @@
#include <QMessageBox>
#include <QSettings>
#include <math.h>
#include "../qtviewer_planetosm/interface_utils.h"
/*!
* The plugin dynamic library (.dll in windows or .so in linux) will be loaded into memory only once.
* for example, a windows app like test_container will contain 2 qtaxviewer_planetosm OCX ctrls ,
...
...
@@ -450,8 +451,8 @@ void qtvplugin_grid::CalArea()
PointX
[
i
]
=
dLonCurr
;
PointY
[
i
]
=
dLatCurr
;
}
str_Polygon
+=
(
")
\n
)',4326),
900913
)
\n
"
);
str_LineString
+=
(
")',4326),
900913
)
\n
"
);
str_Polygon
+=
(
")
\n
)',4326),
3857
)
\n
"
);
str_LineString
+=
(
")',4326),
3857
)
\n
"
);
if
(
Valid
==
true
)
{
...
...
test_container/testcontainer.cpp
浏览文件 @
77fb2e55
...
...
@@ -3,6 +3,7 @@
#include <QAxBase>
#include <QDebug>
#include <QMessageBox>
#include "../qtviewer_planetosm/interface_utils.h"
testcontainer
::
testcontainer
(
QWidget
*
parent
)
:
QDialog
(
parent
),
ui
(
new
Ui
::
testcontainer
)
...
...
@@ -26,27 +27,8 @@ testcontainer::testcontainer(QWidget *parent) :
connect
(
ui
->
axWidget_map1
,
SIGNAL
(
evt_Message
(
QString
)),
this
,
SLOT
(
slot_message
(
QString
)));
connect
(
ui
->
axWidget_map2
,
SIGNAL
(
evt_Message
(
QString
)),
this
,
SLOT
(
slot_message
(
QString
)));
m_nAnTimer
=
startTimer
(
150
);
//confirmLayerNames();
}
//void testcontainer::confirmLayerNames()
//{
// //Get Total layers
// QVariant vt_num = ui->axWidget_map1->dynamicCall("osm_layer_get_count()");
// int n_num = vt_num.toInt();
// //Get Layer names
// for (int i=0;i<n_num;++i)
// {
// QVariant vt_name = ui->axWidget_map1->dynamicCall("osm_layer_get_name(int)",i);
// QString strname = vt_name.toString();
// if (strname.indexOf("grid")>=0)
// m_str_gridLayerName = strname;
// else if (strname.indexOf("geomarker")>=0)
// m_str_markerLayerName = strname;
// }
//}
void
testcontainer
::
show_message
(
QString
message
)
{
QList
<
QStandardItem
*>
list_newrow
;
...
...
@@ -237,35 +219,7 @@ void testcontainer::on_pushButton_QTV_test_layer_move_clicked()
av
=
ui
->
axWidget_map1
->
dynamicCall
(
"osm_layer_set_active(QString,int)"
,
"OSM"
,
av
==
0
?-
1
:
0
).
toInt
();
QMessageBox
::
information
(
this
,
"active"
,
QString
(
"osm_layer_set_active(
\"
OSM
\"
) returns %1"
).
arg
(
av
));
}
QString
testcontainer
::
map_to_string
(
const
QMap
<
QString
,
QVariant
>
&
m
)
{
QString
s
;
for
(
QMap
<
QString
,
QVariant
>::
const_iterator
p
=
m
.
begin
();
p
!=
m
.
end
();
++
p
)
{
s
+=
p
.
key
();
s
+=
"="
;
s
+=
p
.
value
().
toString
();
s
+=
";"
;
}
return
/*std::move*/
(
s
);
}
QMap
<
QString
,
QVariant
>
testcontainer
::
string_to_map
(
const
QString
&
s
)
{
QMap
<
QString
,
QVariant
>
res
;
QStringList
lst
=
s
.
split
(
";"
);
foreach
(
QString
s
,
lst
)
{
int
t
=
s
.
indexOf
(
"="
);
if
(
t
>
0
&&
t
<
s
.
size
())
{
QString
name
=
s
.
left
(
t
).
trimmed
();
QString
value
=
s
.
mid
(
t
+
1
).
trimmed
();
res
[
name
]
=
value
;
}
}
return
/*std::move*/
(
res
);
}
void
testcontainer
::
on_pushButton_QTV_test_grid_enable_clicked
()
{
//Get the grid plugin's ruler status
...
...
@@ -563,7 +517,7 @@ void testcontainer::on_osmmap_map_event(QMap<QString, QVariant> p)
{
QList
<
QStandardItem
*>
list_newrow
;
list_newrow
<<
new
QStandardItem
(
QString
(
"%1"
).
arg
((
quint64
)
ui
->
osmmap
));
QString
message
=
this
->
map_to_string
(
p
);
QString
message
=
map_to_string
(
p
);
if
(
message
.
contains
(
"MOUSE_MOVE"
))
{
...
...
test_container/testcontainer.h
浏览文件 @
77fb2e55
...
...
@@ -12,8 +12,6 @@ class testcontainer : public QDialog
Q_OBJECT
private:
QStandardItemModel
*
m_pModel
;
QString
map_to_string
(
const
QMap
<
QString
,
QVariant
>
&
m
);
QMap
<
QString
,
QVariant
>
string_to_map
(
const
QString
&
s
);
public:
explicit
testcontainer
(
QWidget
*
parent
=
0
);
~
testcontainer
();
...
...
@@ -23,9 +21,6 @@ protected:
private:
Ui
::
testcontainer
*
ui
;
int
m_nAnTimer
;
//QString m_str_gridLayerName;
//QString m_str_markerLayerName;
//void confirmLayerNames();
void
show_message
(
QString
);
protected
slots
:
void
slot_message
(
QString
);
...
...
test_container/testcontainer_linux.cpp
浏览文件 @
77fb2e55
...
...
@@ -2,6 +2,7 @@
#include "ui_testcontainer_linux.h"
#include <QDebug>
#include <QMessageBox>
#include "../qtviewer_planetosm/interface_utils.h"
testcontainer
::
testcontainer
(
QWidget
*
parent
)
:
QDialog
(
parent
),
ui
(
new
Ui
::
testcontainer
)
...
...
@@ -22,26 +23,7 @@ testcontainer::testcontainer(QWidget *parent) :
m_nAnTimer
=
startTimer
(
150
);
//confirmLayerNames();
}
//void testcontainer::confirmLayerNames()
//{
// //Get Total layers
// int n_num = ui->osmmap->osm_layer_get_count();
// //Get Layer names
// for (int i=0;i<n_num;++i)
// {
// QString strname = ui->osmmap->osm_layer_get_name(i);
// if (strname.indexOf("grid")>=0)
// m_str_gridLayerName = strname;
// else if (strname.indexOf("geomarker")>=0)
// m_str_markerLayerName = strname;
// }
//}
testcontainer
::~
testcontainer
()
{
delete
ui
;
...
...
@@ -185,35 +167,7 @@ void testcontainer::on_pushButton_QTV_test_layer_move_clicked()
av
=
ui
->
osmmap
->
osm_layer_set_active
(
"OSM"
,
av
==
0
?-
1
:
0
);
QMessageBox
::
information
(
this
,
"active"
,
QString
(
"osm_layer_set_active(
\"
OSM
\"
) returns %1"
).
arg
(
av
));
}
QString
testcontainer
::
map_to_string
(
const
QMap
<
QString
,
QVariant
>
&
m
)
{
QString
s
;
for
(
QMap
<
QString
,
QVariant
>::
const_iterator
p
=
m
.
begin
();
p
!=
m
.
end
();
++
p
)
{
s
+=
p
.
key
();
s
+=
"="
;
s
+=
p
.
value
().
toString
();
s
+=
";"
;
}
return
/*std::move*/
(
s
);
}
QMap
<
QString
,
QVariant
>
testcontainer
::
string_to_map
(
const
QString
&
s
)
{
QMap
<
QString
,
QVariant
>
res
;
QStringList
lst
=
s
.
split
(
";"
);
foreach
(
QString
s
,
lst
)
{
int
t
=
s
.
indexOf
(
"="
);
if
(
t
>
0
&&
t
<
s
.
size
())
{
QString
name
=
s
.
left
(
t
).
trimmed
();
QString
value
=
s
.
mid
(
t
+
1
).
trimmed
();
res
[
name
]
=
value
;
}
}
return
/*std::move*/
(
res
);
}
void
testcontainer
::
on_pushButton_QTV_test_grid_enable_clicked
()
{
//Get the grid plugin's ruler status
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录