lazmapviewer: Cleanup, less hints and warnings.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8105 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2021-09-29 21:51:08 +00:00
parent fc027d9ceb
commit d6c8a34a63
6 changed files with 26 additions and 62 deletions

View File

@ -76,6 +76,13 @@
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Linking>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
<Debugging>
<Exceptions Count="4">

View File

@ -6,7 +6,7 @@ object GPSListViewer: TGPSListViewer
Caption = 'GPS points'
ClientHeight = 356
ClientWidth = 753
LCLVersion = '2.1.0.0'
LCLVersion = '2.3.0.0'
object ListView: TListView
Left = 6
Height = 312
@ -246,14 +246,14 @@ object GPSListViewer: TGPSListViewer
Title = 'Save gps points as'
DefaultExt = '.*.gps'
Filter = 'GPS points (*.gps)|*.gps|All files (*.*)|*.*'
left = 472
top = 256
Left = 472
Top = 256
end
object OpenDialog: TOpenDialog
Title = 'Open gps points file'
DefaultExt = '.gps'
Filter = 'GPS files (*.gps)|*.gps|All files (*.*)|*.*'
left = 560
top = 256
Left = 560
Top = 256
end
end

View File

@ -5,7 +5,7 @@ unit gpslistform;
interface
uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ButtonPanel, ComCtrls,
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ComCtrls,
ExtCtrls, Buttons, StdCtrls, mvGpsObj, mvMapViewer;
const

View File

@ -71,10 +71,10 @@ object GPSPointForm: TGPSPointForm
AnchorSideRight.Control = edGPSPointLabel
AnchorSideRight.Side = asrBottom
Left = 0
Height = 58
Height = 80
Top = 48
Width = 200
PageIndex = 1
PageIndex = 0
AutoSize = True
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 8

View File

@ -80,13 +80,17 @@ end;
procedure TGPSPointForm.cmbImageIndexDrawItem(Control: TWinControl;
Index: Integer; ARect: TRect; State: TOwnerDrawState);
var
combobox: TCombobox;
begin
combobox := Control as TCombobox;
if State * [odSelected, odFocused] <> [] then
cmbImageIndex.Canvas.Brush.Color := clHighlight
combobox.Canvas.Brush.Color := clHighlight
else
cmbImageIndex.Canvas.Brush.Color := clWindow;
cmbImageIndex.Canvas.FillRect(ARect);
FImageList.Draw(cmbImageIndex.Canvas, ARect.Left+2, ARect.Top+2, Index);
combobox.Canvas.Brush.Color := clWindow;
combobox.Canvas.FillRect(ARect);
FImageList.Draw(combobox.Canvas, ARect.Left+2, ARect.Top+2, Index);
end;
procedure TGPSPointForm.GetImageIndexData(var AName: String; var AImgIndex: Integer);

View File

@ -90,9 +90,9 @@ type
procedure MapViewDrawGpsPoint(Sender: TObject;
ADrawer: TMvCustomDrawingEngine; APoint: TGpsPoint);
procedure MapViewMouseLeave(Sender: TObject);
procedure MapViewMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
procedure MapViewMouseMove(Sender: TObject; {%H-}Shift: TShiftState; X, Y: Integer);
procedure MapViewMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
{%H-}Shift: TShiftState; X, Y: Integer);
procedure MapViewZoomChange(Sender: TObject);
procedure BtnLoadMapProvidersClick(Sender: TObject);
procedure BtnSaveMapProvidersClick(Sender: TObject);
@ -576,54 +576,8 @@ begin
end;
end;
gpsPt.Name := gpsName;
MapView.GpsItems.Add(gpsPt, _CLICKED_POINTS_);
WriteLn(MapView.GPSItems.Count);
(*
if rgPOIMode.ItemIndex in [0, 1] then
begin
if not InputQuery('Name of GPS location', 'Please enter name', gpsName) then
exit;
gpsPt := TGpsPoint.CreateFrom(rPt);
gpsPt.Name := gpsName;
end else
begin
if GPSPointForm = nil then begin
GPSPointForm := TGPSPointForm.Create(Application);
GPSPointForm.Position := poMainformCenter;
end;
if rgPOIMode.ItemIndex = 2 then
GPSPointForm.SetImageIndexData('', POIImages, -1)
else
GPSPointForm.SetSymbolData('', clRed, gpsPlus, 10);
if GPSPointForm.ShowModal <> mrOK then
exit;
if rgPOIMode.ItemIndex = 2 then // Image from imagelist
begin
gpsPt := TGpsPointOfInterest.CreateFrom(rPt);
GPSPointForm.GetImageIndexData(gpsName, gpsImageIndex);
//gpsImageIndex := Random(POIImages.Count); // to be removed...
TGPSPointOfInterest(gpsPt).ImageIndex := gpsImageIndex;
end else
begin // Symbols
gpsPt := TGpsPoint.CreateFrom(rPt);
GPSPointForm.GetSymbolData(gpsName, gpsColor, gpsSymbol, gpsSize); // to be aktivated
//GPSPointForm.GetData(gpsName, gpsColor, gpsSymbol, gpsSize); // to be removed
gpsPt.ExtraData := TGPSExtraData.Create(_CLICKED_POINTS_);
with TGPSExtraData(gpsPt.ExtraData) do
begin
Color := gpsColor;
Symbol := gpsSymbol;
Size := gpsSize;
end;
end;
gpsPt.Name := gpsName;
end;
MapView.GpsItems.Add(gpsPt, _CLICKED_POINTS_);
*)
end;
end;
@ -814,7 +768,6 @@ end;
procedure TMainForm.WriteToIni;
var
ini: TCustomIniFile;
L: TStringList;
i: Integer;
begin
ini := TMemIniFile.Create(CalcIniName);