Skip to content

Commit

Permalink
Merge pull request #192 from SPlanzer/master
Browse files Browse the repository at this point in the history
1.0.1
  • Loading branch information
Simon Planzer authored Nov 2, 2016
2 parents 2d5dbe7 + dfb328f commit dd04fe1
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 57 deletions.
2 changes: 1 addition & 1 deletion AimsUI/AimsClient/Gui/DictionaryList.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

from PyQt4.QtCore import *
from PyQt4.QtGui import *
from qgis.core import * # temp for testing
from qgis.core import *

# DictionaryListView and DictionaryListModel.

Expand Down
9 changes: 1 addition & 8 deletions AimsUI/AimsClient/Gui/QueueEditorWidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,7 @@ def __init__( self, parent=None, controller=None ):
hide = (self.uExternalObjectId, self.uExtObjectIdScheme,
self.lExtObjectIdScheme, self.lExternalObjectId
)

""" self.uObjectType, self.uObjectName, self.uPositionType, self.uUpdatePosButton
, self.uExtObjectIdScheme, self.uExternalObjectId, self.uValuationReference
, self.uCertificateOfTitle, self.uAppellation, self.uMblkOverride
"""


for uiElement in hide:
uiElement.hide()

Expand Down Expand Up @@ -161,8 +156,6 @@ def reinstateEdits(self):
elif isinstance(getattr(self, uiElement), QComboBox) and getattr(self, v[0]):
getattr(self, uiElement).setCurrentIndex(QComboBox.findText(getattr(self, uiElement),getattr(self, v[0])))


#uiElement.setCurrentIndex(QComboBox.findText(uiElement, prop))
def clearEdits(self):
"""
set all temp properties to None
Expand Down
2 changes: 1 addition & 1 deletion AimsUI/AimsClient/Gui/QueueModelView.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ def __init__(self, data = None, featureModel = None, headerdata = None, parent=N
@type headerdata: list
@param parent: Inherits from QtGui.QWidget
"""

QAbstractTableModel.__init__(self, parent)
self.dummyData = {('','', '', '', ''): [['', '', '', '', '']]}
if not data: data = self.dummyData
Expand Down
6 changes: 3 additions & 3 deletions AimsUI/AimsClient/Gui/ReviewQueueWidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

from AIMSDataManager.AimsLogging import Logger

import sys # temp
import sys # temp - debugging

# Dev only - debugging
try:
Expand Down Expand Up @@ -182,7 +182,7 @@ def reinstateSelection(self):
self.uQueueEditor.clearForm()


def singleReviewObj(self, feedType, objKey): # can the below replace this?
def singleReviewObj(self, feedType, objKey):
"""
Return either single or group
review object as per supplied key
Expand Down Expand Up @@ -439,7 +439,7 @@ def display(self):

if self.currentFeatureKey:
coords = self.uidm.reviewItemCoords(self.currentGroup, self.currentFeatureKey)
if self.currentAdrCoord == coords:
if self.currentAdrCoord == coords or not coords:
return
self.currentAdrCoord = coords
buffer = .00100
Expand Down
22 changes: 12 additions & 10 deletions AimsUI/AimsClient/Gui/UiDataManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def register(self, observer):
self._observers.append(observer)

@pyqtSlot()
def dataUpdated(self, data, feedType = FEEDS['AR']):
def dataUpdated(self, data = None, feedType = FEEDS['AR']):
"""
Slot communicated to when Review data changed. Updates review layer and table data
Expand All @@ -123,9 +123,7 @@ def dataUpdated(self, data, feedType = FEEDS['AR']):
@param feedType: Type of AIMS API feed
@type feedType: AIMSDataManager.FeatureFactory.FeedRef
"""

uilog.info("Signal Recieved")
if data is None: return

self.setData(data,feedType)
for observer in self._observers:
observer.notify(feedType)
Expand Down Expand Up @@ -166,12 +164,14 @@ def keyData(self, listofFeatures, feedtype):
@param feedType: Type of AIMS API feed
@type feedType: AIMSDataManager.FeatureFactory.FeedRef
"""

if listofFeatures:

### was if listofFeatures: but stop the queue being emptied to None
if listofFeatures or listofFeatures == []:
li = []
keyId = self.idProperty(feedtype)
li = dict((getattr(feat, keyId), feat) for feat in listofFeatures)
self.data[feedtype] = li

# [GroupKey:{AdKey:}]
if feedtype == FEEDS['GR']:
# key group objects
Expand All @@ -188,7 +188,7 @@ def setData(self, dataRefresh, FeedType):
@param feedType: Type of AIMS API feed
@type feedType: AIMSDataManager.FeatureFactory.FeedRef
"""

self.keyData(dataRefresh, FeedType)

def updateRdata(self, respFeature, feedType):
Expand Down Expand Up @@ -773,14 +773,14 @@ def compareData(self):
If the is change update the UIDatamanager data
"""

for k , v in self.data.items():
if v and self.previousData[k] != v:
for k , v in self.data.items():
if self.previousData[k] != v:
self.emit(SIGNAL('dataChanged'), v, k)
self.previousData = self.data

def run(self):
"""
Check for change on the DMData data
Check for change in the DM data
"""

while True:
Expand Down Expand Up @@ -848,4 +848,6 @@ def observe(self,observable,*args,**kwargs):

uilog.info('*** NOTIFY *** Notify A[{}]'.format(observable))
setattr(self.DMData, self.feedData.get(fType),data)



2 changes: 1 addition & 1 deletion AimsUI/AimsClient/Gui/UiUtility.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
################################################################################
#
# Copyright 2015 Crown copyright (c)
# Copyright 2016 Crown copyright (c)
# Land Information New Zealand and the New Zealand Government.
# All rights reserved
#
Expand Down
2 changes: 1 addition & 1 deletion AimsUI/DelAddressTool.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def selectionToRetirementJson(self, selected):
retireIds = {}
retireIds['version'] = i['version']
retireIds['components'] = {'addressId': i['addressId']}
retireIds['address'] = i['fullAddress'] #this data not required by the API but useful for error reporting
retireIds['address'] = i['fullAddress']
retireFeatures.append(retireIds)
return retireFeatures

Expand Down
4 changes: 2 additions & 2 deletions AimsUI/LayerManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ def installRefLayers(self):
AND toc_code = 'PRIM'""",
'Parcels' ) ,

#'lpr':( 'lpr', 'bde', 'parcel_labels_mview', 'id', True, "",'Parcels (Labels)' ) ,
#'lpr':( 'lpr', 'admin_bdys', 'parcel_labels_mview', 'id', True, "",'Parcels (Labels)' ) ,

'rcl':( 'rcl', 'roads', 'simple_road_name_view', 'gid', True, "",'Roads' ),

Expand Down Expand Up @@ -521,7 +521,7 @@ def notify(self, feedType):
@param feedType: Type of AIMS API
@type feedType: AIMSDataManager.FeatureFactory.FeedRef
"""

uilog.info('*** NOTIFY *** Notify A[{}]'.format(feedType))
if feedType == FEEDS['AF']:
self.getAimsFeatures()
Expand Down
6 changes: 5 additions & 1 deletion AimsUI/LineageTool.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
#
################################################################################

# Removed from "go live" schedule

"""
from PyQt4.QtCore import *
from PyQt4.QtGui import *
Expand Down Expand Up @@ -148,4 +152,4 @@ def groupIdChanged(self):
if len(self.uGroupId.text()) != 0:
self.uGroupDescription.setEnabled(False)
else: self.uGroupDescription.setEnabled(True)
"""
28 changes: 2 additions & 26 deletions AimsUI/styles/lpr_style.qml
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,10 @@
<edittype widgetv2type="TextEdit" name="appellation">
<widgetv2config IsMultiline="0" fieldEditable="1" UseHtml="0" labelOnTop="0"/>
</edittype>
<edittype widgetv2type="TextEdit" name="affected_surveys">
<widgetv2config IsMultiline="0" fieldEditable="1" UseHtml="0" labelOnTop="0"/>
</edittype>
<edittype widgetv2type="TextEdit" name="parcel_intent">
<widgetv2config IsMultiline="0" fieldEditable="1" UseHtml="0" labelOnTop="0"/>
</edittype>
<edittype widgetv2type="TextEdit" name="topology_type">
<widgetv2config IsMultiline="0" fieldEditable="1" UseHtml="0" labelOnTop="0"/>
</edittype>
<edittype widgetv2type="TextEdit" name="statutory_actions">
<widgetv2config IsMultiline="0" fieldEditable="1" UseHtml="0" labelOnTop="0"/>
</edittype>
<edittype widgetv2type="TextEdit" name="land_district">
<widgetv2config IsMultiline="0" fieldEditable="1" UseHtml="0" labelOnTop="0"/>
</edittype>
<edittype widgetv2type="TextEdit" name="titles">
<widgetv2config IsMultiline="0" fieldEditable="1" UseHtml="0" labelOnTop="0"/>
</edittype>
<edittype widgetv2type="TextEdit" name="survey_area">
<widgetv2config IsMultiline="0" fieldEditable="1" UseHtml="0" labelOnTop="0"/>
</edittype>
<edittype widgetv2type="TextEdit" name="calc_area">
<widgetv2config IsMultiline="0" fieldEditable="1" UseHtml="0" labelOnTop="0"/>
</edittype>
</edittypes>
<renderer-v2 symbollevels="0" type="RuleRenderer">
<rules key="{82d4af77-548f-4edc-8573-82ad95044023}">
<rule checkstate="0" filter=" &quot;parcel_intent&quot; not in ('Road', 'Railway', 'Hydro')" key="{fa341051-8aae-45fe-952d-5f72fa479e5a}" symbol="0" label="Land"/>
<rules key="{2aa3fd36-1641-48de-b3ca-8a3689b71028}">
<rule checkstate="0" filter=" &quot;appellation&quot; IS NOT NULL" key="{383cd0c4-ecea-4261-8ea8-408ab689886b}" symbol="0" label="Appellation"/>
</rules>
<symbols>
<symbol alpha="0.0980392" type="fill" name="0">
Expand Down
6 changes: 3 additions & 3 deletions metadata.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
################################################################################
#
# Copyright 2015 Crown copyright (c)
# Copyright 2016 Crown copyright (c)
# Land Information New Zealand and the New Zealand Government.
# All rights reserved
#
Expand All @@ -14,10 +14,10 @@ name=Aims Plugin
description=QGIS Plugin for managing LINZ address information
about=QGIS Plugin for managing LINZ address information
category=Vector
version=0.8.24
version=1.0.1
experimental=True
qgisMinimumVersion=2.6
author=splanzer
author=LINZ
email=splanzer@linz.govt.nz
icon=./resources/loadaddress.png
homepage=https://github.com/linz/QGIS-AIMS-Plugin
Expand Down

0 comments on commit dd04fe1

Please sign in to comment.