Esempio n. 1
0
 def hashingMsgbox(self):
     msgBox = QMessageBox()
     msgBox.setText('Changing the hashing requires you to enter all'
                    'passwords again.')
     msgBox.setInformativeText('Do you still want to change the hashing?\n'
                               'WARNING: THIS WILL CLEAR ALL PASSWORDS.')
     msgBox.setStandardButtons(QMessageBox.Ok | QMessageBox.Cancel)
     msgBox.setDefaultButton(QMessageBox.Cancel)
     return msgBox.exec_() == QMessageBox.Ok
Esempio n. 2
0
 def on_proposal_popup_timer_timeout(self):
     if self._viewonly:
         return
     dlg = QMessageBox(self)
     dlg.setText('The experiment has been idle for more than %.1f hours.' %
                 self._timeout)
     contButton = QPushButton('Continue current experiment')
     finishAndNewButton = QPushButton('Finish and start new experiment')
     dlg.addButton(contButton, QMessageBox.RejectRole)
     dlg.addButton(finishAndNewButton, QMessageBox.ActionRole)
     dlg.exec_()
     if dlg.clickedButton() == finishAndNewButton:
         self.on_proposalBtn_clicked()
     elif dlg.clickedButton() == contButton:
         self._proposal_popup_timer.start()
Esempio n. 3
0
    def on_client_prompt(self, data):
        if self.promptWindow:
            self.promptWindow.close()

        # show non-modal dialog box that prompts the user to continue or abort
        prompt_text = data[0]
        dlg = self.promptWindow = QMessageBox(
            QMessageBox.Information, 'Confirmation required', prompt_text,
            QMessageBox.Ok | QMessageBox.Cancel, self)
        dlg.setWindowModality(Qt.NonModal)

        # give the buttons better descriptions
        btn = dlg.button(QMessageBox.Cancel)
        btn.setText('Abort script')
        btn.clicked.connect(lambda: self.client.tell_action('stop', BREAK_NOW))
        btn = dlg.button(QMessageBox.Ok)
        btn.setText('Continue script')
        btn.clicked.connect(lambda: self.client.tell_action('continue'))
        btn.setFocus()

        dlg.show()
Esempio n. 4
0
 def show_finish_message(self):
     msg_box = QMessageBox()
     msg_box.setText('Experiment successfully finished.')
     return msg_box.exec_()