Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
content += '\n\n'
content += 'PyQt5 (GPL)\n'
content += 'Copyright (c) 2018 Riverbank Computing Limited\n'
content += 'https://www.riverbankcomputing.com/'
content += '\n\n'
content += 'Icons8 (Creative Commons Attribution-NoDerivs 3.0 Unported)\n'
content += 'Copyright (c) Icons8 LLC\n'
content += 'https://icons8.comn'
content += '\n\n'
content += 'Versioneer (Public Domain, CC0-1.0)\n'
content += 'Copyright (c) 2018 Brian Warner\n'
content += 'https://github.com/warner/python-versioneer'
self._text = QPlainTextEdit(content)
self._text.setReadOnly(True)
self._text.setFont(get_system_font())
self._text.setLineWrapMode(True)
self._text.setFixedWidth(480)
layout.addWidget(self._text)
self.setLayout(layout)
elif interface_type == EInterfaceType.intfIEnumeration:
w = QComboBox(parent)
for item in feature.entries:
w.addItem(item.symbolic)
w.setCurrentText(feature.value)
elif interface_type == EInterfaceType.intfIString:
w = QLineEdit(parent)
w.setText(feature.value)
elif interface_type == EInterfaceType.intfIFloat:
w = QLineEdit(parent)
w.setText(str(feature.value))
else:
return None
#
w.setFont(get_system_font())
return w
def __init__(self, parent=None):
super().__init__(parent)
self.setFont(get_system_font())
def _setup_toolbars(self):
#
group_filter = self.addToolBar('Node Visibility')
group_manipulation = self.addToolBar('Node Tree Manipulation')
#
label_visibility = QLabel()
label_visibility.setText('Visibility')
label_visibility.setFont(get_system_font())
#
self._combo_box_visibility = QComboBox()
self._combo_box_visibility.setSizeAdjustPolicy(
QComboBox.AdjustToContents
)
items = ('Beginner', 'Expert', 'Guru', 'All')
for item in items:
self._combo_box_visibility.addItem(item)
shortcut_key = 'Ctrl+v'
shortcut = QShortcut(QKeySequence(shortcut_key), self)
def show_popup():
self._combo_box_visibility.showPopup()
def _initialize_widgets(self):
#
self.setWindowIcon(Icon('genicam_logo_i.png'))
#
self.setWindowTitle('GenICam.Harvester')
self.setFont(get_system_font())
#
self.statusBar().showMessage('')
self.statusBar().setFont(get_system_font())
#
self._initialize_gui_toolbar(self._observer_widgets)
#
self.setCentralWidget(self.canvas.native)
#
self.resize(800, 600)
# Place it in the center.
rectangle = self.frameGeometry()
def _initialize_widgets(self):
#
self.setWindowIcon(Icon('genicam_logo_i.png'))
#
self.setWindowTitle('GenICam.Harvester')
self.setFont(get_system_font())
#
self.statusBar().showMessage('')
self.statusBar().setFont(get_system_font())
#
self._initialize_gui_toolbar(self._observer_widgets)
#
self.setCentralWidget(self.canvas.native)
#
self.resize(800, 600)
# Place it in the center.
rectangle = self.frameGeometry()
coordinate = QDesktopWidget().availableGeometry().center()
rectangle.moveCenter(coordinate)
self.move(rectangle.topLeft())
items = ('Beginner', 'Expert', 'Guru', 'All')
for item in items:
self._combo_box_visibility.addItem(item)
shortcut_key = 'Ctrl+v'
shortcut = QShortcut(QKeySequence(shortcut_key), self)
def show_popup():
self._combo_box_visibility.showPopup()
shortcut.activated.connect(show_popup)
self._combo_box_visibility.setToolTip(
compose_tooltip('Filter the nodes to show', shortcut_key)
)
self._combo_box_visibility.setFont(get_system_font())
self._combo_box_visibility.currentIndexChanged.connect(
self._invalidate_feature_tree_by_visibility
)
#
button_expand_all = ActionExpandAll(
icon='expand.png', title='Expand All', parent=self,
action=self.action_on_expand_all
)
shortcut_key = 'Ctrl+e'
button_expand_all.setToolTip(
compose_tooltip('Expand the node tree', shortcut_key)
)
button_expand_all.setShortcut(shortcut_key)
button_expand_all.toggle()