Beispiel #1
0
    def setupUi(self, ApplicationPage):
        ApplicationPage.setObjectName(_fromUtf8("ApplicationPage"))
        ApplicationPage.resize(507, 457)
        self.horizontalLayout = QtGui.QHBoxLayout(ApplicationPage)
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.verticalLayout = QtGui.QVBoxLayout()
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.quitOnClose = QtGui.QCheckBox(ApplicationPage)
        self.quitOnClose.setObjectName(_fromUtf8("quitOnClose"))
        self.verticalLayout.addWidget(self.quitOnClose)
        self.errorLogChecker = QtGui.QCheckBox(ApplicationPage)
        self.errorLogChecker.setObjectName(_fromUtf8("errorLogChecker"))
        self.verticalLayout.addWidget(self.errorLogChecker)
        self.checkBox = QtGui.QCheckBox(ApplicationPage)
        self.checkBox.setObjectName(_fromUtf8("checkBox"))
        self.verticalLayout.addWidget(self.checkBox)
        self.horizontalLayout_2 = QtGui.QHBoxLayout()
        self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
        self.label_2 = QtGui.QLabel(ApplicationPage)
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.horizontalLayout_2.addWidget(self.label_2)
        self.styleSelector = QtGui.QComboBox(ApplicationPage)
        self.styleSelector.setObjectName(_fromUtf8("styleSelector"))
        self.horizontalLayout_2.addWidget(self.styleSelector)
        self.verticalLayout.addLayout(self.horizontalLayout_2)
        spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum,
                                       QtGui.QSizePolicy.Expanding)
        self.verticalLayout.addItem(spacerItem)
        self.horizontalLayout.addLayout(self.verticalLayout)
        spacerItem1 = QtGui.QSpacerItem(275, 20, QtGui.QSizePolicy.Expanding,
                                        QtGui.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem1)

        self.retranslateUi(ApplicationPage)
        QtCore.QMetaObject.connectSlotsByName(ApplicationPage)
Beispiel #2
0
    def initUI(self):
        self.combobox_cmap = QtGui.QComboBox(self)
        self.cmapStrs = ['hot', 'gray', 'jet', 'gnuplot2', 'Paired']
        self.combobox_cmap.addItems(self.cmapStrs)

        self.checkbox_applyDark = QtGui.QCheckBox('Subtract Dark')
        self.checkbox_applyDark.setChecked(True)
        self.checkbox_applyFlat = QtGui.QCheckBox('Divide by Flat')
        self.checkbox_applyFlat.setChecked(False)
        self.checkbox_applyHPM = QtGui.QCheckBox('Mask Hot Pix')
        self.checkbox_applyHPM.setChecked(True)
        self.checkbox_applyCPM = QtGui.QCheckBox('Apply Cold Pixel Cutoff')
        self.checkbox_applyCPM.setChecked(True)
        self.label_coldCut = QtGui.QLabel('Counts/sec for cold cut: ')
        self.lineEdit_coldCut = QtGui.QLineEdit(
            str(self.parent.stackParams['coldCut'][0]))

        coldCutBox = layoutBox('H',
                               [self.label_coldCut, self.lineEdit_coldCut])
        plotArrayBox = layoutBox('V', [
            self.combobox_cmap, self.checkbox_applyDark,
            self.checkbox_applyFlat, self.checkbox_applyHPM,
            self.checkbox_applyCPM, coldCutBox
        ])

        plotArrayGroup = QtGui.QGroupBox('plotArray parameters', self)
        plotArrayGroup.setLayout(plotArrayBox)

        self.connectChangeSignals()
        mainBox = layoutBox('V', [plotArrayGroup])
        self.setLayout(mainBox)
Beispiel #3
0
    def __init__(self, parent):
        QtGui.QDialog.__init__(self, parent)
        self.parent = parent
        self.setMinimumWidth(400)
        self.setMinimumHeight(400)
        self.setWindowTitle('Close Instrument')

        inst = QtGui.QWidget()
        self.synToggle = QtGui.QCheckBox()
        self.liaToggle = QtGui.QCheckBox()
        self.pciToggle = QtGui.QCheckBox()
        self.motorToggle = QtGui.QCheckBox()
        self.pressureToggle = QtGui.QCheckBox()

        instLayout = QtGui.QFormLayout()
        instLayout.addRow(QtGui.QLabel('Instrument'), QtGui.QLabel('Status'))
        # only list currently connected instruments
        if self.parent.synHandle:
            self.synToggle.setCheckState(True)
            instLayout.addRow(QtGui.QLabel('Synthesizer'), self.synToggle)
        else:
            self.synToggle.setCheckState(False)

        if self.parent.liaHandle:
            self.liaToggle.setCheckState(True)
            instLayout.addRow(QtGui.QLabel('Lockin'), self.liaToggle)
        else:
            self.liaToggle.setCheckState(False)

        if self.parent.pciHandle:
            self.pciToggle.setCheckState(True)
            instLayout.addRow(QtGui.QLabel('Oscilloscope'), self.pciToggle)
        else:
            self.pciToggle.setCheckState(False)

        if self.parent.motorHandle:
            self.motorToggle.setCheckState(True)
            instLayout.addRow(QtGui.QLabel('Motor'), self.motorToggle)
        else:
            self.motorToggle.setCheckState(False)

        if self.parent.pressureHandle:
            self.pressureToggle.setCheckState(True)
            instLayout.addRow(QtGui.QLabel('Pressure Readout'),
                              self.pressureToggle)
        else:
            self.pressureToggle.setCheckState(False)

        inst.setLayout(instLayout)

        okButton = QtGui.QPushButton(Shared.btn_label('complete'))
        mainLayout = QtGui.QVBoxLayout()
        mainLayout.addWidget(inst)
        mainLayout.addWidget(
            QtGui.QLabel(
                'No command will be sent before you hit the accept button'))
        mainLayout.addWidget(okButton)
        self.setLayout(mainLayout)

        okButton.clicked.connect(self.accept)
Beispiel #4
0
    def make_buttons(self):
        # ROI CHECKBOX
        self.l0.setVerticalSpacing(4)
        self.checkBox = QtGui.QCheckBox("ROIs On [space bar]")
        self.checkBox.setStyleSheet("color: white;")
        self.checkBox.toggle()
        self.checkBox.stateChanged.connect(self.ROIs_on)
        self.l0.addWidget(self.checkBox, 0, 0, 1, 2)

        buttons.make_selection(self)
        buttons.make_cellnotcell(self)
        b0 = views.make_buttons(self)  # b0 says how many
        b0 = masks.make_buttons(self, b0)
        masks.make_colorbar(self, b0)
        b0 += 1
        b0 = classgui.make_buttons(self, b0)
        b0 += 1

        # ------ CELL STATS / ROI SELECTION --------
        # which stats
        self.stats_to_show = [
            "med", "npix", "skew", "compact", "footprint", "aspect_ratio"
        ]
        lilfont = QtGui.QFont("Arial", 8)
        qlabel = QtGui.QLabel(self)
        qlabel.setFont(self.boldfont)
        qlabel.setText("<font color='white'>Selected ROI:</font>")
        self.l0.addWidget(qlabel, b0, 0, 1, 1)
        self.ROIedit = QtGui.QLineEdit(self)
        self.ROIedit.setValidator(QtGui.QIntValidator(0, 10000))
        self.ROIedit.setText("0")
        self.ROIedit.setFixedWidth(45)
        self.ROIedit.setAlignment(QtCore.Qt.AlignRight)
        self.ROIedit.returnPressed.connect(self.number_chosen)
        self.l0.addWidget(self.ROIedit, b0, 1, 1, 1)
        b0 += 1
        self.ROIstats = []
        self.ROIstats.append(qlabel)
        for k in range(1, len(self.stats_to_show) + 1):
            llabel = QtGui.QLabel(self.stats_to_show[k - 1])
            self.ROIstats.append(llabel)
            self.ROIstats[k].setFont(lilfont)
            self.ROIstats[k].setStyleSheet("color: white;")
            self.ROIstats[k].resize(self.ROIstats[k].minimumSizeHint())
            self.l0.addWidget(self.ROIstats[k], b0, 0, 1, 2)
            b0 += 1
        self.l0.addWidget(QtGui.QLabel(""), b0, 0, 1, 2)
        self.l0.setRowStretch(b0, 1)
        b0 += 2
        b0 = traces.make_buttons(self, b0)

        # zoom to cell CHECKBOX
        self.l0.setVerticalSpacing(4)
        self.checkBoxz = QtGui.QCheckBox("zoom to cell")
        self.checkBoxz.setStyleSheet("color: white;")
        self.zoomtocell = False
        self.checkBoxz.stateChanged.connect(self.zoom_cell)
        self.l0.addWidget(self.checkBoxz, b0, 15, 1, 2)
        return b0
    def __init__(self, parent=None):
        super(Sweep2DWidget, self).__init__(parent)
        # self.layout = QtGui.QHBoxLayout(self)
        self.layout = QtGui.QGridLayout(self)
        # self.caplayout = QtWidgets.QVBoxLayout(self)
        self.view1 = pg.PlotItem(title="Capacitance",
                                 labels={
                                     'right': "V1",
                                     'bottom': "V2",
                                     'top': "V2",
                                     'left': "V1"
                                 })
        self.w1autoLevels = True
        self.w2autoLevels = True

        self.chBx_autolevels1 = QtGui.QCheckBox('Auto Levels')
        self.chBx_autolevels1.setChecked(True)
        # self.chBx_autolevels1.stateChanged.connect()
        self.view1.setAspectLocked(True)
        self.win1 = pg.ImageView(view=self.view1)

        self.layout.addWidget(self.win1, *(0, 0))
        self.layout.addWidget(self.chBx_autolevels1, *(1, 0))

        # self.dislayout = QtWidgets.QVBoxLayout(self)
        self.view2 = pg.PlotItem(title="Dissipation",
                                 labels={
                                     'right': "V1",
                                     'bottom': "V2",
                                     'top': "V2",
                                     'left': "V1"
                                 })

        self.view2.setAspectLocked(True)
        self.chBx_autolevels2 = QtGui.QCheckBox('Auto Levels')
        self.win2 = pg.ImageView(view=self.view2)
        self.layout.addWidget(self.win2, *(0, 1))
        self.layout.addWidget(self.chBx_autolevels2, *(1, 1))

        # self.layout.addWidget(self.win1)

        # self.win2 = pg.ImageView(view=self.view2)
        # self.layout.addWidget(self.win2)

        self.win1.ui.roiBtn.hide()
        self.win1.ui.menuBtn.hide()
        self.win2.ui.roiBtn.hide()
        self.win2.ui.menuBtn.hide()
        self.win1.ui.histogram.item.gradient.loadPreset('bipolar')
        self.win2.ui.histogram.item.gradient.loadPreset('bipolar')
        # self.win1.ui.histogram.item.region.hide()
        self.setLayout(self.layout)
Beispiel #6
0
 def _createChannelControl(self):
     self._channelControlDock = QtGui.QDockWidget('Channels', self)
     self._channelCtrlBox = QtGui.QGroupBox(self)
     self._naConductanceToggle = QtGui.QCheckBox('Block Na+ channel', self._channelCtrlBox)
     self._naConductanceToggle.setToolTip('<html>%s</html>' % (tooltip_NaChan))
     self._kConductanceToggle = QtGui.QCheckBox('Block K+ channel', self._channelCtrlBox)
     self._kConductanceToggle.setToolTip('<html>%s</html>' % (tooltip_KChan))
     self._kOutLabel = QtGui.QLabel('[K+]out (mM)', self._channelCtrlBox)
     self._kOutEdit = QtGui.QLineEdit('%g' % (self.squid_setup.squid_axon.K_out), 
                                      self._channelCtrlBox)
     self._kOutLabel.setToolTip('<html>%s</html>' % (tooltip_Nernst))
     self._kOutEdit.setToolTip('<html>%s</html>' % (tooltip_Nernst))
     set_default_line_edit_size(self._kOutEdit)
     self._naOutLabel = QtGui.QLabel('[Na+]out (mM)', self._channelCtrlBox)
     self._naOutEdit = QtGui.QLineEdit('%g' % (self.squid_setup.squid_axon.Na_out), 
                                      self._channelCtrlBox)
     self._naOutLabel.setToolTip('<html>%s</html>' % (tooltip_Nernst))
     self._naOutEdit.setToolTip('<html>%s</html>' % (tooltip_Nernst))
     set_default_line_edit_size(self._naOutEdit)
     self._kInLabel = QtGui.QLabel('[K+]in (mM)', self._channelCtrlBox)
     self._kInEdit = QtGui.QLineEdit('%g' % (self.squid_setup.squid_axon.K_in), 
                                      self._channelCtrlBox)
     self._kInEdit.setToolTip(tooltip_Nernst)
     self._naInLabel = QtGui.QLabel('[Na+]in (mM)', self._channelCtrlBox)
     self._naInEdit = QtGui.QLineEdit('%g' % (self.squid_setup.squid_axon.Na_in), 
                                      self._channelCtrlBox)
     self._naInEdit.setToolTip('<html>%s</html>' % (tooltip_Nernst))
     self._temperatureLabel = QtGui.QLabel('Temperature (C)', self._channelCtrlBox)
     self._temperatureEdit = QtGui.QLineEdit('%g' % (self.defaults['temperature'] - CELSIUS_TO_KELVIN),
                                             self._channelCtrlBox)
     self._temperatureEdit.setToolTip('<html>%s</html>' % (tooltip_Nernst))
     set_default_line_edit_size(self._temperatureEdit)
     for child in self._channelCtrlBox.children():
         if isinstance(child, QtGui.QLineEdit):
             set_default_line_edit_size(child)
     layout = QtGui.QGridLayout(self._channelCtrlBox)
     layout.addWidget(self._naConductanceToggle, 0, 0)
     layout.addWidget(self._kConductanceToggle, 1, 0)
     layout.addWidget(self._naOutLabel, 2, 0)
     layout.addWidget(self._naOutEdit, 2, 1)
     layout.addWidget(self._naInLabel, 3, 0)
     layout.addWidget(self._naInEdit, 3, 1)
     layout.addWidget(self._kOutLabel, 4, 0)
     layout.addWidget(self._kOutEdit, 4, 1)
     layout.addWidget(self._kInLabel, 5, 0)
     layout.addWidget(self._kInEdit, 5, 1)
     layout.addWidget(self._temperatureLabel, 6, 0)
     layout.addWidget(self._temperatureEdit, 6, 1)
     layout.setRowStretch(7, 1.0)
     self._channelCtrlBox.setLayout(layout)
     self._channelControlDock.setWidget(self._channelCtrlBox)
     return self._channelCtrlBox        
Beispiel #7
0
    def _add_data_option_menu(self):
        """add data option submenu to Plot Options menu
        
        Data option menu contains actions to to clear present data; set the
        clear-on-startup option; and enable data autosave option
        
        """
        
        # Clear data
        clear_data = QtGui.QAction(
            "Clear Data", 
            self.data_options
        )
        clear_data.triggered.connect(self.tpg.clear_all_data)
        self.data_options.addAction(clear_data)
        self.data_options.clear_data = clear_data

        # Automatic clear data
        automatic_clear = QtGui.QWidgetAction(self.data_options)
        automatic_clear_checkbox = QtGui.QCheckBox("Clear Old Data on Start")
        automatic_clear.setDefaultWidget(automatic_clear_checkbox)
        automatic_clear_checkbox.stateChanged.connect(self.tpg.save_data_settings)
        self.data_options.addAction(automatic_clear)
        self.data_options.automatic_clear = automatic_clear
        self.data_options.automatic_clear_checkbox = automatic_clear_checkbox

        # autosave
        autosave = QtGui.QWidgetAction(self.data_options)
        autosave_widget = QWidget()
        autosave_layout = QHBoxLayout()
        autosave_layout.setContentsMargins(0,0,0,0)
        autosave_checkbox = QtGui.QCheckBox("Automatically Save Data")
        autosave_checkbox.stateChanged.connect(self.tpg.set_all_autosave)
        autosave_checkbox.setChecked(self.tpg.settings['do_autosave'])
        autosave_nr = QSpinBox()
        autosave_nr.setButtonSymbols(QAbstractSpinBox().NoButtons)
        autosave_nr.setRange(10, 1000)
        autosave_nr.setValue(self.tpg.settings['autosave_nr'])
        autosave_nr.valueChanged.connect(self.tpg.set_all_autosave_nr)
        autosave_layout.addWidget(autosave_checkbox)
        autosave_layout.addWidget(autosave_nr)
        autosave_widget.setLayout(autosave_layout)
        autosave.setDefaultWidget(autosave_widget)
        self.data_options.addAction(autosave)
        # self.data_options.autosave = autosave
        setattr(self.data_options, 'autosave', autosave)
        setattr(self.data_options, 'autosave_checkbox', autosave_checkbox)
        setattr(self.data_options, 'autosave_nr', autosave_nr)        
    def createWidgets(self):
        self.mainFrame = QtGui.QWidget()

        self.label_startTstamp = QtGui.QLabel(str(self.startTstamp))
        self.label_endTstamp = QtGui.QLabel(str(self.endTstamp))
        self.lineEdit_currentTstamp = QtGui.QLineEdit(
            str(self.startTstamp + self.currentImageIndex))

        self.checkbox_applyDark = QtGui.QCheckBox('Subtract Dark')
        self.button_generateDark = QtGui.QPushButton('Generate Dark')
        self.checkbox_applyDark.setChecked(False)
        self.lineEdit_darkStart = QtGui.QLineEdit(str(self.darkStart))
        self.lineEdit_darkEnd = QtGui.QLineEdit(str(self.darkEnd))

        self.arrayImageWidget = ArrayImageWidget(parent=self,
                                                 hoverCall=self.hoverCanvas)
        self.button_jumpToBeginning = QtGui.QPushButton('|<')
        self.button_jumpToEnd = QtGui.QPushButton('>|')
        self.button_incrementBack = QtGui.QPushButton('<')
        self.button_incrementForward = QtGui.QPushButton('>')

        self.button_jumpToBeginning.setMaximumWidth(30)
        self.button_jumpToEnd.setMaximumWidth(30)
        self.button_incrementBack.setMaximumWidth(30)
        self.button_incrementForward.setMaximumWidth(30)
Beispiel #9
0
    def home(self):
        btn = QtGui.QPushButton("Quit", self)
        btn.clicked.connect(self.close_application)
        btn.resize(btn.minimumSizeHint())
        btn.move(0, 100)

        extractAction = QtGui.QAction(QtGui.QIcon('todachoppa.png'),
                                      'Flee the Scene', self)
        extractAction.triggered.connect(self.close_application)

        self.toolBar = self.addToolBar("Extraction")
        self.toolBar.addAction(extractAction)

        checkBox = QtGui.QCheckBox('Shrink Window', self)
        checkBox.move(100, 25)
        checkBox.stateChanged.connect(self.enlarge_window)

        self.progress = QtGui.QProgressBar(self)
        self.progress.setGeometry(200, 80, 250, 20)

        self.btn = QtGui.QPushButton("Download", self)
        self.btn.move(200, 120)
        self.btn.clicked.connect(self.download)

        self.show()
Beispiel #10
0
    def __init__(self):
        super(DeleteButtonExample, self).__init__()

        delete_gb = QtGui.QGroupBox("QGroupBox with Delete Button")
        group_box_vbl = QtGui.QVBoxLayout()
        group_box_vbl.setAlignment(QtCore.Qt.AlignTop)
        group_box_vbl.addSpacing(-14)
        delete_button_hbl = QtGui.QHBoxLayout()
        delete_button_cb = QtGui.QCheckBox()
        delete_button_cb.clicked.connect(self.delete_event)
        delete_button_cb.setStyleSheet(
            "QCheckBox::indicator:hover {image: url(del_btn_hover.png);}"
            "QCheckBox::indicator:!hover {image: url(del_btn_no_hover.png);}")
        delete_button_hbl.setAlignment(QtCore.Qt.AlignRight)
        delete_button_hbl.addWidget(delete_button_cb)
        delete_button_hbl.addSpacing(-13)
        group_box_vbl.addLayout(delete_button_hbl)
        delete_gb.setLayout(group_box_vbl)

        window_vbl = QtGui.QVBoxLayout()
        window_vbl.addWidget(delete_gb)
        self.setLayout(window_vbl)

        self.setGeometry(300, 300, 250, 150)
        self.setWindowTitle("QGroupBox with Delete Button")
        self.show()
Beispiel #11
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName(_fromUtf8("MainWindow"))
        MainWindow.resize(820, 650)
        MainWindow.setAutoFillBackground(False)
        MainWindow.setDocumentMode(False)
        self.centralwidget = QtGui.QWidget(MainWindow)
        self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
        self.verticalLayout = QtGui.QVBoxLayout(self.centralwidget)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setContentsMargins(-1, -1, 0, 0)
        self.horizontalLayout.setSpacing(10)
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.btnAdd = QtGui.QPushButton(self.centralwidget)
        self.btnAdd.setObjectName(_fromUtf8("btnAdd"))
        self.horizontalLayout.addWidget(self.btnAdd)
        self.chkMore = QtGui.QCheckBox(self.centralwidget)
        self.chkMore.setObjectName(_fromUtf8("chkMore"))
        self.horizontalLayout.addWidget(self.chkMore)
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.grPlot = PlotWidget(self.centralwidget)
        self.grPlot.setObjectName(_fromUtf8("grPlot"))
        self.verticalLayout.addWidget(self.grPlot)
        MainWindow.setCentralWidget(self.centralwidget)
        self.statusbar = QtGui.QStatusBar(MainWindow)
        self.statusbar.setObjectName(_fromUtf8("statusbar"))
        MainWindow.setStatusBar(self.statusbar)

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Beispiel #12
0
    def _add_local_fft(self):
        """add local_fft option to the Transform submenu in the Plot Option menu
        
        This function ammends functionality to the Transform submenu. Since the 
        Transform submenu is defined in the pyqtgraph ContextMenu class this
        function has to retrieve the relevant QAction to successfully ammend 
        the functionality.
        
        """
        self.transform_menu = self.menu.actions()[0].menu()
        self.transform_menu.actions()[0].defaultWidget().layout().setContentsMargins(10,10,10,0)

        self.x_log_check = self.transform_menu.actions()[0].defaultWidget().layout().itemAt(1).widget()
        self.y_log_check = self.transform_menu.actions()[0].defaultWidget().layout().itemAt(2).widget()

        local_fourier = QtGui.QWidgetAction(self.transform_menu)
        local_fourier_widget = QWidget()
        lf_label = QLabel("Local Fourier Mode")
        local_fourier_checkbox = QtGui.QCheckBox()
        local_fourier_checkbox.stateChanged.connect(self.tpg.set_local_ft_mode)
        lf_layout = QHBoxLayout()
        lf_layout.setContentsMargins(10,0,0,0)
        lf_layout.addWidget(lf_label)
        lf_layout.addWidget(local_fourier_checkbox)
        local_fourier_widget.setLayout(lf_layout)
        local_fourier.setDefaultWidget(local_fourier_widget)
        self.transform_menu.addAction(local_fourier)
        self.transform_menu.local_fourier = local_fourier
    def createRecordGroupBox(self):
        self.recordForm = QtGui.QGroupBox("Video capture")
        self.recordFormLayout = QFormLayout()

        self.path_bx = QtGui.QLineEdit()
        self.resetPath()

        self.file_btn = QtGui.QPushButton("save to")
        self.file_btn.clicked.connect(self.on_getfile)

        self.file_bx = QtGui.QLineEdit()
        self.file_bx.textChanged.connect(self.on_fileChange)
        self.file_bx.setText(self.filename)


        self.save_btn = QtGui.QCheckBox()
        self.save_btn.setChecked(self.save)
        self.save_btn.stateChanged.connect(self.on_saveClick)


        hbox = QtGui.QHBoxLayout()
        self.recordFormLayout.addRow(self.file_btn, self.file_bx)
        self.recordFormLayout.addRow(QLabel("path:"), self.path_bx)
        self.recordFormLayout.addRow(QLabel("save:"), self.save_btn)


        self.recordForm.setLayout(self.recordFormLayout)
Beispiel #14
0
    def setupUi(self, parent, value, minval, maxval, jump):
        """
    Creates the widget.

    @param parent : the object which created this instance of SpinSlider
    @type  parent : QWidget

    @param minval : minimum value for the range
    @type  minval : int

    @param maxval : maximum value for the range
    @type  maxval : int

    @param jump : change in value when clicking beside the slider
    @type  jump : int
    """
        widget = self  # QtGui.QFrame(parent)
        widget.setFrameShape(QtGui.QFrame.Panel)
        widget.resize(100, 60)
        layout = QtGui.QVBoxLayout()
        layout.addStretch(1)

        toplayout = QtGui.QHBoxLayout()
        toplayout.addStretch(1)

        spin = QtGui.QSpinBox()
        spin.resize(60, 30)
        spin.setMinimum(minval)
        spin.setMaximum(maxval)
        spin.setSingleStep(1)
        spin.setValue(value)
        toplayout.addWidget(spin)

        self.push = QtGui.QCheckBox()
        self.push.resize(30, 30)
        self.push.setChecked(True)
        toplayout.addWidget(self.push)

        layout.addLayout(toplayout)

        slide = QtGui.QSlider()
        slide.resize(100, 30)
        slide.setMinimum(minval)
        slide.setMaximum(maxval)
        slide.setSingleStep(1)
        slide.setPageStep(jump)
        slide.setValue(value)
        slide.setOrientation(QtCore.Qt.Horizontal)
        layout.addWidget(slide)

        widget.setLayout(layout)

        QtCore.QObject.connect(slide, QtCore.SIGNAL("valueChanged(int)"),
                               spin.setValue)
        QtCore.QObject.connect(spin, QtCore.SIGNAL("valueChanged(int)"),
                               slide.setValue)
        QtCore.QObject.connect(slide, QtCore.SIGNAL("valueChanged(int)"),
                               self.valueChanged)
        QtCore.QObject.connect(self.push, QtCore.SIGNAL("clicked()"),
                               self.setValue)
Beispiel #15
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName(_fromUtf8("MainWindow"))
        MainWindow.resize(1095, 681)
        MainWindow.setAutoFillBackground(False)
        self.centralwidget = QtGui.QWidget(MainWindow)
        self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
        self.gridLayout = QtGui.QGridLayout(self.centralwidget)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.label = QtGui.QLabel(self.centralwidget)
        self.label.setText(_fromUtf8(""))
        self.label.setPixmap(QtGui.QPixmap(_fromUtf8("topoMap.jpg")))
        self.label.setScaledContents(True)
        self.label.setObjectName(_fromUtf8("label"))
        self.gridLayout.addWidget(self.label, 0, 1, 1, 1)
        self.verticalLayout = QtGui.QVBoxLayout()
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.ChooseLayersText = QtGui.QLabel(self.centralwidget)
        self.ChooseLayersText.setAlignment(QtCore.Qt.AlignLeading
                                           | QtCore.Qt.AlignLeft
                                           | QtCore.Qt.AlignTop)
        self.ChooseLayersText.setObjectName(_fromUtf8("ChooseLayersText"))
        self.verticalLayout.addWidget(self.ChooseLayersText, 0,
                                      QtCore.Qt.AlignTop)
        self.TopoCheckBox = QtGui.QCheckBox(self.centralwidget)
        self.TopoCheckBox.setIconSize(QtCore.QSize(30, 30))
        self.TopoCheckBox.setChecked(True)
        self.TopoCheckBox.setAutoRepeat(False)
        self.TopoCheckBox.setObjectName(_fromUtf8("TopoCheckBox"))
        self.verticalLayout.addWidget(self.TopoCheckBox, 0, QtCore.Qt.AlignTop)
        self.ProbCheckBox = QtGui.QCheckBox(self.centralwidget)
        self.ProbCheckBox.setIconSize(QtCore.QSize(30, 30))
        self.ProbCheckBox.setObjectName(_fromUtf8("ProbCheckBox"))
        self.verticalLayout.addWidget(self.ProbCheckBox, 0, QtCore.Qt.AlignTop)
        self.gridLayout.addLayout(self.verticalLayout, 0, 0, 1, 1)
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtGui.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 1095, 26))
        self.menubar.setObjectName(_fromUtf8("menubar"))
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtGui.QStatusBar(MainWindow)
        self.statusbar.setObjectName(_fromUtf8("statusbar"))
        MainWindow.setStatusBar(self.statusbar)

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Beispiel #16
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName(_fromUtf8("MainWindow"))
        MainWindow.resize(271, 554)
        self.centralwidget = QtGui.QWidget(MainWindow)
        self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
        self.gridLayout_2 = QtGui.QGridLayout(self.centralwidget)
        self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
        self.verticalLayout = QtGui.QVBoxLayout()
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.gridLayout = QtGui.QGridLayout()
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding,
                                       QtGui.QSizePolicy.Minimum)
        self.gridLayout.addItem(spacerItem, 1, 1, 1, 1)
        spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding,
                                        QtGui.QSizePolicy.Minimum)
        self.gridLayout.addItem(spacerItem1, 0, 1, 1, 1)
        self.FileButton = QtGui.QPushButton(self.centralwidget)
        self.FileButton.setObjectName(_fromUtf8("FileButton"))
        self.gridLayout.addWidget(self.FileButton, 0, 0, 1, 1)
        self.liveCheckBox = QtGui.QCheckBox(self.centralwidget)
        self.liveCheckBox.setObjectName(_fromUtf8("liveCheckBox"))
        self.gridLayout.addWidget(self.liveCheckBox, 1, 2, 1, 1)
        self.updateButton = QtGui.QPushButton(self.centralwidget)
        self.updateButton.setObjectName(_fromUtf8("updateButton"))
        self.gridLayout.addWidget(self.updateButton, 1, 0, 1, 1)
        self.refreshTime = QtGui.QDoubleSpinBox(self.centralwidget)
        self.refreshTime.setMinimum(1.0)
        self.refreshTime.setMaximum(999.99)
        self.refreshTime.setProperty("value", 2.0)
        self.refreshTime.setObjectName(_fromUtf8("refreshTime"))
        self.gridLayout.addWidget(self.refreshTime, 1, 3, 1, 1)
        self.heardBeat = QtGui.QRadioButton(self.centralwidget)
        self.heardBeat.setText(_fromUtf8(""))
        self.heardBeat.setObjectName(_fromUtf8("heardBeat"))
        self.gridLayout.addWidget(self.heardBeat, 1, 4, 1, 1)
        self.verticalLayout.addLayout(self.gridLayout)
        self.treeWidget = QtGui.QTreeWidget(self.centralwidget)
        self.treeWidget.setObjectName(_fromUtf8("treeWidget"))
        self.treeWidget.headerItem().setText(0, _fromUtf8("1"))
        self.verticalLayout.addWidget(self.treeWidget)
        self.Dataset_properties = QtGui.QPlainTextEdit(self.centralwidget)
        self.Dataset_properties.setReadOnly(True)
        self.Dataset_properties.setObjectName(_fromUtf8("Dataset_properties"))
        self.verticalLayout.addWidget(self.Dataset_properties)
        self.gridLayout_2.addLayout(self.verticalLayout, 0, 0, 1, 1)
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtGui.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 271, 22))
        self.menubar.setObjectName(_fromUtf8("menubar"))
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtGui.QStatusBar(MainWindow)
        self.statusbar.setObjectName(_fromUtf8("statusbar"))
        MainWindow.setStatusBar(self.statusbar)

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
def checkItem(text,confunc,context,init=False):
    '''creating a checkbox with annotation
    '''
    ch_wid=QtGui.QCheckBox(context.tr(text))
    context.connect(ch_wid, QtCore.SIGNAL("clicked()"), confunc)
    mee_box=QtGui.QWidgetAction(context)
    mee_box.setDefaultWidget(ch_wid)
    ch_wid.setChecked(init)
    return mee_box
Beispiel #18
0
    def _add_checkbox(self, groupbox, dict_checkbox):
        groupbox, horizontal_group, vertical_group = groupbox
        checkbox = QtGui.QCheckBox(groupbox)
        checkbox.setChecked(dict_checkbox.get(KW_GUI_DEFAULT))
        checkbox.setText(dict_checkbox.get(KW_GUI_NAME))

        horizontal_cb = QtGui.QHBoxLayout()
        horizontal_cb.addWidget(checkbox)
        horizontal_group.addLayout(horizontal_cb, 0)
        return checkbox, horizontal_cb
Beispiel #19
0
 def initUI(self):
     # self.devices = []
     self.mainLayout = QtGui.QHBoxLayout()
     self.mainLayout.setAlignment(QtCore.Qt.AlignLeft)
     self.buttons = QtGui.QCheckBox("Enable Touch")
     self.getEnableStatus()
     self.buttons.stateChanged.connect(self.buttonChange)
     # layout code
     self.mainLayout.addWidget(self.buttons)
     self.mainLayout.setAlignment(QtCore.Qt.AlignCenter)
     self.setLayout(self.mainLayout)
Beispiel #20
0
 def addSelectAllCheckBox(self):    
     self.selectAllCheckBox = QtGui.QCheckBox()
     self.deSelectAll       = True
     font                   = QtGui.QFont()
     font.setPointSize(9)
     self.selectAllCheckBox.setFont(font)
     self.selectAllCheckBox.setText(QtGui.QApplication.translate("Load", "Select All", None, QtGui.QApplication.UnicodeUTF8))
     self.selectAllCheckBox.setObjectName("selectAllCheckBox")
     self.selectAllCheckBox.setCheckState(QtCore.Qt.Checked)
     self.selectAllCheckBox.setTristate(on = False)
     self.uiLoad.SelectAllLayout.addWidget(self.selectAllCheckBox)
     self.connect(self.selectAllCheckBox, QtCore.SIGNAL('stateChanged(int)'), self.checkBoxState)
Beispiel #21
0
def put_accept_data_in_tree(tree_widget, on_accept_data_changed):
    accept_checkbox = QtGui.QCheckBox()
    accept_checkbox.setChecked(True)

    def on_state_changed(state):
        on_accept_data_changed(accept_checkbox.isChecked())

    accept_checkbox.stateChanged.connect(on_state_changed)

    item = QtGui.QTreeWidgetItem(['accept data'])
    tree_widget.addTopLevelItem(item)
    tree_widget.setItemWidget(item, 1, accept_checkbox)
Beispiel #22
0
    def setupUi(self, SearchWidget):
        SearchWidget.setObjectName("SearchWidget")
        SearchWidget.resize(718, 30)
        self.horizontalLayout = QtGui.QHBoxLayout(SearchWidget)
        self.horizontalLayout.setMargin(0)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.label = QtGui.QLabel(SearchWidget)
        self.label.setObjectName("label")
        self.horizontalLayout.addWidget(self.label)
        self.input = QtGui.QLineEdit(SearchWidget)
        self.input.setObjectName("input")
        self.horizontalLayout.addWidget(self.input)
        self.findPrevButton = QtGui.QToolButton(SearchWidget)
        self.findPrevButton.setObjectName("findPrevButton")
        self.horizontalLayout.addWidget(self.findPrevButton)
        self.findNextButton = QtGui.QToolButton(SearchWidget)
        self.findNextButton.setObjectName("findNextButton")
        self.horizontalLayout.addWidget(self.findNextButton)
        self.caseCheckBox = QtGui.QCheckBox(SearchWidget)
        self.caseCheckBox.setObjectName("caseCheckBox")
        self.horizontalLayout.addWidget(self.caseCheckBox)
        self.wrapCheckBox = QtGui.QCheckBox(SearchWidget)
        self.wrapCheckBox.setObjectName("wrapCheckBox")
        self.horizontalLayout.addWidget(self.wrapCheckBox)
        self.infoLabel = QtGui.QLabel(SearchWidget)
        self.infoLabel.setMinimumSize(QtCore.QSize(200, 0))
        self.infoLabel.setText("")
        self.infoLabel.setObjectName("infoLabel")
        self.horizontalLayout.addWidget(self.infoLabel)
        self.closeButton = QtGui.QToolButton(SearchWidget)
        self.closeButton.setText("")
        self.closeButton.setObjectName("closeButton")
        self.horizontalLayout.addWidget(self.closeButton)

        self.retranslateUi(SearchWidget)
        QtCore.QMetaObject.connectSlotsByName(SearchWidget)
        SearchWidget.setTabOrder(self.caseCheckBox, self.wrapCheckBox)
        SearchWidget.setTabOrder(self.wrapCheckBox, self.findNextButton)
        SearchWidget.setTabOrder(self.findNextButton, self.findPrevButton)
 def Create_checkbox(self):
     groupBox = QGroupBox("Electrodes for topomap")
     vbox = QtGui.QGridLayout()
     self.Check = []
     for i in range(8):
         self.Check.append([])
         for j in range(8):
             self.Check[i].append(
                 QtGui.QCheckBox(str(self.ch_names[8 * i + j])))
             vbox.addWidget(self.Check[i][j], i, j)
             self.Check[i][j].setChecked(True)
     groupBox.setLayout(vbox)
     return groupBox
Beispiel #24
0
    def __init__(self, tabletName, sensor, parent=None):
        QtGui.QWidget.__init__(self, parent)
        self.setFixedSize(250, 120)

        self.tabletName = tabletName
        self.sensor = sensor
        self.buttons = QtGui.QCheckBox("Inverse Buttons")
        self.buttons.setToolTip("Inverse mouse clicks on pen")
        self.buttons.stateChanged.connect(self.buttonChange)
        self.tiptouch = QtGui.QCheckBox("Pen Touch")
        self.tiptouch.setToolTip(
            "When enabled, pen must touch tablet to work.\nWhen disabled, hover will register."
        )
        self.tiptouch.stateChanged.connect(self.tipChange)
        #layout code
        self.mainLayout = QtGui.QVBoxLayout()
        self.mainLayout.addWidget(self.penSettings())
        if sensor == 'stylus':
            self.mainLayout.addWidget(self.buttons)
        self.mainLayout.addWidget(self.tiptouch)
        self.mainLayout.setAlignment(QtCore.Qt.AlignCenter)
        self.setLayout(self.mainLayout)
Beispiel #25
0
    def __init__(self, parent=None):
        super(LoginWidget, self).__init__(parent)

        ## create a control button
        self.button = QtGui.QPushButton('Start Plotting')

        ## create a checkbox
        self.check_box = QtGui.QCheckBox("run fft")

        ## A vertical layout box for putting control widgets
        self.control_column = QtGui.QVBoxLayout()
        self.control_column.addWidget(self.button)
        self.control_column.addWidget(self.check_box)

        ## A vertical layout box for holding horizontal graph layouts
        self.graph_column = QtGui.QVBoxLayout()

        self.graph_pair_row = [QtGui.QHBoxLayout() for i in range(4)]
        _ = [
            self.graph_column.addLayout(self.graph_pair_row[i])
            for i in range(len(self.graph_pair_row))
        ]

        ## create main panel layout
        self.main_panel_layout = QtGui.QHBoxLayout()
        self.main_panel_layout.addLayout(self.control_column)
        self.main_panel_layout.addLayout(self.graph_column)

        for i in range(len(self.graph_pair_row)):
            plots_in_current_row = []
            curves_in_current_row = []
            vline1_curves_in_current_row = []
            vline2_curves_in_current_row = []
            for j in range(2):
                plotter = pg.PlotWidget()

                self.graph_pair_row[i].addWidget(plotter)
                plots_in_current_row.append(plotter)
                curves_in_current_row.append(plotter.getPlotItem().plot())
                vline1_curves_in_current_row.append(
                    plotter.getPlotItem().plot())
                vline2_curves_in_current_row.append(
                    plotter.getPlotItem().plot())

            self.curves.append(curves_in_current_row)
            self.plots.append(plots_in_current_row)
            self.vline1_curves.append(vline1_curves_in_current_row)
            self.vline2_curves.append(vline2_curves_in_current_row)

        self.setLayout(self.main_panel_layout)
Beispiel #26
0
    def __init__(self, parent=None):
        QtGui.QTableView.__init__(self, parent)

        self.select_all = QtGui.QCheckBox(
            i18n('Select all packages in this group'), self)
        self.select_all.resize(parent.width(), 32)
        self.select_all.move(3, 3)
        self.select_all.setStyleSheet('padding:8px;padding-left:4px;')
        self.select_all.setAutoFillBackground(True)

        self.needs_select_all = True
        self.showComponents = False
        self.showIsA = False
        self.parent = parent
     def setupUi(self, ScrShot):
         ScrShot.setObjectName(_fromUtf8("ScrShot"))
         ScrShot.resize(270, 270)
         self.verticalLayout = QtGui.QVBoxLayout(ScrShot)
         self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
         self.labelShow = QtGui.QLabel(ScrShot)
         sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
         sizePolicy.setHorizontalStretch(0)
         sizePolicy.setVerticalStretch(0)
         sizePolicy.setHeightForWidth(self.labelShow.sizePolicy().hasHeightForWidth())
         self.labelShow.setSizePolicy(sizePolicy)
         self.labelShow.setText(_fromUtf8(""))
         self.labelShow.setObjectName(_fromUtf8("labelShow"))
         self.verticalLayout.addWidget(self.labelShow)
         self.groupBox = QtGui.QGroupBox(ScrShot)
         self.groupBox.setObjectName(_fromUtf8("groupBox"))
         self.verticalLayout_2 = QtGui.QVBoxLayout(self.groupBox)
         self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
         self.horizontalLayout_2 = QtGui.QHBoxLayout()
         self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
         self.labelSpinBox = QtGui.QLabel(self.groupBox)
         self.labelSpinBox.setObjectName(_fromUtf8("labelSpinBox"))
         self.horizontalLayout_2.addWidget(self.labelSpinBox)
         self.spinBox = QtGui.QSpinBox(self.groupBox)
         self.spinBox.setObjectName(_fromUtf8("spinBox"))
         self.horizontalLayout_2.addWidget(self.spinBox)
         self.verticalLayout_2.addLayout(self.horizontalLayout_2)
         self.checkBoxHideThis = QtGui.QCheckBox(self.groupBox)
         self.checkBoxHideThis.setObjectName(_fromUtf8("checkBoxHideThis"))
         self.verticalLayout_2.addWidget(self.checkBoxHideThis)
         self.verticalLayout.addWidget(self.groupBox)
         self.horizontalLayout = QtGui.QHBoxLayout()
         self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
         spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
         self.horizontalLayout.addItem(spacerItem)
         self.pushButtonNew = QtGui.QPushButton(ScrShot)
         self.pushButtonNew.setObjectName(_fromUtf8("pushButtonNew"))
         self.horizontalLayout.addWidget(self.pushButtonNew)
         self.pushButtonSave = QtGui.QPushButton(ScrShot)
         self.pushButtonSave.setObjectName(_fromUtf8("pushButtonSave"))
         self.horizontalLayout.addWidget(self.pushButtonSave)
         self.pushButton_Quit = QtGui.QPushButton(ScrShot)
         self.pushButton_Quit.setObjectName(_fromUtf8("pushButton_Quit"))
         self.horizontalLayout.addWidget(self.pushButton_Quit)
         self.verticalLayout.addLayout(self.horizontalLayout)
 
         self.retranslateUi(ScrShot)
         QtCore.QMetaObject.connectSlotsByName(ScrShot)
Beispiel #28
0
  def make_checkbutton_row(self, row, row_name, states, action):
    """
    Make a row of checkbuttons

    Four parameters are required to describe this row.

    @param row : row number
    @type  row : int

    @param row_name : name of monitor data
    @type  row_name : str

    @param states : checkbutton states
    @type  states : dict of bool

    @param action : method to invoke on state change
    @type  action : dict of functions
    """
    rowLabel = QtGui.QLabel(row_name)
    rowLabel.setSizePolicy(8,0)
    self.gridLayout.addWidget(rowLabel, row, 0, 1, 1,
                              QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
    self.logger.debug("make_checkbutton_row: processing dictionary: %s",
                      str(states))
    flatdict = flattenDict(states)
    keys = flatdict.keys()
    keys.sort()
    self.logger.debug("make_checkbutton_row: new keys for checkbox row: %s",
                      str(keys))
    checkbuttons = {}
    col = 1
    if keys:
      keylen = len(keys[0])
      for key in keys:
        col, colspan = self._position_widget(key,keylen,col)
        checkbuttons[key] = QtGui.QCheckBox("On")
        checkbuttons[key].setSizePolicy(8,0)
        self.gridLayout.addWidget(checkbuttons[key],
                                  row, col, 1, colspan,
                                  QtCore.Qt.AlignHCenter|QtCore.Qt.AlignTop)
        if flatdict[key] == None:
          checkbuttons[key].setDisabled(True)
        else:
          checkbuttons[key].setChecked(flatdict[key])
          checkbuttons[key].clicked.connect(slotgen((self,row_name)+key,
                                                     action))
        col += colspan
    return checkbuttons
Beispiel #29
0
    def insertMixture(self, mixture):
        start = time.clock()
        self.clear()
        for molName in mixture:
            print("insertMixture", molName)
            row = QtGui.QTreeWidgetItem(self)
            self.addTopLevelItem(row)

            showCheckbox = QtGui.QCheckBox()
            showCheckbox.setChecked(True)
            row.setText(0, str(1))
            self.setItemWidget(row, 1, showCheckbox)  #!!!!
            row.setText(2, mixture.getMolecule(molName).molname())
            row.setText(3, str(mixture.getMolecule(molName).order()))
        stop = time.clock()
        print("insertMixture time", stop - start)
Beispiel #30
0
 def __init__(self, parent=None):
     QtGui.QDialog.__init__(self, parent)
     self.resize(320, 100)
     self.setWindowTitle('set remote db')
     self.remote_cb = QtGui.QCheckBox("use remote database")
     if self.__class__.remote_mode:
         self.remote_cb.toggle()
     self.remote_cb.stateChanged.connect(self.set_remote_mode)
     grid = QtGui.QGridLayout()
     grid.addWidget(self.remote_cb, 0, 0, 1, 1)
     grid.addWidget(QtGui.QLabel(u'dowload image thread num', parent=self),
                    1, 0, 1, 1)
     self.thread_num = QtGui.QSpinBox()
     self.thread_num.setRange(1, 10)
     self.thread_num.setValue(self.__class__.dowload_thead_num)
     self.thread_num.valueChanged.connect(self.set_thread_num)
     grid.addWidget(self.thread_num, 1, 1, 1, 1)
     grid.addWidget(
         QtGui.QLabel(u'remote db url[123.57.438.245/]', parent=self), 2, 0,
         1, 1)
     self.remote_url_line = QtGui.QLineEdit(parent=self)
     if self.__class__.remote_url:
         self.remote_url_line.setText(self.__class__.remote_url)
     grid.addWidget(self.remote_url_line, 2, 1, 1, 1)
     grid.addWidget(QtGui.QLabel(u'remote image list', parent=self), 3, 0,
                    1, 1)
     self.server_image_list = QtGui.QLineEdit(parent=self)
     if self.__class__.server_image_list:
         self.server_image_list.setText(self.__class__.server_image_list)
     grid.addWidget(self.server_image_list, 3, 1, 1, 1)
     buttonBox = QtGui.QDialogButtonBox(parent=self)
     buttonBox.setOrientation(QtCore.Qt.Horizontal)
     buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel
                                  | QtGui.QDialogButtonBox.Ok)
     buttonBox.accepted.connect(self.accept)
     buttonBox.rejected.connect(self.reject)
     layout = QtGui.QVBoxLayout()
     layout.addLayout(grid)
     spacerItem = QtGui.QSpacerItem(20, 48, QtGui.QSizePolicy.Minimum,
                                    QtGui.QSizePolicy.Expanding)
     layout.addItem(spacerItem)
     layout.addWidget(buttonBox)
     self.setLayout(layout)