Esempio n. 1
0
    def __init__(self, parent):
        super().__init__(parent)
        self._parent = parent
        self.person = None
        self.place = None
        self.thing = None

        form = QtWidgets.QFormLayout()
        self.suspect_selector = QtWidgets.QComboBox(self)
        self.suspect_selector.add_items(['None'] + Suspects.get_suspect_list())
        form.add_row(QtWidgets.QLabel('Suspect'), self.suspect_selector)
        self.room_selector = QtWidgets.QComboBox(self)
        self.room_selector.add_items(['None'] + Rooms.get_room_list())
        form.add_row(QtWidgets.QLabel('Room'), self.room_selector)
        self.weapon_selector = QtWidgets.QComboBox(self)
        self.weapon_selector.add_items(['None'] + Weapons.get_weapon_list())
        form.add_row(QtWidgets.QLabel('Weapon'), self.weapon_selector)

        accept_button = QtWidgets.QPushButton('Accuse', self)
        self.connect(accept_button, QtCore.SIGNAL('clicked()'), self.accept)

        cancel_button = QtWidgets.QPushButton('Cancel', self)
        self.connect(cancel_button, QtCore.SIGNAL('clicked()'), self.reject)
        form.add_row(accept_button, cancel_button)
        self.set_layout(form)
Esempio n. 2
0
 def createEditor(self, parent, option, index):
     if index.column() == TEU:
         spinbox = QtWidgets.QSpinBox(parent)
         spinbox.setRange(0, 200000)
         spinbox.setSingleStep(1000)
         spinbox.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
         return spinbox
     elif index.column() == OWNER:
         combobox = QtWidgets.QComboBox(parent)
         combobox.addItems(sorted(index.model().owners))
         combobox.setEditable(True)
         return combobox
     elif index.column() == COUNTRY:
         combobox = QtWidgets.QComboBox(parent)
         combobox.addItems(sorted(index.model().countries))
         combobox.setEditable(True)
         return combobox
     elif index.column() == NAME:
         editor = QtWidgets.QLineEdit(parent)
         self.connect(editor, QtCore.SIGNAL("returnPressed()"),
                      self.commitAndCloseEditor)
         return editor
     elif index.column() == DESCRIPTION:
         editor = richtextlineedit.RichTextLineEdit(parent)
         self.connect(editor, QtCore.SIGNAL("returnPressed()"),
                      self.commitAndCloseEditor)
         return editor
     else:
         return QtWidgets.QStyledItemDelegate.createEditor(
             self, parent, option, index)
    def init_color_info(self):
        self.last_row += 1
        self.color_primaries_widget = QtWidgets.QComboBox()
        self.color_primaries_widget.addItem(t("Unspecified"))
        self.color_primaries_widget.addItems(ffmpeg_valid_color_primaries)
        self.color_primaries_widget.currentIndexChanged.connect(
            self.page_update)

        self.color_transfer_widget = QtWidgets.QComboBox()
        self.color_transfer_widget.addItem(t("Unspecified"))
        self.color_transfer_widget.addItems(ffmpeg_valid_color_transfers)
        self.color_transfer_widget.currentIndexChanged.connect(
            self.page_update)

        self.color_space_widget = QtWidgets.QComboBox()
        self.color_space_widget.addItem(t("Unspecified"))
        self.color_space_widget.addItems(ffmpeg_valid_color_space)
        self.color_space_widget.currentIndexChanged.connect(self.page_update)

        self.layout.addWidget(QtWidgets.QLabel(t("Color Primaries")),
                              self.last_row,
                              0,
                              alignment=QtCore.Qt.AlignRight)
        self.layout.addWidget(self.color_primaries_widget, self.last_row, 1)
        self.layout.addWidget(QtWidgets.QLabel(t("Color Transfer")),
                              self.last_row,
                              2,
                              alignment=QtCore.Qt.AlignRight)
        self.layout.addWidget(self.color_transfer_widget, self.last_row, 3)
        self.layout.addWidget(QtWidgets.QLabel(t("Color Space")),
                              self.last_row,
                              4,
                              alignment=QtCore.Qt.AlignRight)
        self.layout.addWidget(self.color_space_widget, self.last_row, 5)
Esempio n. 4
0
    def get_lay_middle(self):
        lay_middle_form = QtWidgets.QFormLayout()
        lay_middle_form.setContentsMargins(QtCore.QMargins(25, 0, 25, 0))

        self.le_name = QtWidgets.QLineEdit()
        self.cb_scheme = QtWidgets.QComboBox(self)
        self.cb_scheme.addItems(["Root=>Series=>Episode=>Shot",
                                 "Root=>Episode=>Shot"])
        self.le_fps = QtWidgets.QLineEdit()


#         root_paths = [obj.root_folder for obj in self.roots]
        self.cb_root_project = QtWidgets.QComboBox(self)
        for idx, obj in enumerate(self.roots):
            self.cb_root_project.addItem(obj.root_folder)
            self.cb_root_project.setItemData(idx, str(obj.id))
#             print(self.cb_root_project.currentData(QtCore.Qt.UserRole))
#         self.cb_root_project.addItems(root_paths)

#         self.le_root_project = QtWidgets.QLineEdit()
        self.btn_root_project = QtWidgets.QPushButton("...")
#         self.btn_root_project.setFixedWidth(30)
#         lay_root_project = QtWidgets.QHBoxLayout()
#         lay_root_project.addWidget(self.le_root_project)
#         lay_root_project.addWidget(self.btn_root_project)
#         lay_root_project.setContentsMargins(QtCore.QMargins(0, 0, 0, 0))
#         lay_root_project.setSpacing(0)
#         self.btn_root_project.clicked.connect(self.select_root_project)

        lay_middle_form.addRow("Name:", self.le_name)
        lay_middle_form.addRow("Scheme:", self.cb_scheme)
        lay_middle_form.addRow("FPS:", self.le_fps)
        lay_middle_form.addRow("Root project:", self.cb_root_project)

        return lay_middle_form
Esempio n. 5
0
    def __init__(self, *args, **kwargs):
        QtWidgets.QWidget.__init__(self, *args, **kwargs)

        # Show recorded routines
        self.recorded_attributes = QtWidgets.QGroupBox('Recorded attributes')
        self.recorded_attributes.setLayout(QtWidgets.QVBoxLayout())
        self.recorded_attributes.setFixedWidth(250)
        self.rec_attribute_list = QtWidgets.QListWidget()

        self.recorded_attributes.layout().addWidget(self.rec_attribute_list)
        # Update recorded attributes
        for match_string in config.CONF_REC_ATTRIBUTES:
            self.rec_attribute_list.addItem(QtWidgets.QListWidgetItem(match_string))
        # self.layout().addWidget(self.recorded_attributes)

        # Data compression
        self.layout().addWidget(QLabel('Compression'))
        self.compression_method = QtWidgets.QComboBox()
        self.compression_opts = QtWidgets.QComboBox()
        self.compression_method.addItems(['None', 'GZIP', 'LZF'])
        self.layout().addWidget(self.compression_method)
        self.layout().addWidget(self.compression_opts)
        self.compression_method.currentTextChanged.connect(self.set_compression_method)
        self.compression_method.currentTextChanged.connect(self.update_compression_opts)
        self.compression_opts.currentTextChanged.connect(self.set_compression_opts)
    def init_deblock(self):
        self.last_row += 1
        self.deblock_widget = QtWidgets.QComboBox()
        self.deblock_widget.addItems(["none", "weak", "strong"])
        self.deblock_widget.setCurrentIndex(0)
        self.deblock_widget.currentIndexChanged.connect(self.page_update)

        self.deblock_size_widget = QtWidgets.QComboBox()
        self.deblock_size_widget.addItem("4")
        self.deblock_size_widget.addItems(
            [str(x * 4) for x in range(2, 33, 2)])
        self.deblock_size_widget.addItems(["256", "512"])
        self.deblock_size_widget.currentIndexChanged.connect(self.page_update)
        self.deblock_size_widget.setCurrentIndex(2)

        self.layout.addWidget(QtWidgets.QLabel(t("Deblock")),
                              self.last_row,
                              0,
                              alignment=QtCore.Qt.AlignRight)
        self.layout.addWidget(self.deblock_widget, self.last_row, 1)
        self.layout.addWidget(QtWidgets.QLabel(t("Block Size")),
                              self.last_row,
                              2,
                              alignment=QtCore.Qt.AlignRight)
        self.layout.addWidget(self.deblock_size_widget, self.last_row, 3)
    def init_video_speed(self):
        self.last_row += 1
        self.video_speed_widget = QtWidgets.QComboBox()
        self.video_speed_widget.addItems(video_speeds.keys())
        self.video_speed_widget.currentIndexChanged.connect(self.page_update)
        self.layout.addWidget(QtWidgets.QLabel(t("Video Speed")),
                              self.last_row,
                              0,
                              alignment=QtCore.Qt.AlignRight)
        self.layout.addWidget(self.video_speed_widget, self.last_row, 1)
        self.layout.addWidget(
            QtWidgets.QLabel(t("Warning: Audio will not be modified")),
            self.last_row, 2, 1, 3)

        # def init_tone_map(self):
        #     self.last_row += 1
        self.tone_map_widget = QtWidgets.QComboBox()
        self.tone_map_widget.addItems(
            ["none", "clip", "linear", "gamma", "reinhard", "hable", "mobius"])
        self.tone_map_widget.setCurrentIndex(5)
        self.tone_map_widget.currentIndexChanged.connect(self.page_update)
        self.layout.addWidget(QtWidgets.QLabel(t("HDR -> SDR Tone Map")),
                              self.last_row,
                              4,
                              alignment=QtCore.Qt.AlignRight)
        self.layout.addWidget(self.tone_map_widget, self.last_row, 5)
Esempio n. 8
0
    def __init__(self, app: FastFlixApp, main, *args, **kwargs):
        super().__init__(None, *args, **kwargs)
        self.app = app
        self.main = main
        self.config_file = self.app.fastflix.config.config_path
        self.setWindowTitle(t("New Profile"))
        self.setMinimumSize(500, 150)
        layout = QtWidgets.QGridLayout()

        profile_name_label = QtWidgets.QLabel(t("Profile Name"))
        self.profile_name = QtWidgets.QLineEdit()

        self.auto_crop = QtWidgets.QCheckBox(t("Auto Crop"))

        audio_language_label = QtWidgets.QLabel(t("Audio select language"))
        self.audio_language = QtWidgets.QComboBox()
        self.audio_language.addItems([t("All"), t("None")] + language_list)
        self.audio_language.insertSeparator(1)
        self.audio_language.insertSeparator(3)
        self.audio_first_only = QtWidgets.QCheckBox(t("Only select first matching Audio Track"))

        sub_language_label = QtWidgets.QLabel(t("Subtitle select language"))
        self.sub_language = QtWidgets.QComboBox()
        self.sub_language.addItems([t("All"), t("None")] + language_list)
        self.sub_language.insertSeparator(1)
        self.sub_language.insertSeparator(3)
        self.sub_first_only = QtWidgets.QCheckBox(t("Only select first matching Subtitle Track"))

        self.sub_burn_in = QtWidgets.QCheckBox(t("Auto Burn-in first forced or default subtitle track"))

        self.encoder = x265Settings(crf=18)
        self.encoder_settings = QtWidgets.QLabel()
        self.encoder_settings.setStyleSheet("font-family: monospace;")
        self.encoder_label = QtWidgets.QLabel(f"{t('Encoder')}: {self.encoder.name}")

        save_button = QtWidgets.QPushButton(t("Create Profile"))
        save_button.clicked.connect(self.save)
        save_button.setMaximumWidth(150)

        layout.addWidget(profile_name_label, 0, 0)
        layout.addWidget(self.profile_name, 0, 1)
        layout.addWidget(self.auto_crop, 1, 0)
        layout.addWidget(audio_language_label, 2, 0)
        layout.addWidget(self.audio_language, 2, 1)
        layout.addWidget(self.audio_first_only, 3, 1)
        layout.addWidget(sub_language_label, 4, 0)
        layout.addWidget(self.sub_language, 4, 1)
        layout.addWidget(self.sub_first_only, 5, 1)
        layout.addWidget(self.sub_burn_in, 6, 0, 1, 2)
        layout.addWidget(self.encoder_label, 7, 0, 1, 2)
        layout.addWidget(self.encoder_settings, 8, 0, 10, 2)
        layout.addWidget(save_button, 20, 1, alignment=QtCore.Qt.AlignRight)

        self.update_settings()

        self.setLayout(layout)
Esempio n. 9
0
    def interface(self):
        self.layout = QtWidgets.QHBoxLayout(self)
        self.cbb_devisesFrom = QtWidgets.QComboBox()
        self.spn_montant = QtWidgets.QSpinBox()
        self.cbb_devisesTo = QtWidgets.QComboBox()
        self.spn_montantConverti = QtWidgets.QSpinBox()
        self.btn_inverser = QtWidgets.QPushButton("Inverser devises")

        self.layout.addWidget(self.cbb_devisesFrom)
        self.layout.addWidget(self.spn_montant)
        self.layout.addWidget(self.cbb_devisesTo)
        self.layout.addWidget(self.cbb_devisesTo)
        self.layout.addWidget(self.spn_montantConverti)
        self.layout.addWidget(self.btn_inverser)
Esempio n. 10
0
    def init_conversion(self):
        layout = QtWidgets.QHBoxLayout()
        self.widgets.convert_to = QtWidgets.QComboBox()

        self.update_codecs(self.codecs)

        self.widgets.convert_bitrate = QtWidgets.QComboBox()
        self.widgets.convert_bitrate.setFixedWidth(70)

        self.widgets.convert_bitrate.addItems([
            f"{x}k" for x in range(16 * self.channels, (256 * self.channels) +
                                   1, 16 * self.channels)
        ] if self.channels else [
            "32k",
            "64k",
            "96k",
            "128k",
            "160k",
            "192k",
            "224k",
            "256k",
            "320k",
            "512K",
            "768k",
            "896k",
            "1024k",
            "1152k",
            "1280k",
            "1408k",
            "1536k",
            "1664k",
            "1792k",
            "1920k",
        ])
        self.widgets.convert_bitrate.setCurrentIndex(3)
        self.widgets.convert_bitrate.setDisabled(True)

        self.widgets.convert_bitrate.currentIndexChanged.connect(
            lambda: self.page_update())
        self.widgets.convert_to.currentIndexChanged.connect(
            self.update_conversion)
        layout.addWidget(QtWidgets.QLabel(f"{t('Conversion')}: "))
        layout.addWidget(self.widgets.convert_to)

        layout.addWidget(QtWidgets.QLabel(f"{t('Bitrate')}: "))
        layout.addWidget(self.widgets.convert_bitrate)

        return layout
Esempio n. 11
0
    def initUI(self):
        self.layout = qw.QHBoxLayout(self)

        self.profile_dropdown = qw.QComboBox()
        self.profile_dropdown.currentTextChanged.connect(self.profileSelected)

        self.PLACEHOLDER_TEXT = "-- Choose Profile --"
        self.profile_dropdown.addItem(self.PLACEHOLDER_TEXT)
        for profile_name in read_profiles().keys():
            self.profile_dropdown.addItem(profile_name)

        update_profile = qw.QPushButton("Save")
        update_profile.clicked.connect(self.overwriteProfileClicked)

        save_new_profile = qw.QPushButton("Save As...")
        save_new_profile.clicked.connect(self.saveNewProfileClicked)

        delete_current_profile = qw.QPushButton("Delete")
        delete_current_profile.clicked.connect(self.deleteProfileClicked)

        self.layout.addWidget(self.profile_dropdown, 2)
        self.layout.addWidget(update_profile, 1)
        self.layout.addWidget(save_new_profile, 1)
        self.layout.addWidget(delete_current_profile, 1)

        self.profile_dropdown.setCurrentIndex(0)
Esempio n. 12
0
 def createComboBox(self, text=""):
     comboBox = QtWidgets.QComboBox()
     comboBox.setEditable(True)
     comboBox.addItem(text)
     comboBox.setSizePolicy(QtWidgets.QSizePolicy.Expanding,
             QtWidgets.QSizePolicy.Preferred)
     return comboBox
Esempio n. 13
0
    def __init__(self, parent=None):
        super(PenPropertiesDlg, self).__init__(parent)
        widthLabel = QtWidgets.QLabel("&Width:")
        self.widthSpinBox = QtWidgets.QSpinBox()
        widthLabel.setBuddy(self.widthSpinBox)
        self.widthSpinBox.setAlignment(QtCore.Qt.AlignRight
                                       | QtCore.Qt.AlignVCenter)
        self.widthSpinBox.setRange(0, 24)
        self.beveledCheckBox = QtWidgets.QCheckBox("&Beveled edges")
        styleLabel = QtWidgets.QLabel("&Style:")
        self.styleComboBox = QtWidgets.QComboBox()
        styleLabel.setBuddy(self.styleComboBox)
        self.styleComboBox.addItems(
            ["Solid", "Dashed", "Dotted", "DashDotted", "DashDotDotted"])
        okButton = QtWidgets.QPushButton("&OK")
        cancelButton = QtWidgets.QPushButton("Cancel")

        buttonLayout = QtWidgets.QHBoxLayout()
        buttonLayout.addStretch()
        buttonLayout.addWidget(okButton)
        buttonLayout.addWidget(cancelButton)
        layout = QtWidgets.QGridLayout()
        layout.addWidget(widthLabel, 0, 0)
        layout.addWidget(self.widthSpinBox, 0, 1)
        layout.addWidget(self.beveledCheckBox, 0, 2)
        layout.addWidget(styleLabel, 1, 0)
        layout.addWidget(self.styleComboBox, 1, 1, 1, 2)
        layout.addLayout(buttonLayout, 2, 0, 1, 3)
        self.setLayout(layout)
Esempio n. 14
0
    def __init__(self, parent: QtWidgets.QWidget | None):
        super().__init__(parent)
        self.main_layout = QtWidgets.QVBoxLayout(self)
        self.font_chooser = QtWidgets.QFontComboBox(self)
        self.font_size_chooser = QtWidgets.QSpinBox(self)
        self.font_bold_checkbox = QtWidgets.QCheckBox(self)

        self.language_label = QtWidgets.QLabel(self)
        self.language_combo = QtWidgets.QComboBox(self)
        self.language_combo.size_adjust_policy = (
            QtWidgets.QComboBox.SizeAdjustPolicy.AdjustToContents)

        self.dark_mode_checkbox = _ReorderedCheckBox(self)
        self.dark_mode_checkbox.tristate = True

        self.font_layout = QtWidgets.QHBoxLayout()
        self.font_layout.add_widget(self.font_chooser)
        self.font_layout.add_widget(self.font_size_chooser)
        self.language_layout = QtWidgets.QHBoxLayout()
        self.language_layout.add_widget(self.language_label)
        self.language_layout.add_widget(self.language_combo)
        self.main_layout.add_layout(self.font_layout)
        self.main_layout.add_layout(self.language_layout)
        self.main_layout.add_widget(self.font_bold_checkbox)
        self.main_layout.add_widget(self.dark_mode_checkbox)
        self.main_layout.add_spacer_item(get_spacer())

        self.font_size_chooser.maximum_width = 50
Esempio n. 15
0
    def create_selector_combobox(self):
        combobox = QtWidgets.QComboBox()
        combobox.setFocusPolicy(QtCore.Qt.NoFocus)
        combobox.addItem("Select a DICOM dataset...")

        # determines which files are included
        self.special_files = []

        if self.patient_dict_container.has_modality("rtss"):
            combobox.addItem("RT Structure Set")
            self.special_files.append("rtss")

        if self.patient_dict_container.has_modality("rtdose"):
            combobox.addItem("RT Dose")
            self.special_files.append("rtdose")

        if self.patient_dict_container.has_modality("rtplan"):
            combobox.addItem("RT Plan")
            self.special_files.append("rtplan")

        for i in range(len(self.pixmaps)):
            combobox.addItem("Image Slice " + str(i + 1))

        combobox.activated.connect(self.item_selected)
        combobox.setFixedSize(QtCore.QSize(200, 31))
        combobox.setObjectName("DicomTreeviewComboBox")
        return combobox
Esempio n. 16
0
    def __init__(self, parent=None):
        super().__init__(parent)
        self.resize(600, 1000)
        self.flag_analysis_finish = True
        self.flag_remove_box = True

        self.original_video_1 = None
        self.original_video_2 = None
        self.out_video = None
        self.different_views = {}

        self.combo = QtWidgets.QComboBox(self)
        self.combo.addItem("-Select the analysis-")
        self.combo.addItem("Subtraction")
        self.combo.addItem("ADD")
        self.combo.addItem("Divide")
        self.combo.addItem("Background subtraction")
        self.combo.addItem("Dark frame correction")
        self.combo.addItem("Temporal Median")
        self.combo.addItem("Temporal Mean")
        self.combo.currentIndexChanged.connect(self.on_select)

        self.load1 = QtWidgets.QPushButton("load video_1")
        self.load1.setAutoDefault(False)
        self.load1.clicked.connect(self.read_data1)
        self.load1.setEnabled(False)
        self.load1.setFixedWidth(100)

        self.load2 = QtWidgets.QPushButton("load video_2")
        self.load2.setAutoDefault(False)
        self.load2.clicked.connect(self.read_data2)
        self.load2.setEnabled(False)
        self.load2.setFixedWidth(100)

        self.inputFileLineEdit1 = QtWidgets.QTextEdit(self)
        self.inputFileLineEdit1.setFixedHeight(20)
        self.inputFileLineEdit1.setFixedWidth(500)

        self.inputFileLineEdit2 = QtWidgets.QTextEdit(self)
        self.inputFileLineEdit2.setFixedHeight(20)
        self.inputFileLineEdit2.setFixedWidth(500)

        self.ok = QtWidgets.QPushButton("Ok")
        self.ok.setAutoDefault(False)
        self.ok.clicked.connect(self.do_update)

        self.grid = QtWidgets.QGridLayout()
        self.grid.addWidget(self.combo, 0, 0)
        self.grid.addWidget(self.load1, 1, 0)
        self.grid.addWidget(self.load2, 2, 0)
        self.grid.addWidget(self.inputFileLineEdit1, 1, 1)
        self.grid.addWidget(self.inputFileLineEdit2, 2, 1)
        self.grid.addWidget(self.ok, 3, 0)

        self.window = QtWidgets.QWidget()
        self.setWindowTitle("Video calculator")
        self.setStyleSheet('QMainWindow{background-color: darkgray;}')
        self.window.setGeometry(450, 90, 600, 50)
        self.window.setLayout(self.grid)
        self.window.show()
Esempio n. 17
0
    def create_journal_and_submit_layout(
        self, widget_parent: QtWidgets.QWidget
    ) -> tuple[QtWidgets.QHBoxLayout, QtWidgets.QComboBox, QtWidgets.
               QPushButton, QtWidgets.QPushButton, QtWidgets.QPushButton, ]:
        """Create a layout that holds the bottom journal combo box and submit button."""
        journal_submit_layout = QtWidgets.QHBoxLayout()

        journal_combo = QtWidgets.QComboBox(widget_parent)
        journal_combo.size_adjust_policy = (
            QtWidgets.QComboBox.SizeAdjustPolicy.AdjustToContents)

        submit_button = QtWidgets.QPushButton(widget_parent)
        submit_button.size_policy = QtWidgets.QSizePolicy(
            QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Maximum)
        abort_button = QtWidgets.QPushButton(widget_parent)
        abort_button.size_policy = QtWidgets.QSizePolicy(
            QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Maximum)
        abort_button.hide()
        refresh_button = QtWidgets.QPushButton(widget_parent)
        refresh_button.icon = QtGui.QIcon(self.get_refresh_icon(is_dark()))

        journal_submit_layout.add_widget(journal_combo)
        journal_submit_layout.add_widget(refresh_button)
        journal_submit_layout.add_spacer_item(
            QtWidgets.QSpacerItem(1, 1, QtWidgets.QSizePolicy.Expanding))
        journal_submit_layout.add_widget(submit_button)
        journal_submit_layout.add_widget(abort_button)

        return (
            journal_submit_layout,
            journal_combo,
            refresh_button,
            submit_button,
            abort_button,
        )
Esempio n. 18
0
    def __init__(self):
        QtWidgets.QGroupBox.__init__(self, 'Routine settings')

        self.setLayout(QtWidgets.QHBoxLayout())

        # Available routines
        self.layout().addWidget(QtWidgets.QLabel('Available routines'))
        self.avail_routine_list = QtWidgets.QComboBox()
        self.layout().addWidget(self.avail_routine_list)

        # Add
        self.btn_add_routine = QtWidgets.QPushButton('Add routine')
        self.btn_add_routine.clicked.connect(self.add_routine)
        self.layout().addWidget(self.btn_add_routine)

        self.layout().addWidget(QtWidgets.QLabel('Selected routines'))
        # Remove
        self.btn_remove_routine = QtWidgets.QPushButton('Remove selected')
        self.btn_remove_routine.clicked.connect(self.remove_routine)
        self.btn_remove_routine.setEnabled(False)
        self.layout().addWidget(self.btn_remove_routine)

        # Used routines
        self.used_routine_list = QtWidgets.QListWidget()
        self.used_routine_list.setMaximumWidth(400)
        self.used_routine_list.currentTextChanged.connect(
            self.toggle_routine_remove_btn)
        self.layout().addWidget(QtWidgets.QLabel('Routines'))
        self.layout().addWidget(self.used_routine_list)
Esempio n. 19
0
 def create_widgets(self):
     self.current_asset_wgt = QtWidgets.QLabel()
     self.asset_type_wgt = QtWidgets.QLabel()
     self.publish_type_cat_wgt = QtWidgets.QComboBox()
     self.publish_sub_cat_wgt = QtWidgets.QComboBox()
     self.filepath_le = QtWidgets.QLineEdit()
     self.select_file_path_btn = QtWidgets.QPushButton()
     self.select_file_path_btn.setIcon(QtGui.QIcon(":fileOpen.png"))
     
     
     self.output_log_wget = QtWidgets.QTextBrowser()
     
     self.publish_btn_wgt = QtWidgets.QPushButton('Publish')
     self.cancle_btn_wgt = QtWidgets.QPushButton('Cancle')
     
     self.statusBar_wgt = QtWidgets.QStatusBar()
Esempio n. 20
0
 def PSF_mode(self):
     self.combo_mode = QtWidgets.QComboBox(self)
     self.combo_mode.addItem("-Select the Mode-")
     self.combo_mode.addItem("Bright PSF")
     self.combo_mode.addItem("Dark PSF")
     self.combo_mode.addItem("Bright & Dark PSF")
     self.combo_mode.currentIndexChanged.connect(self.on_select_mode)
     self.grid_Localization.addWidget(self.combo_mode, 0, 1)
Esempio n. 21
0
 def createFormGroupBox(self):
     self.formGroupBox = QtWidgets.QGroupBox("Form layout")
     layout = QtWidgets.QFormLayout()
     layout.addRow(QtWidgets.QLabel("Line 1:"), QtWidgets.QLineEdit())
     layout.addRow(QtWidgets.QLabel("Line 2, long text:"),
                   QtWidgets.QComboBox())
     layout.addRow(QtWidgets.QLabel("Line 3:"), QtWidgets.QSpinBox())
     self.formGroupBox.setLayout(layout)
Esempio n. 22
0
 def __init__(self, parent=None):
     super().__init__(parent=parent)
     self.setWindowTitle(self.tr("Clustering Analyzer"))
     self.setAttribute(QtCore.Qt.WA_StyledBackground, True)
     self.main_layout = QtWidgets.QGridLayout(self)
     self.chart = HierarchicalChart()
     self.main_layout.addWidget(self.chart, 0, 0, 1, 8)
     self.linkage_label = QtWidgets.QLabel(self.tr("Linkage"))
     self.linkage_label.setToolTip(
         self.tr("The linkage method for calculating the distance between "
                 "the newly formed cluster and each observation vector."))
     self.linkage_combo_box = QtWidgets.QComboBox()
     self.linkage_combo_box.addItems(linkages)
     self.linkage_combo_box.setCurrentText("ward")
     self.linkage_combo_box.currentTextChanged.connect(
         lambda name: self.perform())
     self.metric_label = QtWidgets.QLabel(self.tr("Metric"))
     self.metric_label.setToolTip(self.tr("The distance metric."))
     self.metric_combo_box = QtWidgets.QComboBox()
     self.metric_combo_box.addItems(metrics)
     self.metric_combo_box.setCurrentText("euclidean")
     self.metric_combo_box.currentTextChanged.connect(
         lambda metric: self.perform())
     self.main_layout.addWidget(self.linkage_label, 1, 0)
     self.main_layout.addWidget(self.linkage_combo_box, 1, 1)
     self.main_layout.addWidget(self.metric_label, 1, 2)
     self.main_layout.addWidget(self.metric_combo_box, 1, 3)
     self.p_label = QtWidgets.QLabel(self.tr("p"))
     self.p_label.setToolTip(
         self.tr("The number of leaves at the bottom level of the figure."))
     self.p_input = QtWidgets.QSpinBox()
     self.p_input.setMinimum(1)
     self.p_input.valueChanged.connect(lambda p: self.perform())
     self.main_layout.addWidget(self.p_label, 1, 4)
     self.main_layout.addWidget(self.p_input, 1, 5)
     self.n_clusters_label = QtWidgets.QLabel(self.tr("Number of Clusters"))
     self.n_clusters_label.setToolTip(self.tr("The number of clusters."))
     self.n_clusters_input = QtWidgets.QSpinBox()
     self.n_clusters_input.setMinimum(2)
     self.main_layout.addWidget(self.n_clusters_label, 1, 6)
     self.main_layout.addWidget(self.n_clusters_input, 1, 7)
     self.normal_msg = QtWidgets.QMessageBox(self)
     self.file_dialog = QtWidgets.QFileDialog(parent=self)
     self._last_dataset = None
     self._last_result = None
Esempio n. 23
0
 def __init__(self, name, value, choices):
     super().__init__(name)
     combobox = QtWidgets.QComboBox()
     label = QtWidgets.QLabel(self.get_label_text())
     combobox.addItems(choices)
     combobox.setCurrentIndex(choices.index(value))
     combobox.currentTextChanged.connect(self._combobox_select)
     self.layout.addWidget(label)
     self.layout.addWidget(combobox)
Esempio n. 24
0
 def add_local_control(self):
     """
     Create local control components.
     """
     self.label_Local_control = QtWidgets.QLabel()
     self.Local_control = QtWidgets.QComboBox()
     self.Local_control.addItem("")
     self.Local_control.addItem("")
     self.Local_control.addItem("")
Esempio n. 25
0
 def add_distant_control(self):
     """
     Create distant control components.
     """
     self.label_Distant_Control = QtWidgets.QLabel()
     self.Distant_Control = QtWidgets.QComboBox()
     self.Distant_Control.addItem("")
     self.Distant_Control.addItem("")
     self.Distant_Control.addItem("")
Esempio n. 26
0
 def add_regional_control(self):
     """
     Create regional control components.
     """
     self.label_Regional_control = QtWidgets.QLabel()
     self.Regional_Control = QtWidgets.QComboBox()
     self.Regional_Control.addItem("")
     self.Regional_Control.addItem("")
     self.Regional_Control.addItem("")
Esempio n. 27
0
 def add_death(self):
     """
     Create death components.
     """
     self.label_Death = QtWidgets.QLabel()
     self.Death = QtWidgets.QComboBox()
     self.Death.addItem("")
     self.Death.addItem("")
     self.Death.addItem("")
Esempio n. 28
0
 def add_cancer_death(self):
     """
     Create cancer death components.
     """
     self.label_Cancer_death = QtWidgets.QLabel()
     self.Cancer_death = QtWidgets.QComboBox()
     self.Cancer_death.addItem("")
     self.Cancer_death.addItem("")
     self.Cancer_death.addItem("")
Esempio n. 29
0
 def add_M_stage(self):
     """
     Create M stage components.
     """
     self.label_M_Stage = QtWidgets.QLabel()
     self.M_stage = QtWidgets.QComboBox()
     self.M_stage.addItem("")
     self.M_stage.addItem("")
     self.M_stage.addItem("")
Esempio n. 30
0
 def add_gender(self):
     """
     Create gender components.
     """
     self.label_gender = QtWidgets.QLabel()
     self.gender = QtWidgets.QComboBox()
     self.gender.addItem("")
     self.gender.addItem("")
     self.gender.addItem("")
     self.gender.addItem("")