Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def setup_ui(self):
"""
Create the required UI elements for the form.
Returns
-------
None
"""
iconfont = IconFont()
self.setWindowTitle("PyDM Widget Rules Editor")
vlayout = QtWidgets.QVBoxLayout()
vlayout.setContentsMargins(5, 5, 5, 5)
vlayout.setSpacing(5)
self.setLayout(vlayout)
hlayout = QtWidgets.QHBoxLayout()
hlayout.setContentsMargins(0, 0, 0, 0)
hlayout.setSpacing(5)
vlayout.addLayout(hlayout)
# Creating the widgets for the String List and
# buttons to add and remove actions
list_frame = QtWidgets.QFrame(parent=self)
list_frame.setMinimumHeight(300)
def generate_alarm_icons(self):
self.alarm_icons = (
IconFont().icon('circle', color=self.noAlarmIconColor),
IconFont().icon('circle', color=self.minorAlarmIconColor),
IconFont().icon('exclamation-circle',
color=self.majorAlarmIconColor),
IconFont().icon('question-circle',
color=self.invalidAlarmIconColor),
IconFont().icon('times-circle',
color=self.disconnectedAlarmIconColor)
)
for i in range(0, self.count()):
self.set_initial_icon_for_tab(i)
def __init__(self):
icon = IconFont().icon("cogs")
name = "Read Device Recursive"
group = "Rogue"
use_with_widgets = True
ExternalTool.__init__(self, icon=icon, name=name, group=group, use_with_widgets=use_with_widgets)
def __init__(self):
icon = IconFont().icon("code")
name = "Dummy Tool 2"
group = "Example"
use_with_widgets = True
use_without_widget = False
ExternalTool.__init__(self, icon=icon, name=name, group=group,
use_with_widgets=use_with_widgets,
use_without_widget=use_without_widget)
def generate_alarm_icons(self):
self.alarm_icons = (
IconFont().icon('circle', color=self.noAlarmIconColor),
IconFont().icon('circle', color=self.minorAlarmIconColor),
IconFont().icon('exclamation-circle',
color=self.majorAlarmIconColor),
IconFont().icon('question-circle',
color=self.invalidAlarmIconColor),
IconFont().icon('times-circle',
color=self.disconnectedAlarmIconColor)
)
for i in range(0, self.count()):
self.set_initial_icon_for_tab(i)