version 2.13.0
add Map library (MapView with OSM maps and items) and mapviewer util
This commit is contained in:
70
libs/map/plugin/mapplugin.cpp
Normal file
70
libs/map/plugin/mapplugin.cpp
Normal file
@@ -0,0 +1,70 @@
|
||||
#include "mapplugin.h"
|
||||
|
||||
#include "mapview.h"
|
||||
|
||||
#include <QtCore/QtPlugin>
|
||||
|
||||
|
||||
MapPlugin::MapPlugin(QObject * parent): QObject(parent) {
|
||||
m_initialized = false;
|
||||
}
|
||||
|
||||
|
||||
void MapPlugin::initialize(QDesignerFormEditorInterface * /* core */) {
|
||||
if (m_initialized) return;
|
||||
|
||||
// Add extension registrations, etc. here
|
||||
|
||||
m_initialized = true;
|
||||
}
|
||||
|
||||
|
||||
bool MapPlugin::isInitialized() const {
|
||||
return m_initialized;
|
||||
}
|
||||
|
||||
|
||||
QWidget * MapPlugin::createWidget(QWidget * parent) {
|
||||
MapView * w = new MapView(parent);
|
||||
return w;
|
||||
}
|
||||
|
||||
|
||||
QString MapPlugin::name() const {
|
||||
return QLatin1String("MapView");
|
||||
}
|
||||
|
||||
|
||||
QString MapPlugin::group() const {
|
||||
return QLatin1String("Display Widgets");
|
||||
}
|
||||
|
||||
|
||||
QIcon MapPlugin::icon() const {
|
||||
return QIcon("://icons/maps.png");
|
||||
}
|
||||
|
||||
|
||||
QString MapPlugin::toolTip() const {
|
||||
return QLatin1String("");
|
||||
}
|
||||
|
||||
|
||||
QString MapPlugin::whatsThis() const {
|
||||
return QLatin1String("");
|
||||
}
|
||||
|
||||
|
||||
bool MapPlugin::isContainer() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
QString MapPlugin::domXml() const {
|
||||
return QLatin1String("<widget class=\"MapView\" name=\"map\">\n</widget>\n");
|
||||
}
|
||||
|
||||
|
||||
QString MapPlugin::includeFile() const {
|
||||
return QLatin1String("mapview.h");
|
||||
}
|
||||
Reference in New Issue
Block a user