Agroeye  1.0
Public Member Functions | Public Attributes | List of all members
agroeyepy.View.viewarea.ViewArea Class Reference
Inheritance diagram for agroeyepy.View.viewarea.ViewArea:
Collaboration diagram for agroeyepy.View.viewarea.ViewArea:

Public Member Functions

def __init__ (self, parent=None)
 
def addFilesModel (self, model)
 
def convertLayersToData (self, fileListVisible, fileListAll)
 Set parameters of views, run thread for all loaded files. More...
 
def rescale (self, scale)
 
def addLayers (self, params)
 Add loaded files to view as QGraphicsPixmapItem. More...
 
def getFileName (self, path)
 
def getVisibleLayers (self)
 
def setupViewAreaParameters (self, file=None, fullExtent=False)
 Setup ViewArea parameters such as: projection EPSG, size of ViewScene, coordinates of center. More...
 
def newSceneParameters (self, event)
 Calculates new width and height of View Scene. More...
 
def clearScene (self)
 Clears the scene in order to create space for new elements after for example resizing, zooming, adding new layer or removing it. More...
 
def buildUpBoundary (self)
 Builds new boundary in the currently displayed window. More...
 
def setZoomWheelScrollFactor (self, valueIn)
 Changes the strength of the zoom. More...
 
def wheelEvent (self, event)
 Examines what type of mouse wheel event has just occured. More...
 
def contextMenuEvent (self, event)
 Creates context menu if right mouse button clicked inside the view area. More...
 
def mouseMoveEvent (self, event)
 Changes the coordinates in the main window if the mouse moves over the view area or moves layers if the middle button was pressed or proper tool was selected. More...
 
def mouseReleaseEvent (self, event)
 Finishes moving layers triggering shift. More...
 
def getMouseCoordinates (self, qPoint)
 Converts pixel coordinates into physical coordinates in the terrain. More...
 
def revertCoordinates (self, xReal, yReal)
 
def mousePressEvent (self, event)
 
def mouseDoubleClickEvent (self, event)
 
def panActionToggled (self, isToogled)
 
def resizeEvent (self, event)
 
def properties (self)
 
def zoomIn (self, event=None, delta=120)
 
def zoomOut (self, event=None, delta=-120)
 
def updateUI (self)
 
def fromPixelsToCoordinates (self, qPoint)
 Re-Calculates point coordinates from pixel into Geo-Coordinates. More...
 
def setUpEPSG (self, combobox, code)
 
def chooseEPSG (self, newIndex, combobox, isTemp=False)
 Choose EPSG code. More...
 
def epsgChanged (self, newIndex, combobox=False, setupMain=False)
 Set EPSG code to Raster. More...
 
def checkComboBoxValues (self, args, kwargs)
 Simply styling line with editing EPSG code. More...
 
def zoomTyped (self, textTyped, combobox)
 
def changeZoom (self, lineEdit=None, expression=None)
 Does everything connected with change zoom. More...
 
def setZoomComboBoxValue (self, scaleNominator)
 
def setNoStyleZoomComboBox (self, index)
 
def projectionFromFirst (self)
 
def transformCoordinates (self, oldProj4, xCoord, yCooord)
 

Public Attributes

 scene
 Clears the scene in order to create space for new elements after for example resizing, zooming, adding new layer or removing it. More...
 
 parent
 
 wheelScrollZoomFactor
 Changes the strength of the zoom. More...
 
 panActionActive
 
 stretchClass
 
 vectorPixSize
 
 vectorSymbolStyle
 
 vectorLineStyle
 
 vectorFillStyle
 
 vectorOpacity
 
 vectorColorIn
 
 projectionFirst
 Set EPSG code to Raster. More...
 
 centralPaintPoint
 
 paintSize
 Size of the displaying widget. More...
 
 projectionEPSG
 EPGS of showed files. More...
 
 viewAreaSpatialReference
 
 viewAreaProj4
 
 mem_drv
 
 viewAreaAsRaster
 Builds new boundary in the currently displayed window. More...
 
 viewAreaGeoMatrix
 
 pixSize
 Does everything connected with change zoom. More...
 
 scaleNominator
 
 ratio
 Coefficient to convert file pix size into graphics scene size. More...
 
 ratioHeight
 
 ratioWidth
 
 movePressed
 Finishes moving layers triggering shift. More...
 
 startPosition
 Changes the coordinates in the main window if the mouse moves over the view area or moves layers if the middle button was pressed or proper tool was selected. More...
 
 offset
 Pixel coordinates indicate upper left corner whereas geographic coordinates indicates center position of center of pix. More...
 
 viewBoundary
 
 sceneHeight
 
 sceneWidth
 Setup ViewArea parameters such as: projection EPSG, size of ViewScene, coordinates of center. More...
 
 factor
 
 pressed
 
 comboIndexEpsg
 Dictionary with current used EPSG code, show in viewerApplication.coordinateSystemComboBox. More...
 
 EPSG2Name
 Dictionary with all EPSG (by name) More...
 
 EPSG2Proj4
 Dictionary with all EPSG (by Proj4) More...
 
 getImageList
 
 thread
 
 zoomObject
 
 zoomThread
 
 files
 Set parameters of views, run thread for all loaded files. More...
 
 filesAll
 
 getDataThread
 
 svgWidget
 Add loaded files to view as QGraphicsPixmapItem. More...
 
 transformation
 

Constructor & Destructor Documentation

§ __init__()

def agroeyepy.View.viewarea.ViewArea.__init__ (   self,
  parent = None 
)

Member Function Documentation

§ addFilesModel()

def agroeyepy.View.viewarea.ViewArea.addFilesModel (   self,
  model 
)

§ addLayers()

def agroeyepy.View.viewarea.ViewArea.addLayers (   self,
  params 
)

Add loaded files to view as QGraphicsPixmapItem.

Parameters
params0 - list of raster data; 1 - list of vector data;
Here is the call graph for this function:

§ buildUpBoundary()

def agroeyepy.View.viewarea.ViewArea.buildUpBoundary (   self)

Builds new boundary in the currently displayed window.

Here is the call graph for this function:
Here is the caller graph for this function:

§ changeZoom()

def agroeyepy.View.viewarea.ViewArea.changeZoom (   self,
  lineEdit = None,
  expression = None 
)

Does everything connected with change zoom.

Parameters
lineEditParameter send if rescale was caused by typing value on keyboard
expressionParameter send if rescale was caused by selecting value from QComboBox
Here is the call graph for this function:

§ checkComboBoxValues()

def agroeyepy.View.viewarea.ViewArea.checkComboBoxValues (   self,
  args,
  kwargs 
)

Simply styling line with editing EPSG code.

When background is yellow it means that more digits are required, When background is green the number of digits is satisfactory Red background never appears because right format of characters is imposed by Regular Expression Validator

Here is the caller graph for this function:

§ chooseEPSG()

def agroeyepy.View.viewarea.ViewArea.chooseEPSG (   self,
  newIndex,
  combobox,
  isTemp = False 
)

Choose EPSG code.

User can choose EPSG code from list or enter new EPSG Code. If user EPSG Code is valid, new code is add to list.

Parameters
newIndexIndex of EPSG code list
comboboxGiven QComboBox widget as a instance of a QComboBox class from PyQt
Here is the call graph for this function:

§ clearScene()

def agroeyepy.View.viewarea.ViewArea.clearScene (   self)

Clears the scene in order to create space for new elements after for example resizing, zooming, adding new layer or removing it.

Here is the caller graph for this function:

§ contextMenuEvent()

def agroeyepy.View.viewarea.ViewArea.contextMenuEvent (   self,
  event 
)

Creates context menu if right mouse button clicked inside the view area.

Here is the call graph for this function:

§ convertLayersToData()

def agroeyepy.View.viewarea.ViewArea.convertLayersToData (   self,
  fileListVisible,
  fileListAll 
)

Set parameters of views, run thread for all loaded files.

Returns nothing.

Parameters
fileListList of all loaded files

§ epsgChanged()

def agroeyepy.View.viewarea.ViewArea.epsgChanged (   self,
  newIndex,
  combobox = False,
  setupMain = False 
)

Set EPSG code to Raster.

Parameters
newIndexIndex of chosen EPSG code
comboboxGiven QComboBox widget as a instance of a QComboBox class from PyQt
Here is the caller graph for this function:

§ fromPixelsToCoordinates()

def agroeyepy.View.viewarea.ViewArea.fromPixelsToCoordinates (   self,
  qPoint 
)

Re-Calculates point coordinates from pixel into Geo-Coordinates.

Parameters
qPointGiven point as a instance of a QPoint class from PyQt
Returns
Returns a point with geo-coordinates, instance of ogr.Point Class

§ getFileName()

def agroeyepy.View.viewarea.ViewArea.getFileName (   self,
  path 
)

§ getMouseCoordinates()

def agroeyepy.View.viewarea.ViewArea.getMouseCoordinates (   self,
  qPoint 
)

Converts pixel coordinates into physical coordinates in the terrain.

Parameters
qPointPair of coordinates of pixel under current position of mouse
Returns
Emits signal with terrain coordinates of mouse
Here is the caller graph for this function:

§ getVisibleLayers()

def agroeyepy.View.viewarea.ViewArea.getVisibleLayers (   self)
Here is the caller graph for this function:

§ mouseDoubleClickEvent()

def agroeyepy.View.viewarea.ViewArea.mouseDoubleClickEvent (   self,
  event 
)

§ mouseMoveEvent()

def agroeyepy.View.viewarea.ViewArea.mouseMoveEvent (   self,
  event 
)

Changes the coordinates in the main window if the mouse moves over the view area or moves layers if the middle button was pressed or proper tool was selected.

Parameters
eventMouse event
Here is the call graph for this function:

§ mousePressEvent()

def agroeyepy.View.viewarea.ViewArea.mousePressEvent (   self,
  event 
)

§ mouseReleaseEvent()

def agroeyepy.View.viewarea.ViewArea.mouseReleaseEvent (   self,
  event 
)

Finishes moving layers triggering shift.

Parameters
eventMouse event
Here is the call graph for this function:

§ newSceneParameters()

def agroeyepy.View.viewarea.ViewArea.newSceneParameters (   self,
  event 
)

Calculates new width and height of View Scene.

Parameters
eventEvent causes changes

§ panActionToggled()

def agroeyepy.View.viewarea.ViewArea.panActionToggled (   self,
  isToogled 
)

§ projectionFromFirst()

def agroeyepy.View.viewarea.ViewArea.projectionFromFirst (   self)

§ properties()

def agroeyepy.View.viewarea.ViewArea.properties (   self)

§ rescale()

def agroeyepy.View.viewarea.ViewArea.rescale (   self,
  scale 
)

§ resizeEvent()

def agroeyepy.View.viewarea.ViewArea.resizeEvent (   self,
  event 
)
Parameters
eventSets new value of view area after every resizing
Here is the call graph for this function:

§ revertCoordinates()

def agroeyepy.View.viewarea.ViewArea.revertCoordinates (   self,
  xReal,
  yReal 
)

§ setNoStyleZoomComboBox()

def agroeyepy.View.viewarea.ViewArea.setNoStyleZoomComboBox (   self,
  index 
)

§ setUpEPSG()

def agroeyepy.View.viewarea.ViewArea.setUpEPSG (   self,
  combobox,
  code 
)
Here is the caller graph for this function:

§ setupViewAreaParameters()

def agroeyepy.View.viewarea.ViewArea.setupViewAreaParameters (   self,
  file = None,
  fullExtent = False 
)

Setup ViewArea parameters such as: projection EPSG, size of ViewScene, coordinates of center.

Parameters
fileRequired parameters are set up from provided file, raster and vector are possible.
Here is the call graph for this function:
Here is the caller graph for this function:

§ setZoomComboBoxValue()

def agroeyepy.View.viewarea.ViewArea.setZoomComboBoxValue (   self,
  scaleNominator 
)
Here is the caller graph for this function:

§ setZoomWheelScrollFactor()

def agroeyepy.View.viewarea.ViewArea.setZoomWheelScrollFactor (   self,
  valueIn 
)

Changes the strength of the zoom.

Parameters
valueInParameter for changes

§ transformCoordinates()

def agroeyepy.View.viewarea.ViewArea.transformCoordinates (   self,
  oldProj4,
  xCoord,
  yCooord 
)

§ updateUI()

def agroeyepy.View.viewarea.ViewArea.updateUI (   self)
Here is the caller graph for this function:

§ wheelEvent()

def agroeyepy.View.viewarea.ViewArea.wheelEvent (   self,
  event 
)

Examines what type of mouse wheel event has just occured.

Overrides the default method.

Parameters
eventScrolling the mouse wheel triggers this event
Here is the call graph for this function:

§ zoomIn()

def agroeyepy.View.viewarea.ViewArea.zoomIn (   self,
  event = None,
  delta = 120 
)
if event is not None:
    mousePos = self.mapFromGlobal(event.globalPos())
    self.centralPaintPoint = self.fromPixelsToCoordinates(mousePos)
Here is the call graph for this function:
Here is the caller graph for this function:

§ zoomOut()

def agroeyepy.View.viewarea.ViewArea.zoomOut (   self,
  event = None,
  delta = -120 
)
if event is not None:
    mousePos = self.mapFromGlobal(event.globalPos())
    self.centralPaintPoint = self.fromPixelsToCoordinates(mousePos)
Here is the call graph for this function:
Here is the caller graph for this function:

§ zoomTyped()

def agroeyepy.View.viewarea.ViewArea.zoomTyped (   self,
  textTyped,
  combobox 
)
Here is the call graph for this function:

Member Data Documentation

§ centralPaintPoint

agroeyepy.View.viewarea.ViewArea.centralPaintPoint

§ comboIndexEpsg

def agroeyepy.View.viewarea.ViewArea.comboIndexEpsg

Dictionary with current used EPSG code, show in viewerApplication.coordinateSystemComboBox.

§ EPSG2Name

def agroeyepy.View.viewarea.ViewArea.EPSG2Name

Dictionary with all EPSG (by name)

§ EPSG2Proj4

def agroeyepy.View.viewarea.ViewArea.EPSG2Proj4

Dictionary with all EPSG (by Proj4)

§ factor

agroeyepy.View.viewarea.ViewArea.factor
if event is not None:
    mousePos = self.mapFromGlobal(event.globalPos())
    self.centralPaintPoint = self.fromPixelsToCoordinates(mousePos)

§ files

agroeyepy.View.viewarea.ViewArea.files

Set parameters of views, run thread for all loaded files.

Returns nothing.

Parameters
fileListList of all loaded files

§ filesAll

agroeyepy.View.viewarea.ViewArea.filesAll

§ getDataThread

agroeyepy.View.viewarea.ViewArea.getDataThread

§ getImageList

agroeyepy.View.viewarea.ViewArea.getImageList

§ mem_drv

agroeyepy.View.viewarea.ViewArea.mem_drv

§ movePressed

def agroeyepy.View.viewarea.ViewArea.movePressed

Finishes moving layers triggering shift.

flag checking whether shifting button is pressed or not

Parameters
eventMouse event

§ offset

def agroeyepy.View.viewarea.ViewArea.offset

Pixel coordinates indicate upper left corner whereas geographic coordinates indicates center position of center of pix.

§ paintSize

def agroeyepy.View.viewarea.ViewArea.paintSize

Size of the displaying widget.

Parameters
eventSets new value of view area after every resizing

§ panActionActive

agroeyepy.View.viewarea.ViewArea.panActionActive

§ parent

agroeyepy.View.viewarea.ViewArea.parent

§ pixSize

def agroeyepy.View.viewarea.ViewArea.pixSize

Does everything connected with change zoom.

Current size of the graphics pix in meters.

Parameters
lineEditParameter send if rescale was caused by typing value on keyboard
expressionParameter send if rescale was caused by selecting value from QComboBox

§ pressed

agroeyepy.View.viewarea.ViewArea.pressed

§ projectionEPSG

def agroeyepy.View.viewarea.ViewArea.projectionEPSG

EPGS of showed files.

§ projectionFirst

agroeyepy.View.viewarea.ViewArea.projectionFirst

Set EPSG code to Raster.

Parameters
newIndexIndex of chosen EPSG code
comboboxGiven QComboBox widget as a instance of a QComboBox class from PyQt

§ ratio

def agroeyepy.View.viewarea.ViewArea.ratio

Coefficient to convert file pix size into graphics scene size.

§ ratioHeight

agroeyepy.View.viewarea.ViewArea.ratioHeight

§ ratioWidth

agroeyepy.View.viewarea.ViewArea.ratioWidth

§ scaleNominator

agroeyepy.View.viewarea.ViewArea.scaleNominator

§ scene

agroeyepy.View.viewarea.ViewArea.scene

Clears the scene in order to create space for new elements after for example resizing, zooming, adding new layer or removing it.

§ sceneHeight

agroeyepy.View.viewarea.ViewArea.sceneHeight

§ sceneWidth

agroeyepy.View.viewarea.ViewArea.sceneWidth

Setup ViewArea parameters such as: projection EPSG, size of ViewScene, coordinates of center.

Parameters
fileRequired parameters are set up from provided file, raster and vector are possible.

§ startPosition

def agroeyepy.View.viewarea.ViewArea.startPosition

Changes the coordinates in the main window if the mouse moves over the view area or moves layers if the middle button was pressed or proper tool was selected.

Cooridnates of the position of the beginning of the movement.

Parameters
eventMouse event

§ stretchClass

agroeyepy.View.viewarea.ViewArea.stretchClass

§ svgWidget

agroeyepy.View.viewarea.ViewArea.svgWidget

Add loaded files to view as QGraphicsPixmapItem.

Parameters
params0 - list of raster data; 1 - list of vector data;

§ thread

agroeyepy.View.viewarea.ViewArea.thread

§ transformation

agroeyepy.View.viewarea.ViewArea.transformation

§ vectorColorIn

agroeyepy.View.viewarea.ViewArea.vectorColorIn

§ vectorFillStyle

agroeyepy.View.viewarea.ViewArea.vectorFillStyle

§ vectorLineStyle

agroeyepy.View.viewarea.ViewArea.vectorLineStyle

§ vectorOpacity

agroeyepy.View.viewarea.ViewArea.vectorOpacity

§ vectorPixSize

agroeyepy.View.viewarea.ViewArea.vectorPixSize

§ vectorSymbolStyle

agroeyepy.View.viewarea.ViewArea.vectorSymbolStyle

§ viewAreaAsRaster

agroeyepy.View.viewarea.ViewArea.viewAreaAsRaster

Builds new boundary in the currently displayed window.

§ viewAreaGeoMatrix

agroeyepy.View.viewarea.ViewArea.viewAreaGeoMatrix

§ viewAreaProj4

agroeyepy.View.viewarea.ViewArea.viewAreaProj4

§ viewAreaSpatialReference

agroeyepy.View.viewarea.ViewArea.viewAreaSpatialReference

§ viewBoundary

agroeyepy.View.viewarea.ViewArea.viewBoundary

§ wheelScrollZoomFactor

agroeyepy.View.viewarea.ViewArea.wheelScrollZoomFactor

Changes the strength of the zoom.

Parameters
valueInParameter for changes

§ zoomObject

agroeyepy.View.viewarea.ViewArea.zoomObject

§ zoomThread

agroeyepy.View.viewarea.ViewArea.zoomThread

The documentation for this class was generated from the following file: