Parent Directory
|
Revision Log
Sticky Revision: |
made a copy
2006-09-18 Didrik Pinte <dpinte@itae.be> * wxPython 2.6 update : wx 2.4 syntax has been updated to 2.6
Add missing import, which led to an exception when opening a layer's projection.
More wxPython 2.5 changes. This time taken from a patch from Daniel Calvelo Aros. * Thuban/UI/tableview.py (QueryTableFrame.__init__) (QueryTableFrame.__init__): Pass the size of a spacer as a single item. * Thuban/UI/projdialog.py (ProjFrame.build_dialog) (ProjFrame.build_dialog): Pass the size of a spacer as a single item. * Thuban/UI/dbdialog.py (ChooseDBTableDialog.__init__): Pass the size of a spacer as a single item. * Thuban/UI/classifier.py (Classifier.dialog_layout): Pass the size of a spacer as a single item.
(ProjFrame.load_user_proj): Added a \n to stderr after the warnings. Thanks to Russell Nelson.
Fix for RT#2237 (ProjFrame._show_proj_panel): If the panel to be shown is the UnknownProjPanel disable the OK and Try buttons. Otherwise enable them. (ProjFrame.__GetProjection): The UnknownProjPanel returns None for the parameters. In that case __GetProjection also returns None now.
Make Thuban remember path selections (at least for one application run). * Thuban/UI/application.py (Application.OnInit): Initialize path as a attribute of application object. Path is a dictionary of strings, currently with the items "data" and "projection". (Application.SetPath): New, stores path for the specified item. (Application.Path): New, return path for the specified item. * Thuban/UI/mainwindow.py (MainWindow.OpenSession, MainWindow.SaveSessionAs, MainWindow.AddLayer, MainWindow.AddRasterLayer, MainWindow.TableOpen): Access "data" path information of the application. * Thuban/UI/projdialog.py (ProjFrame._OnImport, ProjFrame._OnExport): Access "projection" path information of the application.
Thuban/UI/projdialog.py (load_user_proj): If user.proj is missing write warning to stderr instead of rising a warning dialog
(ProjFrame.build_dialog): Add a space above the EPS widgets, introduce a check box for the deprecated eps projections and a label for the epsg widgets (ProjFrame._OnShowEPSG): Handle the deprecated EPSG projections too
* Thuban/Model/resource.py (get_system_proj_file): Add a filename parameter so that this function can be used for all proj files in Resource/Projections (DEFAULT_PROJ_FILE, EPSG_PROJ_FILE): New. Predefined filenames for get_system_proj_file * Thuban/UI/projdialog.py (ProjFrame.__init__): Instead of one ProjFile self.__sysProjFile use a dictionary of system ProjFile objects self._sys_proj_files (ProjFrame.build_dialog): Adapt to the new changes in the ProjectionList constructor. Add a check button to toggle whether EPSG projections are shown (ProjFrame._OnShowEPSG): New. Handler for the epsg check button events. (ProjFrame.load_user_proj, ProjFrame.load_system_proj): Only show the busy cursor if the files have not yet been loaded by the dialog. (ProjFrame.load_system_proj): Add a parameter for the name of the proj file. Maintain the dictionary of system projections self._sys_proj_files * Thuban/UI/projlist.py (ProjectionList): Merge the system_projs, user_projs parameters into one parameter proj_files which is a list of proj files. (ProjectionList._subscribe_proj_files) (ProjectionList._unsubscribe_proj_files): New. Move subscription/unsubscription of projfile messages to separate methods (ProjectionList.Destroy): The unsubscribe is now done in _unsubscribe_proj_files (ProjectionList.update_projections): We now have a list of proj file objects (ProjectionList.SetProjFiles): New method to set a new list of proj file objects * test/test_proj.py (ProjFileReadTests.test_get_system_proj_file): Specify explicitly which system proj file to load.
(ProjFrame.__init__): Added 'longlat' as alias for 'latlong'.
(ProjFrame.proj_selection_changed): Set the projection even for the UnknownPanel. (UnknownProjPanel.__init__): Define the text and create the textctrl widget. (UnknownProjPanel._DoLayout): Replaced static text widget by the textctrl created in __init__. (UnknownProjPanel.SetProjection): Set the text for the text ctrl including the parameters of the projection.
(ProjFrame.__init__): Do not set the focus on the OK button, only on the projection list. That way the list really has the focus initially (ProjFrame.OnClose): Call the projection list's Destroy method to make it unsubscribe all messages
Rework the projection dialog to fix a few bugs, including RT 2166 and most of 2168 (ProjFrame): Substantial changes throughout the class. The main change is to use the ProjectionList class instead of a normal wxListBox. Also, add an explicit "Unknown" projection to the projection choice control. (ProjPanel.__init__): Add an "unknown" ellipsoid (TMPanel.__init__, LCCPanel.__init__): Tweak the order of instantiation of the panel's controls to make the tab-order more natural
(ProjFrame.write_proj_file): New. helper method to write a projfile and display a busy cursor and error dialogs. (ProjFrame._OnSave, ProjFrame._OnAddToList, ProjFrame._OnImport) (ProjFrame._OnExport, ProjFrame._OnRemove): Use write_proj_file (ProjFrame.__FillAvailList): Translate "<None>" too and display a busy cursor while loading the user and system prj files.
(ProjFrame._OnSave) (ProjFrame._OnAddToList, ProjFrame.__DoOnProjAvail) (ProjFrame.__FillAvailList): Use the projection's Label method to get the string for the list box
(ProjFrame.build_dialog): Instantiate all projection type specific panels and put them into a NotebookLikeSizer. This way the dialog doesn't change its size when a different projection is selected (ProjFrame.__init__): Rename projection_panels projection_panel_defs and reuse projection_panels for a list of the instantiated panels. (ProjFrame._show_proj_panel, ProjFrame.__DoOnProjAvail) (ProjFrame.__DoOnProjChoice): Changes due to the new handling of the panels (UnknownProjPanel._DoLayout): Place the newlines in the message differently to make the panel narrower. (TMPanel._DoLayout): Layout the parameters in one column.
(ProjFrame.build_dialog): New method that contains all the setup for the dialog's widgets, layout and event handling. (__): Call build_dialog to build the dialog. (ProjFrame.__set_properties, ProjFrame.__do_layout): Removed. Their functionality is now in build_dialog (ProjFrame.__VerifyButtons, ProjFrame.__VerifyButtons) (ProjFrame.__DoOnProjAvail, ProjFrame.__DoOnProjAvail) (ProjFrame.__DoOnProjChoice): Small updates due to slightly different widget names and hierarchy introduced with build_dialog.
(ProjFrame.__set_properties): Remove the length limit on the projname text control
(ProjFrame.__DoOnProjAvail): When the projection type of the currently selected projection is not known, i.e. there's no panel for it, use the UnknownProjPanel (ProjFrame.__DoOnProjChoice, ProjFrame._show_proj_panel): Split the actual replacing of the proj panel into the new method _show_proj_panel. (UnknownProjPanel): Add doc-string. (UnknownProjPanel._DoLayout): Insert a newline into the text so that the panel is not so wide.
* Thuban/Model/resource.py (read_proj_file): Return the warnings too. Update the doc-string (get_proj_files): Removed. It wasn't used anywhere (get_system_proj_files, get_system_proj_file): Rename to get_system_proj_file and return the ProjFile object and not a list of ProjFile objects. Update the callers. (get_user_proj_files, get_user_proj_file): Rename to get_user_proj_file return the ProjFile object and not a list of ProjFile objects. Update the callers. (ProjFileReader.__init__): New instance variable for the warnings. Rename the __pf ivar to projfile. Update the methods referring to __pf (ProjFileReader.end_projection): Catch any errors raised when instantiating the projection and record that as an error. The projection will not be in the final ProjFile object. (ProjFileReader.GetWarnings): New method to return the warnings. * Thuban/UI/projdialog.py (ProjFrame.show_warnings): New method to show the warnings from the projfile reader (ProjFrame._OnImport): Deal with any warnings returned by read_proj_file (ProjFrame.__FillAvailList): Deal with any warnings returned by get_system_proj_file or get_user_proj_file.
(UnknownProjPanel._DoLayout): Translated strings have to be one string literal.
Make sure translated strings are recognized as one string literal.
(UTMPanel._OnPropose): Added test for a bounding box. A dialog is raised in case, no bounding box is found. This fixes bug #2043: https://intevation.de/rt/webrt?serial_num=2043
Insert cvs keywords and doc-strings.
(ProjFrame.__DoOnProjAvail): Clear the projfilepath if no projection is selected.
(ProjFrame.__DoOnProjAvail): Set the projfilepath label to just the basename of the projection file rather than include the entire path.
Use renamed projection resource functions.
(ProjFrame.__init__): Fill the projchoice once on initialisation (Former implementation resulted in multiple entries for each projection). (ProjFrame.__FillAvailList): selectProj as second optional parameter, if set, select the projection found under the specified name. This overwrites any other selection estimate. Removed projchoice filling from this method. (ProjFrame._OnSave, ProjFrame._OnAddToList): Updated call of ProjFrame.__FillAvailList (LCCPanel._DoLayout): Moved parameter controls in more common order.
Dialog derived from NonModalNonParentDialog
(ProjFrame.__do_layout, ProjPanel._DoLayout): Center Choices.
(ProjFrame.__init__, ProjFrame.__doLayout): UI polishing updates: Place main buttons (OK, Cancel, etc) in the lower right corner, center labels for selections, initialize controls in reasonable order for keyboard navigation. (ProjFrame.__DoOnProjAvail): Determine position of current projection using the wxListBox.FindString() method. Still a problem (#1886)
(GeoPanel.__init__): Put Degrees as the first item in choices. Fixes RTBug #1882.
(ProjFrame.__do_layout): Fix Windows layout bug with the 'Projection' label.
(ProjFrame.__VerifyButtons): Save button should be disabled if no projection is selected in the available list.
(ProjFrame.__init__): Rearrange the order that the controls are created so that tabbing works correctly. (ProjFrame.OnApply): Renamed from _OnTry() to use wxDialog behaviour. (ProjFrame.OnOK): Renamed from _OnOK() to use wxDialog behaviour. (ProjFrame.OnCancel): Renamed from _OnClose() to use wxDialog behaviour. (ProjPanel.__init__): Add "Airy" to the list of ellipsoids so we can provide the "UK National Grid" as a default projection. (UTMPanel.__init__): Rearrange the order that the controls are created so that tabbing works correctly.
(ProjFrame._OnSave): Add missing parameter in call to SetClientData. (GeoPanel): Add support for selecting the units that the source data is in (Radians or Degrees).
(ProjFrame._OnSave): Use the new ProjFile.Replace() method instead of the mutator Projection.SetProjection(). Also requires that we reassign the client data to the new projection.
quick fix for a windows bug. wxWindows under MSW complains if you set a selection to an invalid index.
(ProjFrame.__ShowError): Consolidate error dialogs into a single method call. (ProjFrame.__VerifyButtons): Add more states to check. (ProjFrame.__GetProjection): Return the current state of an edited projection or None. (ProjFrame.__FillAvailList): Remove checks for states that shouldn't exist. (ProjFrame._OnNew): Clear all selected items and supply a projection panel if necessary.
(ProjFrame.__FillAvailList): Now takes an optional argument to select the current projection. This does not guarantee that the item is visible due to limited wxWindows functionality. Fixes RTBug #1821.
(ProjFrame._OnAddToList): Renamed from ProjFrame._OnSaveAs. Removed old dead code from previous implementation. (ProjFrame._OnExport): Add support for exporting more than one projection to a single file. (ProjFrame.__FillAvailList): use string formatting (% operator) to build strings that are (partly) translated. Fixes RTbug #1818.
(ProjFrame._OnSaveAs): Don't translate empty strings.
Large changes to how the dialog is laid out. Use three panels instead of one. One for the list of projections, one for the edit controls, and one for the buttons. Fixed resizing problems so that the dialog resizes correctly when the projection panel changes. Added import/export, save, and new buttons/functionality.
Projection dialog. Allows the user to select from a list of projection templates and optionally edit them and save new ones. (ProjFrame): New. Main dialog. (ProjPanel): Base class for projection specific panels. (TMPanel): Projection panel for Transverse Mercartor. (UTMPanel): Projection panel for Universal Transverse Mercartor. (LCCPanel): Projection panel for Lambert Conic Conformal. (GeoPanel): Projetion panel for Geographic Projection.
This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.
[email protected] | ViewVC Help |
Powered by ViewVC 1.1.26 |