Ejemplo n.º 1
0
    def on_finish(self, finishedint):
        if self.currentPage() != self.ui.wizardPage_end:
            #there has been an error
            return

        if self.ui.checkBox_open.isChecked():
            Tomb.open(self.ui.lineEdit_tombpath.text(), self._keyloc())
Ejemplo n.º 2
0
 def nextId(self):
     '''Virtual method reimplemented to decide next page'''
     if self.ui.fs.isChecked():
         keyfile = QtGui.QFileDialog.getOpenFileName(self.wizard(), 'Key file',
                 filter="Tomb keys (*.tomb.key);;Buried keys (*.jpeg)")
         if keyfile:
             #TODO: check if this really is a success :)
             if Tomb.open(self.wizard().get_tombfile(), keyfile): #bugs when wrong password
                 return TombOpenWizard.SUCCESS_PAGE
             #else: #TODO: should alert the user that we failed
         return TombOpenWizard.METHOD_PAGE
     if self.ui.usb.isChecked():
         return TombOpenWizard.USB_PAGE
     print self.group.checkedButton().property('path').toPyObject()
     return TombOpenWizard.SUCCESS_PAGE
Ejemplo n.º 3
0
 def nextId(self):
     '''Virtual method reimplemented to decide next page'''
     if self.ui.fs.isChecked():
         keyfile = QtGui.QFileDialog.getOpenFileName(
             self.wizard(),
             'Key file',
             filter="Tomb keys (*.tomb.key);;Buried keys (*.jpeg)")
         if keyfile:
             #TODO: check if this really is a success :)
             if Tomb.open(self.wizard().get_tombfile(),
                          keyfile):  #bugs when wrong password
                 return TombOpenWizard.SUCCESS_PAGE
             #else: #TODO: should alert the user that we failed
         return TombOpenWizard.METHOD_PAGE
     if self.ui.usb.isChecked():
         return TombOpenWizard.USB_PAGE
     print self.group.checkedButton().property('path').toPyObject()
     return TombOpenWizard.SUCCESS_PAGE