Beispiel #1
0
    def closeEvent(self, event):
        params.saveFile()
        choice = QMessageBox.question(self, 'Close Relaxo', 'Are you sure that you want to quit Relax?',\
            QMessageBox.Cancel | QMessageBox.Close, QMessageBox.Cancel)

        if choice == QMessageBox.Close:
            params.dispVars()
            self.data.disconn_client()
            event.accept()
        else: event.ignore()
Beispiel #2
0
    def __init__(self, parent=None):
        super(MainWindow, self).__init__(parent)
        self.setupUi(self)

        # Setup
        self.ui = loadUi('ui/mainWindow.ui')
        self.setWindowTitle('Relax')
        self.setStyleSheet(params.stylesheet)
        #self.plotTabWidget.setStyleSheet("border: 0.5px solid #BAB9B8; ")

        # Load GUI parameter
        params.loadParam()
        params.dispVars()

        self.data = data()

        # Establish connection
        self.establish_conn()