Subversion Repositories public

Rev

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

Rev 274 Rev 275
Line 2747... Line 2747...
2747
	      {
2747
	      {
2748
		 QDir shpd(MAP, QString("*.shp"));
2748
		 QDir shpd(MAP, QString("*.shp"));
2749
 
2749
 
2750
		 if (shpd.count() < 1)
2750
		 if (shpd.count() < 1)
2751
		 {
2751
		 {
2752
		    KMessageBox::error(this, i18n("There is no shape file in directory ") + MAP);
2752
		    KMessageBox::error(this, i18n("There is no shape file in directory %1").arg(MAP));
2753
		    Fgeo = false;
2753
		    Fgeo = false;
2754
		 }
2754
		 }
2755
		 else
2755
		 else
2756
		 {
2756
		 {
2757
		 SRender rd;
2757
		 SRender rd;
-
 
2758
		 QColor bg(220, 220, 220);		// background color
2758
 
2759
 
2759
		    paint.end();
2760
		    if (curTab == 0)
2760
		    rd.setDrawArea(*ui_sportwatcherWidgetBase.imgMap);
2761
		       rd.setDrawArea(*ui_sportwatcherWidgetBase.imgMap);
-
 
2762
		    else
-
 
2763
		       rd.setDrawArea(*ui_sportwatcherWidgetBase.grMap);
-
 
2764
 
2761
		    rd.getMap(posLXY.lat, posLXY.lon, posRXY.lat, posRXY.lon);
2765
		    if (rd.getMap(posLXY.lon, posLXY.lat, posRXY.lon, posRXY.lat))
-
 
2766
		    {
-
 
2767
		       paint.fillRect(0, 0, width+2, height+2, bg);
-
 
2768
//		       QPixmap qpx;
-
 
2769
//		       qpx.load(rd.getOutBuf());
-
 
2770
//cout << "Pixmap loaded from: " << rd.getOutBuf().toAscii().data() << endl;
-
 
2771
		       if (curTab == 0)
2762
		    pmMap = *ui_sportwatcherWidgetBase.imgMap->pixmap();
2772
			  paint.drawPixmap(0, 0, *ui_sportwatcherWidgetBase.imgMap->pixmap());
-
 
2773
		       else
-
 
2774
			  paint.drawPixmap(0, 0, *ui_sportwatcherWidgetBase.grMap->pixmap());
-
 
2775
 
-
 
2776
		       Fgeo = true;
-
 
2777
		    }
-
 
2778
		    else
2763
		    paint.begin(&pmMap);
2779
		       Fgeo = false;
2764
		 }
2780
		 }
2765
	      }
2781
	      }
2766
	      else
2782
	      else
2767
	      {
2783
	      {
2768
		 KMessageBox::error(this, i18n("Error opening map file!"));
2784
		 KMessageBox::error(this, i18n("Error opening map file!"));