Subversion Repositories public

Rev

Rev 275 | Rev 280 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 275 Rev 276
Line 1748... Line 1748...
1748
	   wmsbase *dlg = new wmsbase(this);
1748
	   wmsbase *dlg = new wmsbase(this);
1749
	   dlg->exec();
1749
	   dlg->exec();
1750
	   delete dlg;
1750
	   delete dlg;
1751
	}
1751
	}
1752
 
1752
 
1753
	if (MapType == MPT_SHP)
1753
	if (MapType == MPT_SHP || MapType == MPT_OSM)
1754
	{
1754
	{
1755
	   shapeWidget *dlg = new shapeWidget(this);
1755
	   shapeWidget *dlg = new shapeWidget(this);
-
 
1756
 
-
 
1757
	   if (MapType == MPT_SHP)
-
 
1758
	      dlg->setMapType(shapeWidget::MAP_SHAPE);
-
 
1759
	   else
-
 
1760
	      dlg->setMapType(shapeWidget::MAP_OSM);
-
 
1761
 
1756
	   dlg->exec();
1762
	   dlg->exec();
1757
	   delete dlg;
1763
	   delete dlg;
1758
	}
1764
	}
1759
 
1765
 
1760
	if (MapType != MPT_WMS && MapType != MPT_SHP)
1766
	if (MapType != MPT_WMS && MapType != MPT_SHP && MapType != MPT_OSM)
1761
	{
1767
	{
1762
	   KMessageBox::detailedSorry(this,
1768
	   KMessageBox::detailedSorry(this,
1763
	      i18n("You have not choosen a WMS tag file or shape file directory!"),
1769
	      i18n("You have not choosen a WMS tag file or shape file directory!"),
1764
	      i18n("This dialog is especialy to set map specific parameters. ") +
1770
	      i18n("This dialog is especialy to set map specific parameters. ") +
1765
	      i18n("Therefore this dialog is temporary disabled. It will be ") +
1771
	      i18n("Therefore this dialog is temporary disabled. It will be ") +
Line 2760... Line 2766...
2760
		    if (curTab == 0)
2766
		    if (curTab == 0)
2761
		       rd.setDrawArea(*ui_sportwatcherWidgetBase.imgMap);
2767
		       rd.setDrawArea(*ui_sportwatcherWidgetBase.imgMap);
2762
		    else
2768
		    else
2763
		       rd.setDrawArea(*ui_sportwatcherWidgetBase.grMap);
2769
		       rd.setDrawArea(*ui_sportwatcherWidgetBase.grMap);
2764
 
2770
 
-
 
2771
		    rd.setMapType(SRender::MAP_SHAPE);
-
 
2772
 
2765
		    if (rd.getMap(posLXY.lon, posLXY.lat, posRXY.lon, posRXY.lat))
2773
		    if (rd.getMap(posLXY.lon, posLXY.lat, posRXY.lon, posRXY.lat))
2766
		    {
2774
		    {
2767
		       paint.fillRect(0, 0, width+2, height+2, bg);
2775
		       paint.fillRect(0, 0, width+2, height+2, bg);
-
 
2776
 
-
 
2777
		       if (curTab == 0)
-
 
2778
			  paint.drawPixmap(0, 0, *ui_sportwatcherWidgetBase.imgMap->pixmap());
-
 
2779
		       else
-
 
2780
			  paint.drawPixmap(0, 0, *ui_sportwatcherWidgetBase.grMap->pixmap());
-
 
2781
 
2768
//		       QPixmap qpx;
2782
		       Fgeo = true;
-
 
2783
		    }
-
 
2784
		    else
2769
//		       qpx.load(rd.getOutBuf());
2785
		       Fgeo = false;
-
 
2786
		 }
-
 
2787
	      }
-
 
2788
	      else if (MapType == MPT_OSM)
-
 
2789
	      {
-
 
2790
		 QFileInfo osmf(MAP);
-
 
2791
 
-
 
2792
		 if (!osmf.exists())
-
 
2793
		 {
2770
//cout << "Pixmap loaded from: " << rd.getOutBuf().toAscii().data() << endl;
2794
		    KMessageBox::error(this, i18n("The OSM file %1 does not exist!").arg(MAP));
-
 
2795
		    Fgeo = false;
-
 
2796
		 }
-
 
2797
		 else
-
 
2798
		 {
-
 
2799
		 SRender rd;
-
 
2800
		 QColor bg(220, 220, 220);		// background color
-
 
2801
 
-
 
2802
		    if (curTab == 0)
-
 
2803
		       rd.setDrawArea(*ui_sportwatcherWidgetBase.imgMap);
-
 
2804
		    else
-
 
2805
		       rd.setDrawArea(*ui_sportwatcherWidgetBase.grMap);
-
 
2806
 
-
 
2807
		    rd.setMapType(SRender::MAP_OSM);
-
 
2808
 
-
 
2809
		    if (rd.getMap(posLXY.lon, posLXY.lat, posRXY.lon, posRXY.lat))
-
 
2810
		    {
-
 
2811
		       paint.fillRect(0, 0, width+2, height+2, bg);
-
 
2812
 
2771
		       if (curTab == 0)
2813
		       if (curTab == 0)
2772
			  paint.drawPixmap(0, 0, *ui_sportwatcherWidgetBase.imgMap->pixmap());
2814
			  paint.drawPixmap(0, 0, *ui_sportwatcherWidgetBase.imgMap->pixmap());
2773
		       else
2815
		       else
2774
			  paint.drawPixmap(0, 0, *ui_sportwatcherWidgetBase.grMap->pixmap());
2816
			  paint.drawPixmap(0, 0, *ui_sportwatcherWidgetBase.grMap->pixmap());
2775
 
2817