Пример #1
0
    def __init__(self, parent=None):

        super(ImportDialog, self).__init__(parent)

        try:
            import spec2nexus
        except ImportError:
            raise NeXusError("Please install the 'spec2nexus' module")

        self.accepted = False
        self.import_file = None  # must set in self.get_data()
        self.spec = None

        # progress bar is updated via calls to pdate_progress()
        self.progress_bar = QtWidgets.QProgressBar()
        self.progress_bar.setVisible(False)

        status_layout = QtWidgets.QHBoxLayout()
        status_layout.addWidget(self.progress_bar)
        status_layout.addStretch()
        status_layout.addWidget(self.close_buttons())

        self.layout = QtWidgets.QVBoxLayout()
        self.layout.addLayout(self.filebox())
        self.layout.addLayout(self.scanbox())
        self.layout.addLayout(status_layout)
        self.setLayout(self.layout)

        self.setWindowTitle("Import " + str(filetype))
Пример #2
0
    def __init__(self, parent=None):

        super(ImportDialog, self).__init__(parent)

        self.layout = QtWidgets.QVBoxLayout()

        self.layout.addLayout(self.directorybox())

        self.filter_box = self.make_filterbox()
        self.layout.addWidget(self.filter_box)

        self.rangebox = self.make_rangebox()
        self.layout.addWidget(self.rangebox)

        status_layout = QtWidgets.QHBoxLayout()
        self.progress_bar = QtWidgets.QProgressBar()
        status_layout.addWidget(self.progress_bar)
        self.progress_bar.setVisible(False)
        status_layout.addStretch()
        status_layout.addWidget(self.buttonbox())
        self.layout.addLayout(status_layout)

        self.setLayout(self.layout)

        self.setWindowTitle("Import " + str(filetype))
Пример #3
0
    def __init__(self, parent=None):

        super(StackDialog, self).__init__(parent)
        
        status_layout = QtWidgets.QHBoxLayout()
        self.progress_bar = QtWidgets.QProgressBar()
        status_layout.addWidget(self.progress_bar)
        self.progress_bar.setVisible(False)
        status_layout.addStretch()
        status_layout.addWidget(self.close_buttons(save=True))

        self.set_layout(self.directorybox(), 
                        self.make_filter_box(),
                        self.make_range_box(),
                        self.make_output_box(),
                        status_layout)

        self.setLayout(self.layout)
        self.set_title('Stack Images')
  
        self.suffix = ''