def __init__( self, parent, feature, layerManager, controller):
     QDialog.__init__( self, parent )  
     self.setupUi(self)
     self.iface = iface
     self.feature = feature
     self._layerManager = layerManager
     self._controller = controller
     
     # limit user inputs
     UiUtility.formMask(self)
     # set combo box defaults
     UiUtility.setFormCombos(self)
     
     self.uSubmitAddressButton.clicked.connect(self.submitAddress)
     self.uAbort.clicked.connect(self.closeDlg)
     self.rejected.connect(self.closeDlg)
     self.uFullNum.textEdited.connect(self.fullNumChanged)   
     self.uPrefix.textEdited.connect(self.partNumChanged)
     self.uUnit.textEdited.connect(self.partNumChanged)
     self.uBase.textEdited.connect(self.partNumChanged)
     self.uHigh.textEdited.connect(self.partNumChanged)
     self.uAlpha.textEdited.connect(self.partNumChanged)
     self.uGetRclToolButton.clicked.connect(self.getRcl)     
     # set forms feature values
     UiUtility.addObjToForm(self, self.feature)                   
     self.show()
Ejemplo n.º 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'))
Ejemplo n.º 3
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, parent=None, controller=None):
        """
        Intialise Queue Feature UI components
        """

        QWidget.__init__(self, parent)
        self.setupUi(self)

        #icons for buttons
        moveIcon = QIcon()
        moveIcon.addPixmap(
            QPixmap(":/plugins/QGIS-AIMS-Plugin/resources/moveaddress.png"),
            QIcon.Normal, QIcon.On)
        self.uUpdatePosButton.setIcon(moveIcon)

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

        self.feature = None
        self.featureId = None
        UiUtility.setFormCombos(self)
        self.uGetRclToolButton.clicked.connect(self.getRcl)
        self.uUpdatePosButton.clicked.connect(self.updatePosition)
        self.setController(controller)
        self.uAddressType.currentIndexChanged.connect(self.setEditability)
        self.setStyle()

        # limit user inputs
        UiUtility.formMask(self)

        #Ext Object temp taken out of scope
        hide = (self.uExternalObjectId, self.uExtObjectIdScheme,
                self.lExtObjectIdScheme, self.lExternalObjectId)

        for uiElement in hide:
            uiElement.hide()

        # connect all editing ui elements to
        for uiElement, v in UiUtility.uiObjMappings.iteritems():
            if isinstance(getattr(self, uiElement), QLineEdit):
                getattr(self,
                        uiElement).textEdited.connect(getattr(self, v[1]))
            elif isinstance(getattr(self, uiElement), QComboBox):
                getattr(self, uiElement).activated.connect(getattr(self, v[1]))
Ejemplo n.º 5
0
 def __init__( self, parent=None, controller=None ):
     """
     Intialise Queue Feature UI components
     """
     
     QWidget.__init__( self, parent )
     self.setupUi(self)
     
     #icons for buttons
     moveIcon = QIcon()
     moveIcon.addPixmap(QPixmap(":/plugins/QGIS-AIMS-Plugin/resources/moveaddress.png"), QIcon.Normal, QIcon.On)
     self.uUpdatePosButton.setIcon(moveIcon)
     
     getRclIcon = QIcon()
     getRclIcon.addPixmap(QPixmap(":/plugins/QGIS-AIMS-Plugin/resources/selectrcl.png"), QIcon.Normal, QIcon.On)
     self.uGetRclToolButton.setIcon(getRclIcon)
     
     self.feature = None
     self.featureId = None
     UiUtility.setFormCombos(self)
     self.uGetRclToolButton.clicked.connect(self.getRcl)      
     self.uUpdatePosButton.clicked.connect(self.updatePosition)     
     self.setController(controller)
     self.uAddressType.currentIndexChanged.connect(self.setEditability)
     self.setStyle()
     
     # limit user inputs
     UiUtility.formMask(self)
     
     #Ext Object temp taken out of scope
     hide = (self.uExternalObjectId, self.uExtObjectIdScheme, 
              self.lExtObjectIdScheme,  self.lExternalObjectId
              )
            
     for uiElement in hide:
         uiElement.hide()
     
     # connect all editing ui elements to 
     for uiElement, v in UiUtility.uiObjMappings.iteritems():    
         if isinstance(getattr(self, uiElement), QLineEdit):
             getattr(self, uiElement).textEdited.connect(getattr(self, v[1]))
         elif isinstance(getattr(self, uiElement), QComboBox):
             getattr(self, uiElement).activated.connect(getattr(self, v[1]))