[Thuban-devel] Re: RfD: Support for layer specific resources
Martin Schulze
joey at infodrom.org
Wed May 19 16:48:13 CEST 2004
Jan-Oliver Wagner wrote:
> On Fri, Apr 16, 2004 at 05:02:28PM +0200, Bernhard Herzog wrote:
> > The main problem with the Show Table command is that it's not grayed out
> > in the context menu for non-shape layers. It is grayed out in the main
> > menu, so it should be easy to do it in the context menu too. Jan is
> > already looking into that.
>
> and fixed that in HEAD and thuban-1-0-branch now :-)
>
> > For the properties dialog, a registry like that for the renderer would
> > be an easy way to define new layer type specific properties dialogs.
> >
> > The existing properties dialog should perhaps be split in two, one for
> > the shape layers and one for raster layers, instead of having one which
> > simply doesn't have some of the widgets of the other. It might be a
> > good idea ot have a common base class for the property dialogs which has
> > the widgets for the common base class BaseLayer.
>
> these two actions look quite sensible to me.
>
> Joey: Do you think you could develop patches for this (first the dialog
> separation, then based on that, the registry for properties dialogs like
> for renderer)?
Looking at the current code:
MainWindow.OpenLayerProperties():
dialog = self.get_open_dialog(name)
if dialog is None:
dialog = Classifier(self, name, self.Map(), layer, group)
self.add_dialog(name, dialog)
dialog.Show()
else
dialog.Raise()
Classifier is a specialisation of NonModalNonParentDialog
So what you would like to see is something like
class GeneralPropertiesDialogs (NonModalNonParentDialog)
...
class Classifier (GeneralPropertiesDialog)
...
class wmsPropertiesDialog (GeneralPropertiesDialog)
...
and
BaseLayer.propertiesDialog of class PropertiesDialog, or rather one
of the specialisations of it (i.e. Classifier or wmsPropertiesDialog).
MainWindow.OpenLayerProperties would then contain code like
if current_layer.has_properties():
name = ...
dialog = self.get_open_dialog(name)
if dialog is None:
dialog = current_layer.properties_dialog(..)
self.add_dialog(name, dialog)
dialog.Show()
else
dialog.Raise()
Is that what you wanted? Or did I misunderstand you?
Regards,
Joey
--
Ten years and still binary compatible. -- XFree86
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)