def __init__(self, ScanmanMain): self.scanman = ScanmanMain self.config = self.scanman.config QGroupBox.__init__(self) self.ui = Ui_FitCommon() self.ui.setupUi(self) self.scanman = ScanmanMain self.rangeList = [] self.prevrangeList = [] self.colornr = 0 self.colorlist = ['blue', 'green', 'cyan', 'magenta', 'brown'] self.paramxy = {"Range_start": "x_chan", "Range_end": "x_chan"} self.rangeparams = ["Range_start", "Range_end"] self.fitparams = ['Chi^2', 'R^2', 'nIter', 'Time'] self.iterparams = [] self.miscparams = [] self.axislinked = {} self.myslide = VarSlider() self.sliderLinkText = [] self.linesperrange = 4 self.range_tbl = mylib.Table(self.ui.range_tbl)
def __init__(self, ScanmanMain=""): QGroupBox.__init__(self) self.name = "Figures" self.ui = Ui_Figures() self.ui.setupUi(self) self.scanman = ScanmanMain self.setstart = 0 self.setend = -1 self.ui.graph_scan.figure.delaxes(self.ui.graph_scan.figure.axes[0]) self.graphlist = [] self.maxid=-1 self.graphset={"scan":[],"fit":[]} self.loaded = False self.xlabel = "x" self.ylabel = "y" self.zlabel = "z" # #self.ui.widget = self.mywi #self.ui.waterfall_container_layout.addWidget(mywi) self.scanparamgraph = Graph(self.ui.graph_scan) self.filedialog = QFileDialog() self.filedialog.setFileMode(QFileDialog.ExistingFiles) self.filedialog.setViewMode(QFileDialog.Detail) self.curfilter = ""
def __init__(self, id, default=False, *args, **kwargs): QGroupBox.__init__(self, *args, **kwargs) self.id = id vbox = VBoxLayout() self.setLayout(vbox) self.setCheckable(True) self.setChecked(default)
def __init__(self, accordion, title, widget): QGroupBox.__init__(self, accordion) # create the layout layout = QVBoxLayout() layout.setContentsMargins(6, 6, 6, 6) layout.setSpacing(0) layout.addWidget(widget) self._accordianWidget = accordion self._rolloutStyle = 2 self._dragDropMode = 0 self.setAcceptDrops(True) self.setLayout(layout) self.setContextMenuPolicy(Qt.CustomContextMenu) self.customContextMenuRequested.connect(self.showMenu) # create custom properties self._widget = widget self._collapsed = False self._collapsible = True self._clicked = False self._customData = {} # set common properties self.setTitle(title)
def __init__(self,parent): QGroupBox.__init__(self,parent) self.parent = parent self.setMaximumHeight(130) self.layout = QHBoxLayout(self) self.layout.setMargin(10) self.setTitle("Property") lab1 = QLabel("Text: ") lab2 = QLabel("Font: ") lab3 = QLabel("Size: ") self.lab4 = QLabel("x: ") self.lab5 = QLabel("y: ") self.lab6 = QLabel(": ") self.led1 = QLineEdit() self.led2 = QFontComboBox() self.led3 = QComboBox() for i in range(1,50): self.led3.addItem(str(i)) self.layout.addWidget(lab1) self.layout.addWidget(self.led1) self.layout.addWidget(lab2) self.layout.addWidget(self.led2) self.layout.addWidget(lab3) self.layout.addWidget(self.led3) self.layout.addWidget(self.lab4) self.layout.addWidget(self.lab5) self.layout.addWidget(self.lab6)
def __init__(self,parent): QGroupBox.__init__(self,parent) self.parent = parent self.setMaximumHeight(100) self.setMaximumWidth(300) self.layout = QHBoxLayout(self) self.layout.setMargin(10) self.setTitle("Map") lab1 = QLabel("Size: ") lab2 = QLabel("Orientation: ") btn1 = QComboBox() btn1.addItem("320x240") btn1.addItem("480x320") btn1.addItem("640x480") btn1.addItem("720x480") btn1.addItem("800x480") btn1.addItem("852x480") btn1.addItem("960x540") btn2 = QComboBox() btn2.addItem("Portrait") btn2.addItem("Landscape") self.layout.addWidget(lab1) self.layout.addWidget(btn1) self.layout.addWidget(lab2) self.layout.addWidget(btn2)
def __init__(self, attribute, values, parent=None): QGroupBox.__init__(self, attribute, parent) self._attribute = attribute self._current_items = [] self._defaults = {} self._inputField = None self._inputFieldType = None self._insertIndex = -1 self._insertAtEnd = False self._shortcuts = {} # Setup GUI self._layout = FloatingLayout() self.setLayout(self._layout) self._buttons = {} self._labels = {} #Abhishek : Add Label Dropdown self.ann_input_combo = ExtendedCombo(self) self._layout.insertWidget(0,self.ann_input_combo) self.ann_input_combo.show() self.modelItem = QStandardItemModel() self.ann_input_combo.setModel(self.modelItem) self.ann_input_combo.setModelColumn(0) self.ann_input_combo.currentIndexChanged.connect(self.onAnnotationValueSelected) # Add interface elements self.updateValues(values)
def __init__(self, id, logscale=False, style=True): QGroupBox.__init__(self) self.setTitle("Control Axes") self.setToolTip("<p>Control if/how axes are drawn</p>") self.xAxisCheckBox = QCheckBox("Show X axis") self.xAxisCheckBox.setChecked(True) self.yAxisCheckBox = QCheckBox("Show Y axis") self.yAxisCheckBox.setChecked(True) self.id = id hbox = HBoxLayout() hbox.addWidget(self.xAxisCheckBox) hbox.addWidget(self.yAxisCheckBox) vbox = VBoxLayout() vbox.addLayout(hbox) if logscale: self.xLogCheckBox = QCheckBox("Logarithmic X axis") self.yLogCheckBox = QCheckBox("Logarithmic Y axis") hbox = HBoxLayout() hbox.addWidget(self.xLogCheckBox) hbox.addWidget(self.yLogCheckBox) vbox.addLayout(hbox) if style: self.directionComboBox = QComboBox() self.directionComboBox.addItems(["Parallel to axis", "Horizontal", "Perpendicualr to axis", "Vertical"]) directionLabel = QLabel("Axis label style:") directionLabel.setBuddy(self.directionComboBox) hbox = HBoxLayout() hbox.addWidget(directionLabel) hbox.addWidget(self.directionComboBox) vbox.addLayout(hbox) self.setLayout(vbox)
def __init__(self, tree, dataset, master, parent=None): QGroupBox.__init__(self, parent) Control.__init__(self, tree, dataset, master) self.setLayout(QVBoxLayout()) if tree: self.setGroup(tree)
def __init__( self, accordion, title, widget ): QGroupBox.__init__(self, accordion) # create the layout layout = QVBoxLayout() layout.setContentsMargins(6, 6, 6, 6) layout.setSpacing(0) layout.addWidget(widget) self._accordianWidget = accordion self._rolloutStyle = 2 self._dragDropMode = 0 self.setAcceptDrops(True) self.setLayout(layout) self.setContextMenuPolicy(Qt.CustomContextMenu) self.customContextMenuRequested.connect(self.showMenu) # create custom properties self._widget = widget self._collapsed = False self._collapsible = True self._clicked = False self._customData = {} # set common properties self.setTitle(title)
def __init__(self, ScanmanMain=""): QGroupBox.__init__(self) self.name = "Sics" self.ui = Ui_Sics() self.ui.setupUi(self) self.scanman = ScanmanMain self.ui.inbuffer_Edit.setText("Hello\n") self.prm = DeviceParams() self.cmplist = [] self.cmplist.append(CmpItem("inten2bgnd", 0)) self.cmplist.append(CmpItem("inten", 1)) self.cmplist.append(CmpItem("rho_inten", 2)) self.cmplist.append(CmpItem("rho_pos", 3)) self.cmplist.append(CmpItem("rho_fwhm", 4)) self.cmplist.append(CmpItem("rho_bgnd", 5)) self.compareprms = {} self.compareprms["inten2bgnd"] = CmpItem( "Minimum Intensity to Background", 2.0, 0, "greater") self.compareprms["inten"] = CmpItem("Minimum Intensity", 20.0, 1, "greater") self.compareprms["rho_inten"] = CmpItem("Maximum %Rel StDev Intensity", 2.0, 2, "less") self.compareprms["rho_pos"] = CmpItem("Maximum %Rel StDev Position", 2.0, 3, "less") self.compareprms["rho_fwhm"] = CmpItem("Maximum %Rel StDev FWHM", 2.0, 4, "less") self.compareprms["rho_bgnd"] = CmpItem("Maximum %Rel StDev Background", 2.0, 5, "less") self.compareprms["err_ustrain"] = CmpItem("Maximum error in u-strain", 50.0, 6, "less") self.reqcol = 0 self.curcol = 1 self.prevevents = float(0) self.prevstatus = "" self.worstpercent = float(0) cmptbl = self.ui.compare_tbl #for i in range(cmptbl.rowCount()): # someitem = qt.QTableWidgetItem() # someitem.setFlags(someitem.flags() & ~qtCore.Qt.ItemIsEditable) # someitem.setTextAlignment(qtCore.Qt.AlignRight) # someitem.setText("0") # cmptbl.setItem(i,self.curcol,someitem) cmptbl.setRowCount(len(self.compareprms)) cmptbl.setColumnCount(2) #for item in self.compareprms.itervalues(): CDM itervalues depricated for item in self.compareprms.values(): cmptbl.setItem(item.row, self.curcol, item.tblitem_cur) cmptbl.setItem(item.row, self.reqcol, item.tblitem_req) cmptbl.setVerticalHeaderItem(item.row, item.tblitem_header) True True self.compare_tbl = mylib.Table(self.ui.compare_tbl)
def __init__(self, parent = None, name = 'Block Group'): QGroupBox.__init__(self, name, parent) self.parent = parent self.setStyleSheet(SHARED) self.layout = QVBoxLayout(self) self._disks = [] self.hide()
def __init__(self, title, page): """ page is a SettingsPage """ QGroupBox.__init__(self, title, page) page.layout().addWidget(self) page.layout().addStretch(1) page.groups.append(self) self.changed = page.changed # quick connect :-) self.page = page
def __init__(self, myparent=""): QGroupBox.__init__(self) self.name = "PeakProfilesOptions" self.ui = Ui_PeakProfilesOptions() self.ui.setupUi(self) self.scanman = myparent.scanman self.ui.backgroundGroupBox.hide() self.ui.backgroundLayout.removeWidget(self.ui.backgroundGroupBox) self.ui.backgroundGroupBox = BackgroundOptionsDEF.BackgroundOptionsDEF( self) self.ui.backgroundLayout.addWidget(self.ui.backgroundGroupBox) self.ui.backgroundLayout.update() self.ui.backgroundGroupBox.show() self.peaktype = {} gauss = ProfileParams("Gauss") gauss.additerparams(['FWHM', 'Intensity', 'Background']) gauss.addparamxy({ 'FWHM': "del_x", 'Intensity': "del_y", 'Background': "y" }) gauss.addvaluesformat({ 'FWHM': "{0:0.4f}", 'Intensity': "{0:.4f}", 'Background': "{0:.4f}" }) gauss.addstdevformat({ 'FWHM': "{0:.3e}", 'Intensity': "{0:.3e}", 'Background': "{0:.3e}" }) gauss.addmiscparams(['Intensity_sum', 'Intensity_area', 'Counts']) self.peaktype["Gauss"] = gauss lorentz = ProfileParams("Lorentz") lorentz.additerparams(['FWHM2', 'Intensity', 'Background']) lorentz.addparamxy({ 'FWHM2': "del_x", 'Intensity': "del_y", 'Background': "y" }) lorentz.addvaluesformat({ 'FWHM2': "{0:0.4f}", 'Intensity': "{0:.4f}", 'Background': "{0:.4f}" }) lorentz.addstdevformat({ 'FWHM2': "{0:.3e}", 'Intensity': "{0:.3e}", 'Background': "{0:.3e}" }) lorentz.addmiscparams(['Intensity_sum', 'Intensity_area', 'Counts']) self.peaktype["Lorentz"] = lorentz True
def __init__(self, parent, name = '', size = 0, root = None): QGroupBox.__init__(self, name, parent) self.layout = QHBoxLayout(self) self.parent = parent self.root = root self._name = name self._size = size self._partitions = []
def __init__(self, parent=None): QGroupBox.__init__(self, tr("Active Directory membership status"), parent) self._setup_gui() self.deleted = False self._set_unknown(None) self.connect(self, SIGNAL('destroyed()'), self._deactivate)
def __init__(self): QGroupBox.__init__(self, None) self.timer = QTimer() self._selectedDrive = None self.setupUi(self) self._updateDriveList() self.timer.start(5000) self.connect(self.timer, SIGNAL('timeout()'), self.timerTimeout) self.connect(self.driveList, SIGNAL('currentRowChanged(int)'), self.driveListRowChanged)
def __init__(self, ScanmanMain=""): self.scanman = ScanmanMain QGroupBox.__init__(self) self.name = "Attenuation" self.ui = Ui_Attenuation() self.ui.setupUi(self) self.ConstructUI() self.filedialog = QFileDialog() self.filedialog.setAcceptMode(QFileDialog.AcceptSave) self.filedialog.setFileMode(QFileDialog.AnyFile) self.filedialog.setViewMode(QFileDialog.Detail) self.lastdir = "" self.lineseries = [] self.lineseries.append(Line2D([], [], color='black', linewidth=1.0)) #0 = intensity fraction #self.ui.abs_graphic.figure.axes[0].add_line(self.lineseries[0]) #self.ui.abs_graphic.figure.axes[0].set_ylabel("Intensity fraction") #self.absgraph = Graph(self.ui.abs_graphic) self.absgraph_line = self.lineseries[0] self.lineseries.append(Line2D( [], [], color='black', linewidth=1.0)) #1 = Correction multiplier self.ui.cor_graphic.figure.axes[0].add_line(self.lineseries[1]) self.ui.cor_graphic.figure.axes[0].set_ylabel("Correction coefficient") self.corgraph = Graph(self.ui.cor_graphic) self.corgraph_line = self.lineseries[1] self.expgraph = Graph(self.ui.exp_graphic) #rect = [0.0,0.0, 1.0,1.0] #self.ui.exp_graphic.figure.add_axes(rect, polar=True, frameon=False) self.omega = prm( "omega", "Sample rotation [degrees] Clockwise from primary beam") self.sstth = prm( "sstth", "Secondary slit 2-theta [degrees] Clockwise from primary beam") self.psw = prm("psw", "Primary slit width [mm]") self.ssw = prm("ssw", "Secondary slit width [mm]") self.psw_sec = prm("psw_sec", "Primary slit divisions for grid") self.ssw_sec = prm("ssw_sec", "Secondary slit divisions for grid") self.psp = prm("psp", "Primary slit position") self.ssp = prm("ssp", "Secondary slit position") self.psdiv = prm("psdiv", "Primary slit divergence [degrees]") self.ssdiv = prm("ssdiv", "Secondary slit divergence [degrees]") self.sdd = prm("sdd", "Sample to detector distance [mm]") self.cor_x = prm("cor_x", "Center of rotation x-offset in sample [mm]") self.cor_y = prm("cor_y", "Center of rotation y-offset in sample [mm]") self.s_len_x = prm("s_len_x", "Sample length in x-direction [mm]") self.s_len_y = prm("s_len_y", "Sample length in y-direction [mm]") self.att_coef = prm("att_coef", "Attenuation coefficient [cm^-1]") self.LoadPrmFile("./Session/abs_corr.txt") self.InitExpFigure()
def __init__(self, ScanmanMain): QGroupBox.__init__(self) SourceCommon.__init__(self, ScanmanMain) self.name = "GenPeaks" self.ui = Ui_GenPeaks() self.ui.setupUi(self) #self.scanman = ScanmanMain #self.src = Srcpar.Srcpar(self.config) #self.paramdict = {} self.peaks_tbl = mylib.Table(self.ui.peaks_tbl) self.paramdict["DAQ_Status"] = ""
def __init__(self, id): QGroupBox.__init__(self) self.id = id self.setToolTip("<p>Add/adjust plotting parameters.</p>") hbox = HBoxLayout() label = QLabel("Additional parameters:") self.parameterLineEdit = QLineEdit() self.parameterLineEdit.setToolTip("<p>Enter additional (comma separated) " "parameter=value pairs here</p>") hbox.addWidget(label) hbox.addWidget(parameterLineEdit) self.setLayout(hbox)
def __init__(self, ScanmanMain=""): QGroupBox.__init__(self) self.name = "Intensity_map" self.ui = Ui_Intensity_map() self.ui.setupUi(self) self.scanman = ScanmanMain self.filedialog = QFileDialog() self.filedialog.setAcceptMode(QFileDialog.AcceptSave) self.filedialog.setFileMode(QFileDialog.AnyFile) self.filedialog.setViewMode(QFileDialog.Detail) self.lastdir = ""
def __init__(self, id): QGroupBox.__init__(self) self.id = id self.setTitle("Adjust scale (min and max)") self.setToolTip("<p>Adjust scale (range) of axes " "(leave unchecked to use defaults)</p>") self.setCheckable(True) self.setChecked(False) self.xMinLineEdit = QLineEdit() self.xMinLineEdit.setToolTip("<p>Specify minimum X value " "(leave blank to use default)</p>") xMinLabel = QLabel("X Min:") xMinLabel.setBuddy(self.xMinLineEdit) self.xMaxLineEdit = QLineEdit() self.xMaxLineEdit.setToolTip("<p>Specify maximum X value " "(leave blank to use default)</p>") xMaxLabel = QLabel("X Max:") xMaxLabel.setBuddy(self.xMaxLineEdit) self.yMinLineEdit = QLineEdit() self.yMinLineEdit.setToolTip("<p>Specify minimum Y value " "(leave blank to use default)</p>") yMinLabel = QLabel("Y Min:") yMinLabel.setBuddy(self.yMinLineEdit) self.yMaxLineEdit = QLineEdit() self.yMaxLineEdit.setToolTip("<p>Specify maximum Y value " "(leave blank to use default)</p>") yMaxLabel = QLabel("Y Max:") yMaxLabel.setBuddy(self.yMaxLineEdit) vbox = VBoxLayout() hbox = HBoxLayout() hbox.addWidget(xMinLabel) hbox.addWidget(self.xMinLineEdit) vbox.addLayout(hbox) hbox = HBoxLayout() hbox.addWidget(xMaxLabel) hbox.addWidget(self.xMaxLineEdit) vbox.addLayout(hbox) box = HBoxLayout() box.addLayout(vbox) vbox = VBoxLayout() hbox = HBoxLayout() hbox.addWidget(yMinLabel) hbox.addWidget(self.yMinLineEdit) vbox.addLayout(hbox) hbox = HBoxLayout() hbox.addWidget(yMaxLabel) hbox.addWidget(self.yMaxLineEdit) vbox.addLayout(hbox) box.addLayout(vbox) self.setLayout(box)
def __init__(self, widget, parent, graph, auto_send=False, buttons=DefaultButtons, name="Zoom / Select"): widget.settingsHandler.initialize(self) QGroupBox.__init__(self, name, parent) self.widget_toolbars = self.register_toolbar(widget) self.widget = widget self.graph = graph self.auto_send = auto_send self.setup_toolbar(parent) self.buttons = self.add_buttons(buttons) self.action(self.selected_button)
def __init__(self, parent, name, size, layout = HORIZONTAL): QGroupBox.__init__(self, '%s - %s MB' % (name, size), parent) if layout == HORIZONTAL: self.layout = QHBoxLayout(self) else: self.layout = QVBoxLayout(self) self._name = name self._layout = layout self._size = size self._used_size = 0 self._partitions = [] self._accepted_blocks = []
def __init__(self, ScanmanMain): QGroupBox.__init__(self) SourceCommon.__init__(self, ScanmanMain) self.name = "SourceFile" self.ui = Ui_SourceFile() self.ui.setupUi(self) self.filedialog = QFileDialog() self.filedialog.setFileMode(QFileDialog.ExistingFiles) self.filedialog.setViewMode(QFileDialog.Detail) self.file_tbl = Table(self.ui.file_tbl) self.curfilter = "" self.colnr = {'Filename': 0, 'Ext': 1, 'Type': 2, 'Location': 3}
def __init__(self, ScanmanMain=""): QGroupBox.__init__(self) self.name = "Ascii" self.ui = Ui_Ascii() self.ui.setupUi(self) self.scanman = ScanmanMain self.filedialog = QFileDialog() self.filedialog.setFileMode(QFileDialog.Directory) self.filedialog.setAcceptMode(QFileDialog.AcceptSave) self.filedialog.setViewMode(QFileDialog.Detail) self.curfilter = "" self.lastdir = "" self.setstart = 0 self.setend = -1 self.singlefile = True
def __init__(self, attribute, values, parent=None): QGroupBox.__init__(self, attribute, parent) self._attribute = attribute self._current_items = [] self._defaults = {} self._inputField = None self._inputFieldType = None self._insertIndex = -1 self._insertAtEnd = False self._shortcuts = {} # Setup GUI self._layout = FloatingLayout() self.setLayout(self._layout) self._buttons = {} # Add interface elements self.updateValues(values)
def __init__(self, values, parent=None): QGroupBox.__init__(self, parent) self.setTitle(tr("Device information")) hbox = QHBoxLayout(self) edenwall_image = QPixmap(':/images/edenwall_small') label = QLabel() label.setPixmap(edenwall_image) hbox.addWidget(label) self.form = QFormLayout() hbox.addLayout(self.form) self.form.addRow(tr("Device type:"), QLabel(strong(values['type']))) self.form.addRow(tr("Property of:"), QLabel(strong(values['client']))) self.form.addRow(tr("Hardware version:"), QLabel(strong(values['hw_version']))) self.form.addRow(tr("Serial number:"), QLabel(strong(values['serial'])))
def __init__(self, id, name="Choose Variables", model=None): QGroupBox.__init__(self) if model is None: model = TreeModel() self.setTitle(name) self.setToolTip("<p>Select variables for analysis</p>") self.id = id self.pairs = {} layout = HBoxLayout() self.variableTreeView = QTreeView() self.variableTreeView.setModel(model) self.variableTreeView.setToolTip("Select variables from here") self.variableTreeView.setSelectionMode(QAbstractItemView.ExtendedSelection) self.variableTreeView.installEventFilter(self) layout.addWidget(self.variableTreeView) self.widgetsLayout = VBoxLayout() layout.addLayout(self.widgetsLayout) self.setLayout(layout)
def __init__(self,parent): QGroupBox.__init__(self,parent) self.parent = parent self.setFixedHeight(40) self.layout = QHBoxLayout(self) self.layout.setMargin(0) self.setTitle("Screen") lab = QLabel("Name: ") lab1 = QLabel("Size: ") lab2 = QLabel("Orientation: ") self.lab3 = QLabel("Background: #000000") btn = QLineEdit("Menu1",self) btn1 = QComboBox() btn1.addItem("320x240") btn1.addItem("480x320") btn1.addItem("640x480") btn1.addItem("720x480") btn1.addItem("800x480") btn1.addItem("852x480") btn1.addItem("960x540") btn1.currentIndexChanged.connect(self.setScreenSize) btn2 = QComboBox() btn2.addItem("Portrait") btn2.addItem("Landscape") btn2.currentIndexChanged.connect(self.parent.setOrientation) btn3 = QPushButton("Color") btn3.clicked.connect(self.setColor) btn4 = QPushButton("Scroll") btn4.clicked.connect(self.parent.setScrollBar) self.layout.addWidget(lab) self.layout.addWidget(btn) self.layout.addWidget(lab1) self.layout.addWidget(btn1) self.layout.addWidget(lab2) self.layout.addWidget(btn2) self.layout.addWidget(self.lab3) self.layout.addWidget(btn3) self.layout.addWidget(btn4)
def __init__(self, id): QGroupBox.__init__(self) self.id = id self.setTitle("Custom titles and axis labels") self.setToolTip("<p>Specify custom plot titles " "and axis labels (leave unchecked to use defaults</p>") self.setCheckable(True) self.setChecked(False) gbox = GridLayout() self.mainLineEdit = QLineEdit() self.mainLineEdit.setToolTip("<p>Specify text for title above " "plot (leave blank for no text)</p>") label = QLabel("Main title:") label.setBuddy(self.mainLineEdit) gbox.addWidget(label,0,0) gbox.addWidget(self.mainLineEdit,0,1) self.subLineEdit = QLineEdit() self.subLineEdit.setToolTip("<p>Specify text for title below " "plot (leave blank for no text)</p>") label = QLabel("Sub title:") label.setBuddy(self.subLineEdit) gbox.addWidget(label,1,0) gbox.addWidget(self.subLineEdit,1,1) self.xlabLineEdit = QLineEdit() self.xlabLineEdit.setToolTip("<p>Specify text for X axis (leave " "blank for no text)</p>") label = QLabel("X label:") label.setBuddy(self.xlabLineEdit) gbox.addWidget(label,2,0) gbox.addWidget(self.xlabLineEdit,2,1) self.ylabLineEdit = QLineEdit() self.ylabLineEdit.setToolTip("<p>Specify text for Y axis (leave " "blank for no text)</p>") label = QLabel("Y label:") label.setBuddy(self.ylabLineEdit) gbox.addWidget(label,3,0) gbox.addWidget(self.ylabLineEdit,3,1) vbox = VBoxLayout() self.setLayout(gbox)
def __init__(self, ScanmanMain=""): QGroupBox.__init__(self) self.name = "Excel" self.ui = Ui_Excel() self.ui.setupUi(self) self.scanman = ScanmanMain #self.src = Srcpar.Srcpar() self.excel = "" self.sh = "" self.includeHeader = True self.includeEmptyRow = 1 self.colnr = {'File name': 1, 'Mods': 2, 'Records': 3} self.setstart = 0 self.setend = 0 self.filedialog = QFileDialog() self.filedialog.setAcceptMode(QFileDialog.AcceptSave) self.filedialog.setFileMode(QFileDialog.AnyFile) self.filedialog.setViewMode(QFileDialog.Detail) self.lastdir = ""
def __init__(self, ScanmanMain): QGroupBox.__init__(self) self.name = "Peak" self.ui = Ui_Peak() self.ui.setupUi(self) self.scanman = ScanmanMain self.rangeList = [] self.prevrangeList = [] self.colornr = 0 self.colorlist = ['blue','green','cyan','magenta', 'brown'] self.myslide = VarSlider() self.sliderLinkText = [] self.bgmode="Auto" self.linesperrange = 4 self.range_start_row = 0 self.range_end_row = 1 self.position_row = 2 self.fwhm_row = 3 self.intensity_row = 4 self.background_row = 5 self.chi2_row = 6 self.r2_row = 7 self.niter_row = 8 self.time_row = 9 self.intensity_sum_row = 10 self.intensity_area_row = 11 self.counts_row = 12 self.errustrain_row = 13 self.ui.bgstart_edit.installEventFilter(self) self.ui.bgend_edit.installEventFilter(self) self.ui.bgfix_edit.installEventFilter(self) #self.scanman.signal["xtypechanged"].connect(self.xTypeChanged) self.range_tbl = mylib.Table(self.ui.range_tbl) True
def __init__(self, parent, layoutStyle="VL"): QGroupBox.__init__(self, parent) sizePolicy = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.sizePolicy().hasHeightForWidth()) self.setSizePolicy(sizePolicy) self.layoutBoxPanel = None if layoutStyle == "VL": self.layoutBoxPanel = QVBoxLayout(self) self.layoutBoxPanel.setSpacing(6) self.layoutBoxPanel.setContentsMargins(6, 6, 6, 6) self.layoutBoxPanel.setObjectName(("layoutBoxPanel")) elif layoutStyle == "HL": self.layoutBoxPanel = QHBoxLayout(self) self.layoutBoxPanel.setSpacing(0) self.layoutBoxPanel.setContentsMargins(6, 6, 6, 6) self.layoutBoxPanel.setObjectName(("layoutBoxPanel")) self.setTitle("GroupBox")
def __init__(self, parent, run_data_dir): self.block_state_change = False self.run_data_dir = run_data_dir QGroupBox.__init__(self, "Global Tab Options", parent) self.grid_layout = QGridLayout(self) title = QLabel('Lovell') font = QFont() title.setAlignment(Qt.AlignHCenter) font.setPointSize(20) font.setBold(True) title.setFont(font) self.setMinimumWidth(275) self.grid_layout.addWidget(title, self.rowCount(), 0, 1, 2) setPadding(self.grid_layout) self.add_group_selector() self.add_ID_selector() self.add_next_prev_buttons() self.add_notify_box() self.add_reference_buttons() self.add_run_num_buttons()
def __init__(self, ScanmanMain): QGroupBox.__init__(self) SourceCommon.__init__(self, ScanmanMain) self.name = "Histmem" self.ui = Ui_Histmem() self.ui.setupUi(self) self.scanman = ScanmanMain #self.src = Srcpar.Srcpar() #self.detdict = {} #self.paramdict = {} if "histmem" in self.scanman.config["source"]: self.ui.servername_edit.setText( self.scanman.config["source"]["histmem"]["IP"]) if "flipxy" in self.scanman.config["source"]["histmem"]: self.flipxy = bool( self.scanman.config["source"]["histmem"]["flipxy"]) else: self.flipxy = False self.paramdict["DAQ_Status"] = "" self.password_mgr = urllib.request.HTTPPasswordMgrWithDefaultRealm() #self.serveraddr = 'http://10.0.1.21/admin/' #self.password_mgr.add_password(None, self.serveraddr, 'manager','necsa') #pwd_handler = urllib2.HTTPBasicAuthHandler(self.password_mgr) #proxy_support = urllib2.ProxyHandler({}) #self.opener = urllib2.build_opener(pwd_handler,proxy_support) self.x_mm = self.y_mm = np.array([0.0]) self.ServerChanged() self.autotimer = mylib.RepeatedTimer() self.autotimer.updateSignal.connect(self.ReadServer) #self.autotimer = mylib.RepeatedTimer(100, self.ReadServer) #self.autotimer.start() #self.mythread=QtCore.QThread() True
def __init__(self, parent=None): QGroupBox.__init__(self, parent) self.ICONS = { self.INFO: QPixmap(":icons-32/info"), self.WARNING: QPixmap(":icons-32/warning"), self.CRITICAL: QPixmap(":icons-32/off_line"), } self.box = QHBoxLayout(self) self.icon = QLabel() self.message = QLabel() self.message.setTextFormat(Qt.RichText) self.message.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed) self.display_items = self.message, self.icon self.box.addWidget(self.icon) self.box.addWidget(self.message) # self.box.addStretch() self.setNoMessage()
def __init__(self, parent): QGroupBox.__init__(self, parent)
def __init__(self, tree, dataset, master, parent=None): QGroupBox.__init__(self, parent) Control.__init__(self, tree, dataset, master) self.setFlat(True) self.attributes = [] self.filters = []
def __init__(self, title, parent=None): QGroupBox.__init__(self, title, parent) self.form = QFormLayout(self) self.setStyleSheet(u"QGroupBox {font: bold italic large;}")
def __init__(self, myparent=""): QGroupBox.__init__(self) self.name = "BackgroundOptions" self.ui = Ui_BackgroundOptions() self.ui.setupUi(self) self.scanman = myparent.scanman
def __init__(self, id): QGroupBox.__init__(self) self.id = id self.setTitle("Adjust bounding box") self.setToolTip("<p>Adjust plot bounding box (leave " "unchecked to use default)</p>") self.setCheckable(True) self.setChecked(False) self.buttonGroup = QButtonGroup(self) self.buttonNames = [] hbox = HBoxLayout() id = 0 button = QToolButton() button.setToolTip("Outline") self.buttonNames.append("o") button.setIcon(QIcon(":custom-chart-outline.svg")) button.setCheckable(True) button.setChecked(True) self.buttonGroup.addButton(button, id) hbox.addWidget(button) id += 1 button = QToolButton() button.setToolTip("L shape") self.buttonNames.append("l") button.setIcon(QIcon(":custom-chart-l-shape.svg")) button.setCheckable(True) self.buttonGroup.addButton(button, id) hbox.addWidget(button) id += 1 button = QToolButton() button.setToolTip("7 shape") self.buttonNames.append("7") button.setIcon(QIcon(":custom-chart-7-shape.svg")) button.setCheckable(True) self.buttonGroup.addButton(button, id) hbox.addWidget(button) id += 1 button = QToolButton() button.setToolTip("C shape") self.buttonNames.append("c") button.setIcon(QIcon(":custom-chart-c-shape.svg")) button.setCheckable(True) self.buttonGroup.addButton(button, id) hbox.addWidget(button) id += 1 button = QToolButton() button.setToolTip("U shape") self.buttonNames.append("u") button.setCheckable(True) button.setIcon(QIcon(":custom-chart-u-shape.svg")) self.buttonGroup.addButton(button, id) hbox.addWidget(button) id += 1 button = QToolButton() button.setToolTip("] shape") self.buttonNames.append("]") button.setIcon(QIcon(":custom-chart-]-shape.svg")) button.setCheckable(True) self.buttonGroup.addButton(button, id) hbox.addWidget(button) id += 1 button = QToolButton() button.setToolTip("None") self.buttonNames.append("n") button.setIcon(QIcon()) button.setCheckable(True) self.buttonGroup.addButton(button, id) hbox.addWidget(button) self.setLayout(hbox)
def __init__(self, *args, **kwargs): QGroupBox.__init__(self, *args, **kwargs) self.cursor_in = False
def __init__(self): QGroupBox.__init__(self, None) self.setupUi(self) self.connect(self.chooseButton, SIGNAL('clicked()'), self.chooseButtonClicked) self.connect(self.pathField, SIGNAL('textChanged(QString)'), self.pathFieldChanged)
def __init__(self, id): QGroupBox.__init__(self) self.id = id self.setTitle("Adjust plot type") self.setToolTip("<p>Adjust plot type (leave " "unchecked to use default)</p>") self.setCheckable(True) self.setChecked(False) self.buttonGroup = QButtonGroup(self) self.buttonNames = [] hbox = HBoxLayout() id = 0 button = QToolButton() button.setToolTip("Points") self.buttonNames.append("p") button.setIcon(QIcon(":custom-chart-point.svg")) button.setCheckable(True) button.setChecked(True) self.buttonGroup.addButton(button, id) hbox.addWidget(button) id += 1 button = QToolButton() button.setToolTip("Lines") self.buttonNames.append("l") button.setIcon(QIcon(":custom-chart-line.svg")) button.setCheckable(True) self.buttonGroup.addButton(button, id) hbox.addWidget(button) id += 1 button = QToolButton() button.setToolTip("Both") self.buttonNames.append("b") button.setIcon(QIcon(":custom-chart-both.svg")) button.setCheckable(True) self.buttonGroup.addButton(button, id) hbox.addWidget(button) id += 1 button = QToolButton() button.setToolTip("Overplotted") self.buttonNames.append("o") button.setIcon(QIcon(":custom-chart-overplotted.svg")) button.setCheckable(True) self.buttonGroup.addButton(button, id) hbox.addWidget(button) id += 1 button = QToolButton() button.setToolTip("Histogram") self.buttonNames.append("h") button.setIcon(QIcon(":custom-chart-hist.svg")) button.setCheckable(True) self.buttonGroup.addButton(button, id) hbox.addWidget(button) id += 1 button = QToolButton() button.setToolTip("Stair steps") self.buttonNames.append("s") button.setIcon(QIcon(":custom-chart-stairs.svg")) button.setCheckable(True) self.buttonGroup.addButton(button, id) hbox.addWidget(button) id += 1 button = QToolButton() button.setToolTip("No plotting") self.buttonNames.append("n") button.setIcon(QIcon()) button.setCheckable(True) self.buttonGroup.addButton(button, id) hbox.addWidget(button) self.setLayout(hbox)
def __init__(self, parent): QGroupBox.__init__(self, parent) self.setStyleSheet(self.template_css % (self.green, self.white))
def __init__(self, from_min_date=None, from_min_time=None, from_max_date=None, from_max_time=None, to_min_date=None, to_min_time=None, to_max_date=None, to_max_time=None, title='Define time range', from_label='From', to_label='To', object_name='', parent=None, flags=0): QGroupBox.__init__(self) #members self.from_time = None # QTime self.from_date = None # QDate self.to_time = None # QTime self.to_date = None # QDate self.from_min_date = from_min_date # QDate self.from_min_time = from_min_time # QTime self.from_max_date = from_max_date # QDate self.from_max_time = from_max_time # QTime self.to_min_date = to_min_date # QDate self.to_min_time = to_min_time # QTime self.to_max_date = to_max_date # QDate self.to_max_time = to_max_time # QTime #private gui elements self._from_label = QLabel(from_label) self._from_date_le = QLineEdit() self._from_date_cw = self._make_cw() self._from_date_cw_btn = self._make_cw_button() self._from_time_te = QTimeEdit() self._to_label = QLabel(to_label) self._to_date_le = QLineEdit() self._to_date_cw = self._make_cw() self._to_date_cw_btn = self._make_cw_button() self._to_time_te = QTimeEdit() self.setTitle(title) self._setup_ui() # from time ranges and default if self.from_min_time is None or not self.from_min_time.isValid(): self.from_min_time = QTime(0, 0, 0, 0) if self.from_max_time is None or not self.from_max_time.isValid(): self.from_max_time = QTime(23, 59, 59, 999) self.from_time = self.from_min_time # to time ranges and default if self.to_min_time is None or not self.to_min_time.isValid(): self.to_min_time = QTime(0, 0, 0, 0) if self.to_max_time is None or not self.to_max_time.isValid(): self.to_max_time = QTime(23, 59, 59, 999) self.to_time = self.to_max_time # from date ranges and default if self.from_min_date is None or not self.from_min_date.isValid(): self.from_min_date = QDate.fromJulianDay(1) if self.from_max_date is None or not self.from_max_date.isValid(): self.from_max_date = QDate.fromJulianDay(sys.maxint) self.from_date = self.from_min_date # to date ranges and default if self.to_min_date is None or not self.to_min_date.isValid(): self.to_min_date = QDate.fromJulianDay(1) if self.to_max_date is None or not self.to_max_date.isValid(): self.to_max_date = QDate.fromJulianDay(sys.maxint) self.to_date = self.to_max_date #setup the connections self._from_date_cw.clicked.connect(self.set_from_date) self._to_date_cw.clicked.connect(self.set_to_date) self._from_time_te.timeChanged.connect(self.set_from_time) self._to_time_te.timeChanged.connect(self.set_to_time) self._update_state()
def __init__(self, parent=0): QGroupBox.__init__(self) self.checkStateChanged.connect(self.onStateChanged)
def __init__(self, myparent=""): QGroupBox.__init__(self) self.name = "EntryCurveOptions" self.ui = Ui_EntryCurveOptions() self.ui.setupUi(self) self.scanman = myparent.scanman
def __init__(self, id, *args, **kwargs): QGroupBox.__init__(self, *args, **kwargs) self.id = id vbox = VBoxLayout() self.setLayout(vbox)