layerwindow

Module that contains the LayerWindow class

class tuiview.layerwindow.LayerItemModel(viewwidget, viewwindow, parent)[source]

This class provides the data to the list view by reading the list of layers provided by the LayerManager

data(index, role)[source]

Get the data associated with an item

flags(index)[source]

Have to override to make it checkable

getLayer(index)[source]

Because we are showing the layers in the opposite order (last layer is top) we have a helper function to get the right layer

rowCount(parent)[source]

Just the number of layers

setData(index, value, role)[source]

Set the data back. Only bother with CheckStateRole

class tuiview.layerwindow.LayerListView[source]

Our own QListView derived class so we can handle the context menu event

changeColor()[source]

Change the color of the vector layer

contextMenuEvent(e)[source]

Show our popup menu

editStretch()[source]

Edit the stretch for the layer

moveDown()[source]

Move the selected layer down in order

moveToTop()[source]

Move the selected layer to the top

moveUp()[source]

Move the selected layer up in order

properties()[source]

Show the properties for the layer

removeLayers()[source]

remove the selected layer

setLineWidth()[source]

Set the line width for vector layers

setSQL()[source]

Set the attribute filter for vector layers

setupActions()[source]

Set up the actions for the popup menu

setupMenu()[source]

Create the popup menus

toggleFill(state)[source]

toggle the fill state

zoomLayer()[source]

zoom to the extents of the selected layer

class tuiview.layerwindow.LayerWindow(parent, viewwidget)[source]

Our dock window that shows the layers. Contains a list view

closeEvent(event)[source]

Window is being closed - inform parent window

layersChanged()[source]

Called when a layer has been added or removed to/from the LayerManager

layerWindowClosed