def setupUI(self):

        layout = QVBoxLayout()
        layout.setContentsMargins(20, 20, 20, 10)

        selectGroup = QGroupBox("Select")
        form1 = QFormLayout()
        form1.addRow(QLabel("Name"), self.nameSearch)
        form1.addRow(QLabel("ID No."), self.id)
        selectGroup.setLayout(form1)

        editGroup = QGroupBox("Edit below")
        form = QFormLayout()
        form.setSpacing(20)
        form.addRow(QLabel("Name"), self.nameEdit)
        form.addRow(QLabel("Designation"), self.designation)
        form.addRow(QLabel("Original Pay"), self.originalPay)
        form.addRow(QLabel("Original Pay Grade"), self.originalPayGrade)
        form.addRow(QLabel("Date of joining"), self.DOJ)
        form.addRow(QLabel("Pan No."), self.pan)
        editGroup.setLayout(form)

        layout.addWidget(selectGroup)
        layout.addWidget(editGroup)
        layout.addStretch()
        bttnLayout = QHBoxLayout()
        bttnLayout.addStretch()
        bttnLayout.addWidget(self.bttnCancel)
        bttnLayout.addWidget(self.bttnSave)

        layout.addLayout(bttnLayout)
        self.setLayout(layout)
Esempio n. 2
0
    def layoutWidgets(self):
        layout = QVBoxLayout()

        form = QFormLayout()
        form.addRow("C&reator", self.creatorLineEdit)
        form.addRow("&Initials", self.initialsLineEdit)
        layout.addLayout(form)

        form = QFormLayout()
        form.addRow("For This Index", self.thisLanguageComboBox)
        form.addRow("Default", self.defaultLanguageComboBox)
        self.languageGroupBox.setLayout(form)
        layout.addWidget(self.languageGroupBox)

        form = QFormLayout()
        form.addRow("&Highest Page Number", self.highestPageSpinBox)
        form.addRow("Largest &Page Range Span", self.largestPageRangeSpinBox)
        form.addRow("&Most Pages per Entry", self.mostPagesSpinBox)
        self.limitsGroupBox.setLayout(form)
        hbox = QHBoxLayout()
        hbox.addWidget(self.limitsGroupBox)
        hbox.addStretch()
        layout.addLayout(hbox)

        layout.addStretch()
        self.setLayout(layout)
    def setupUI(self):

        layout = QVBoxLayout()
        layout.setContentsMargins(20, 20, 20, 10)

        datelayout = QHBoxLayout()
        datelayout.addWidget(QLabel("Salary for month of "))
        datelayout.addWidget(self.month)
        datelayout.addWidget(self.year)
        datelayout.addStretch()
        layout.addLayout(datelayout)

        form = QFormLayout()
        form.setSpacing(10)
        form.addRow(QLabel("Name"), self.name)
        form.addRow(QLabel("ID No."), self.id)
        form.addRow(QLabel("Designation"), self.designation)
        form.addRow(QLabel("Original Pay"), self.originalPay)
        form.addRow(QLabel("Original Pay Grade"), self.originalPayGrade)
        form.addRow(QLabel("Date of joining"), self.DOJ)
        form.addRow(QLabel("Pan No."), self.pan)

        infoGroup = QGroupBox("Basic Info")
        infoGroup.setLayout(form)
        layout.addWidget(infoGroup)

        leftForm = QFormLayout()
        leftForm.addRow(QLabel("Dearness Allowance"), self.da_percent)
        leftForm.addRow(QLabel("Housing Rent Allowance"), self.hra_percent)
        leftForm.addRow(QLabel("Transport Allowance"), self.ta_percent)

        leftGroup = QGroupBox("Allowances")
        leftGroup.setLayout(leftForm)

        rightForm = QFormLayout()
        rightForm.addRow(QLabel("Income Tax"), self.it_percent)
        rightForm.addRow(QLabel("Profession Tax"), self.pt_percent)

        rightGroup = QGroupBox("Deductions")
        rightGroup.setLayout(rightForm)

        table = QHBoxLayout()
        table.addWidget(leftGroup)
        table.addWidget(rightGroup)

        layout.addLayout(table)

        layout.addStretch()
        bttnLayout = QHBoxLayout()
        bttnLayout.addStretch()
        bttnLayout.addWidget(self.bttnCancel)
        bttnLayout.addWidget(self.bttnCalculate)

        layout.addLayout(bttnLayout)
        self.setLayout(layout)
    def testGetLayoutPosition(self):
        formlayout = QFormLayout()
        layout = QFormLayout()
        row, role = formlayout.getLayoutPosition(layout)
        self.assert_(isinstance(row, int))
        self.assert_(isinstance(role, QFormLayout.ItemRole))
        self.assertEqual(row, -1)

        formlayout.addRow(layout)
        row, role = formlayout.getLayoutPosition(layout)
        self.assert_(isinstance(row, int))
        self.assert_(isinstance(role, QFormLayout.ItemRole))
        self.assertEqual(row, 0)
        self.assertEqual(role, QFormLayout.SpanningRole)
Esempio n. 5
0
    def setupUI(self):

        paneLayout = QHBoxLayout()
        paneLayout.setContentsMargins(0, 0, 0, 0)

        leftPane = QFrame()
        leftPane.setObjectName("leftPane")

        leftPaneLayout = QVBoxLayout()
        leftPaneLayout.setContentsMargins(20, 20, 20, 10)
        heading = QLabel("Select Employee: ")
        heading.setObjectName("heading")
        leftPaneLayout.addWidget(heading)
        leftPaneLayout.addSpacing(10)

        form1 = QFormLayout()
        form1.addRow(QLabel("Name"), self.nameSearch)
        form1.addRow(QLabel("ID No."), self.id)
        leftPaneLayout.addLayout(form1)
        leftPaneLayout.addStretch()
        leftPane.setLayout(leftPaneLayout)

        layout = QVBoxLayout()
        layout.setContentsMargins(20, 20, 20, 10)

        editGroup = QGroupBox("Edit below")
        form = QFormLayout()
        form.setContentsMargins(10, 10, 10, 30)
        form.setSpacing(20)
        form.addRow(QLabel("Name"), self.nameEdit)
        form.addRow(QLabel("Designation"), self.designation)
        form.addRow(QLabel("Original Pay"), self.originalPay)
        form.addRow(QLabel("Original Pay Grade"), self.originalPayGrade)
        form.addRow(QLabel("Date of joining"), self.DOJ)
        form.addRow(QLabel("Pan No."), self.pan)
        editGroup.setLayout(form)

        layout.addWidget(editGroup)
        layout.addStretch()
        bttnLayout = QHBoxLayout()
        bttnLayout.addStretch()
        bttnLayout.addWidget(self.bttnCancel)
        bttnLayout.addWidget(self.bttnSave)

        layout.addLayout(bttnLayout)

        paneLayout.addWidget(leftPane)
        paneLayout.addLayout(layout)
        self.setLayout(paneLayout)
Esempio n. 6
0
 def setUpUI(self):
     layout = QVBoxLayout()
     form = QFormLayout()
     form.addRow(QLabel("text file"), self.files1)
     form.addRow(QLabel(".csv file"), self.files2)
     layout.addLayout(form)
     self.setLayout(layout)
    def setupUI(self):
        # self.bttnAddEmployee.setMinimumSize(100, 30)
        # self.bttnCancel.setMinimumSize(100, 30)
        # self.id.setMaximumWidth(800)
        # self.name.setMaximumWidth(800)
        # self.designation.setMaximumWidth(800)
        # self.originalPay.setMaximumWidth(800)
        # self.originalPayGrade.setMaximumWidth(800)
        # self.DOJ.setMaximumWidth(800)
        # self.pan.setMaximumWidth(800)

        layout = QVBoxLayout()
        layout.setContentsMargins(20, 20, 20, 10)
        form = QFormLayout()
        form.setSpacing(20)
        form.addRow(QLabel("ID No."), self.id)
        form.addRow(QLabel("Name"), self.name)
        form.addRow(QLabel("Designation"), self.designation)
        form.addRow(QLabel("Original Pay"), self.originalPay)
        form.addRow(QLabel("Original Pay Grade"), self.originalPayGrade)
        form.addRow(QLabel("Date of joining"), self.DOJ)
        form.addRow(QLabel("Pan No."), self.pan)
        layout.addLayout(form)
        layout.addStretch()
        bttnLayout = QHBoxLayout()
        bttnLayout.addStretch()
        bttnLayout.addWidget(self.bttnCancel)
        bttnLayout.addWidget(self.bttnAddEmployee)

        layout.addLayout(bttnLayout)
        self.setLayout(layout)
    def setupUI(self):
        """Arranges GUI elements inside the widget properly"""

        layout = QVBoxLayout()
        layout.setContentsMargins(20, 20, 20, 10)
        form = QFormLayout()
        form.setSpacing(20)

        form.addRow(QLabel("Deignation"), self.designation)
        form.addRow(QLabel("Dearness Allowance"), self.da)
        form.addRow(QLabel("House Rent Allowance"), self.hra)
        form.addRow(QLabel("Transport Allowance"), self.ta)
        form.addRow(QLabel("Income Tax"), self.it)
        form.addRow(QLabel("Professional Tax"), self.pt)

        layout.addLayout(form)
        layout.addStretch()
        bttnLayout = QHBoxLayout()
        bttnLayout.addStretch()
        bttnLayout.addWidget(self.bttnCancel)
        bttnLayout.addWidget(self.bttnAddDesignation)


        layout.addLayout(bttnLayout)
        self.setLayout(layout)
 def setUpUI(self):
     layout = QVBoxLayout()
     form = QFormLayout()
     form.addRow(QLabel("Satellite Data File"), self.files1)
     form.addRow(QLabel("Work Station Position DataFile"), self.files2)
     layout.addLayout(form)
     self.setLayout(layout)
Esempio n. 10
0
    def __init__(self, parent):
        global configuration
        super(EditConfigurationDialog, self).__init__(parent)

        title = _("Preferences")
        self.setWindowTitle(title)
        self.title_widget = TitleWidget(title, self)

        self.buttons = QDialogButtonBox()
        self.buttons.addButton(QDialogButtonBox.Ok)
        self.buttons.addButton(QDialogButtonBox.Cancel)

        self.font_select = QCheckBox()
        self.server_address = QLineEdit()

        form_layout = QFormLayout()
        form_layout.addRow(_("Fonts"), self.font_select)
        form_layout.addRow(_("Server's IP address"), self.server_address)

        top_layout = QVBoxLayout()
        top_layout.addWidget(self.title_widget)
        top_layout.addLayout(form_layout)
        top_layout.addWidget(self.buttons)

        self.setLayout(top_layout)  # QWidget takes ownership of the layout
        self.buttons.accepted.connect(self.save_and_accept)
        self.buttons.rejected.connect(self.cancel)

        self._load_configuration(configuration)
Esempio n. 11
0
    def __init__(self):
        super(DirectoryDialog, self).__init__()

        self.setWindowTitle("Query")
        rect = QApplication.desktop().screenGeometry()
        height = rect.height()
        width = rect.width()
        self.setGeometry(width / 3, height / 3, width / 3, height / 8)

        formLayout = QFormLayout()

        self.dir = QLineEdit()
        self.dir.setReadOnly(True)
        formLayout.addRow(QLabel("Select a folder"), self.dir)
        browseBtn = QPushButton("Browse")
        browseBtn.clicked.connect(self.browseAction)

        formLayout.addWidget(browseBtn)

        btnOk = QPushButton("Ok")
        btnOk.clicked.connect(self.okAction)

        btnCancel = QPushButton("Cancel")
        btnCancel.clicked.connect(self.reject)

        group = QDialogButtonBox()
        group.addButton(btnOk, QDialogButtonBox.AcceptRole)
        group.addButton(btnCancel, QDialogButtonBox.RejectRole)
        formLayout.addRow(group)

        self.setLayout(formLayout)
        self.setWindowIcon(QIcon("res/SplashScreen.png"))
        self.__result = None
Esempio n. 12
0
    def __init__(self, parent=None):
        super(TransferTaskDialog, self).__init__(parent)

        layout = QFormLayout(self)

        self.to_queue_selector = QComboBox()
        self.from_queue_selector = QComboBox()

        queue_list = cqmanage.cqQueueList()
        for queue in queue_list:
            self.to_queue_selector.addItem(str(queue))
            self.from_queue_selector.addItem(str(queue))

        self.number_to_transfer = QLineEdit("")

        layout.addRow("To Queue:", self.to_queue_selector)
        layout.addRow("From Queue:", self.from_queue_selector)
        layout.addRow("Amount:", self.number_to_transfer)

        # OK and Cancel buttons
        self.buttons = QDialogButtonBox(
            QDialogButtonBox.Ok | QDialogButtonBox.Cancel, Qt.Horizontal, self)
        layout.addWidget(self.buttons)

        self.buttons.accepted.connect(self.accept)
        self.buttons.rejected.connect(self.reject)

        self.setWindowTitle("Transfer Tasks")
        self.resize(225, 150)
Esempio n. 13
0
    def __init__(self, parent):
        super(PresenceDialog, self).__init__(parent)

        self.model = QuickComboModel(None)

        self.tar_type_edit = TaskActionReportTypeComboBox("action_type",
                                                          _("Action"),
                                                          nullable=False)
        self.tar_type_edit.set_model(
            [TaskActionReportType.day_in, TaskActionReportType.day_out])
        self.start_time_edit = TimeStampEdit("start_time",
                                             _("Start time"),
                                             nullable=False)
        self.form_fields = [self.tar_type_edit, self.start_time_edit]

        form_layout = QFormLayout()
        form_layout.addRow(_("Action"), self.tar_type_edit.widget)
        form_layout.addRow(_("Start time"), self.start_time_edit.widget)

        self.buttons = QDialogButtonBox()
        self.buttons.addButton(QDialogButtonBox.Ok)
        self.buttons.addButton(QDialogButtonBox.Cancel)
        self.buttons.accepted.connect(self.save_and_accept)
        self.buttons.rejected.connect(self.cancel)

        top_layout = QVBoxLayout()
        top_layout.addLayout(form_layout)
        top_layout.addWidget(self.buttons)

        self.setLayout(top_layout)
Esempio n. 14
0
 def layoutWidgets(self):
     layout = QFormLayout()
     layout.addRow(self.termLabelLabel, self.termLabel)
     layout.addRow("Pages", self.originalPagesLabel)
     layout.addRow("Pages if Combined", self.combinedPagesLabel)
     layout.addRow(self.buttonBox)
     self.setLayout(layout)
 def __init__(self):
     super(PhoneFrame, self).__init__()
     self.setWindowTitle('Phone Book.')
     self.name = QLineEdit()
     self.number = QLineEdit()
     entry = QFormLayout()
     entry.addRow(QLabel('Name'), self.name)
     entry.addRow(QLabel('Number'), self.number)
     buttons = QHBoxLayout()
     button = QPushButton('&Add')
     button.clicked.connect(self._addEntry)
     buttons.addWidget(button)
     button = QPushButton('&Update')
     button.clicked.connect(self._updateEntry)
     buttons.addWidget(button)
     button = QPushButton('&Delete')
     button.clicked.connect(self._deleteEntry)
     buttons.addWidget(button)
     dataDisplay = QTableView()
     dataDisplay.setModel(PhoneDataModel())
     layout = QVBoxLayout()
     layout.addLayout(entry)
     layout.addLayout(buttons)
     layout.addWidget(dataDisplay)
     self.setLayout(layout)
     self.show()
Esempio n. 16
0
    def initialize(self, words):
        self.removeComboBox = QComboBox()
        self.removeComboBox.addItems(words)
        self.tooltips.append((self.removeComboBox, """\
<p><b>Spelling Words combobox</b></p>
<p>This index's list of words that have been remembered as correctly
spelled or to be ignored even though they aren't in the dictionary for
the index's language.</p>"""))
        self.helpButton = QPushButton(QIcon(":/help.svg"), "Help")
        self.tooltips.append((self.helpButton,
                              "Help on the Forget Spelling Words dialog"))
        self.removeButton = QPushButton(QIcon(":/spelling-remove.svg"),
                                        "&Forget")
        self.tooltips.append((self.removeButton, """\
<p><b>Forget</b></p>
<p>Permanently forget the selected word from the index's spelling words
list. Afterwards, if this word appears in any entry, it will be
highlighted as misspelled.</p>"""))
        closeButton = QPushButton(QIcon(":/dialog-close.svg"),
                                  "&Close")
        self.tooltips.append((closeButton, """<p><b>Close</b></p>
<p>Close the dialog.</p>"""))
        self.buttonBox = QDialogButtonBox()
        self.buttonBox.addButton(closeButton, QDialogButtonBox.RejectRole)
        self.buttonBox.addButton(
            self.removeButton, QDialogButtonBox.ApplyRole)
        self.buttonBox.addButton(self.helpButton, QDialogButtonBox.HelpRole)
        layout = QFormLayout()
        layout.addRow("F&orget", self.removeComboBox)
        layout.addRow(self.buttonBox)
        self.setLayout(layout)
        self.helpButton.clicked.connect(self.help)
        self.removeButton.clicked.connect(self.remove)
        self.buttonBox.rejected.connect(self.reject)
    def __init__(self,parent=None):
        super(QtReducePreferencesComputation,self).__init__(parent)

        reduceGroup = QGroupBox("Reduce")

        self.reduceBinary = QLineEdit()

        # font = self.reduceBinary.font()
        # font.setFamily(QSettings().value("worksheet/fontfamily",
        #                                QtReduceDefaults.FONTFAMILY))
        # self.reduceBinary.setFont(font)

        self.reduceBinary.setText(QSettings().value("computation/reduce",
                                                    QtReduceDefaults.REDUCE))

        self.reduceBinary.editingFinished.connect(self.editingFinishedHandler)

        reduceLayout = QFormLayout()
        reduceLayout.addRow(self.tr("Reduce Binary"),self.reduceBinary)

        reduceGroup.setLayout(reduceLayout)

        mainLayout = QVBoxLayout()
        mainLayout.addWidget(reduceGroup)

        self.setLayout(mainLayout)
    def __init__(self,parent=None):
        super(QtReducePreferencesWorksheet,self).__init__(parent)

        fontGroup = QGroupBox(self.tr("Fonts"))

        self.fontCombo = QtReduceFontComboBox(self)
        self.setFocusPolicy(Qt.NoFocus)
        self.fontCombo.setEditable(False)
        self.fontCombo.setCurrentFont(self.parent().parent().controller.view.font())

        self.sizeCombo = QtReduceFontSizeComboBox()
        self.sizeComboFs = QtReduceFontSizeComboBoxFs()
        self.findSizes(self.fontCombo.currentFont())
        self.fontCombo.currentFontChanged.connect(self.findSizes)

        fontLayout = QFormLayout()
        fontLayout.addRow(self.tr("General Worksheet Font"),self.fontCombo)
        fontLayout.addRow(self.tr("Font Size"),self.sizeCombo)
        fontLayout.addRow(self.tr("Full Screen Font Size"),self.sizeComboFs)

        fontGroup.setLayout(fontLayout)

        mainLayout = QVBoxLayout()
        mainLayout.addWidget(fontGroup)

        self.setLayout(mainLayout)
Esempio n. 19
0
    def initUI(self):
        self.layoutFile = FileBrowseWidget(
            "Layout settings file .yaml (*.yaml)")
        self.layoutFile.setText(DEFAULT_LAYOUT_FILE)
        self.rfSettingsFile = FileBrowseWidget(
            "Device settings file .yaml (*.yaml)")
        self.rfSettingsFile.setText(DEFAULT_RF_FILE)
        layout = QFormLayout()
        layout.addRow(QLabel("Layout settings file (.yaml):"), self.layoutFile)
        layout.addRow(QLabel("RF settings file (.yaml):"), self.rfSettingsFile)
        self.idLine = QLineEdit()
        self.idLine.setText(str(DEFAULT_DEVICE_ID))
        self.idLine.setMaximumWidth(50)
        self.idLine.setValidator(QIntValidator(0, 63))
        layout.addRow(QLabel("Device id (0-63):"), self.idLine)

        self.generateButton = QPushButton("Generate new RF settings")
        self.generateButton.setMaximumWidth(230)
        self.generateButton.clicked.connect(self.generateRFSettings)
        layout.addRow(None, self.generateButton)

        label = QLabel(
            "<b>Note:</b> These settings only need to be loaded on each "
            "device once and are persistent when you update the layout. "
            "To ensure proper operation and security, each device must "
            "have a unique device ID for a given RF settings file. "
            "Since RF settings file contains your encryption key, make "
            "sure to keep it secret.")
        label.setTextInteractionFlags(Qt.TextSelectableByMouse)
        label.setWordWrap(True)
        layout.addRow(label)
        self.setLayout(layout)
Esempio n. 20
0
     def __init__(self, parent=None):
         
         super(Form, self).__init__(parent)       
         #self.setWindowIcon(self.style().standardIcon(QStyle.SP_DirIcon))
         #QtGui.QIcon(QtGui.QMessageBox.Critical))
         self.txt =  QLabel()
         self.txt.setText("This will remove ALL Suffix from selection objects.  .\nDo you want to continue?\n\n\'suffix\'")
         self.le = QLineEdit()
         self.le.setObjectName("suffix_filter")
         self.le.setText(".step")
 
         self.pb = QPushButton()
         self.pb.setObjectName("OK")
         self.pb.setText("OK") 
 
         self.pbC = QPushButton()
         self.pbC.setObjectName("Cancel")
         self.pbC.setText("Cancel") 
 
         layout = QFormLayout()
         layout.addWidget(self.txt)
         layout.addWidget(self.le)
         layout.addWidget(self.pb)
         layout.addWidget(self.pbC)
 
         self.setLayout(layout)
         self.connect(self.pb, SIGNAL("clicked()"),self.OK_click)
         self.connect(self.pbC, SIGNAL("clicked()"),self.Cancel_click)
         self.setWindowTitle("Warning ...")
Esempio n. 21
0
    def __init__(self, fileInfo, gallery, parent=None, flags=Qt.Widget):
        QWidget.__init__(self, parent, flags)

        self.setLayout(QFormLayout(parent=self))
        self.request = QGalleryQueryRequest(gallery, self)
        self.request.setFilter(
            QDocumentGallery.filePath.equals(fileInfo.absoluteFilePath()))
        self.resultSet = None

        self.propertyKeys = []
        self.widgets = []

        propertyNames = [
            QDocumentGallery.fileName,
            QDocumentGallery.mimeType,
            QDocumentGallery.path,
            QDocumentGallery.fileSize,
            QDocumentGallery.lastModified,
            QDocumentGallery.lastAccessed,
        ]

        labels = [
            self.tr('File Name'),
            self.tr('Type'),
            self.tr('Path'),
            self.tr('Size'),
            self.tr('Modified'),
            self.tr('Accessed'),
        ]

        self.requestProperties(QDocumentGallery.File, propertyNames, labels)
Esempio n. 22
0
    def layoutWidgets(self):
        form = QFormLayout()
        hbox = QHBoxLayout()
        hbox.addStretch()
        hbox.addWidget(self.formatPanel)
        form.addRow(hbox)
        form.addRow(self.titleLabel, self.titleTextEdit)
        form.addRow(self.noteLabel, self.noteTextEdit)

        vbox = QVBoxLayout()
        hbox = QHBoxLayout()
        hbox.addWidget(self.blankBeforeLabel)
        hbox.addWidget(self.blankBeforeSpinBox)
        hbox.addWidget(self.blankAfterLabel)
        hbox.addWidget(self.blankAfterSpinBox)
        hbox.addStretch()
        vbox.addLayout(hbox)
        hbox = QHBoxLayout()
        hbox.addWidget(self.sectionTitlesCheckBox)
        hbox.addStretch()
        hbox.addWidget(self.sectionSpecialTitleLabel)
        hbox.addWidget(self.sectionSpecialTitleTextEdit)
        vbox.addLayout(hbox)
        self.sectionsGroupBox.setLayout(vbox)
        form.addRow(self.sectionsGroupBox)

        hbox = QHBoxLayout()
        hbox.addWidget(self.stdFontComboBox, 1)
        hbox.addWidget(self.stdFontSizeSpinBox)
        hbox.addStretch()
        label = QLabel("&Std. Font")
        label.setBuddy(self.stdFontComboBox)
        form.addRow(label, hbox)
        hbox = QHBoxLayout()
        hbox.addWidget(self.altFontComboBox, 1)
        hbox.addWidget(self.altFontSizeSpinBox)
        hbox.addStretch()
        label = QLabel("&Alt. Font")
        label.setBuddy(self.altFontComboBox)
        form.addRow(label, hbox)
        hbox = QHBoxLayout()
        hbox.addWidget(self.monoFontComboBox, 1)
        hbox.addWidget(self.monoFontSizeSpinBox)
        hbox.addStretch()
        label = QLabel("&Mono. Font")
        label.setBuddy(self.monoFontComboBox)
        form.addRow(label, hbox)

        grid = QGridLayout()
        grid.addWidget(self.monoFontAsStrikeoutCheckbox, 0, 0, 1, 2)
        grid.addWidget(self.termPagesSepLabel, 0, 2)
        grid.addWidget(self.termPagesSepTextEdit, 0, 3)
        grid.addWidget(self.styleLabel, 1, 0)
        grid.addWidget(self.styleComboBox, 1, 1)
        grid.addWidget(self.runInSepLabel, 1, 2)
        grid.addWidget(self.runInSepTextEdit, 1, 3)
        form.addRow(grid)
        self.setLayout(form)
Esempio n. 23
0
 def SetFLayout(self):
     formLayout = QFormLayout(self)
     labelUsername = QLabel("Username")
     txtUsername = QLineEdit()
     labelPassword = QLabel("Password")
     txtPassword = QLineEdit()
     formLayout.addRow(labelUsername, txtUsername)
     formLayout.addRow(labelPassword, txtPassword)
     self.setLayout(formLayout)
Esempio n. 24
0
    def _create_field_controls(self):
        """Creates QWidgets for editing each field in DWC_TERMS and returns
        tuple of two dicts ({ field name: control },
                            { group name: QGroupBox }
        """
        # Mapping { field name: control }
        controls = {}

        # Mapping { group name: ToggleFrame }
        groups = {}

        current_group = group_layout = None

        def finish_group():
            # Finish the existing group
            debug_print('Finishing', current_group)

            # The widget that holds this group's controls
            controls_widget = QWidget()
            controls_widget.setLayout(group_layout)
            controls_widget.setVisible(False)

            # The group box, which contains the label to toggle the controls#
            # and the controls themselves
            group_box_layout = QVBoxLayout()
            group_box_layout.addWidget(
                ToggleWidgetLabel(current_group, controls_widget))
            group_box_layout.addWidget(controls_widget)
            group_box = QGroupBox()
            group_box.setLayout(group_box_layout)

            # Add the group box to the main layout
            self._main_layout.addRow(group_box)

            #self._main_layout.addWidget(group_box)
            groups[current_group] = group_box

        # Create controls and group boxes
        for field in DWC_TERMS:
            if field['Group label'] != current_group:
                if current_group:
                    finish_group()

                group_layout = QFormLayout()
                group_layout.setFieldGrowthPolicy(
                    QFormLayout.ExpandingFieldsGrow)
                current_group = field['Group label']

            # Create control for this field
            control = self._create_field_control(field)
            group_layout.addRow(URLLabel(field['URI'], field['Label']),
                                control)
            controls[field['Name']] = control

        finish_group()

        return controls, groups
Esempio n. 25
0
 def initUI(self):
     self.fileWidget = FileBrowseWidget("Firmware file .hex (*.hex)")
     layout = QFormLayout()
     layout.addRow(QLabel("Firmware file (.hex):"), self.fileWidget)
     label = QLabel("<b>Note:</b> after updating the firmware, all layout "
                    "and device settings will be erased.")
     label.setTextInteractionFlags(Qt.TextSelectableByMouse)
     layout.addRow(label)
     self.setLayout(layout)
Esempio n. 26
0
    def layoutWidgets(self):
        layout = QVBoxLayout()
        hbox = QHBoxLayout()
        hbox.addStretch()
        hbox.addWidget(self.formatPanel)
        layout.addLayout(hbox)

        seeGroup = QGroupBox("See")
        form = QFormLayout()
        form.addRow(self.seeLabel, self.seeTextEdit)
        hbox = QHBoxLayout()
        hbox.addWidget(self.seePrefixTextEdit)
        hbox.addWidget(self.seeSepLabel)
        hbox.addWidget(self.seeSepTextEdit)
        hbox.addWidget(self.seeSuffixLabel)
        hbox.addWidget(self.seeSuffixTextEdit)
        form.addRow(self.seePrefixLabel, hbox)
        seeGroup.setLayout(form)
        layout.addWidget(seeGroup)

        alsoGroup = QGroupBox("See Also")
        form = QFormLayout()
        form.addRow(self.seeAlsoLabel, self.seeAlsoTextEdit)
        hbox = QHBoxLayout()
        hbox.addWidget(self.seeAlsoPrefixTextEdit)
        hbox.addWidget(self.seeAlsoSepLabel)
        hbox.addWidget(self.seeAlsoSepTextEdit)
        hbox.addWidget(self.seeAlsoSuffixLabel)
        hbox.addWidget(self.seeAlsoSuffixTextEdit)
        form.addRow(self.seeAlsoPrefixLabel, hbox)
        form.addRow(self.seeAlsoPositionLabel, self.seeAlsoPositionComboBox)
        alsoGroup.setLayout(form)
        layout.addWidget(alsoGroup)

        form = QFormLayout()
        form.addRow(self.xrefToSubentryLabel, self.xrefToSubentryComboBox)
        form.addRow(self.genericConjunctionLabel,
                    self.genericConjunctionTextEdit)
        layout.addLayout(form)

        layout.addStretch(2)

        self.setLayout(layout)
Esempio n. 27
0
    def __init__(self, athlete):
        '''
        Constructor
        '''
        QDialog.__init__(self)

        self.setWindowTitle("Pushup form")
        self.athlete = athlete
        self.pushupForm = QFormLayout()
        self.createGUI()
Esempio n. 28
0
 def setLayoutForm(self):
     """Présentation du QFormLayout"""
     self.setWindowTitle("Form Layout")
     formLayout = QFormLayout(self)
     labelUser = QLabel("Username")
     txtUser = QLineEdit()
     labelPass = QLabel("Password")
     txtPass = QLineEdit()
     formLayout.addRow(labelUser, txtUser)
     formLayout.addRow(labelPass, txtPass)
     self.setLayout(formLayout)
Esempio n. 29
0
    def layoutWidgets(self):
        layout = QVBoxLayout()

        form = QFormLayout()
        form.addRow("For This Index", self.thisSortAsRulesBox)
        form.addRow("Default", self.defaultSortAsRulesBox)
        self.sortRulesGroupBox.setLayout(form)
        layout.addWidget(self.sortRulesGroupBox)

        form = QFormLayout()
        form.addRow("For This Index", self.thisPageRangeRulesBox)
        form.addRow("Default", self.defaultPageRangeRulesBox)
        self.pageRangeRulesBox.setLayout(form)
        layout.addWidget(self.pageRangeRulesBox)

        hbox = QHBoxLayout()
        hbox.addWidget(self.thisPadDigitsLabel)
        hbox.addWidget(self.thisPadDigitsSpinBox)
        hbox.addStretch(1)
        hbox.addWidget(self.defaultPadDigitsLabel)
        hbox.addWidget(self.defaultPadDigitsSpinBox)
        hbox.addStretch(3)
        self.padDigitsGroupBox.setLayout(hbox)
        layout.addWidget(self.padDigitsGroupBox)

        hbox = QHBoxLayout()
        hbox.addWidget(self.thisIgnoreSubFirstsCheckBox)
        hbox.addWidget(self.defaultIgnoreSubFirstsCheckBox)
        hbox.addStretch()
        self.ignoreSubFirstsGroupBox.setLayout(hbox)
        layout.addWidget(self.ignoreSubFirstsGroupBox)

        hbox = QHBoxLayout()
        hbox.addWidget(self.thisSuggestSpelledCheckBox)
        hbox.addWidget(self.defaultSuggestSpelledCheckBox)
        hbox.addStretch()
        self.suggestSpelledGroupBox.setLayout(hbox)
        layout.addWidget(self.suggestSpelledGroupBox)

        layout.addStretch()
        self.setLayout(layout)
Esempio n. 30
0
    def __init__(self):
        QDialog.__init__(self)

        layout = QFormLayout(self)
        self.setLayout(layout)
        layout.addRow("Python version:", QLabel("%s.%s.%s (%s)" % 
                        (sys.version_info[0], 
                         sys.version_info[1], 
                         sys.version_info[2], 
                         sys.version_info[3])))

        layout.addRow("Qt version:", QLabel( qVersion()))