示例#1
0
def delete(signame,self,num):
   entries=getInfo.getinfo(fileName())
   quit_messge='Are you sure you want to delete '+signame
   reply=QtGui.QMessageBox.question(self, 'Warning: altering varDB', quit_messge, QtGui.QMessageBox.Yes, QtGui.QMessageBox.No)
   if reply == QtGui.QMessageBox.Yes:
      from addSignal import addsignal
      from radioClickEvent import lookingAt
      from radioClickEvent import clearRightInfoHub
      clearRightInfoHub()
      #lookingAt(-1,self)
      addsignal(signame,self,num,{'action':'delete'})
示例#2
0
def saveChanges(self,headers,num):
   global bools
   global rightInfoHub
   if bools==True:
      from addSignal import addsignal
      bools=False
      reply=QtGui.QMessageBox.question(self, 'Save Changes?', 'Save these changes to '+rightInfoHub['textBoxes']['name'].text()+'?', QtGui.QMessageBox.Yes, QtGui.QMessageBox.No)
      if reply==QtGui.QMessageBox.Yes:
        i=1

        headers=getInfo.getDictionary(fileName())
        #Get new information from text boxes
        signalist=[[]]
        signalist[0]=['name',signalSet(self,'name')]
        while i<len(headers):

           #signalist is of the form [ [attribute name, attribute text] * N]
           signalist.append([headers[i],signalSet(self,headers[i])])
           i+=1
                
             #Uses new information to replace previous information.
             #If entry with desired name exists, new entry is created
        addsignal(signalist,self,num,{'action':'edit'})
示例#3
0
def rematt(num,signal,att,friend,self,sure):
    from addSignal import addsignal
    if sure==True:
       addsignal([signal,att],friend,num,{'action':'remove attribute'})
    self.hide()
示例#4
0
def combo_chosen(self,friend,text,var,sig,adding):
    from addSignal import addsignal
    if adding==True:
       addsignal([sig,var,str(text)],friend,-1,{'action':'new attribute'})
    self.hide()