points;
- points << new Point(8.2606, 50.0051);
- points << new Point(8.2602, 50.0050);
- points << new Point(8.2598, 50.0044);
- points << new Point(8.2569, 50.0057);
- points << new Point(8.2595, 50.0083);
- points << new Point(8.2587, 50.0086);
- points << new Point(8.2589, 50.0100);
- points << new Point(8.2590, 50.0105);
- pub_tour = new LineString(points, "", pen);
- notes->addGeometry(pub_tour);
-
- points.clear();
- points << new Point(8.25987, 50.0018);
- points << new Point(8.26192, 50.0019);
- points << new Point(8.26301, 50.0031);
- points << new Point(8.26459, 50.0026);
- points << new Point(8.26601, 50.004);
- points << new Point(8.26781, 50.0033);
- points << new Point(8.27052, 50.0054);
- points << new Point(8.2697, 50.0059);
- museum_tour = new LineString(points, "", pen);
- notes->addGeometry(museum_tour);
-
- points.clear();
- points << new Point(8.26015, 50.0015);
- points << new Point(8.2617, 50.0012);
- points << new Point(8.26423, 50.0002);
- points << new Point(8.26698, 50.0024);
- points << new Point(8.27065, 50.0012);
- points << new Point(8.27152, 50.0016);
- points << new Point(8.27225, 50.0004);
- points << new Point(8.27333, 49.9994);
- points << new Point(8.26946, 49.9983);
- points << new Point(8.27105, 49.9973);
- points << new Point(8.27024, 49.9972);
- points << new Point(8.26833, 49.9958);
- sights_tour = new LineString(points, "", pen);
- notes->addGeometry(sights_tour);
-}
-
-void Citymap::addSights()
-{
- sights = new GeometryLayer("Sehenswürdigkeiten", mapadapter);
- mc->addLayer(sights);
- Point *dom = new ImagePoint(
- 8.274167, 49.998889,
- QCoreApplication::applicationDirPath() + "/images/180-dom.jpg", "Mainzer Dom");
- dom->setBaselevel(17);
- sights->addGeometry(dom);
-
- Point *stephan = new ImagePoint(8.268611, 49.995556,
- QCoreApplication::applicationDirPath()
- + "/images/180-stephan.jpg",
- "St. Stephan");
- stephan->setBaselevel(17);
- sights->addGeometry(stephan);
-
- Point *quitin = new ImagePoint(8.272222, 50.000833,
- QCoreApplication::applicationDirPath()
- + "/images/180-quintin.jpg",
- "St. Quintin");
- quitin->setBaselevel(17);
- sights->addGeometry(quitin);
- connect(sights, SIGNAL(geometryClicked(Geometry *, QPoint)), this,
- SLOT(geometryClicked(Geometry *, QPoint)));
-}
-void Citymap::addPubs()
-{
- pubs = new GeometryLayer("Kneipe", mapadapter);
- mc->addLayer(pubs);
-
- Point *bagatelle = new Point(
- 8.2606, 50.0052,
- QPixmap(QCoreApplication::applicationDirPath() + "/images/pub.png"), "Bagatelle");
- pubs->addGeometry(bagatelle);
-
- Point *nirgendwo = new Point(
- 8.2595, 50.0048,
- QPixmap(QCoreApplication::applicationDirPath() + "/images/pub.png"), "Nirgendwo");
- pubs->addGeometry(nirgendwo);
-
- Point *krokodil = new Point(
- 8.2594, 50.0106,
- QPixmap(QCoreApplication::applicationDirPath() + "/images/pub.png"), "Krokodil");
- pubs->addGeometry(krokodil);
-
- connect(pubs, SIGNAL(geometryClicked(Geometry *, QPoint)), this,
- SLOT(geometryClickEventKneipe(Geometry *, QPoint)));
-}
-void Citymap::addMuseums()
-{
- museum = new GeometryLayer("Museen", mapadapter);
- mc->addLayer(museum);
- Point *rgzm = new ImagePoint(
- 8.269722, 50.006111,
- QCoreApplication::applicationDirPath() + "/images/180-rgzm.jpg", "rgzm");
- rgzm->setBaselevel(17);
- museum->addGeometry(rgzm);
-
- Point *lm = new ImagePoint(
- 8.26778, 50.00385, QCoreApplication::applicationDirPath() + "/images/180-lm.jpg",
- "lm");
- lm->setBaselevel(17);
- museum->addGeometry(lm);
-
- connect(museum, SIGNAL(geometryClicked(Geometry *, QPoint)), this,
- SLOT(geometryClicked(Geometry *, QPoint)));
-}
-
-void Citymap::geometryClicked(Geometry *geometry, QPoint)
-{
- if (ignoreClicks || addingNote)
- return;
-
- InfoDialog *infodialog = new InfoDialog(this);
- infodialog->setWindowTitle(geometry->name());
-
- if (geometry->name() == "Mainzer Dom")
- {
- infodialog->setInfotext(
- "Mainzer Dom
Der "
- "Hohe Dom zu Mainz ist die Bischofskirche der Diözese Mainz und steht unter "
- "dem Patrozinium des heiligen Martin von Tours. Der Ostchor ist dem Hl. "
- "Stephan geweiht. Der zu den Kaiserdomen zählende Bau ist in seiner heutigen "
- "Form eine dreischiffige romanische Säulenbasilika, die in ihren Anbauten "
- "sowohl gotische als auch barocke Elemente aufweist.
");
- }
- else if (geometry->name() == "St. Stephan")
- {
- infodialog->setInfotext(
- "St. Stephan
Die katholische Pfarrkirche Sankt Stephan in Mainz wurde "
- "990 von Erzbischof Willigis auf der höchsten Erhebung der Stadt gegründet. "
- "Auftraggeberin war höchstwahrscheinlich die Kaiserwitwe Theophanu. Willigis "
- "wollte mit ihr die Gebetsstätte des Reiches schaffen. In der Kirche war "
- "ursprünglich ein Stift untergebracht. Der Propst des Stiftes verwaltete "
- "eines der Archidiakonate (mittelalterliche Organisationseinheit, ähnlich "
- "den heutigen Dekanaten) des Erzbistums.
");
- }
- else if (geometry->name() == "St. Quintin")
- {
- infodialog->setInfotext(
- "St. Quintin
Die Kirche St. Quintin in Mainz ist die Pfarrkirche der "
- "ältesten nachgewiesenen Pfarrei der Stadt.");
- }
- else if (geometry->name() == "rgzm")
- {
- infodialog->setInfotext(
- "
Römisch-Germanisches Zentralmuseum
Das Römisch-Germanische "
- "Zentralmuseum (RGZM) in Mainz ist ein Forschungsinstitut für Vor- und "
- "Frühgeschichte, das von Bund und Ländern getragen wird und zur "
- "Leibniz-Gemeinschaft deutscher Forschungseinrichtungen gehört. Gegliedert "
- "in mehrere Abteilungen, arbeitet das Institut im Bereich der Alten Welt "
- "sowie seiner Kontaktzonen von der Altsteinzeit bis ins Mittelalter.");
- }
- else if (geometry->name() == "lm")
- {
- infodialog->setInfotext(
- "
Landesmuseum Mainz
Das Landesmuseum Mainz ist eines der ältesten Museen in "
- "Deutschland. Eine seiner Vorgängerinstitutionen, die Städtische "
- "Gemäldesammlung, wurde bereits 1803 von Jean-Antoine Chaptal auf "
- "Veranlassung Napoléon Bonapartes durch eine Schenkung von 36 Gemälden "
- "gegründet. Das Museum, welches sich heute im ehemaligen kurfürstlichen "
- "Marstall befindet, gehört zusammen mit dem Römisch-Germanischen "
- "Zentralmuseum und dem Gutenbergmuseum zu den bedeutenden Museen in Mainz. "
- "Seine kunst- und kulturgeschichtliche Sammlung erstreckt sich von der "
- "Vorgeschichte über die römische Zeit, dem Mittelalter und Barock bis hin "
- "zur Jugendstilzeit und der Kunst des 20. Jahrhunderts.");
- }
- if (geometry->name() != "")
- infodialog->showMaximized();
-}
-
-void Citymap::geometryClickEventKneipe(Geometry *geometry, QPoint)
-{
- if (ignoreClicks || addingNote)
- return;
- InfoDialog *infodialog = new InfoDialog(this);
- infodialog->setWindowTitle(geometry->name());
- infodialog->setInfotext("
" + geometry->name() + "
");
- infodialog->showNormal();
-}
-
-void Citymap::addZoomButtons()
-{
- // create buttons as controls for zoom
- QPushButton *zoomin = new QPushButton("+");
- QPushButton *zoomout = new QPushButton("-");
- zoomin->setMaximumWidth(50);
- zoomout->setMaximumWidth(50);
-
- connect(zoomin, SIGNAL(clicked(bool)), mc, SLOT(zoomIn()));
- connect(zoomout, SIGNAL(clicked(bool)), mc, SLOT(zoomOut()));
-
- // add zoom buttons to the layout of the MapControl
- QVBoxLayout *innerlayout = new QVBoxLayout;
- innerlayout->addWidget(zoomin);
- innerlayout->addWidget(zoomout);
- mc->setLayout(innerlayout);
-}
-
-void Citymap::createActions()
-{
- toggleSights = new QAction(tr("Show Sights"), this);
- toggleSights->setCheckable(true);
- toggleSights->setChecked(true);
- connect(toggleSights, SIGNAL(triggered(bool)), sights, SLOT(setVisible(bool)));
-
- togglePub = new QAction(tr("Show Pubs"), this);
- togglePub->setCheckable(true);
- togglePub->setChecked(true);
- connect(togglePub, SIGNAL(triggered(bool)), pubs, SLOT(setVisible(bool)));
-
- toggleMuseum = new QAction(tr("Show Museums"), this);
- toggleMuseum->setCheckable(true);
- toggleMuseum->setChecked(true);
- connect(toggleMuseum, SIGNAL(triggered(bool)), museum, SLOT(setVisible(bool)));
-
- toggleSightTour = new QAction(tr("Show Sight Tour"), this);
- toggleSightTour->setCheckable(true);
- toggleSightTour->setChecked(true);
- connect(toggleSightTour, SIGNAL(triggered(bool)), sights_tour,
- SLOT(setVisible(bool)));
-
- togglePubTour = new QAction(tr("Show Pub Tour"), this);
- togglePubTour->setCheckable(true);
- togglePubTour->setChecked(true);
- connect(togglePubTour, SIGNAL(triggered(bool)), pub_tour, SLOT(setVisible(bool)));
-
- toggleMuseumTour = new QAction(tr("Show Museum Tour"), this);
- toggleMuseumTour->setCheckable(true);
- toggleMuseumTour->setChecked(true);
- connect(toggleMuseumTour, SIGNAL(triggered(bool)), museum_tour,
- SLOT(setVisible(bool)));
-
- addNoteAction = new QAction(tr("Add Note"), this);
- connect(addNoteAction, SIGNAL(triggered(bool)), this, SLOT(addNote()));
-
- toolsDistance = new QAction(tr("Calculate Distance"), this);
- connect(toolsDistance, SIGNAL(triggered(bool)), this, SLOT(calcDistance()));
-
- toolsLocalDiskCache = new QAction(tr("Cache Tiles Locally"), this);
- toolsLocalDiskCache->setCheckable(true);
- toolsLocalDiskCache->setChecked(true);
- connect(toolsLocalDiskCache, SIGNAL(triggered(bool)), this, SLOT(cacheTiles(bool)));
-
- QActionGroup *mapproviderGroup = new QActionGroup(this);
- osmAction = new QAction(tr("OpenStreetMap"), mapproviderGroup);
- googleActionMap = new QAction(tr("Google: Roadmap (default)"), mapproviderGroup);
- googleActionSatellite = new QAction(tr("Google: Satellite"), mapproviderGroup);
-
- googleActionSatellite = new QAction(tr("Google: Satellite"), mapproviderGroup);
- googleActionTerrain = new QAction(tr("Google: Terrain"), mapproviderGroup);
- googleActionHybrid = new QAction(tr("Google: Hybrid"), mapproviderGroup);
-
- osmAction->setCheckable(true);
- googleActionMap->setCheckable(true);
- googleActionSatellite->setCheckable(true);
- googleActionTerrain->setCheckable(true);
- googleActionHybrid->setCheckable(true);
- osmAction->setChecked(true);
- connect(mapproviderGroup, SIGNAL(triggered(QAction *)), this,
- SLOT(mapproviderSelected(QAction *)));
-
- QActionGroup *mapZoomGroup = new QActionGroup(this);
-
- for (int i = 0; i <= 17; ++i)
- {
- QString title = QString("Zoom %1").arg(i);
- QAction *action = new QAction(title, mapZoomGroup);
- action->setCheckable(true);
- zoomActions << action;
- }
- connect(mapZoomGroup, SIGNAL(triggered(QAction *)), this,
- SLOT(mapZoomSelected(QAction *)));
-}
-
-void Citymap::createMenus()
-{
- layerMenu = menuBar()->addMenu(tr("&Layer"));
- layerMenu->addAction(toggleSights);
- layerMenu->addAction(togglePub);
- layerMenu->addAction(toggleMuseum);
-
- tourMenu = menuBar()->addMenu(tr("T&ours"));
- tourMenu->addAction(toggleSightTour);
- tourMenu->addAction(togglePubTour);
- tourMenu->addAction(toggleMuseumTour);
-
- toolsMenu = menuBar()->addMenu(tr("&Tools"));
- toolsMenu->addAction(addNoteAction);
- toolsMenu->addAction(toolsDistance);
- toolsMenu->addAction(toolsLocalDiskCache);
-
- mapMenu = menuBar()->addMenu(tr("&Map Provider"));
- mapMenu->addAction(osmAction);
- mapMenu->addAction(googleActionMap);
- mapMenu->addAction(googleActionSatellite);
- mapMenu->addAction(googleActionTerrain);
- mapMenu->addAction(googleActionHybrid);
-
- zoomMenu = menuBar()->addMenu(tr("&Zoom Level"));
- foreach (QAction *action, zoomActions)
- {
- zoomMenu->addAction(action);
- }
-}
-
-void Citymap::addNote()
-{
- addingNote = true;
- connect(mc, SIGNAL(mouseEventCoordinate(const QMouseEvent *, const QPointF)), this,
- SLOT(writeNote(const QMouseEvent *, const QPointF)));
-}
-
-void Citymap::writeNote(const QMouseEvent *, const QPointF coord)
-{
- Point *p = new Point(coord.x(), coord.y(), *notepixmap, QString::number(++noteID),
- Point::BottomLeft);
- currentnoteID = noteID;
- p->setBaselevel(16);
- p->setMinsize(QSize(12, 10));
- p->setMaxsize(QSize(47, 40));
- notes->addGeometry(p);
-
- notetextedit->clear();
-
- notepoint->setCoordinate(coord);
- notepoint->setVisible(true);
-
- mc->updateRequestNew();
-
- disconnect(mc, SIGNAL(mouseEventCoordinate(const QMouseEvent *, const QPointF)), this,
- SLOT(writeNote(const QMouseEvent *, const QPointF)));
-
- connect(mc, SIGNAL(mouseEventCoordinate(const QMouseEvent *, const QPointF)), this,
- SLOT(hideNote(const QMouseEvent *, const QPointF)));
-}
-
-void Citymap::hideNote(const QMouseEvent *evnt, const QPointF)
-{
- if (addingNote && evnt->type() == QEvent::MouseButtonDblClick)
- {
- addingNote = false;
- notepoint->setVisible(false);
-
- mc->updateRequestNew();
-
- // save text
- notestext[currentnoteID] = notetextedit->toPlainText();
-
- disconnect(mc, SIGNAL(mouseEventCoordinate(const QMouseEvent *, const QPointF)),
- this, SLOT(hideNote(const QMouseEvent *, const QPointF)));
- }
-}
-
-void Citymap::editNote(Geometry *geom, QPoint)
-{
- addingNote = true;
- currentnoteID = QVariant(geom->name()).toInt();
- notetextedit->setPlainText(notestext[currentnoteID]);
- notepoint->setCoordinate(geom->points().at(0)->coordinate());
- notepoint->setVisible(true);
-
- mc->updateRequestNew();
- connect(mc, SIGNAL(mouseEventCoordinate(const QMouseEvent *, const QPointF)), this,
- SLOT(hideNote(const QMouseEvent *, const QPointF)));
-}
-
-void Citymap::resizeEvent(QResizeEvent *qEvent)
-{
- Q_UNUSED(qEvent);
- if (mc)
- {
- mc->resize(size());
- }
-}
-
-void Citymap::calcDistance()
-{
- ignoreClicks = true;
- connect(mc, SIGNAL(mouseEventCoordinate(const QMouseEvent *, const QPointF)), this,
- SLOT(calcDistanceClick(const QMouseEvent *, const QPointF)));
-}
-void Citymap::calcDistanceClick(const QMouseEvent *evnt, const QPointF coord)
-{
- if (coord1 == QPointF() && evnt->type() == QEvent::MouseButtonPress)
- {
- coord1 = coord;
- l->addGeometry(
- new ImagePoint(coord1.x(), coord1.y(),
- QCoreApplication::applicationDirPath() + "/images/flag.png",
- "", Point::BottomRight));
- mc->updateRequestNew();
- }
- else if (coord2 == QPointF() && evnt->type() == QEvent::MouseButtonPress)
- {
- coord2 = coord;
- double PI = acos(-1.0);
- double a1 = coord1.x() * (PI / 180.0);
- ;
- double b1 = coord1.y() * (PI / 180.0);
- ;
- double a2 = coord2.x() * (PI / 180.0);
- ;
- double b2 = coord2.y() * (PI / 180.0);
- ;
- double r = 6378;
-
- double km = acos(cos(a1) * cos(b1) * cos(a2) * cos(b2)
- + cos(a1) * sin(b1) * cos(a2) * sin(b2) + sin(a1) * sin(a2))
- * r;
-
- QList points;
- points.append(new Point(coord1.x(), coord1.y()));
- QPixmap *pixm = new QPixmap(100, 20);
- pixm->fill(Qt::transparent);
- QPainter pain(pixm);
- pain.setFont(QFont("Helvetiva", 6));
- pain.drawText(pixm->rect(), QString().setNum(km, 'f', 3) + " km");
- pain.end();
- points.append(new Point(coord2.x(), coord2.y(), *pixm, "", Point::BottomLeft));
- l->addGeometry(new LineString(points));
- mc->updateRequestNew();
- coord1 = QPointF();
- coord2 = QPointF();
- ignoreClicks = false;
- disconnect(mc, SIGNAL(mouseEventCoordinate(const QMouseEvent *, const QPointF)),
- this, SLOT(calcDistanceClick(const QMouseEvent *, const QPointF)));
- }
-}
-
-void Citymap::mapControlZoomChanged(const QPointF &coordinate, int zoom) const
-{
- Q_UNUSED(coordinate);
- if (zoomActions.at(zoom))
- {
- zoomActions.at(zoom)->setChecked(true);
- }
-}
-
-void Citymap::mapZoomSelected(QAction *action)
-{
- mc->setZoom(zoomActions.indexOf(action));
-}
-
-void Citymap::mapproviderSelected(QAction *action)
-{
- if (action == osmAction)
- {
- int zoom = mapadapter->adaptedZoom();
- mc->setZoom(0);
-
- mapadapter = new OSMMapAdapter();
- l->setMapAdapter(mapadapter);
- sights->setMapAdapter(mapadapter);
- museum->setMapAdapter(mapadapter);
- pubs->setMapAdapter(mapadapter);
- notes->setMapAdapter(mapadapter);
- mc->updateRequestNew();
- mc->setZoom(zoom);
- }
- else if (action == googleActionMap)
- {
- int zoom = mapadapter->adaptedZoom();
- mc->setZoom(0);
- mapadapter = new GoogleMapAdapter();
- l->setMapAdapter(mapadapter);
- sights->setMapAdapter(mapadapter);
- museum->setMapAdapter(mapadapter);
- pubs->setMapAdapter(mapadapter);
- notes->setMapAdapter(mapadapter);
- mc->updateRequestNew();
- mc->setZoom(zoom);
- }
- else if (action == googleActionSatellite)
- {
- int zoom = mapadapter->adaptedZoom();
- mc->setZoom(0);
- mapadapter = new GoogleMapAdapter(GoogleMapAdapter::satellite);
- l->setMapAdapter(mapadapter);
- sights->setMapAdapter(mapadapter);
- museum->setMapAdapter(mapadapter);
- pubs->setMapAdapter(mapadapter);
- notes->setMapAdapter(mapadapter);
- mc->updateRequestNew();
- mc->setZoom(zoom);
- }
- else if (action == googleActionTerrain)
- {
- int zoom = mapadapter->adaptedZoom();
- mc->setZoom(0);
- mapadapter = new GoogleMapAdapter(GoogleMapAdapter::terrain);
- l->setMapAdapter(mapadapter);
- sights->setMapAdapter(mapadapter);
- museum->setMapAdapter(mapadapter);
- pubs->setMapAdapter(mapadapter);
- notes->setMapAdapter(mapadapter);
- mc->updateRequestNew();
- mc->setZoom(zoom);
- }
- else if (action == googleActionHybrid)
- {
- int zoom = mapadapter->adaptedZoom();
- mc->setZoom(0);
- mapadapter = new GoogleMapAdapter(GoogleMapAdapter::hybrid);
- l->setMapAdapter(mapadapter);
- sights->setMapAdapter(mapadapter);
- museum->setMapAdapter(mapadapter);
- pubs->setMapAdapter(mapadapter);
- notes->setMapAdapter(mapadapter);
- mc->updateRequestNew();
- mc->setZoom(zoom);
- }
-}
-
-Citymap::~Citymap()
-{
- delete mc;
- delete mapadapter;
- delete notepixmap;
- delete sights;
- delete notes;
- delete pubs;
- delete museum;
-}
diff --git a/libs/QMapControl/Samples/Citymap/src/citymap.h b/libs/QMapControl/Samples/Citymap/src/citymap.h
deleted file mode 100644
index 111474cda..000000000
--- a/libs/QMapControl/Samples/Citymap/src/citymap.h
+++ /dev/null
@@ -1,112 +0,0 @@
-#ifndef CITYMAP_H
-#define CITYMAP_H
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include "dialogs.h"
-#include
-
-class QLabel;
-
-using namespace qmapcontrol;
-class Citymap : public QMainWindow
-{
- Q_OBJECT
-public:
- Citymap(QWidget *parent = 0);
-
- ~Citymap();
-
-private:
- MapControl *mc;
- MapAdapter *mapadapter;
-
- QPixmap *notepixmap;
-
- Layer *sights;
- Layer *museum;
- Layer *pubs;
- Layer *notes;
-
- void addZoomButtons();
-
- void createTours();
- void createActions();
- void createMenus();
-
- QMenu *layerMenu;
- QMenu *tourMenu;
- QMenu *toolsMenu;
- QMenu *mapMenu;
- QMenu *zoomMenu;
-
- QAction *toggleSights;
- QAction *togglePub;
- QAction *toggleMuseum;
-
- QAction *togglePubTour;
- QAction *toggleMuseumTour;
- QAction *toggleSightTour;
-
- QAction *addNoteAction;
- QAction *toolsDistance;
- QAction *toolsLocalDiskCache;
-
- QAction *osmAction;
- QAction *googleActionMap;
- QAction *googleActionSatellite;
- QAction *googleActionTerrain;
- QAction *googleActionHybrid;
-
- QList zoomActions;
-
- QStatusBar *statusBar;
-
- bool ignoreClicks;
- bool addingNote;
-
- void addSights();
- void addPubs();
- void addMuseums();
-
- QPointF coord1;
- QPointF coord2;
-
- Layer *l;
-
- LineString *pub_tour;
- LineString *museum_tour;
- LineString *sights_tour;
-
- QTextEdit *notetextedit;
- Point *notepoint;
- int noteID;
- int currentnoteID;
- QHash notestext;
- QLabel *loadingProgress;
- QTimer *loadingProgressTimer;
-
-public slots:
- void hideNote(const QMouseEvent *evnt, const QPointF coordinate);
- void geometryClicked(Geometry *geometry, QPoint point);
- void geometryClickEventKneipe(Geometry *geometry, QPoint point);
- void addNote();
- void writeNote(const QMouseEvent *, const QPointF);
- void calcDistance();
- void calcDistanceClick(const QMouseEvent *, const QPointF);
- void mapControlZoomChanged(const QPointF &coordinate, int zoom) const;
-
- void mapproviderSelected(QAction *);
- void mapZoomSelected(QAction *);
- void editNote(Geometry *geom, QPoint point);
- void resizeEvent(QResizeEvent *qEvent);
- void updateProgress();
- void cacheTiles(bool qEnabled);
-};
-
-#endif
diff --git a/libs/QMapControl/Samples/Citymap/src/dialogs.cpp b/libs/QMapControl/Samples/Citymap/src/dialogs.cpp
deleted file mode 100644
index b62700ce2..000000000
--- a/libs/QMapControl/Samples/Citymap/src/dialogs.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-#include "dialogs.h"
-#include
-
-InfoDialog::InfoDialog(QWidget *parent)
- : QDialog(parent)
-{
- setWindowFlags(Qt::Dialog | Qt::WindowStaysOnTopHint);
- infotext = new QTextEdit();
- infotext->setReadOnly(true);
-
- QHBoxLayout *layout = new QHBoxLayout();
- setLayout(layout);
-
- layout->addWidget(infotext);
-}
-
-void InfoDialog::setInfotext(QString text)
-{
- infotext->setHtml(text);
-}
diff --git a/libs/QMapControl/Samples/Citymap/src/dialogs.h b/libs/QMapControl/Samples/Citymap/src/dialogs.h
deleted file mode 100644
index 78e6b84fd..000000000
--- a/libs/QMapControl/Samples/Citymap/src/dialogs.h
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef DIALOGS_H
-#define DIALOGS_H
-
-#include
-#include
-
-/**
- @author Kai Winter
-*/
-class InfoDialog : public QDialog
-{
- Q_OBJECT
-public:
- InfoDialog(QWidget *parent = 0);
- void setInfotext(QString text);
-
-private:
- QTextEdit *infotext;
-};
-
-#endif
diff --git a/libs/QMapControl/Samples/Citymap/src/main.cpp b/libs/QMapControl/Samples/Citymap/src/main.cpp
deleted file mode 100644
index 2b95f0f31..000000000
--- a/libs/QMapControl/Samples/Citymap/src/main.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-#include
-#include "citymap.h"
-
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
- Citymap *mw = new Citymap();
-
- mw->resize(400, 590);
- mw->setWindowTitle("City Map Mainz");
- mw->show();
- return app.exec();
-}
diff --git a/libs/QMapControl/Samples/GPS/GPS.kdevelop b/libs/QMapControl/Samples/GPS/GPS.kdevelop
deleted file mode 100644
index a33c65218..000000000
--- a/libs/QMapControl/Samples/GPS/GPS.kdevelop
+++ /dev/null
@@ -1,188 +0,0 @@
-
-
-
- Kai Winter
- kaiwinter@gmx.de
- 1
- KDevTrollProject
- C++
-
- Qt
-
- GPS
-
- .
- false
-
-
-
-
-
-
-
-
-
- false
- false
-
-
- *.o,*.lo,CVS
- false
-
-
-
-
- bash
- bash_bugs
- clanlib
- w3c-dom-level2-html
- fortran_bugs_gcc
- gnome1
- gnustep
- gtk
- gtk_bugs
- haskell
- haskell_bugs_ghc
- java_bugs_gcc
- java_bugs_sun
- kde2book
- opengl
- pascal_bugs_fp
- php
- php_bugs
- perl
- perl_bugs
- python
- python_bugs
- qt-kdev3
- ruby
- ruby_bugs
- sdl
- stl
- w3c-svg
- sw
- w3c-uaag10
- wxwidgets_bugs
-
-
- KDE Libraries (Doxygen)
-
-
-
-
-
-
-
-
-
- true
- false
- false
- false
-
-
- false
- true
- 10
-
-
-
-
- 4
- true
- 4
- ExternalDesigner
- /usr/lib/qt4
- /usr/lib/qt4/bin/qmake-qt4
- /usr/lib/qt4/bin/designer-qt4
-
-
-
- false
- true
- true
- 250
- 400
- 250
- false
- 0
- true
- true
- false
- std=_GLIBCXX_STD;__gnu_cxx=std
- true
- false
- false
- false
- false
- true
- true
- false
- .;
-
-
-
- set
- m_,_
- theValue
- true
- true
-
-
- false
- true
- Vertical
-
-
- QMapControl
- Qt4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- executable
- ./bin/GPS
-
-
- ./bin/
- false
- false
- false
- false
- false
-
-
-
- true
- false
- 1
- false
-
- 0
-
-
-
- 2
- false
- true
- false
-
-
-
-
- .h
- .cpp
-
-
-
diff --git a/libs/QMapControl/Samples/GPS/GPS.pro b/libs/QMapControl/Samples/GPS/GPS.pro
deleted file mode 100644
index c55e36c3f..000000000
--- a/libs/QMapControl/Samples/GPS/GPS.pro
+++ /dev/null
@@ -1,20 +0,0 @@
-include(../../QMapControl.pri)
-DEPENDPATH += src
-MOC_DIR = tmp
-OBJECTS_DIR = obj
-DESTDIR = ../bin
-TARGET = GPS
-
-QT+=network
-QT+=gui
-greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
-greaterThan(QT_MAJOR_VERSION, 4): cache()
-
-# Input
-SOURCES += src/gps.cpp \
-src/main.cpp \
-src/gps_neo.cpp \
- src/gps_simulation.cpp
-HEADERS += src/gps.h \
-src/gps_neo.h \
- src/gps_simulation.h
diff --git a/libs/QMapControl/Samples/GPS/Readme b/libs/QMapControl/Samples/GPS/Readme
deleted file mode 100644
index e0f60286d..000000000
--- a/libs/QMapControl/Samples/GPS/Readme
+++ /dev/null
@@ -1,12 +0,0 @@
-/*!
- * \example gps.cpp
- * This sample application uses GPS data from the gllin service, which you have to start manually before using this application.
- * The file /tmp/nmeaNP is read in for the posiitons.
- *
- * The application receives positions from the GPS_Neo class and writes it into a label.
- * You can toggle a button to set the view to the received coordinate.
- *
- * You can find this example here: MapAPI/Samples/GPS
- * \image html sample_gps.png "screenshot"
- * @see http://3rdparty.downloads.openmoko.org
- */
\ No newline at end of file
diff --git a/libs/QMapControl/Samples/GPS/src/gps.cpp b/libs/QMapControl/Samples/GPS/src/gps.cpp
deleted file mode 100644
index cbe677d5f..000000000
--- a/libs/QMapControl/Samples/GPS/src/gps.cpp
+++ /dev/null
@@ -1,122 +0,0 @@
-#include "gps.h"
-
-/*!
- * \example gps.cpp
- * This sample application uses GPS data from the gllin service, which you have to start
- * manually before using this application. The file /tmp/nmeaNP is read in for the
- * posiitons.
- *
- * The application receives positions from the GPS_Neo class and writes it into a label.
- * You can toggle a button to set the view to the received coordinate.
- *
- * You can find this example here: MapAPI/Samples/GPS
- * \image html sample_gps.png "screenshot"
- * @see http://3rdparty.downloads.openmoko.org
- */
-
-#include
-#include
-#include
-
-GPS::GPS()
-{
- // create MapControl
- mc = new MapControl(QSize(480, 640));
- // ImageManager::instance()->setProxy("www-cache", 8080);
-
- // create MapAdapter to get maps from
- TileMapAdapter *mapadapter
- = new TileMapAdapter("tile.openstreetmap.org", "/%1/%2/%3.png", 256, 0, 17);
-
- // create a layer with the mapadapter and type MapLayer
- Layer *l = new Layer("Custom Layer", mapadapter, Layer::MapLayer);
-
- // current GPS Location
- gpsDot = new CirclePoint(0, 0, "GPS", CirclePoint::Middle, new QPen(Qt::darkBlue));
- l->addGeometry(gpsDot);
-
- // add Layer to the MapControl
- mc->addLayer(l);
-
- // display the MapControl in the application
- QHBoxLayout *layout = new QHBoxLayout;
- layout->addWidget(mc);
- setLayout(layout);
-
- // create buttons as controls for zoom
- QPushButton *zoomin = new QPushButton("+");
- QPushButton *zoomout = new QPushButton("-");
-
- followgps = new QPushButton("Follow");
- followgps->setCheckable(true);
- simulategps = new QPushButton("Simulate");
- simulategps->setCheckable(true);
- gpsposition = new QLabel();
- zoomin->setMaximumWidth(50);
- zoomout->setMaximumWidth(50);
- followgps->setMaximumWidth(50);
- simulategps->setMaximumWidth(50);
- gpsposition->setFont(QFont("Arial", 10));
-
- connect(zoomin, SIGNAL(clicked(bool)), mc, SLOT(zoomIn()));
- connect(zoomout, SIGNAL(clicked(bool)), mc, SLOT(zoomOut()));
-
- connect(simulategps, SIGNAL(clicked(bool)), this, SLOT(simulategps_checked()));
-
- // add zoom buttons to the layout of the MapControl
- QVBoxLayout *innerlayout = new QVBoxLayout;
- innerlayout->addWidget(zoomin);
- innerlayout->addWidget(zoomout);
- innerlayout->addWidget(followgps);
- innerlayout->addWidget(simulategps);
- innerlayout->addWidget(gpsposition);
- mc->setLayout(innerlayout);
-
- GPS_Neo *gm = new GPS_Neo();
- connect(gm, SIGNAL(new_position(float, QPointF)), this,
- SLOT(updatePosition(float, QPointF)));
-
- gpsSim = new GPS_Simulation(this);
- connect(gpsSim, SIGNAL(newPosition(float, QPointF)), this,
- SLOT(updatePosition(float, QPointF)));
-
- mc->setView(QPointF(0, 0));
-
- gm->start();
-}
-
-GPS::~GPS() { }
-
-void GPS::updatePosition(float time, QPointF coordinate)
-{
- gpsposition->setText(QString::number(time) + " / " + QString::number(coordinate.x())
- + " / " + QString::number(coordinate.y()));
- if (followgps->isChecked())
- {
- mc->setView(coordinate);
- }
-
- // update the gps dot location on map
- gpsDot->setCoordinate(coordinate);
-}
-
-void GPS::resizeEvent(QResizeEvent *qEvent)
-{
- Q_UNUSED(qEvent);
- if (mc)
- {
- mc->resize(size());
- }
-}
-
-void GPS::simulategps_checked()
-{
- if (simulategps->isChecked())
- {
- gpsSim->start();
- }
- else
- {
- gpsSim->stop();
- }
-}
diff --git a/libs/QMapControl/Samples/GPS/src/gps.h b/libs/QMapControl/Samples/GPS/src/gps.h
deleted file mode 100644
index 5b98b4d53..000000000
--- a/libs/QMapControl/Samples/GPS/src/gps.h
+++ /dev/null
@@ -1,33 +0,0 @@
-#ifndef GPS_H
-#define GPS_H
-
-#include
-#include
-#include
-#include "gps_neo.h"
-#include "gps_simulation.h"
-#include "circlepoint.h"
-
-using namespace qmapcontrol;
-class GPS : public QWidget
-{
- Q_OBJECT
-public:
- GPS();
- ~GPS();
-
-private:
- QPushButton *followgps;
- QPushButton *simulategps;
- QLabel *gpsposition;
- MapControl *mc;
- GPS_Simulation *gpsSim;
- CirclePoint *gpsDot;
-
-public slots:
- void updatePosition(float time, QPointF coordinate);
- void resizeEvent(QResizeEvent *qEvent);
- void simulategps_checked();
-};
-
-#endif
diff --git a/libs/QMapControl/Samples/GPS/src/gps_neo.cpp b/libs/QMapControl/Samples/GPS/src/gps_neo.cpp
deleted file mode 100644
index 09e619324..000000000
--- a/libs/QMapControl/Samples/GPS/src/gps_neo.cpp
+++ /dev/null
@@ -1,67 +0,0 @@
-#include "gps_neo.h"
-
-GPS_Neo::GPS_Neo(QObject *parent)
- : QObject(parent)
-{
- running = false;
-}
-
-GPS_Neo::~GPS_Neo() { }
-
-void GPS_Neo::start()
-{
- if (!running)
- {
- running = true;
- QTimer::singleShot(1000, this, SLOT(tick()));
- }
-}
-void GPS_Neo::stop()
-{
- running = false;
-}
-
-void GPS_Neo::tick()
-{
- QFile file("/tmp/nmeaNP");
- if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
- {
- // qDebug() << file.error();
- return;
- }
-
- QByteArray line;
- while (!file.atEnd())
- {
- line = file.readLine();
- if (line.contains("GPRMC"))
- {
- break;
- }
- }
- file.close();
-
- GPS_Position pos = process_line(line);
-
- emit(new_position(pos.time, QPointF(pos.longitude, pos.latitude)));
-
- if (running)
- {
- QTimer::singleShot(1000, this, SLOT(tick()));
- }
-}
-
-GPS_Position GPS_Neo::process_line(QByteArray line)
-{
- line.chop(1);
-
- QList elems = line.split(',');
-
- float time = QString(elems.at(1)).toFloat();
- float latitude = elems.at(3).toFloat() / 100;
- QString latitude_dir = elems.at(4);
- float longitude = elems.at(5).toFloat() / 100;
- QString longitude_dir = elems.at(6);
-
- return GPS_Position(time, longitude, longitude_dir, latitude, latitude_dir);
-}
diff --git a/libs/QMapControl/Samples/GPS/src/gps_neo.h b/libs/QMapControl/Samples/GPS/src/gps_neo.h
deleted file mode 100644
index c252156a6..000000000
--- a/libs/QMapControl/Samples/GPS/src/gps_neo.h
+++ /dev/null
@@ -1,37 +0,0 @@
-#ifndef GPS_NEO_H
-#define GPS_NEO_H
-
-#include
-#include
-#include
-//! A parser for the NMEA data format
-/*!
- * This class parses gps data from the Neo´s gllin service, which you have to start
- *manually It reads the device file every seconds and emits a signal which contains a
- *GPS_Position.
- * @see http://3rdparty.downloads.openmoko.org
- * @author Kai Winter
- */
-using namespace qmapcontrol;
-class GPS_Neo : public QObject
-{
- Q_OBJECT
-public:
- GPS_Neo(QObject *parent = 0);
- ~GPS_Neo();
- void start();
- void stop();
-
-private:
- QList positions;
- GPS_Position process_line(QByteArray line);
- bool running;
-
-signals:
- void new_position(float, QPointF);
-
-public slots:
- void tick();
-};
-
-#endif
diff --git a/libs/QMapControl/Samples/GPS/src/gps_simulation.cpp b/libs/QMapControl/Samples/GPS/src/gps_simulation.cpp
deleted file mode 100644
index 8fd652fb5..000000000
--- a/libs/QMapControl/Samples/GPS/src/gps_simulation.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-#include "gps_simulation.h"
-#include
-#include
-#include
-
-GPS_Simulation::GPS_Simulation(QObject *parent)
- : QObject(parent)
- , timer(new QTimer(this))
- , mLat(40.748817f)
- , // new york lat
- mLong(-73.985428f) // new york lat
-{
- bool connected
- = connect(timer, SIGNAL(timeout()), this, SLOT(tick()), Qt::QueuedConnection);
- Q_ASSERT(connected);
-}
-
-GPS_Simulation::~GPS_Simulation() { }
-
-void GPS_Simulation::start()
-{
- timer->start(1000); // 1 sec updates
-}
-
-void GPS_Simulation::stop()
-{
- timer->stop();
-}
-
-void GPS_Simulation::tick()
-{
- static float faketime = qrand() % 5000;
-
- float lTempLat = qrand() % 2 - 1; // gives a number between -1 and 1
- float lTempLong = qrand() % 2 - 1; // gives a number between -1 and 1
-
- mLat = qBound(float(-90), (mLat + (lTempLat / 10)), float(90));
- mLong = qBound(float(-180), (mLat + (lTempLong / 10)), float(180));
-
- emit newPosition(++faketime, QPointF(mLong, mLat));
-}
diff --git a/libs/QMapControl/Samples/GPS/src/gps_simulation.h b/libs/QMapControl/Samples/GPS/src/gps_simulation.h
deleted file mode 100644
index c971232b8..000000000
--- a/libs/QMapControl/Samples/GPS/src/gps_simulation.h
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifndef GPS_SIMULATION_H
-#define GPS_SIMULATION_H
-
-#include
-#include
-#include
-
-class GPS_Simulation : public QObject
-{
- Q_OBJECT
-public:
- explicit GPS_Simulation(QObject *parent = 0);
- ~GPS_Simulation();
-
- void start();
- void stop();
-
-signals:
- void newPosition(float time, QPointF coordinate);
-
-public slots:
- void tick();
-
-private:
- QTimer *timer;
- float mLat;
- float mLong;
-};
-
-#endif // GPS_SIMULATION_H
diff --git a/libs/QMapControl/Samples/GPS/src/main.cpp b/libs/QMapControl/Samples/GPS/src/main.cpp
deleted file mode 100644
index e148272d9..000000000
--- a/libs/QMapControl/Samples/GPS/src/main.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-#include
-#include "gps.h"
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
-
- GPS ta;
- ta.resize(480, 640);
-
- ta.setWindowTitle("GPS Demo");
- ta.show();
- return app.exec();
-}
diff --git a/libs/QMapControl/Samples/LinesAndPoints/LinesAndPoints.kdevelop b/libs/QMapControl/Samples/LinesAndPoints/LinesAndPoints.kdevelop
deleted file mode 100644
index 59140c74c..000000000
--- a/libs/QMapControl/Samples/LinesAndPoints/LinesAndPoints.kdevelop
+++ /dev/null
@@ -1,195 +0,0 @@
-
-
-
- Kai Winter
- kaiwinter@gmx.de
- 1
- KDevTrollProject
- C++
-
- Qt
-
- LinesAndPoints
-
- .
- false
-
-
-
-
-
-
-
-
-
-
- false
- false
-
-
- *.o,*.lo,CVS
- false
-
-
-
-
- bash
- bash_bugs
- clanlib
- w3c-dom-level2-html
- fortran_bugs_gcc
- gnome1
- gnustep
- gtk
- gtk_bugs
- haskell
- haskell_bugs_ghc
- java_bugs_gcc
- java_bugs_sun
- kde2book
- opengl
- pascal_bugs_fp
- php
- php_bugs
- perl
- perl_bugs
- python
- python_bugs
- qt-kdev3
- ruby
- ruby_bugs
- sdl
- stl
- w3c-svg
- sw
- w3c-uaag10
- wxwidgets_bugs
-
-
- KDE Libraries (Doxygen)
-
-
-
-
-
-
-
-
-
- true
- false
- false
- false
-
-
- false
- true
- 10
-
-
-
-
- 4
- true
- 4
- ExternalDesigner
- /usr/lib/qt4
- /usr/lib/qt4/bin/qmake-qt4
- /usr/lib/qt4/bin/designer-qt4
-
-
-
- false
- true
- true
- 250
- 400
- 250
- false
- 0
- true
- true
- false
- std=_GLIBCXX_STD;__gnu_cxx=std
- true
- false
- true
- false
- false
- true
- true
- false
- .;
-
-
-
- set
- m_,_
- theValue
- true
- true
-
-
- false
- true
- Vertical
-
-
- Qt4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- executable
- ./bin/Linesandpoints
-
-
- ./bin/
- true
- false
- false
- false
- false
-
-
-
- true
- false
- 1
- false
-
- 0
-
-
-
- 2
- false
- true
- false
-
-
-
-
- .h
- .cpp
-
-
-
-
-
-
-
-
-
-
diff --git a/libs/QMapControl/Samples/LinesAndPoints/LinesAndPoints.kdevses b/libs/QMapControl/Samples/LinesAndPoints/LinesAndPoints.kdevses
deleted file mode 100644
index 0368b2035..000000000
--- a/libs/QMapControl/Samples/LinesAndPoints/LinesAndPoints.kdevses
+++ /dev/null
@@ -1,100 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/libs/QMapControl/Samples/LinesAndPoints/LinesAndPoints.pro b/libs/QMapControl/Samples/LinesAndPoints/LinesAndPoints.pro
deleted file mode 100644
index 337cb53a0..000000000
--- a/libs/QMapControl/Samples/LinesAndPoints/LinesAndPoints.pro
+++ /dev/null
@@ -1,15 +0,0 @@
-include(../../QMapControl.pri)
-QT+=network
-QT+=gui
-greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
-greaterThan(QT_MAJOR_VERSION, 4): cache()
-DEPENDPATH += src
-MOC_DIR = tmp
-OBJECTS_DIR = obj
-DESTDIR = ../bin
-TARGET = Linesandpoints
-
-# Input
-HEADERS += src/linesandpoints.h
-SOURCES += src/linesandpoints.cpp src/main.cpp
-
diff --git a/libs/QMapControl/Samples/LinesAndPoints/Readme b/libs/QMapControl/Samples/LinesAndPoints/Readme
deleted file mode 100644
index 79a2e1286..000000000
--- a/libs/QMapControl/Samples/LinesAndPoints/Readme
+++ /dev/null
@@ -1,16 +0,0 @@
-/*!
- * \example linesandpoints.cpp
- * This application demonstrates how to use Geometry objects and how to add them to a layer.
- *
- * Here are used three different point types:
- * - One which displays a image
- * - One which draws a plain circle
- * - One which uses a QPen to draw a circle
- * - One which has no markers
- * Then these Points were added to a LineString
- *
- * Also there is a keylistener.
- *
- * You can find this example here: MapAPI/Samples/LinesAndPoints
- * \image html sample_linesandpoints.png "screenshot"
- */
\ No newline at end of file
diff --git a/libs/QMapControl/Samples/LinesAndPoints/src/linesandpoints.cpp b/libs/QMapControl/Samples/LinesAndPoints/src/linesandpoints.cpp
deleted file mode 100644
index acf8bf726..000000000
--- a/libs/QMapControl/Samples/LinesAndPoints/src/linesandpoints.cpp
+++ /dev/null
@@ -1,186 +0,0 @@
-#include "linesandpoints.h"
-/*!
- * \example linesandpoints.cpp
- * This application demonstrates how to use Geometry objects and how to add them to a
- * layer.
- *
- * Here are used three different point types:
- * - One which displays a image
- * - One which draws a plain circle
- * - One which uses a QPen to draw a circle
- * - One which has no markers
- * Then these Points were added to a LineString
- *
- * Also there is a keylistener.
- *
- * You can find this example here: MapAPI/Samples/LinesAndPoints
- * \image html sample_linesandpoints.png "screenshot"
- */
-
-#include
-#include
-#include
-#include
-
-LinesAndPoints::LinesAndPoints(QWidget *parent)
- : QWidget(parent)
-{
- // the size which the QMapControl should fill
- QSize size = QSize(480, 640);
-
- mc = new MapControl(size);
- // create layout
- QHBoxLayout *layout = new QHBoxLayout;
- layout->addWidget(mc);
- setLayout(layout);
-
- // create layer
- MapAdapter *mapadapter = new OSMMapAdapter();
- Layer *l = new MapLayer("Custom Layer", mapadapter);
-
- mc->addLayer(l);
-
- // create a LineString
- QList points;
- // Points with image
- points.append(new ImagePoint(8.259959, 50.001781, "images/bus_stop.png",
- "Mainz, Hauptbahnhof", Point::BottomLeft));
- points.append(new ImagePoint(8.263758, 49.998917, "images/bus_stop.png",
- "Mainz, Münsterplatz", Point::BottomLeft));
- points.append(new ImagePoint(8.265812, 50.001952, "images/bus_stop.png",
- "Mainz, Neubrunnenplatz", Point::BottomLeft));
- // Points with a circle
- points.append(
- new CirclePoint(8.2688, 50.004015, "Mainz, Bauhofstraße LRP", Point::Middle));
- points.append(new CirclePoint(8.272845, 50.00495, "Mainz, Landtag", Point::Middle));
- points.append(
- new CirclePoint(8.280349, 50.008173, "Mainz, Brückenkopf", Point::Middle));
- // A QPen can be used to customize the
- QPen *pointpen = new QPen(QColor(0, 255, 0));
- pointpen->setWidth(3);
- points.append(new CirclePoint(8.273573, 50.016315, 15,
- "Wiesbaden-Mainz-Kastel, Eleonorenstraße",
- Point::Middle, pointpen));
- points.append(new CirclePoint(8.275145, 50.016992, 15,
- "Wiesbaden-Mainz-Kastel, Johannes-Goßner-Straße",
- Point::Middle, pointpen));
- points.append(new CirclePoint(8.270476, 50.021426, 15,
- "Wiesbaden-Mainz-Kastel, Ruthof", Point::Middle,
- pointpen));
- // "Blind" Points
- points.append(
- new Point(8.266445, 50.025913, "Wiesbaden-Mainz-Kastel, Mudra Kaserne"));
- points.append(
- new Point(8.260378, 50.030345, "Wiesbaden-Mainz-Amoneburg, Dyckerhoffstraße"));
-
- // A QPen also can use transparency
- QPen *linepen = new QPen(QColor(0, 0, 255, 100));
- linepen->setWidth(5);
- // Add the Points and the QPen to a LineString
- LineString *ls = new LineString(points, "Busline 54", linepen);
-
- // Add the LineString to the layer
- l->addGeometry(ls);
-
- // Connect click events of the layer to this object
- connect(l, SIGNAL(geometryClicked(Geometry *, QPoint)), this,
- SLOT(geometryClicked(Geometry *, QPoint)));
-
- // Sets the view to the interesting area
- mc->setView(QPointF(8.259959, 50.001781));
- mc->setZoom(11);
-
- addZoomButtons();
-}
-
-void LinesAndPoints::addZoomButtons()
-{
- // create buttons as controls for zoom
- QPushButton *zoomin = new QPushButton("+");
- QPushButton *zoomout = new QPushButton("-");
- zoomin->setMaximumWidth(50);
- zoomout->setMaximumWidth(50);
-
- connect(zoomin, SIGNAL(clicked(bool)), mc, SLOT(zoomIn()));
- connect(zoomout, SIGNAL(clicked(bool)), mc, SLOT(zoomOut()));
-
- // add zoom buttons to the layout of the MapControl
- QVBoxLayout *innerlayout = new QVBoxLayout;
- innerlayout->addWidget(zoomin);
- innerlayout->addWidget(zoomout);
- mc->setLayout(innerlayout);
-}
-
-void LinesAndPoints::geometryClicked(Geometry *geom, QPoint)
-{
- qDebug() << "parent: " << geom->parentGeometry();
- qDebug() << "Element clicked: " << geom->name();
- if (geom->hasClickedPoints())
- {
- QList pp = geom->clickedPoints();
- qDebug() << "number of child elements: " << pp.size();
- for (int i = 0; i < pp.size(); ++i)
- {
- QMessageBox::information(this, geom->name(), pp.at(i)->name());
- }
- }
- else if (geom->GeometryType == "Point")
- {
- QMessageBox::information(this, geom->name(), "just a point");
- }
-}
-
-LinesAndPoints::~LinesAndPoints() { }
-
-void LinesAndPoints::resizeEvent(QResizeEvent *qEvent)
-{
- Q_UNUSED(qEvent);
- if (mc)
- {
- mc->resize(size());
- }
-}
-
-void LinesAndPoints::keyPressEvent(QKeyEvent *evnt)
-{
- if (evnt->key() == 49 || evnt->key() == 17825792) // tastatur '1'
- {
- mc->zoomIn();
- }
- else if (evnt->key() == 50)
- {
- mc->moveTo(QPointF(8.25, 60));
- }
- else if (evnt->key() == 51 || evnt->key() == 16777313) // tastatur '3'
- {
- mc->zoomOut();
- }
- else if (evnt->key() == 54) // 6
- {
- mc->setView(QPointF(8, 50));
- }
- else if (evnt->key() == 16777234) // left
- {
- mc->scrollLeft();
- }
- else if (evnt->key() == 16777236) // right
- {
- mc->scrollRight();
- }
- else if (evnt->key() == 16777235) // up
- {
- mc->scrollUp();
- }
- else if (evnt->key() == 16777237) // down
- {
- mc->scrollDown();
- }
- else if (evnt->key() == 48 || evnt->key() == 17825797) // 0
- {
- emit(close());
- }
- else
- {
- qDebug() << evnt->key() << endl;
- }
-}
diff --git a/libs/QMapControl/Samples/LinesAndPoints/src/linesandpoints.h b/libs/QMapControl/Samples/LinesAndPoints/src/linesandpoints.h
deleted file mode 100644
index 91a32b0da..000000000
--- a/libs/QMapControl/Samples/LinesAndPoints/src/linesandpoints.h
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifndef LINESANDPOINTS_H
-#define LINESANDPOINTS_H
-
-#include
-#include
-#include
-#include
-#include
-#include
-using namespace qmapcontrol;
-class LinesAndPoints : public QWidget
-{
- Q_OBJECT
-public:
- LinesAndPoints(QWidget *parent = 0);
- ~LinesAndPoints();
-
-private:
- MapControl *mc;
- void addZoomButtons();
-
-public slots:
- void geometryClicked(Geometry *geom, QPoint coord_px);
- void resizeEvent(QResizeEvent *qEvent);
-
-protected:
- void keyPressEvent(QKeyEvent *evnt);
-};
-
-#endif
diff --git a/libs/QMapControl/Samples/LinesAndPoints/src/main.cpp b/libs/QMapControl/Samples/LinesAndPoints/src/main.cpp
deleted file mode 100644
index 78043cfee..000000000
--- a/libs/QMapControl/Samples/LinesAndPoints/src/main.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
-#include
-#include "linesandpoints.h"
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
-
- LinesAndPoints ta;
- ta.resize(480, 640);
- ta.setWindowTitle("QMapControl Demo");
- ta.show();
- return app.exec();
-}
diff --git a/libs/QMapControl/Samples/Mapview_FixedOverlayOnEmptyMap/Mapviewer.kdevelop b/libs/QMapControl/Samples/Mapview_FixedOverlayOnEmptyMap/Mapviewer.kdevelop
deleted file mode 100644
index 4f8a36eef..000000000
--- a/libs/QMapControl/Samples/Mapview_FixedOverlayOnEmptyMap/Mapviewer.kdevelop
+++ /dev/null
@@ -1,195 +0,0 @@
-
-
-
- Kai Winter
- kaiwinter@gmx.de
- 1
- KDevTrollProject
- C++
-
- Qt
-
- Mapviewer
-
- .
- false
-
-
-
-
-
-
-
-
-
-
- false
- false
-
-
- *.o,*.lo,CVS
- false
-
-
-
-
- bash
- bash_bugs
- clanlib
- w3c-dom-level2-html
- fortran_bugs_gcc
- gnome1
- gnustep
- gtk
- gtk_bugs
- haskell
- haskell_bugs_ghc
- java_bugs_gcc
- java_bugs_sun
- kde2book
- opengl
- pascal_bugs_fp
- php
- php_bugs
- perl
- perl_bugs
- python
- python_bugs
- qt-kdev3
- ruby
- ruby_bugs
- sdl
- stl
- w3c-svg
- sw
- w3c-uaag10
- wxwidgets_bugs
-
-
- KDE Libraries (Doxygen)
-
-
-
-
-
-
-
-
-
- true
- false
- false
- false
-
-
- false
- true
- 10
-
-
-
-
- 4
- true
- 4
- ExternalDesigner
- /usr/lib/qt4
- /usr/lib/qt4/bin/qmake-qt4
- /usr/lib/qt4/bin/designer-qt4
-
-
-
- false
- true
- true
- 250
- 400
- 250
- false
- 0
- true
- true
- false
- std=_GLIBCXX_STD;__gnu_cxx=std
- true
- false
- false
- false
- false
- true
- true
- false
- .;
-
-
-
- set
- m_,_
- theValue
- true
- true
-
-
- false
- true
- Vertical
-
-
- Qt4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- executable
- ./bin/Mapviewer
-
-
- ./bin
- true
- false
- false
- false
- false
-
-
-
- true
- false
- 1
- false
-
- 0
-
-
-
- 2
- false
- true
- false
-
-
-
-
- .h
- .cpp
-
-
-
-
-
-
-
-
-
-
diff --git a/libs/QMapControl/Samples/Mapview_FixedOverlayOnEmptyMap/Mapviewer.pro b/libs/QMapControl/Samples/Mapview_FixedOverlayOnEmptyMap/Mapviewer.pro
deleted file mode 100644
index ce9d0f7b1..000000000
--- a/libs/QMapControl/Samples/Mapview_FixedOverlayOnEmptyMap/Mapviewer.pro
+++ /dev/null
@@ -1,13 +0,0 @@
-include(../../QMapControl.pri)
-MOC_DIR = tmp
-OBJECTS_DIR = obj
-DESTDIR = bin
-TARGET = Mapviewer
-DEPENDPATH += . ../../src
-INCLUDEPATH += . ../../src
-
-# Input
-HEADERS += src/mapviewer.h
-SOURCES += src/main.cpp src/mapviewer.cpp
-
-QT+=network
diff --git a/libs/QMapControl/Samples/Mapview_FixedOverlayOnEmptyMap/bin/sample.png b/libs/QMapControl/Samples/Mapview_FixedOverlayOnEmptyMap/bin/sample.png
deleted file mode 100644
index 70c336ddd..000000000
Binary files a/libs/QMapControl/Samples/Mapview_FixedOverlayOnEmptyMap/bin/sample.png and /dev/null differ
diff --git a/libs/QMapControl/Samples/Mapview_FixedOverlayOnEmptyMap/src/main.cpp b/libs/QMapControl/Samples/Mapview_FixedOverlayOnEmptyMap/src/main.cpp
deleted file mode 100644
index a7dcfb8d7..000000000
--- a/libs/QMapControl/Samples/Mapview_FixedOverlayOnEmptyMap/src/main.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-#include
-#include "mapviewer.h"
-int main(int argc, char *argv[])
-{
-
- QApplication app(argc, argv);
-
- Mapviewer ta;
- ta.resize(380, 565);
- ta.setWindowTitle("Mapviewer");
- ta.show();
- return app.exec();
-}
diff --git a/libs/QMapControl/Samples/Mapview_FixedOverlayOnEmptyMap/src/mapviewer.cpp b/libs/QMapControl/Samples/Mapview_FixedOverlayOnEmptyMap/src/mapviewer.cpp
deleted file mode 100644
index 635c4f59a..000000000
--- a/libs/QMapControl/Samples/Mapview_FixedOverlayOnEmptyMap/src/mapviewer.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-#include "mapviewer.h"
-Mapviewer::Mapviewer(QWidget *parent)
- : QMainWindow(parent)
-{
- // create MapControl
- mc = new MapControl(QSize(380, 540));
- mc->showScale(true);
-
- // create mapadapter, for mainlayer and overlay
- mapadapter = new EmptyMapAdapter(512);
-
- // create a layer with the mapadapter and type MapLayer
- mainlayer = new MapLayer("", mapadapter);
-
- // add Layer to the MapControl
- mc->addLayer(mainlayer);
-
- addZoomButtons();
-
- // show mapcontrol in mainwindow
- setCentralWidget(mc);
-
- FixedImageOverlay *fip = new FixedImageOverlay(
- -36, 66, 37, 23, QCoreApplication::applicationDirPath() + "/sample.png");
-
- mc->setView(QPointF(10, 50));
- mc->zoomIn();
-
- mainlayer->addGeometry(fip);
-
- connect(mc, SIGNAL(mouseEventCoordinate(const QMouseEvent *, const QPointF)), this,
- SLOT(coordinateClicked(const QMouseEvent *, const QPointF)));
-}
-void Mapviewer::addZoomButtons()
-{
- // create buttons as controls for zoom
- QPushButton *zoomin = new QPushButton("+");
- QPushButton *zoomout = new QPushButton("-");
- zoomin->setMaximumWidth(50);
- zoomout->setMaximumWidth(50);
-
- connect(zoomin, SIGNAL(clicked(bool)), mc, SLOT(zoomIn()));
- connect(zoomout, SIGNAL(clicked(bool)), mc, SLOT(zoomOut()));
-
- // add zoom buttons to the layout of the MapControl
- QVBoxLayout *innerlayout = new QVBoxLayout;
- innerlayout->addWidget(zoomin);
- innerlayout->addWidget(zoomout);
- mc->setLayout(innerlayout);
-}
-
-Mapviewer::~Mapviewer() { }
-
-// resize the widget
-void Mapviewer::resizeEvent(QResizeEvent *event)
-{
- mc->resize(event->size());
-}
-
-void Mapviewer::coordinateClicked(const QMouseEvent *evnt, const QPointF coordinate)
-{
- if (evnt->type() == QEvent::MouseButtonPress)
- {
- qDebug() << coordinate << ": " << evnt->x() << " / " << evnt->y();
- }
-}
diff --git a/libs/QMapControl/Samples/Mapview_FixedOverlayOnEmptyMap/src/mapviewer.h b/libs/QMapControl/Samples/Mapview_FixedOverlayOnEmptyMap/src/mapviewer.h
deleted file mode 100644
index 4ec2fee11..000000000
--- a/libs/QMapControl/Samples/Mapview_FixedOverlayOnEmptyMap/src/mapviewer.h
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifndef MAPVIEWER_H
-#define MAPVIEWER_H
-
-#include
-#include "../../../qmapcontrol.h"
-using namespace qmapcontrol;
-class Mapviewer : public QMainWindow
-{
- Q_OBJECT
-
-public:
- Mapviewer(QWidget *parent = 0);
-
- ~Mapviewer();
-
-private:
- MapControl *mc;
- MapAdapter *mapadapter;
- Layer *mainlayer;
-
- void addZoomButtons();
-
-public slots:
- void coordinateClicked(const QMouseEvent *evnt, const QPointF coordinate);
-
-protected:
- virtual void resizeEvent(QResizeEvent *event);
-};
-
-#endif
diff --git a/libs/QMapControl/Samples/Mapviewer/Mapviewer.kdevelop b/libs/QMapControl/Samples/Mapviewer/Mapviewer.kdevelop
deleted file mode 100644
index 4f8a36eef..000000000
--- a/libs/QMapControl/Samples/Mapviewer/Mapviewer.kdevelop
+++ /dev/null
@@ -1,195 +0,0 @@
-
-
-
- Kai Winter
- kaiwinter@gmx.de
- 1
- KDevTrollProject
- C++
-
- Qt
-
- Mapviewer
-
- .
- false
-
-
-
-
-
-
-
-
-
-
- false
- false
-
-
- *.o,*.lo,CVS
- false
-
-
-
-
- bash
- bash_bugs
- clanlib
- w3c-dom-level2-html
- fortran_bugs_gcc
- gnome1
- gnustep
- gtk
- gtk_bugs
- haskell
- haskell_bugs_ghc
- java_bugs_gcc
- java_bugs_sun
- kde2book
- opengl
- pascal_bugs_fp
- php
- php_bugs
- perl
- perl_bugs
- python
- python_bugs
- qt-kdev3
- ruby
- ruby_bugs
- sdl
- stl
- w3c-svg
- sw
- w3c-uaag10
- wxwidgets_bugs
-
-
- KDE Libraries (Doxygen)
-
-
-
-
-
-
-
-
-
- true
- false
- false
- false
-
-
- false
- true
- 10
-
-
-
-
- 4
- true
- 4
- ExternalDesigner
- /usr/lib/qt4
- /usr/lib/qt4/bin/qmake-qt4
- /usr/lib/qt4/bin/designer-qt4
-
-
-
- false
- true
- true
- 250
- 400
- 250
- false
- 0
- true
- true
- false
- std=_GLIBCXX_STD;__gnu_cxx=std
- true
- false
- false
- false
- false
- true
- true
- false
- .;
-
-
-
- set
- m_,_
- theValue
- true
- true
-
-
- false
- true
- Vertical
-
-
- Qt4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- executable
- ./bin/Mapviewer
-
-
- ./bin
- true
- false
- false
- false
- false
-
-
-
- true
- false
- 1
- false
-
- 0
-
-
-
- 2
- false
- true
- false
-
-
-
-
- .h
- .cpp
-
-
-
-
-
-
-
-
-
-
diff --git a/libs/QMapControl/Samples/Mapviewer/Mapviewer.pro b/libs/QMapControl/Samples/Mapviewer/Mapviewer.pro
deleted file mode 100644
index b29807619..000000000
--- a/libs/QMapControl/Samples/Mapviewer/Mapviewer.pro
+++ /dev/null
@@ -1,16 +0,0 @@
-include(../../QMapControl.pri)
-QT+=network
-QT+=gui
-greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
-greaterThan(QT_MAJOR_VERSION, 4): cache()
-
-DEPENDPATH += src
-MOC_DIR = tmp
-OBJECTS_DIR = obj
-DESTDIR = ../bin
-TARGET = Mapviewer
-
-# Input
-HEADERS += src/mapviewer.h
-SOURCES += src/main.cpp src/mapviewer.cpp
-
diff --git a/libs/QMapControl/Samples/Mapviewer/Readme b/libs/QMapControl/Samples/Mapviewer/Readme
deleted file mode 100644
index 240ea16a0..000000000
--- a/libs/QMapControl/Samples/Mapviewer/Readme
+++ /dev/null
@@ -1,9 +0,0 @@
-/*!
- * \example mapviewer.cpp
- * This application is just a simple map viewer. A Mapadapter is created (OpenStreetmaps)
- * and added to a layer. The layer is given to the MapControl.
- * Two Buttons are available to adjust the zoom level.
- *
- * You can find this example here: MapAPI/Samples/Mapviewer
- * \image html sample_mapviewer.png "screenshot"
- */
\ No newline at end of file
diff --git a/libs/QMapControl/Samples/Mapviewer/src/main.cpp b/libs/QMapControl/Samples/Mapviewer/src/main.cpp
deleted file mode 100644
index a483181d9..000000000
--- a/libs/QMapControl/Samples/Mapviewer/src/main.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-#include
-#include
-
-#include "mapviewer.h"
-
-int main(int argc, char *argv[])
-{
-
- QApplication app(argc, argv);
-
- Mapviewer ta;
- ta.resize(380, 565);
- ta.setWindowTitle("Mapviewer");
- ta.show();
- return app.exec();
-}
diff --git a/libs/QMapControl/Samples/Mapviewer/src/mapviewer.cpp b/libs/QMapControl/Samples/Mapviewer/src/mapviewer.cpp
deleted file mode 100644
index 45ec43a25..000000000
--- a/libs/QMapControl/Samples/Mapviewer/src/mapviewer.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-#include "mapviewer.h"
-
-#include
-#include
-
-/*!
- * \example mapviewer.cpp
- * This application is just a simple map viewer. A Mapadapter is created (OpenStreetmaps)
- * and added to a layer. The layer is given to the MapControl.
- * Two Buttons are available to adjust the zoom level. If the window is
- * resized the map widget will adjust its size.
- *
- * You can find this example here: QMapControl/Samples/Mapviewer
- * \image html sample_mapviewer.png "screenshot"
- */
-Mapviewer::Mapviewer(QWidget *parent)
- : QMainWindow(parent)
-{
- // create MapControl
- mc = new MapControl(QSize(380, 540));
- mc->showScale(true);
-
- // create mapadapter, for mainlayer and overlay
- mapadapter = new OSMMapAdapter();
-
- // create a layer with the mapadapter and type MapLayer
- mainlayer = new MapLayer("OpenStreetMap-Layer", mapadapter);
-
- // add Layer to the MapControl
- mc->addLayer(mainlayer);
-
- addZoomButtons();
-
- mc->setView(QPointF(0, 0));
- mc->setZoom(2);
- // show mapcontrol in mainwindow
- setCentralWidget(mc);
-}
-
-void Mapviewer::addZoomButtons()
-{
- // create buttons as controls for zoom
- QPushButton *zoomin = new QPushButton("+");
- QPushButton *zoomout = new QPushButton("-");
- zoomin->setMaximumWidth(50);
- zoomout->setMaximumWidth(50);
-
- connect(zoomin, SIGNAL(clicked(bool)), mc, SLOT(zoomIn()));
- connect(zoomout, SIGNAL(clicked(bool)), mc, SLOT(zoomOut()));
-
- // add zoom buttons to the layout of the MapControl
- QVBoxLayout *innerlayout = new QVBoxLayout;
- innerlayout->addWidget(zoomin);
- innerlayout->addWidget(zoomout);
- mc->setLayout(innerlayout);
-}
-
-Mapviewer::~Mapviewer() { }
-
-// resize the widget
-void Mapviewer::resizeEvent(QResizeEvent *event)
-{
- mc->resize(event->size());
-}
diff --git a/libs/QMapControl/Samples/Mapviewer/src/mapviewer.h b/libs/QMapControl/Samples/Mapviewer/src/mapviewer.h
deleted file mode 100644
index ca528d02b..000000000
--- a/libs/QMapControl/Samples/Mapviewer/src/mapviewer.h
+++ /dev/null
@@ -1,29 +0,0 @@
-#ifndef MAPVIEWER_H
-#define MAPVIEWER_H
-#include
-#include
-#include
-#include
-#include
-using namespace qmapcontrol;
-class Mapviewer : public QMainWindow
-{
- Q_OBJECT
-
-public:
- Mapviewer(QWidget *parent = 0);
-
- ~Mapviewer();
-
-private:
- MapControl *mc;
- MapAdapter *mapadapter;
- Layer *mainlayer;
-
- void addZoomButtons();
-
-protected:
- virtual void resizeEvent(QResizeEvent *event);
-};
-
-#endif
diff --git a/libs/QMapControl/Samples/Multidemo/Multidemo.kdevelop b/libs/QMapControl/Samples/Multidemo/Multidemo.kdevelop
deleted file mode 100644
index d15ab5f6f..000000000
--- a/libs/QMapControl/Samples/Multidemo/Multidemo.kdevelop
+++ /dev/null
@@ -1,197 +0,0 @@
-
-
-
- Kai Winter
- kaiwinter@gmx.de
- 1
- KDevTrollProject
- C++
-
- Qt
-
- Multidemo
-
- .
- false
-
-
-
-
-
-
-
-
-
-
- false
- false
-
-
- *.o,*.lo,CVS
- false
-
-
-
-
- bash
- bash_bugs
- clanlib
- w3c-dom-level2-html
- fortran_bugs_gcc
- gnome1
- gnustep
- gtk
- gtk_bugs
- haskell
- haskell_bugs_ghc
- java_bugs_gcc
- java_bugs_sun
- kde2book
- opengl
- pascal_bugs_fp
- php
- php_bugs
- perl
- perl_bugs
- python
- python_bugs
- qt-kdev3
- ruby
- ruby_bugs
- sdl
- stl
- w3c-svg
- sw
- w3c-uaag10
- wxwidgets_bugs
-
-
- KDE Libraries (Doxygen)
-
-
-
-
-
-
-
-
-
- true
- false
- false
- false
-
-
- false
- true
- 10
-
-
-
-
- 4
- true
- 4
- ExternalDesigner
- /usr/lib/qt4
- /usr/lib/qt4/bin/qmake-qt4
- /usr/lib/qt4/bin/designer-qt4
-
-
-
- false
- true
- true
- 250
- 400
- 250
- false
- 0
- true
- true
- false
- std=_GLIBCXX_STD;__gnu_cxx=std
- true
- false
- false
- false
- false
- true
- true
- false
- .;
-
-
-
- set
- m_,_
- theValue
- true
- true
-
-
- false
- true
- Vertical
-
-
- QMapControl
- Qt4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- executable
- ./bin/Multidemo
-
-
- ./bin
- true
- false
- false
- false
- false
-
-
-
- true
- false
- 1
- false
-
- 0
-
-
-
- 2
- false
- true
- false
-
-
-
-
- .h
- .cpp
-
-
-
-
-
-
-
-
-
-
diff --git a/libs/QMapControl/Samples/Multidemo/Multidemo.pro b/libs/QMapControl/Samples/Multidemo/Multidemo.pro
deleted file mode 100644
index 14d61f11b..000000000
--- a/libs/QMapControl/Samples/Multidemo/Multidemo.pro
+++ /dev/null
@@ -1,16 +0,0 @@
-include(../../QMapControl.pri)
-QT+=network
-DEPENDPATH += src
-MOC_DIR = tmp
-OBJECTS_DIR = obj
-DESTDIR = ../bin
-TARGET = Multidemo
-
-QT+=network
-QT+=gui
-greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
-greaterThan(QT_MAJOR_VERSION, 4): cache()
-
-# Input
-HEADERS += src/multidemo.h src/gps_modul.h
-SOURCES += src/multidemo.cpp src/main.cpp src/gps_modul.cpp
diff --git a/libs/QMapControl/Samples/Multidemo/Readme b/libs/QMapControl/Samples/Multidemo/Readme
deleted file mode 100644
index 86e120a3a..000000000
--- a/libs/QMapControl/Samples/Multidemo/Readme
+++ /dev/null
@@ -1,15 +0,0 @@
-/*!
- * \example multidemo.cpp
- * This is a bit complexer application, which lets you play around.
- * There are the following buttons configured:
- * - Add Point: adds a Point to the coordinate you click (this point will be clickable)
- * - Drag Rect: lets to drag a rectangular into which will be zoomed in
- * - Move To Click: moves the view middle to the clicked coordinate
- * - GPS: starts a "pseudo" GPS receiver which emits new positions, these are connected to the ImagePoint
- * - Follow Geom: Follows the ImagePoint, when it moves because of new GPS positions
- *
- * A overview map lefts you see where you are. You can even click on it to change your position.
- *
- * You can find this example here: MapAPI/Samples/Multimap
- * \image html sample_multidemo.png "screenshot"
- */
\ No newline at end of file
diff --git a/libs/QMapControl/Samples/Multidemo/src/gps_modul.cpp b/libs/QMapControl/Samples/Multidemo/src/gps_modul.cpp
deleted file mode 100644
index c87b2e2e8..000000000
--- a/libs/QMapControl/Samples/Multidemo/src/gps_modul.cpp
+++ /dev/null
@@ -1,86 +0,0 @@
-#include "gps_modul.h"
-
-double x = 1.0;
-double y = 1.0;
-GPS_Modul::GPS_Modul(QObject *parent)
- : QObject(parent)
-{
- // qDebug() << "GPS_Modul()";
- loadFile();
-
- running = false;
-}
-
-GPS_Modul::~GPS_Modul() { }
-
-void GPS_Modul::start()
-{
-
- if (!running)
- {
- running = true;
- QTimer::singleShot(1000 / 25, this, SLOT(tick()));
- }
-}
-void GPS_Modul::stop()
-{
- running = false;
-}
-
-void GPS_Modul::tick()
-{
- // qDebug() << "GPS_Modul::tick()";
-
- // GPS_Position pos = positions.takeFirst();
- // x = pos.longitude;
- // y = pos.latitude;
-
- // qDebug() << pos.latitude << ", " << pos.longitude;
- x += .1;
- y += .1;
- emit(new_position(QPointF(x, y)));
- // emit(changed());
-
- // if (running && !positions.isEmpty())
- if (running)
- QTimer::singleShot(1000 / 25, this, SLOT(tick()));
-}
-
-void GPS_Modul::loadFile()
-{
- QFile file("/home/kai/kwint001/trunk/code/MapAPI/src/mainz_gps.nme");
- // qDebug() << file.exists();
- if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
- {
- qDebug() << file.error();
- return;
- }
- while (!file.atEnd())
- {
- QByteArray line = file.readLine();
- process_line(line);
- }
-}
-
-void GPS_Modul::process_line(QByteArray line)
-{
- if (!line.contains("GPRMC"))
- return;
-
- line.chop(1);
- // qDebug() << line;
-
- // get time
- QList elems = line.split(',');
-
- float time = QString(elems.at(1)).toFloat();
- float latitude = elems.at(3).toFloat() / 100;
- QString latitude_dir = elems.at(4);
- float longitude = elems.at(5).toFloat() / 100;
- QString longitude_dir = elems.at(6);
-
- positions.append(
- GPS_Position(time, longitude, longitude_dir, latitude, latitude_dir));
-
- // qDebug() << elems.at(6) << " | " << latitude;
-}
diff --git a/libs/QMapControl/Samples/Multidemo/src/gps_modul.h b/libs/QMapControl/Samples/Multidemo/src/gps_modul.h
deleted file mode 100644
index c23493783..000000000
--- a/libs/QMapControl/Samples/Multidemo/src/gps_modul.h
+++ /dev/null
@@ -1,35 +0,0 @@
-#ifndef GPS_MODUL_H
-#define GPS_MODUL_H
-
-#include
-#include
-#include
-
-/**
- @author Kai Winter
-*/
-using namespace qmapcontrol;
-class GPS_Modul : public QObject
-{
- Q_OBJECT
-public:
- GPS_Modul(QObject *parent = 0);
- ~GPS_Modul();
- void start();
- void stop();
-
-private:
- QList positions;
- void loadFile();
- void process_line(QByteArray line);
- bool running;
-
-signals:
- void new_position(QPointF);
- void changed();
-
-public slots:
- void tick();
-};
-
-#endif
diff --git a/libs/QMapControl/Samples/Multidemo/src/main.cpp b/libs/QMapControl/Samples/Multidemo/src/main.cpp
deleted file mode 100644
index 23a3c9678..000000000
--- a/libs/QMapControl/Samples/Multidemo/src/main.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
-#include
-#include "multidemo.h"
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
-
- Multidemo ta;
- ta.resize(480, 640);
- ta.setWindowTitle("QMapControl Demo");
- ta.show();
- return app.exec();
-}
diff --git a/libs/QMapControl/Samples/Multidemo/src/multidemo.cpp b/libs/QMapControl/Samples/Multidemo/src/multidemo.cpp
deleted file mode 100644
index 5b6aa8bd4..000000000
--- a/libs/QMapControl/Samples/Multidemo/src/multidemo.cpp
+++ /dev/null
@@ -1,320 +0,0 @@
-#include "multidemo.h"
-
-#include
-#include
-#include
-
-/*!
- * \example multidemo.cpp
- * This is a bit complexer application, which lets you play around.
- * There are the following buttons configured:
- * - Add Point: adds a Point to the coordinate you click (this point will be clickable)
- * - Drag Rect: lets to drag a rectangular into which will be zoomed in
- * - Move To Click: moves the view middle to the clicked coordinate
- * - GPS: starts a "pseudo" GPS receiver which emits new positions, these are connected
- * to the ImagePoint
- * - Follow Geom: Follows the ImagePoint, when it moves because of new GPS positions
- *
- * A overview map lefts you see where you are. You can even click on it to change your
- * position.
- *
- * You can find this example here: MapAPI/Samples/Multimap
- * \image html sample_multidemo.png "screenshot"
- */
-Multidemo::Multidemo(QWidget *parent)
- : QWidget(parent)
-{
- setupMaps();
- createLayout();
-
- gm = new GPS_Modul();
- connect(gm, SIGNAL(new_position(QPointF)), ip, SLOT(setCoordinate(QPointF)));
-}
-
-void Multidemo::setupMaps()
-{
- QSize size = QSize(480, 640);
-
- // main map control
- mc = new MapControl(size);
- MapAdapter *mapadapter = new WMSMapAdapter(
- "www2.demis.nl",
- "/wms/"
- "wms.asp?wms=WorldMap&LAYERS=Countries,Borders,Cities,Rivers,Settlements,"
- "Hillshading,Waterbodies,Railroads,Highways,Roads&FORMAT=image/"
- "png&VERSION=1.1.1&SERVICE=WMS&REQUEST=GetMap&STYLES=&EXCEPTIONS=application/"
- "vnd.ogc.se_inimage&SRS=EPSG:4326&TRANSPARENT=FALSE",
- 256);
-
- // maplayer
- Layer *l = new MapLayer("Custom Layer", mapadapter);
- mc->addLayer(l);
- // Geometry layer
- Layer *l2 = new GeometryLayer("Geom Layer", mapadapter);
- mc->addLayer(l2);
-
- // "minimap" control
- mc2 = new MapControl(QSize(150, 150), MapControl::None);
- MapAdapter *mapadapter_mini = new OSMMapAdapter();
- Layer *layer_mini = new MapLayer("Custom Layer", mapadapter_mini);
- mc2->addLayer(layer_mini);
-
- // create points
- QPen *pen = new QPen(QColor(255, 0, 0, 100));
- pen->setWidth(5);
- QList points;
- points.append(
- new CirclePoint(8.259959, 50.001781, "Mainz, Hauptbahnhof", Point::Middle, pen));
- points.append(
- new CirclePoint(8.263758, 49.998917, "Mainz, Münsterplatz", Point::Middle, pen));
- points.append(new CirclePoint(8.265812, 50.001952, "Mainz, Neubrunnenplatz",
- Point::Middle, pen));
- points.append(new CirclePoint(8.2688, 50.004015, "Mainz, Bauhofstraße LRP",
- Point::Middle, pen));
- points.append(
- new CirclePoint(8.272845, 50.00495, "Mainz, Landtag", Point::Middle, pen));
- points.append(
- new CirclePoint(8.272845, 50.00495, "Mainz, Brückenplatz", Point::Middle, pen));
- points.append(
- new CirclePoint(8.280349, 50.008173, "Mainz, Brückenkopf", Point::Middle, pen));
- points.append(new CirclePoint(8.273573, 50.016315,
- "Wiesbaden-Mainz-Kastel, Eleonorenstraße",
- Point::Middle, pen));
- points.append(new CirclePoint(8.275145, 50.016992,
- "Wiesbaden-Mainz-Kastel, Johannes-Goßner-Straße",
- Point::Middle, pen));
- points.append(new CirclePoint(8.270476, 50.021426, "Wiesbaden-Mainz-Kastel, Ruthof",
- Point::Middle, pen));
- points.append(new CirclePoint(8.266445, 50.025913,
- "Wiesbaden-Mainz-Kastel, Mudra Kaserne", Point::Middle,
- pen));
- points.append(new CirclePoint(8.260378, 50.030345,
- "Wiesbaden-Mainz-Amoneburg, Dyckerhoffstraße",
- Point::Middle, pen));
-
- // add points to linestring
- pen = new QPen(QColor(0, 0, 255, 100));
- pen->setWidth(5);
- LineString *ls = new LineString(points, "Busline 54", pen);
- // the linestring is added to the MapLayer l, since it doenst change its points
- l->addGeometry(ls);
-
- // this point receives position changes from the "gps modul"
- ip = new ImagePoint(0, 0,
- QCoreApplication::applicationDirPath() + "/images/marker1.png",
- "image point", Point::TopRight);
-
- // so if have to be added to the GeometryLayer l2
- l2->addGeometry(ip);
- QPushButton *pb = new QPushButton("test button", mc);
-
- // widget example
- Point *wpoint = new Point(-20, -20, pb, ".", Point::TopLeft);
- wpoint->setBaselevel(3);
- l->addGeometry(wpoint);
- pb->setGeometry(0, 0, 100, 50);
-
- connect(l, SIGNAL(geometryClicked(Geometry *, QPoint)), this,
- SLOT(geometryClickEvent(Geometry *, QPoint)));
- connect(l2, SIGNAL(geometryClicked(Geometry *, QPoint)), this,
- SLOT(geometryClickEvent(Geometry *, QPoint)));
- connect(mc, SIGNAL(boxDragged(const QRectF)), this, SLOT(draggedRect(QRectF)));
- connect(mc, SIGNAL(mouseEventCoordinate(const QMouseEvent *, const QPointF)), this,
- SLOT(mouseEventCoordinate(const QMouseEvent *, const QPointF)));
- connect(mc, SIGNAL(mouseEventCoordinate(const QMouseEvent *, const QPointF)), this,
- SLOT(coordinateClicked(const QMouseEvent *, const QPointF)));
- connect(mc2, SIGNAL(mouseEventCoordinate(const QMouseEvent *, const QPointF)), this,
- SLOT(coordinateClicked_mc2(const QMouseEvent *, const QPointF)));
-}
-
-void Multidemo::createLayout()
-{
- btn1 = new QPushButton("Add Point");
- btn1->setCheckable(true);
- btn1->setMaximumWidth(80);
- btn1->setMaximumHeight(20);
- btn1->setFont(QFont("Verdana", 5));
-
- btn2 = new QPushButton("Drag Rect");
- btn2->setCheckable(true);
- btn2->setMaximumHeight(20);
- btn2->setFont(QFont("Verdana", 5));
- btn2->setMaximumWidth(80);
-
- btn3 = new QPushButton("Move to Click");
- btn3->setCheckable(true);
- btn3->setMaximumHeight(20);
- btn3->setFont(QFont("Verdana", 5));
- btn3->setMaximumWidth(80);
-
- btn4 = new QPushButton("Follow Geom");
- btn4->setCheckable(true);
- btn4->setMaximumHeight(20);
- btn4->setFont(QFont("Verdana", 5));
- btn4->setMaximumWidth(80);
-
- btn5 = new QPushButton("GPS");
- btn5->setCheckable(true);
- btn5->setMaximumHeight(20);
- btn5->setFont(QFont("Verdana", 5));
- btn5->setMaximumWidth(80);
- btn1->setFocusPolicy(Qt::NoFocus);
- btn2->setFocusPolicy(Qt::NoFocus);
- btn3->setFocusPolicy(Qt::NoFocus);
- btn4->setFocusPolicy(Qt::NoFocus);
- btn5->setFocusPolicy(Qt::NoFocus);
-
- QHBoxLayout *layout = new QHBoxLayout;
- QVBoxLayout *layoutinner = new QVBoxLayout;
-
- layoutinner->addWidget(mc2);
- layoutinner->addWidget(btn1);
- layoutinner->addWidget(btn2);
- layoutinner->addWidget(btn3);
- layoutinner->addWidget(btn4);
- layoutinner->addWidget(btn5);
- layoutinner->addSpacing(70);
- layout->addLayout(layoutinner);
-
- QHBoxLayout *mclayout = new QHBoxLayout;
- mclayout->addWidget(mc);
- mclayout->setMargin(0);
- setLayout(mclayout);
-
- mc->setLayout(layoutinner);
-
- connect(btn2, SIGNAL(toggled(bool)), this, SLOT(buttonToggled(bool)));
-
- connect(btn4, SIGNAL(toggled(bool)), this, SLOT(toggleFollow(bool)));
-
- connect(btn5, SIGNAL(toggled(bool)), this, SLOT(toggleGPS(bool)));
-}
-
-void Multidemo::coordinateClicked(const QMouseEvent *evnt, const QPointF coord)
-{
- if (btn1->isChecked() && evnt->type() == QEvent::MouseButtonPress)
- {
- mc->layer("Geom Layer")
- ->addGeometry(new CirclePoint(coord.x(), coord.y(), 10, "added point"));
- mc->updateRequestNew();
- }
-}
-
-void Multidemo::geometryClickEvent(Geometry *geom, QPoint)
-{
- if (geom->hasClickedPoints())
- {
- QList pp = geom->clickedPoints();
- for (int i = 0; i < pp.size(); ++i)
- {
- QMessageBox::information(this, geom->name(), pp.at(i)->name());
- }
- }
- else if (geom->GeometryType == "Point")
- {
- QMessageBox::information(
- this, geom->name(),
- QString("Position: ")
- .append(QString().setNum(((Point *)geom)->longitude()))
- .append(QString("/"))
- .append(QString().setNum(((Point *)geom)->latitude())));
- }
-}
-
-Multidemo::~Multidemo() { }
-
-void Multidemo::keyPressEvent(QKeyEvent *evnt)
-{
- if (evnt->key() == 49 || evnt->key() == 17825792) // keyboard '1'
- {
- mc->zoomIn();
- }
- else if (evnt->key() == 50)
- {
- mc->moveTo(QPointF(8.25, 60));
- }
- else if (evnt->key() == 51 || evnt->key() == 16777313) // keyboard '3'
- {
- mc->zoomOut();
- }
- else if (evnt->key() == 52) // 4
- {
- mc->updateRequestNew();
- }
- else if (evnt->key() == 16777234) // left
- {
- mc->scrollLeft();
- }
- else if (evnt->key() == 16777236) // right
- {
- mc->scrollRight();
- }
- else if (evnt->key() == 16777235) // up
- {
- mc->scrollUp();
- }
- else if (evnt->key() == 16777237) // down
- {
- mc->scrollDown();
- }
- else if (evnt->key() == 48 || evnt->key() == 17825797) // 0
- {
- emit(close());
- }
-}
-
-void Multidemo::resizeEvent(QResizeEvent *event)
-{
- mc->resize(event->size());
-}
-
-void Multidemo::buttonToggled(bool active)
-{
- if (active)
- mc->setMouseMode(MapControl::Dragging);
- else
- mc->setMouseMode(MapControl::Panning);
-}
-void Multidemo::toggleFollow(bool follow)
-{
- if (follow)
- mc->followGeometry(ip);
- else
- mc->stopFollowing(ip);
-}
-void Multidemo::toggleGPS(bool gps)
-{
- if (gps)
- gm->start();
- else
- gm->stop();
-}
-
-void Multidemo::draggedRect(QRectF rect)
-{
- QList