예제 #1
0
    def __init__(self, iface, layerManager, controller):
        """
        Intialise Move Address Tool
        
        @param iface: QgisInterface Abstract base class defining interfaces exposed by QgisApp  
        @type iface: Qgisinterface Object
        @param layerManager: Plugins layer manager
        @type  layerManager: AimsUI.LayerManager()
        @param controller: Instance of the plugins controller
        @type  controller: AimsUI.AimsClient.Gui.Controller()
        """

        QgsMapToolIdentify.__init__(self, iface.mapCanvas())
        self._iface = iface
        self._canvas = iface.mapCanvas()
        self._layers = layerManager
        self._controller = controller
        self.RespHandler = ResponseHandler(self._iface, self._controller.uidm)
        self.highlighter = self._controller.highlighter
        self.afc = {
            ft: AddressFactory.getInstance(FEEDS['AC'])
            for ft in FeedType.reverse
        }
        self.aff = FeatureFactory.getInstance(
            FeedRef(FeatureType.ADDRESS, FeedType.FEATURES))
        self._features = []
        self._sb = self._iface.mainWindow().statusBar()
        self.activate()
예제 #2
0
    def __init__(self, controller=None):
        """
        Make form button and input field connections
        
        @param controller: instance of the plugins controller
        @type  controller: AimsUI.AimsClient.Gui.Controller
        """

        QWidget.__init__(self)
        self.setupUi(self)

        getRclIcon = QIcon()
        getRclIcon.addPixmap(
            QPixmap(":/plugins/QGIS-AIMS-Plugin/resources/selectrcl.png"),
            QIcon.Normal, QIcon.On)
        self.uGetRclToolButton.setIcon(getRclIcon)

        self.setController(controller)
        self._iface = self._controller.iface
        self._layerManager = self._controller._layerManager
        self.highlight = self._controller.highlighter
        self.coords = None
        self.feature = None

        #         # Val Ref, Cert Title and App have been temp taken out of scope
        hide = (self.uExternalObjectId, self.uExtObjectIdScheme,
                self.lExtObjectIdScheme, self.lExternalObjectId)
        for uiElement in hide:
            uiElement.hide()

        self.wAddObj.hide()

        # Make connections
        self.uAddressType.currentIndexChanged.connect(self.setEditability)
        self.buttonAO.clicked.connect(self.showAddObj)
        # connect dynamic address splitter components
        self.uFullNum.textEdited.connect(self.fullNumChanged)

        partComponents = (self.uPrefix, self.uUnit, self.uBase, self.uBase,
                          self.uHigh, self.uAlpha)

        for com in partComponents:
            com.textEdited.connect(self.partNumChanged)

        self.uSubmitAddressButton.clicked.connect(self.submitAddress)
        self.uAbort.clicked.connect(self.closeDlg)
        self.uGetRclToolButton.clicked.connect(self.getRcl)
        self.af = {
            ft: FeatureFactory.getInstance(FEEDS['AC'])
            for ft in FeedType.reverse
        }

        # limit user inputs
        UiUtility.formMask(self)
        # set combo box defaults
        UiUtility.setFormCombos(self)
        # set addressType to trigger currentIndexChanged
        self.uAddressType.setCurrentIndex(
            QComboBox.findText(self.uAddressType, 'Road'))
    def __init__(self, controller = None):
        """
        Make form button and input field connections
        
        @param controller: instance of the plugins controller
        @type  controller: AimsUI.AimsClient.Gui.Controller
        """
        
        QWidget.__init__( self )
        self.setupUi(self)
        
        getRclIcon = QIcon()
        getRclIcon.addPixmap(QPixmap(":/plugins/QGIS-AIMS-Plugin/resources/selectrcl.png"), QIcon.Normal, QIcon.On)
        self.uGetRclToolButton.setIcon(getRclIcon)
        
        self.setController( controller )
        self._iface = self._controller.iface
        self._layerManager = self._controller._layerManager
        self.highlight = self._controller.highlighter
        self.coords = None
        self.feature = None
        
#         # Val Ref, Cert Title and App have been temp taken out of scope
        hide = (self.uExternalObjectId, self.uExtObjectIdScheme, 
                 self.lExtObjectIdScheme,  self.lExternalObjectId)
        for uiElement in hide:
            uiElement.hide()
            
        self.wAddObj.hide()
        
        # Make connections
        self.uAddressType.currentIndexChanged.connect(self.setEditability)
        self.buttonAO.clicked.connect(self.showAddObj)
        # connect dynamic address splitter components 
        self.uFullNum.textEdited.connect(self.fullNumChanged)
        
        partComponents = (self.uPrefix,self.uUnit, self.uBase, 
                          self.uBase, self.uHigh, self.uAlpha )
        
        for com in partComponents:
            com.textEdited.connect(self.partNumChanged)
         
        self.uSubmitAddressButton.clicked.connect(self.submitAddress)
        self.uAbort.clicked.connect(self.closeDlg)
        self.uGetRclToolButton.clicked.connect(self.getRcl)
        self.af = {ft:FeatureFactory.getInstance(FEEDS['AC']) for ft in FeedType.reverse}  
         
        # limit user inputs
        UiUtility.formMask(self)
        # set combo box defaults
        UiUtility.setFormCombos(self)
        # set addressType to trigger currentIndexChanged
        self.uAddressType.setCurrentIndex(QComboBox.findText(self.uAddressType,'Road'))
    def __init__(self, iface, layerManager, controller=None):
        """
        Intialise New Address Tool
        
        @param iface: QgisInterface Abstract base class defining interfaces exposed by QgisApp  
        @type iface: Qgisinterface Object
        @param layerManager: Plugins layer manager
        @type  layerManager: AimsUI.LayerManager()
        @param controller: Instance of the plugins controller
        @type  controller: AimsUI.AimsClient.Gui.Controller()
        """

        QgsMapToolIdentify.__init__(self, iface.mapCanvas())
        self._iface = iface
        self._layers = layerManager
        self._controller = controller
        self.highlight = self._controller.highlighter
        self._canvas = iface.mapCanvas()
        self.af = FeatureFactory.getInstance(FEEDS['AC'])
        self.activate()
 def __init__(self, iface, layerManager, controller=None):
     """
     Intialise New Address Tool
     
     @param iface: QgisInterface Abstract base class defining interfaces exposed by QgisApp  
     @type iface: Qgisinterface Object
     @param layerManager: Plugins layer manager
     @type  layerManager: AimsUI.LayerManager()
     @param controller: Instance of the plugins controller
     @type  controller: AimsUI.AimsClient.Gui.Controller()
     """
         
     QgsMapToolIdentify.__init__(self, iface.mapCanvas())
     self._iface = iface
     self._layers = layerManager        
     self._controller = controller
     self.highlight = self._controller.highlighter
     self._canvas = iface.mapCanvas()
     self.af = FeatureFactory.getInstance(FEEDS['AC'])
     self.activate()