Example #1
0
    def __init__(self,parent,socialtenure):
        QDialog.__init__(self,parent)
        self.setupUi(self)
        
        self.socialtenure = socialtenure  
        
        #GUI initialization
        self.initGui()   
        
        #Load STR info
        loadComboSelections(self.cboSTRType, CheckSocialTenureRelationship)
        setComboCurrentIndexWithItemData(self.cboSTRType,socialtenure.SocialTenureType)
        
        if socialtenure.AgreementAvailable:
            self.chkSTRAgreement.setChecked(True)        

        #Setup notification 
        self.notifBar = NotificationBar(self.vlNotification)   
        
        #Setup dirty state control monitor
        self._strDirtMonitor = ControlDirtyTrackerCollection()
        #Register controls for monitoring dirty state
        self._strDirtMonitor.addControl(self.cboSTRType)
        self._strDirtMonitor.addControl(self.chkSTRAgreement)   
        
        '''
        Flag for saving or updating the respondent on hitting enter. 
        This is useful for situations where you wish to defer saving
        or updating to be handled by another control.
        '''   
        self.saveUpdateOnEnter = True
Example #2
0
 def setValue(self,value):
     setComboCurrentIndexWithItemData(self.control,value)
Example #3
0
 def setValue(self, value):
     setComboCurrentIndexWithItemData(self.control, value)
 def _set_graph_properties(self, config):
     #Set the general graph properties from the config object
     self.txt_plot_title.setText(config.title())
     self.gb_legend.setChecked(config.insert_legend())
     setComboCurrentIndexWithItemData(self.cbo_legend_pos,
                                      config.legend_position())