]> gitweb.fperrin.net Git - GpsPrune.git/blob - tim/prune/FunctionLibrary.java
0830049b57bb69c74760bc6b608dd74cde760386
[GpsPrune.git] / tim / prune / FunctionLibrary.java
1 package tim.prune;
2
3 import tim.prune.correlate.AudioCorrelator;
4 import tim.prune.correlate.PhotoCorrelator;
5 import tim.prune.function.*;
6 import tim.prune.function.charts.Charter;
7 import tim.prune.function.compress.CompressTrackFunction;
8 import tim.prune.function.distance.DistanceFunction;
9 import tim.prune.function.edit.PointNameEditor;
10 import tim.prune.function.gpsies.GetGpsiesFunction;
11 import tim.prune.function.gpsies.UploadGpsiesFunction;
12 import tim.prune.function.srtm.LookupSrtmFunction;
13 import tim.prune.load.AudioLoader;
14 import tim.prune.load.BabelLoadFromFile;
15 import tim.prune.load.BabelLoadFromGps;
16 import tim.prune.save.GpsSaver;
17 import tim.prune.save.GpxExporter;
18 import tim.prune.save.KmlExporter;
19 import tim.prune.save.PovExporter;
20 import tim.prune.save.SvgExporter;
21
22 /**
23  * Class to provide access to functions
24  */
25 public abstract class FunctionLibrary
26 {
27         public static GenericFunction FUNCTION_GPXEXPORT = null;
28         public static GenericFunction FUNCTION_KMLEXPORT = null;
29         public static PovExporter FUNCTION_POVEXPORT     = null;
30         public static SvgExporter FUNCTION_SVGEXPORT     = null;
31         public static GenericFunction FUNCTION_GPSLOAD  = null;
32         public static GenericFunction FUNCTION_GPSSAVE  = null;
33         public static GenericFunction FUNCTION_IMPORTBABEL = null;
34         public static GenericFunction FUNCTION_SAVECONFIG  = null;
35         public static GenericFunction FUNCTION_EDIT_WAYPOINT_NAME = null;
36         public static RearrangeWaypointsFunction FUNCTION_REARRANGE_WAYPOINTS = null;
37         public static GenericFunction FUNCTION_REARRANGE_PHOTOS = null;
38         public static GenericFunction FUNCTION_COMPRESS = null;
39         public static GenericFunction FUNCTION_LOOKUP_SRTM = null;
40         public static GenericFunction FUNCTION_LOOKUP_WIKIPEDIA = null;
41         public static GenericFunction FUNCTION_SEARCH_WIKIPEDIA = null;
42         public static GenericFunction FUNCTION_DOWNLOAD_OSM = null;
43         public static GenericFunction FUNCTION_ADD_TIME_OFFSET  = null;
44         public static GenericFunction FUNCTION_ADD_ALTITUDE_OFFSET  = null;
45         public static GenericFunction FUNCTION_CONVERT_NAMES_TO_TIMES  = null;
46         public static GenericFunction FUNCTION_DELETE_FIELD_VALUES  = null;
47         public static GenericFunction FUNCTION_PASTE_COORDINATES = null;
48         public static GenericFunction FUNCTION_FIND_WAYPOINT = null;
49         public static GenericFunction FUNCTION_DUPLICATE_POINT = null;
50         public static GenericFunction FUNCTION_CONNECT_TO_POINT = null;
51         public static GenericFunction FUNCTION_DISCONNECT_PHOTO = null;
52         public static GenericFunction FUNCTION_REMOVE_PHOTO = null;
53         public static GenericFunction FUNCTION_DISCONNECT_AUDIO = null;
54         public static GenericFunction FUNCTION_CORRELATE_PHOTOS = null;
55         public static GenericFunction FUNCTION_ROTATE_PHOTO_LEFT = null;
56         public static GenericFunction FUNCTION_ROTATE_PHOTO_RIGHT = null;
57         public static GenericFunction FUNCTION_PHOTO_POPUP = null;
58         public static GenericFunction FUNCTION_IGNORE_EXIF_THUMB = null;
59         public static GenericFunction FUNCTION_CHARTS = null;
60         public static GenericFunction FUNCTION_3D     = null;
61         public static GenericFunction FUNCTION_DISTANCES  = null;
62         public static GenericFunction FUNCTION_FULL_RANGE_DETAILS = null;
63         public static GenericFunction FUNCTION_GET_GPSIES = null;
64         public static GenericFunction FUNCTION_UPLOAD_GPSIES = null;
65         public static GenericFunction FUNCTION_LOAD_AUDIO = null;
66         public static GenericFunction FUNCTION_REMOVE_AUDIO = null;
67         public static GenericFunction FUNCTION_CORRELATE_AUDIOS = null;
68         public static GenericFunction FUNCTION_PLAY_AUDIO = null;
69         public static GenericFunction FUNCTION_STOP_AUDIO = null;
70         public static GenericFunction FUNCTION_SET_MAP_BG = null;
71         public static GenericFunction FUNCTION_SET_DISK_CACHE = null;
72         public static GenericFunction FUNCTION_SET_PATHS  = null;
73         public static GenericFunction FUNCTION_SET_KMZ_IMAGE_SIZE = null;
74         public static GenericFunction FUNCTION_SET_COLOURS = null;
75         public static GenericFunction FUNCTION_SET_LINE_WIDTH = null;
76         public static GenericFunction FUNCTION_SET_LANGUAGE = null;
77         public static GenericFunction FUNCTION_HELP   = null;
78         public static GenericFunction FUNCTION_SHOW_KEYS = null;
79         public static GenericFunction FUNCTION_ABOUT  = null;
80         public static GenericFunction FUNCTION_CHECK_VERSION  = null;
81
82
83         /**
84          * Initialise library of functions
85          * @param inApp App object to give to functions
86          */
87         public static void initialise(App inApp)
88         {
89                 FUNCTION_GPXEXPORT = new GpxExporter(inApp);
90                 FUNCTION_KMLEXPORT = new KmlExporter(inApp);
91                 FUNCTION_POVEXPORT = new PovExporter(inApp);
92                 FUNCTION_SVGEXPORT = new SvgExporter(inApp);
93                 FUNCTION_GPSLOAD   = new BabelLoadFromGps(inApp);
94                 FUNCTION_GPSSAVE   = new GpsSaver(inApp);
95                 FUNCTION_IMPORTBABEL = new BabelLoadFromFile(inApp);
96                 FUNCTION_SAVECONFIG = new SaveConfig(inApp);
97                 FUNCTION_EDIT_WAYPOINT_NAME = new PointNameEditor(inApp);
98                 FUNCTION_REARRANGE_WAYPOINTS = new RearrangeWaypointsFunction(inApp);
99                 FUNCTION_REARRANGE_PHOTOS = new RearrangePhotosFunction(inApp);
100                 FUNCTION_COMPRESS = new CompressTrackFunction(inApp);
101                 FUNCTION_LOOKUP_SRTM = new LookupSrtmFunction(inApp);
102                 FUNCTION_LOOKUP_WIKIPEDIA = new GetWikipediaFunction(inApp);
103                 FUNCTION_SEARCH_WIKIPEDIA = new SearchWikipediaNames(inApp);
104                 FUNCTION_DOWNLOAD_OSM = new DownloadOsmFunction(inApp);
105                 FUNCTION_ADD_TIME_OFFSET = new AddTimeOffset(inApp);
106                 FUNCTION_ADD_ALTITUDE_OFFSET = new AddAltitudeOffset(inApp);
107                 FUNCTION_CONVERT_NAMES_TO_TIMES = new ConvertNamesToTimes(inApp);
108                 FUNCTION_DELETE_FIELD_VALUES = new DeleteFieldValues(inApp);
109                 FUNCTION_PASTE_COORDINATES = new PasteCoordinates(inApp);
110                 FUNCTION_FIND_WAYPOINT = new FindWaypoint(inApp);
111                 FUNCTION_DUPLICATE_POINT = new DuplicatePoint(inApp);
112                 FUNCTION_CONNECT_TO_POINT = new ConnectToPointFunction(inApp);
113                 FUNCTION_DISCONNECT_PHOTO = new DisconnectPhotoFunction(inApp);
114                 FUNCTION_REMOVE_PHOTO = new RemovePhotoFunction(inApp);
115                 FUNCTION_CORRELATE_PHOTOS = new PhotoCorrelator(inApp);
116                 FUNCTION_ROTATE_PHOTO_LEFT = new RotatePhoto(inApp, false);
117                 FUNCTION_ROTATE_PHOTO_RIGHT = new RotatePhoto(inApp, true);
118                 FUNCTION_PHOTO_POPUP = new PhotoPopupFunction(inApp);
119                 FUNCTION_IGNORE_EXIF_THUMB = new IgnoreExifThumb(inApp);
120                 FUNCTION_CHARTS = new Charter(inApp);
121                 FUNCTION_3D     = new ShowThreeDFunction(inApp);
122                 FUNCTION_DISTANCES = new DistanceFunction(inApp);
123                 FUNCTION_FULL_RANGE_DETAILS = new FullRangeDetails(inApp);
124                 FUNCTION_GET_GPSIES = new GetGpsiesFunction(inApp);
125                 FUNCTION_UPLOAD_GPSIES = new UploadGpsiesFunction(inApp);
126                 FUNCTION_LOAD_AUDIO = new AudioLoader(inApp);
127                 FUNCTION_REMOVE_AUDIO = new RemoveAudioFunction(inApp);
128                 FUNCTION_CORRELATE_AUDIOS = new AudioCorrelator(inApp);
129                 FUNCTION_PLAY_AUDIO = new PlayAudioFunction(inApp);
130                 FUNCTION_STOP_AUDIO = new StopAudioFunction(inApp);
131                 FUNCTION_DISCONNECT_AUDIO = new DisconnectAudioFunction(inApp);
132                 FUNCTION_SET_MAP_BG = new SetMapBgFunction(inApp);
133                 FUNCTION_SET_DISK_CACHE = new DiskCacheConfig(inApp);
134                 FUNCTION_SET_PATHS = new SetPathsFunction(inApp);
135                 FUNCTION_SET_KMZ_IMAGE_SIZE = new SetKmzImageSize(inApp);
136                 FUNCTION_SET_COLOURS = new SetColours(inApp);
137                 FUNCTION_SET_LINE_WIDTH = new SetLineWidth(inApp);
138                 FUNCTION_SET_LANGUAGE = new SetLanguage(inApp);
139                 FUNCTION_HELP   = new HelpScreen(inApp);
140                 FUNCTION_SHOW_KEYS = new ShowKeysScreen(inApp);
141                 FUNCTION_ABOUT  = new AboutScreen(inApp);
142                 FUNCTION_CHECK_VERSION= new CheckVersionScreen(inApp);
143         }
144 }