def __init__(self, parent): """:type parent: QtGui.QMainWindow""" QtGui.QDialog.__init__(self, parent) self.setWindowTitle("About") self.setWindowIcon(parent.windowIcon()) logo_banner = os.path.join(os.getcwd(), "icons/Banner.png") self.__program_banner = QtGui.QLabel(self) self.__program_banner.setPixmap(QtGui.QPixmap(logo_banner)) self.__program_banner.setAlignment(QtCore.Qt.AlignCenter) self.__close_button = QtGui.QPushButton("Close", self) self.__close_button.setMaximumWidth(config.MAXIMUM_DIALOG_BUTTON_WIDTH) connect(self.__close_button.clicked, self.close) self.__info_box = QtGui.QGroupBox("Information", self) self.__info_layout = QtGui.QFormLayout(self.__info_box) widget_t = QtGui.QLabel self.__info_layout.addRow( "Application:", widget_t(config.APPLICATION_NAME + " " + __version__)) self.__info_layout.addRow("Author:", widget_t(__author__)) self.__info_layout.addRow("Core version:", widget_t(OPTOLITHIUM_CORE_VERSION)) self.__info_layout.addRow("Python version:", widget_t(sys.version)) self.__info_layout.addRow("%s version:" % backend_name, widget_t(QtBackendVersion)) self.__info_layout.addRow("Qt4 version:", widget_t(QtCoreVersion)) self.__info_layout.addRow("Matplotlib version:", widget_t(matplotlib_version)) self.__layout = QtGui.QGridLayout(self) self.__layout.addWidget(self.__program_banner, 0, 0, 1, 2) self.__layout.addWidget(self.__info_box, 1, 0, 1, 2) self.__layout.addWidget(self.__close_button, 2, 1)
def __init__(self, parent, model, load_dialog): """ :param QtGui.QWidget parent: Widget parent :param QProcessStackModel model: GUI data model :param LoadMaterialDialog load_dialog: Material dialog loader """ QtGui.QGroupBox.__init__(self, "Process Stack", parent) self.setObjectName("QProcessStack") self.__data_model = model self.__load_material_dlg = load_dialog self.__header_layout = QtGui.QHBoxLayout() self.__add_button = self._create_button("icons/Plus", self.insert_layer) self.__remove_button = self._create_button("icons/Minus", self.remove_layer) self.__up_button = self._create_button("icons/ArrowUp", self.layer_upper) self.__down_button = self._create_button("icons/ArrowDown", self.layer_lower) self.__header_layout.addStretch(1) self.__process_table = QProcessStackTable(self, self.__data_model) # PySide crash if not create temporary variable selection_model = self.__process_table.selectionModel() connect(selection_model.selectionChanged, self._item_changed) # Even selection automatically changed when endMoveRows perform selectionChanged not emitted connect(self.__data_model.rowsMoved, self._item_changed) self.__layout = QtGui.QVBoxLayout(self) self.__layout.addLayout(self.__header_layout) self.__layout.addWidget(self.__process_table)
def __init__(self, parent): """ :param QtGui.QWidget parent: Widget parent """ super(InputVariablesTable, self).__init__(parent) self.setColumnCount(6) self.setColumnWidth(InputVariablesTable.ORD_COLUMN, 40) self.setColumnWidth(InputVariablesTable.NAME_COLUMN, 200) self.setColumnWidth(InputVariablesTable.START_COLUMN, 60) self.setColumnWidth(InputVariablesTable.STOP_COLUMN, 60) self.setColumnWidth(InputVariablesTable.INTERVAL_COLUMN, 60) self.setHorizontalHeaderLabels(listify(InputVariablesTable.HEADER)) self.setColumnHidden(InputVariablesTable.INDEX_COLUMN, True) self.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows) self.setSelectionMode(QtGui.QAbstractItemView.SingleSelection) self.horizontalHeader().setClickable(False) self.verticalHeader().setVisible(False) self.verticalHeader().setDefaultSectionSize(self.HEIGHT) self.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOn) self.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) self.setFixedWidth(calculate_table_width(self) + self.OVERSIZE) self.setMinimumHeight(_MINIMUM_HEIGHT) connect(self.itemChanged, self.onItemChanged) self.__variables = list() self.__values = dict()
def __init__(self, parent, imaging_tool, appdb): """ :type imaging_tool: options.structures.ImagingTool :type appdb: ApplicationDatabase """ super(SourceShapeBox, self).__init__("Source Shape", parent) self.__imaging_tools = imaging_tool self.__load_source_shape_dlg = LoadSourceShapeDialog(self, appdb) # -- Buttons section -- self.__buttons_hlayout = QtGui.QHBoxLayout() self.__load_source_shape_button = QtGui.QPushButton("Load Source Shape", self) connect(self.__load_source_shape_button.pressed, self.__load_source_shape) self.__save_source_shape_button = QtGui.QPushButton("Save to Database", self) connect(self.__save_source_shape_button.pressed, self.__save_source_shape) # TODO 15: Add saving of the source shape to the database from plugin state self.__save_source_shape_button.setEnabled(False) self.__buttons_hlayout.addWidget(self.__load_source_shape_button) self.__buttons_hlayout.addWidget(self.__save_source_shape_button) self.__buttons_hlayout.addStretch() # -- Name section -- self.__name_hlayout = QtGui.QHBoxLayout() self.__name_label = QtGui.QLabel("Name:", self) self.__name_edit = QtGui.QLineEdit(self) self.__name_edit.setMinimumWidth(200) self.__name_hlayout.addWidget(self.__name_label) self.__name_hlayout.addWidget(self.__name_edit) # self.__name_hlayout.addStretch() # -- Plot section -- self.__source_shape_hlay = QtGui.QHBoxLayout() self.__source_shape_plot = SourceShapePlot(self) self.__source_shape_hlay.addWidget(self.__source_shape_plot) self.__source_shape_hlay.setAlignment(QtCore.Qt.AlignCenter) # -- Parameters section -- self.__prms = {} self.__parameters_vlayout = QtGui.QVBoxLayout() # -- Body -- self.__vlayout = QtGui.QVBoxLayout(self) self.__vlayout.addLayout(self.__buttons_hlayout) self.__vlayout.addLayout(self.__name_hlayout) self.__vlayout.addLayout(self.__parameters_vlayout) self.__vlayout.addLayout(self.__source_shape_hlay) self.setObject(imaging_tool.source_shape)
def __init__(self, parent, wafer_process, appdb): """ :type parent: QtGui.QWidget :param options.WaferProcess wafer_process: Wafer stack process options :type appdb: ApplicationDatabase """ QStackWidgetTab.__init__(self, parent) self.setObjectName("WaferProcessView") self.__wafer_process = wafer_process self.__appdb = appdb self.__load_material_dlg = LoadMaterialDialog(self, self.__appdb) self.__data_model = QProcessStackModel(self, wafer_process) self.__process_stack = QProcessStack(self, self.__data_model, self.__load_material_dlg) self.__process_step_property = QProcessStepProperty( self, self.__data_model, self.__appdb, self.__load_material_dlg) self.__layout = QtGui.QGridLayout() self.__layout.addWidget(self.__process_stack, 0, 0) self.__layout.addWidget(self.__process_step_property, 0, 1) connect(self.__process_stack.rowChanged, self.__process_step_property.changeMaterial) self.setUnstretchable(self.__layout)
def _create_button(self, icon_directory, handler): button = QtGui.QPushButton(str(), self) button.setIcon(Resources(icon_directory)) button.setIconSize(QtCore.QSize(26, 26)) button.setFixedSize(QtCore.QSize(36, 36)) button.setEnabled(False) connect(button.clicked, handler) self.__header_layout.addWidget(button) return button
def __init__(self, parent): QtGui.QStatusBar.__init__(self, parent) self.setObjectName("StatusBar") self.__mem_usage = MemoryUsageView(self, os.getpid()) self.__mem_usage.setMaximumWidth(200) self.addPermanentWidget(self.__mem_usage) self.__mem_update_timer = QtCore.QTimer(self) connect(self.__mem_update_timer.timeout, self.__mem_usage.update_memory) self.__mem_update_timer.start( config.Configuration.memory_update_interval)
def __init__(self, parent, stage, options): """ :param QtGui.QWidget parent: Resist simulation view widget parent """ super(_AbstractSimulationsView, self).__init__(parent) self.__options = options self.__stage = stage self.__metrology_label = QtGui.QLabel("Metrology results:", self) self._parameters = QMetrologyTable(self, stage.metrics) self.__x_axis_label = QtGui.QLabel("X Axis:", self) self._x_axis_edit = QtGui.QLineEdit(self) self._x_axis_edit.setEnabled(False) self._x_axis_edit.setFixedWidth(self._parameters.width()) self.__y_axis_label = QtGui.QLabel("Y Axis:", self) self._y_axis_edit = QtGui.QLineEdit(self) self._y_axis_edit.setEnabled(False) self._y_axis_edit.setFixedWidth(self._parameters.width()) self._draw_mask_chkbox = QtGui.QCheckBox("Draw original mask", self) connect(self._draw_mask_chkbox.toggled, self.on_draw_mask_chkbox_toggled) self._draw_mask_chkbox.setChecked(False) self.__parameters_layout = QtGui.QVBoxLayout() self.__parameters_layout.addWidget(self.__x_axis_label) self.__parameters_layout.addWidget(self._x_axis_edit) self.__parameters_layout.addSpacing(10) self.__parameters_layout.addWidget(self.__y_axis_label) self.__parameters_layout.addWidget(self._y_axis_edit) self.__parameters_layout.addSpacing(30) self.__parameters_layout.addWidget(self.__metrology_label) self.__parameters_layout.addWidget(self._parameters) self.__parameters_layout.addWidget(self._draw_mask_chkbox) self.__parameters_layout.addStretch() self._graph = graph_class(self, options) self._toolbar = NavigationToolbar(self._graph, self) self.__graph_layout = QtGui.QVBoxLayout() # self.__graph_layout.setAlignment(QtCore.Qt.AlignTop | QtCore.Qt.AlignHCenter) self.__graph_layout.addWidget(self._toolbar) self.__graph_layout.addWidget(self._graph) self.__graph_layout.addStretch() self.__layout = QtGui.QHBoxLayout(self) self.__layout.addLayout(self.__parameters_layout) self.__layout.addLayout(self.__graph_layout)
def setObject(self, p_object): """:type p_object: orm.Mask | orm.ConcretePluginMask | None""" if self.__mask is not None: for variable in self.__mask.variables: disconnect(variable.signals[Abstract], self.updateValues) self.__mask = p_object for variable in self.__mask.variables: connect(variable.signals[Abstract], self.updateValues) self.updateValues()
def setObject(self, p_object): # """:type p_object: orm.SourceShape | orm.ConcretePluginSourceShape""" if self.__p_object is not None: for variable in self.__p_object.variables: disconnect(variable.signals[Abstract], self.__onValueChanged) self.__p_object = p_object for variable in self.__p_object.variables: connect(variable.signals[Abstract], self.__onValueChanged) self.__onValueChanged()
def setObject(self, p_object): if self.__peb is not None: disconnect(self.__peb.time.signals[Abstract], self.__onValueChanged) disconnect(self.__peb.temp.signals[Abstract], self.__onValueChanged) self.__peb = p_object connect(self.__peb.time.signals[Abstract], self.__onValueChanged) connect(self.__peb.temp.signals[Abstract], self.__onValueChanged) self.__onValueChanged()
def setPeb(self, peb): if self.__peb is not None: disconnect(self.__peb.time.signals[Abstract], self.__onValueChanged) disconnect(self.__peb.temp.signals[Abstract], self.__onValueChanged) self.__peb = peb self.__profile_graph.setObject(peb) connect(self.__peb.time.signals[Abstract], self.__onValueChanged) connect(self.__peb.temp.signals[Abstract], self.__onValueChanged) self.__onValueChanged()
def __init__(self, parent, core): super(OutputVariableBox, self).__init__("Output variable", parent) self.__output_variable_tree = OutputVariableTree(self, core) connect(self.__output_variable_tree.itemSelectionChanged, self.onTreeItemSelectionChanged) self.__control_widget = SimulationSetsControl(self, core) self.__layout_accres = QtGui.QHBoxLayout() self.__button_accept = QtGui.QPushButton("Accept", self) connect(self.__button_accept.clicked, self.onAcceptButtonClicked) self.__button_accept.setEnabled(False) self.__button_reset = QtGui.QPushButton("Reset", self) connect(self.__button_reset.clicked, self.onResetButtonClicked) self.__button_reset.setEnabled(False) self.__layout_accres.addWidget(self.__button_accept) self.__layout_accres.addWidget(self.__button_reset) self.__layout_tree = QtGui.QVBoxLayout() self.__layout_tree.addWidget(self.__output_variable_tree) self.__layout_tree.addLayout(self.__layout_accres) self.__layout = QtGui.QHBoxLayout(self) self.__layout.addLayout(self.__layout_tree) self.__layout.addWidget(self.__control_widget) connect(self.__control_widget.finished, self.onFinished)
def __init__(self, parent, core): super(SimulationSetsControl, self).__init__(parent) self.__core = core self.__layout = QtGui.QVBoxLayout(self) self.__label_info = QtGui.QLabel( "Pressing launch button simulation set will be performed \n" "for given input variable till final selected stage not reached.", self) self.__label_final_value = QtGui.QLabel("Simulation set result value:") self.__edit_final_value = QtGui.QLineEdit(self) self.__edit_final_value.setReadOnly(True) self.__edit_final_value.setFixedWidth(300) self.__layout_control = QtGui.QHBoxLayout() self.__button_launch = QtGui.QPushButton("Launch Simulations", self) self.__button_launch.setFixedWidth(165) self.__button_launch.setEnabled(False) self.__edit_set_name = QtGui.QLineEdit(self.SET_NAME_PATTERN % 1, self) self.__edit_set_name.setFixedWidth(125) self.__layout_control.addWidget(self.__edit_set_name) self.__layout_control.addWidget(self.__button_launch) self.__layout_control.setAlignment(QtCore.Qt.AlignLeft) connect(self.__button_launch.clicked, self.__onLaunchButtonClicked) self.__label_progress_info = QtGui.QLabel("Simulation set progress:") self.__progress_bar = QtGui.QProgressBar() self.__layout.addWidget(self.__label_info) self.__layout.addSpacing(20) self.__layout.addWidget(self.__label_final_value) self.__layout.addWidget(self.__edit_final_value) self.__layout.addLayout(self.__layout_control) self.__layout.addSpacing(20) self.__layout.addWidget(self.__label_progress_info) self.__layout.addWidget(self.__progress_bar) self.__layout.setAlignment(QtCore.Qt.AlignTop) self.wait_box = msgBox(msgBox.NoIcon, "Simulations", "Please, wait...", msgBox.Abort, self) self.__payload = SimulationSetsPayload() connect(self.launched, self.__payload.task) connect(self.__payload.taskStarted, self.__onTaskStarted) connect(self.__payload.taskDone, self.__onTaskDone) connect(self.__payload.calculationDone, self.__onCalculationDone)
def __onLaunchButtonClicked(self): connect(self.__payload.stage.invalidated, self.__onStageInvalidated) worker = QWorker(self.__payload, objectName="WorkerThread") worker.start() self.launched.emit(self.__edit_set_name.text()) self.wait_box.exec_() if not self.__payload.done: worker.quit() worker.wait()
def __init__(self, parent, temp): """ :type parent: QtGui.QWidget :type temp: options.Variable """ QGraphPlot.__init__(self, parent, width=320, height=240) self._ax = self.add_subplot() self.__resist = None """:type: options.structures.Resist""" self.__temp = temp connect(self.__temp.signals[structures.Abstract], self.__onValueChanged)
def developer(self, developer): """:type developer: orm.DeveloperInterface or None""" if developer is not None: self.__developer = developer self.update_graph() if isinstance(developer, orm.DeveloperExpr): for obj in developer.object_values: connect(obj.signals[orm.DeveloperExprArgValue.value], self.update_graph) else: if isinstance(self.__developer, orm.DeveloperExpr): for obj in self.__developer.object_values: disconnect(obj.signals[orm.DeveloperExprArgValue.value], self.update_graph) self.__developer = None self._ax.clear() self.redraw()
def __init__(self, parent, appdb): """ :type parent: QtGui.QMainWindow :type appdb: ApplicationDatabase """ QtGui.QDialog.__init__(self, parent) self.setWindowTitle("Load Material") self.setWindowIcon(parent.windowIcon()) self.__appdb = appdb self.__select_group = QtGui.QGroupBox("Select Material", self) self.__select_group_layout = QtGui.QHBoxLayout(self.__select_group) self.__material_list = QtGui.QListWidget(self.__select_group) self.__select_group_layout.addWidget(self.__material_list) self.__material_plot = MaterialPlot(self) self.__buttons_layout = QtGui.QHBoxLayout() self.__parametric_checkbox = QtGui.QCheckBox("Parametric", self) self.__load_button = QtGui.QPushButton("Load material", self) self.__load_button.setFixedWidth(config.MAXIMUM_DIALOG_BUTTON_WIDTH) self.__cancel_button = QtGui.QPushButton("Cancel", self) self.__cancel_button.setFixedWidth(config.MAXIMUM_DIALOG_BUTTON_WIDTH) self.__buttons_layout.addWidget(self.__parametric_checkbox) self.__buttons_layout.addStretch() self.__buttons_layout.addWidget(self.__load_button) self.__buttons_layout.addWidget(self.__cancel_button) connect(self.__load_button.clicked, self.accept) connect(self.__cancel_button.clicked, self.reject) connect(self.__parametric_checkbox.stateChanged, self._accept_state_handler) connect(self.__material_list.itemSelectionChanged, self._accept_state_handler) connect(self.__material_list.itemSelectionChanged, self._change_material) self.__layout = QtGui.QVBoxLayout(self) self.__layout.addWidget(self.__select_group) self.__layout.addWidget(self.__material_plot) self.__layout.addLayout(self.__buttons_layout) self.__parametric_checkbox.setCheckState(QtCore.Qt.Unchecked) self._accept_state_handler()
def _create_body(self): self.__tab_widget = QtGui.QTabWidget(self) self.__tab_widget.addTab(ResistInfoTab(self.__tab_widget), "Information") self.__tab_widget.addTab( ResistExposureTab(self.__tab_widget, self.__peb_temp), "Exposure/PEB") self.__tab_widget.addTab( ResistDevelopmentTab(self.__tab_widget, self.__appdb), "Development") self.__body_layout = QtGui.QHBoxLayout() self.__body_layout.addWidget(self.__tab_widget) self.__body_layout.addStretch() connect(self.__tab_widget.currentChanged, self.__onTabChanged)
def __init__(self, parent, model, appdb, load_dialog): """ :param QtGui.QWidget parent: Widget parent :param QProcessStackModel model: GUI data model :param ApplicationDatabase appdb: Application database :param LoadMaterialDialog load_dialog: Material dialog loader """ QtGui.QGroupBox.__init__(self, "Process Properties Step", parent) self.setObjectName("QProcessStepProperty") self.__data_model = model self.__appdb = appdb self.__load_material_dlg = load_dialog self.__current_row = None self.__layout = QtGui.QVBoxLayout(self) self.__label_name = QtGui.QLabel("Name:") self.__edit_name = QtGui.QLineEdit() self.__edit_name.setFixedWidth(250) self.__load_button = QtGui.QPushButton("Load") connect(self.__load_button.clicked, self._load_material) self.__save_button = QtGui.QPushButton("Save to database") connect(self.__save_button.clicked, self._save_material) self._controls_set_enabled(False) self.__header_layout = QtGui.QHBoxLayout() self.__header_layout.setObjectName("QProcessStepProperty.QHBoxLayout") self.__header_layout.addWidget(self.__label_name) self.__header_layout.addWidget(self.__edit_name) self.__header_layout.addWidget(self.__load_button) self.__header_layout.addWidget(self.__save_button) self.__parameters_widgets = QtGui.QStackedWidget(self) self.__db_view = QProcessStepDepositDbConfig(self) self.__prm_view = QProcessStepDepositPrmConfig(self) self.__resist_view = QProcessStepResistConfig(self) self.__parameters_widgets.addWidget(self.__db_view) self.__parameters_widgets.addWidget(self.__prm_view) self.__parameters_widgets.addWidget(self.__resist_view) self.__layout.addLayout(self.__header_layout) self.__layout.addWidget(self.__parameters_widgets)
def setObject(self, resist): """:type resist: options.structures.Resist""" if self.__resist is not None: disconnect( self.__resist.peb.signals[orm.PebParameters.ln_ar], self.__onValueChanged) disconnect(self.__resist.peb.signals[orm.PebParameters.ea], self.__onValueChanged) self.__resist = resist connect(self.__resist.peb.signals[orm.PebParameters.ln_ar], self.__onValueChanged) connect(self.__resist.peb.signals[orm.PebParameters.ea], self.__onValueChanged) self.__onValueChanged()
def __init__(self, parent, database): """ :param parent: QtGui.QWidget :type database: database.ApplicationDatabase """ QTreeWidgetDrag.__init__(self, parent) self.__root = None """:type: QtGui.QTreeWidgetItem""" self.__standard_root = None """:type: QtGui.QTreeWidgetItem""" self.__plugin_root = None """:type: QtGui.QTreeWidgetItem""" self.__nodes = dict() """:type: dict from str to QtGui.QTreeWidgetItem""" self.__database = database """:type: database.ApplicationDatabase""" logging.info("Configure database view") self.setColumnCount(4) self.setColumnWidth(QDatabaseTreeWidget.NAME_COLUMN, 300) self.setColumnWidth(QDatabaseTreeWidget.COUNT_COLUMN, 40) self.setColumnWidth(QDatabaseTreeWidget.TIME_COLUMN, 140) self.setHeaderLabels(self.listify(QDatabaseTreeWidget.HEADER)) self.sortItems(QDatabaseTreeWidget.NAME_COLUMN, QtCore.Qt.AscendingOrder) self.setSortingEnabled(True) logging.info("Reload database objects") self.reload() self.__undeleteable_items = { self.__root, self.__standard_root, self.__plugin_root } logging.info("Configure actions") # Add item to database action connect(self.dropped, self.__onFileDropped) # Remove item from database action self.installEventFilter(self)
def add_action(self, data): """ :type data: ControlBar.ActionData :rtype: QtGui.QAction """ logging.debug("Create action: %s" % data.name) if data.icon is not None: logging.debug("Set action icon") if self.__toolbar is None: self.__toolbar = QtGui.QToolBar(self.__text, self.__parent) self.__toolbar.setObjectName("ToolBar_" + self.objectName()) self.__parent.addToolBar(self.__toolbar) self.__actions[data.name] = QtGui.QAction(data.icon, data.text, self) self.__toolbar.addAction(self.__actions[data.name]) else: self.__actions[data.name] = QtGui.QAction(data.text, self) if data.status_tip is not None: logging.debug("Set action status tip") self.__actions[data.name].setStatusTip(data.status_tip) if data.shortcut is not None: logging.debug("Set action shortcut") self.__actions[data.name].setShortcut(data.shortcut) if data.callback is not None: logging.debug("Set action callback") connect(self.__actions[data.name].triggered, data.callback) logging.debug("Add action to menubar") self.__menubar.addAction(self.__actions[data.name]) logging.debug("Set object name") self.__actions[data.name].setObjectName("%s.%s" % (self.objectName(), data.name)) logging.debug("Enable action") self.__actions[data.name].setEnabled(data.enabled) logging.debug("Action %s created successfully" % data.name) return self.__actions[data.name]
def __init__(self, parent, appdb): """ :type parent: QtGui.QWidget :type appdb: ApplicationDatabase """ QStackWidgetTab.__init__(self, parent) self.__appdb = appdb self.__resist = None """:type: options.structures.Resist""" self.__dev_rate_graph = DevelopmentGraph(self) self.__group = QtGui.QGroupBox("Parameters", self) self.__views = dict() self.__parameters_widgets = QtGui.QStackedWidget(self.__group) self.__dev_models = QtGui.QComboBox(self.__group) for model in self.__appdb[orm.DevelopmentModel]: self.__dev_models.addItem(model.name) self.__views[ model. name] = ResistDevelopmentTab.DevRateExprView.ModelView( self, model, self.__dev_rate_graph) self.__parameters_widgets.addWidget(self.__views[model.name]) self.__dev_models.setFixedWidth(200) connect(self.__dev_models.currentIndexChanged, self.__onIndexChanged) self.__temporary_check_box = QtGui.QCheckBox( "Coupled", self.__group) connect(self.__temporary_check_box.stateChanged, self._temporary_box_unchecked) self.__group_layout = QtGui.QVBoxLayout(self.__group) self.__group_layout.addWidget(self.__dev_models) self.__group_layout.addWidget(self.__temporary_check_box) self.__group_layout.addWidget(self.__parameters_widgets) self.__group_layout.addStretch() self.__layout = QtGui.QHBoxLayout(self) self.__layout.addWidget(self.__group) self.__layout.addStretch() self.__layout.addWidget(self.__dev_rate_graph)
def __init__(self, parent, core): """ :param QtGui.QWidget parent: Widget parent """ super(SimulationSets, self).__init__(parent) self.__tab_widget = QtGui.QTabWidget(self) self.__core = core self.__configuration_tab = ConfigurationTab(self.__tab_widget, core) self.__result_tabs = dict() self.__tab_widget.addTab(self.__configuration_tab, "Configuration") self.__layout = QtGui.QVBoxLayout() self.__layout.addWidget(self.__tab_widget) connect(self.__configuration_tab.finished, self.__onFinished)
def __init__(self, parent, simulation): """ :param QtGui.QWidget parent: Diffraction pattern view widget parent :param core.Core simulation: Simulation Core """ super(DiffractionPatternView, self).__init__(parent) self.__simulation = simulation self.__type_label = QtGui.QLabel("Display:", self) self.__type_combo = QtGui.QComboBox(self) for type_index in sorted(DiffractionPatternGraph.type_map): self.__type_combo.addItem( DiffractionPatternGraph.type_map[type_index]) self.__show_zero_chkbox = QtGui.QCheckBox("Draw (0, 0) order term", self) self.__show_zero_chkbox.setChecked(True) self.__kx_spinbox = QtGui.QSpinBox(self) self.__kx_spinbox.setFixedWidth(80) self.__ky_spinbox = QtGui.QSpinBox(self) self.__ky_spinbox.setFixedWidth(80) self.__graph = DiffractionPatternGraph(self, simulation.options) self.__options_layout = QtGui.QVBoxLayout() self.__options_layout.addWidget(self.__type_label) self.__options_layout.addWidget(self.__type_combo) self.__options_layout.addSpacing(15) self.__options_layout.addWidget(self.__show_zero_chkbox) self.__options_layout.addSpacing(15) self.__kxy_layout = QtGui.QFormLayout() self.__kxy_layout.addRow("X-Axis at:", self.__kx_spinbox) self.__kxy_layout.addRow("Y-Axis at:", self.__ky_spinbox) self.__options_layout.addLayout(self.__kxy_layout) self.__options_layout.addStretch() self.__graph_layout = QtGui.QVBoxLayout() self.__graph_layout.addWidget(self.__graph) self.__layout = QtGui.QHBoxLayout(self) self.__layout.addLayout(self.__options_layout) self.__layout.addLayout(self.__graph_layout) connect(self.__type_combo.currentIndexChanged, self.on_combobox_changed) connect(self.__show_zero_chkbox.stateChanged, self.on_chkbox_toggled) connect(self.__kx_spinbox.valueChanged, self.on_kx_spin_changed) connect(self.__ky_spinbox.valueChanged, self.on_ky_spin_changed)
def __init__(self, parent, imaging_tool): """:type imaging_tool: options.structures.ImagingTool""" super(ImmersionBox, self).__init__("Immersion Lithography", parent) self.__imaging_tool = imaging_tool self.__immersion_enable_checkbox = QtGui.QCheckBox("Enable Immersion", self) connect(self.__immersion_enable_checkbox.stateChanged, self.immersionStateChanged) # TODO: Add immersion calculation self.__immersion_enable_checkbox.setEnabled(False) self.__refraction_index_label = QtGui.QLabel("Refractive Index:") self.__refraction_index_edit = self.edit(self.__imaging_tool.immersion) self.__hlayout = QtGui.QHBoxLayout(self) self.__hlayout.addWidget(self.__immersion_enable_checkbox) self.__hlayout.addStretch() self.__hlayout.addWidget(self.__refraction_index_label) self.__hlayout.addWidget(self.__refraction_index_edit) self.immersionStateChanged(self.__imaging_tool.immersion_enabled)
def __init__(self, parent, options): super(SimulationResultsTab, self).__init__(parent) self.__results = None """:type: SimulationSetsPayload""" self.__control_layout = QtGui.QHBoxLayout() self.__metric_label = QtGui.QLabel("Metric: ", self) self.__metric_combobox = QtGui.QComboBox(self) self.__metric_combobox.setMaximumWidth(300) connect(self.__metric_combobox.currentIndexChanged, self.__onItemChanged) self.__button_exchange = QtGui.QPushButton("Exchange", self) self.__button_exchange.setEnabled(False) connect(self.__button_exchange.clicked, self.__onButtonExchangeClicked) self.__button_export = QtGui.QPushButton("Clipboard", self) connect(self.__button_export.clicked, self.__onButtonExportClicked) self.__sequence = [0, 1] self.__control_layout.addWidget(self.__metric_label) self.__control_layout.addWidget(self.__metric_combobox) self.__control_layout.addSpacing(10) self.__control_layout.addWidget(self.__button_exchange) self.__control_layout.addWidget(self.__button_export) self.__control_layout.setAlignment(QtCore.Qt.AlignLeft) self.__graph = SimulationSetsGraph(self, options) self.__toolbar = NavigationToolbar(self.__graph, self) self.__control_layout.addWidget(self.__toolbar) self.__layout = QtGui.QVBoxLayout(self) self.__layout.addLayout(self.__control_layout) self.__layout.addWidget(self.__graph)
def _create_header(self): self.__button_load = QtGui.QPushButton("Load Resist") self.__button_load.adjustSize() self.__button_load.setFixedWidth(self.__button_load.width() + 20) connect(self.__button_load.clicked, self._load_resist) self.__button_save = QtGui.QPushButton("Save Resist to Database") self.__button_save.adjustSize() self.__button_save.setFixedWidth(self.__button_save.width() + 20) connect(self.__button_save.clicked, self._save_resist) self.__label_name = QtGui.QLabel("Name:") self.__edit_name = QtGui.QLineEdit() self.__edit_name.setMinimumWidth(100) self.__header_layout = QtGui.QHBoxLayout() self.__header_layout.addWidget(self.__button_load) self.__header_layout.addWidget(self.__button_save) self.__header_layout.addSpacing(20) self.__header_layout.addWidget(self.__label_name) self.__header_layout.addWidget(self.__edit_name)
def __init__(self, parent, appdb): """ Initializer of ResistDevelopmentTab class :type parent: QtGui.QWidget :type appdb: ApplicationDatabase """ AbstractResistTab.__init__(self, parent) self.__appdb = appdb self.__resist = None """:type: options.structures.Resist""" # -- Header -- self.__dev_name_combobox = QtGui.QComboBox(self) self.__dev_name_combobox.setFixedWidth(300) connect(self.__dev_name_combobox.currentIndexChanged, self.__onIndexChanged) self.__save_button = QtGui.QPushButton("Save Developer") self.__save_button.setFixedWidth(120) self.__save_button.setEnabled(False) connect(self.__save_button.clicked, self._save_developer) self.__save_button_as = QtGui.QPushButton("Save Developer As...") self.__save_button_as.setFixedWidth(120) self.__save_button_as.setEnabled(False) connect(self.__save_button_as.clicked, self._save_developer_as) self.__header_layout = QtGui.QHBoxLayout() self.__header_layout.addWidget(self.__dev_name_combobox) self.__header_layout.addStretch() self.__header_layout.addWidget(self.__save_button) self.__header_layout.addWidget(self.__save_button_as) # -- Body -- self.__parameters_widgets = QtGui.QStackedWidget(self) self.__views = { orm.DeveloperSheet: ResistDevelopmentTab.DevRateSheetView(self), orm.DeveloperExpr: ResistDevelopmentTab.DevRateExprView(self, self.__appdb), None: ResistDevelopmentTab.DevRateNone(self) } for widget in self.__views.values(): self.__parameters_widgets.addWidget(widget) # -- Tab -- self.__vlayout = QtGui.QVBoxLayout(self) self.__vlayout.addLayout(self.__header_layout) self.__vlayout.addWidget(self.__parameters_widgets) self.__vlayout.addStretch()