You've already forked lazarus-ccr
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:
@ -76,6 +76,13 @@
|
|||||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
|
<Linking>
|
||||||
|
<Options>
|
||||||
|
<Win32>
|
||||||
|
<GraphicApplication Value="True"/>
|
||||||
|
</Win32>
|
||||||
|
</Options>
|
||||||
|
</Linking>
|
||||||
</CompilerOptions>
|
</CompilerOptions>
|
||||||
<Debugging>
|
<Debugging>
|
||||||
<Exceptions Count="4">
|
<Exceptions Count="4">
|
||||||
|
@ -6,7 +6,7 @@ object GPSListViewer: TGPSListViewer
|
|||||||
Caption = 'GPS points'
|
Caption = 'GPS points'
|
||||||
ClientHeight = 356
|
ClientHeight = 356
|
||||||
ClientWidth = 753
|
ClientWidth = 753
|
||||||
LCLVersion = '2.1.0.0'
|
LCLVersion = '2.3.0.0'
|
||||||
object ListView: TListView
|
object ListView: TListView
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 312
|
Height = 312
|
||||||
@ -246,14 +246,14 @@ object GPSListViewer: TGPSListViewer
|
|||||||
Title = 'Save gps points as'
|
Title = 'Save gps points as'
|
||||||
DefaultExt = '.*.gps'
|
DefaultExt = '.*.gps'
|
||||||
Filter = 'GPS points (*.gps)|*.gps|All files (*.*)|*.*'
|
Filter = 'GPS points (*.gps)|*.gps|All files (*.*)|*.*'
|
||||||
left = 472
|
Left = 472
|
||||||
top = 256
|
Top = 256
|
||||||
end
|
end
|
||||||
object OpenDialog: TOpenDialog
|
object OpenDialog: TOpenDialog
|
||||||
Title = 'Open gps points file'
|
Title = 'Open gps points file'
|
||||||
DefaultExt = '.gps'
|
DefaultExt = '.gps'
|
||||||
Filter = 'GPS files (*.gps)|*.gps|All files (*.*)|*.*'
|
Filter = 'GPS files (*.gps)|*.gps|All files (*.*)|*.*'
|
||||||
left = 560
|
Left = 560
|
||||||
top = 256
|
Top = 256
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -5,7 +5,7 @@ unit gpslistform;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ButtonPanel, ComCtrls,
|
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ComCtrls,
|
||||||
ExtCtrls, Buttons, StdCtrls, mvGpsObj, mvMapViewer;
|
ExtCtrls, Buttons, StdCtrls, mvGpsObj, mvMapViewer;
|
||||||
|
|
||||||
const
|
const
|
||||||
|
@ -71,10 +71,10 @@ object GPSPointForm: TGPSPointForm
|
|||||||
AnchorSideRight.Control = edGPSPointLabel
|
AnchorSideRight.Control = edGPSPointLabel
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 58
|
Height = 80
|
||||||
Top = 48
|
Top = 48
|
||||||
Width = 200
|
Width = 200
|
||||||
PageIndex = 1
|
PageIndex = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Top = 8
|
BorderSpacing.Top = 8
|
||||||
|
@ -80,13 +80,17 @@ end;
|
|||||||
|
|
||||||
procedure TGPSPointForm.cmbImageIndexDrawItem(Control: TWinControl;
|
procedure TGPSPointForm.cmbImageIndexDrawItem(Control: TWinControl;
|
||||||
Index: Integer; ARect: TRect; State: TOwnerDrawState);
|
Index: Integer; ARect: TRect; State: TOwnerDrawState);
|
||||||
|
var
|
||||||
|
combobox: TCombobox;
|
||||||
begin
|
begin
|
||||||
|
combobox := Control as TCombobox;
|
||||||
|
|
||||||
if State * [odSelected, odFocused] <> [] then
|
if State * [odSelected, odFocused] <> [] then
|
||||||
cmbImageIndex.Canvas.Brush.Color := clHighlight
|
combobox.Canvas.Brush.Color := clHighlight
|
||||||
else
|
else
|
||||||
cmbImageIndex.Canvas.Brush.Color := clWindow;
|
combobox.Canvas.Brush.Color := clWindow;
|
||||||
cmbImageIndex.Canvas.FillRect(ARect);
|
combobox.Canvas.FillRect(ARect);
|
||||||
FImageList.Draw(cmbImageIndex.Canvas, ARect.Left+2, ARect.Top+2, Index);
|
FImageList.Draw(combobox.Canvas, ARect.Left+2, ARect.Top+2, Index);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TGPSPointForm.GetImageIndexData(var AName: String; var AImgIndex: Integer);
|
procedure TGPSPointForm.GetImageIndexData(var AName: String; var AImgIndex: Integer);
|
||||||
|
@ -90,9 +90,9 @@ type
|
|||||||
procedure MapViewDrawGpsPoint(Sender: TObject;
|
procedure MapViewDrawGpsPoint(Sender: TObject;
|
||||||
ADrawer: TMvCustomDrawingEngine; APoint: TGpsPoint);
|
ADrawer: TMvCustomDrawingEngine; APoint: TGpsPoint);
|
||||||
procedure MapViewMouseLeave(Sender: TObject);
|
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;
|
procedure MapViewMouseUp(Sender: TObject; Button: TMouseButton;
|
||||||
Shift: TShiftState; X, Y: Integer);
|
{%H-}Shift: TShiftState; X, Y: Integer);
|
||||||
procedure MapViewZoomChange(Sender: TObject);
|
procedure MapViewZoomChange(Sender: TObject);
|
||||||
procedure BtnLoadMapProvidersClick(Sender: TObject);
|
procedure BtnLoadMapProvidersClick(Sender: TObject);
|
||||||
procedure BtnSaveMapProvidersClick(Sender: TObject);
|
procedure BtnSaveMapProvidersClick(Sender: TObject);
|
||||||
@ -576,54 +576,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
gpsPt.Name := gpsName;
|
gpsPt.Name := gpsName;
|
||||||
|
|
||||||
MapView.GpsItems.Add(gpsPt, _CLICKED_POINTS_);
|
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;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -814,7 +768,6 @@ end;
|
|||||||
procedure TMainForm.WriteToIni;
|
procedure TMainForm.WriteToIni;
|
||||||
var
|
var
|
||||||
ini: TCustomIniFile;
|
ini: TCustomIniFile;
|
||||||
L: TStringList;
|
|
||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
ini := TMemIniFile.Create(CalcIniName);
|
ini := TMemIniFile.Create(CalcIniName);
|
||||||
|
Reference in New Issue
Block a user