Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions dronecan_gui_tool/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def __init__(self, node, iface_name, iface_kwargs):
#
# File menu
#
quit_action = QAction(get_icon('sign-out'), '&Quit', self)
quit_action = QAction(get_icon('fa6s.right-from-bracket'), '&Quit', self)
quit_action.setShortcut(QKeySequence('Ctrl+Shift+Q'))
quit_action.triggered.connect(self.close)

Expand All @@ -148,28 +148,28 @@ def __init__(self, node, iface_name, iface_kwargs):
#
# Tools menu
#
show_bus_monitor_action = QAction(get_icon('bus'), '&Bus Monitor', self)
show_bus_monitor_action = QAction(get_icon('fa6s.bus'), '&Bus Monitor', self)
show_bus_monitor_action.setShortcut(QKeySequence('Ctrl+Shift+B'))
show_bus_monitor_action.setStatusTip('Open bus monitor window')
show_bus_monitor_action.triggered.connect(self._bus_monitor_manager.spawn_monitor)

show_console_action = QAction(get_icon('terminal'), 'Interactive &Console', self)
show_console_action = QAction(get_icon('fa6s.terminal'), 'Interactive &Console', self)
show_console_action.setShortcut(QKeySequence('Ctrl+Shift+T'))
show_console_action.setStatusTip('Open interactive console window')
show_console_action.triggered.connect(self._show_console_window)

new_subscriber_action = QAction(get_icon('newspaper-o'), '&Subscriber', self)
new_subscriber_action = QAction(get_icon('fa6.newspaper'), '&Subscriber', self)
new_subscriber_action.setShortcut(QKeySequence('Ctrl+Shift+S'))
new_subscriber_action.setStatusTip('Open subscription tool')
new_subscriber_action.triggered.connect(
lambda: SubscriberWindow.spawn(self, self._node, self._active_data_type_detector))

new_plotter_action = QAction(get_icon('area-chart'), '&Plotter', self)
new_plotter_action = QAction(get_icon('fa6s.chart-area'), '&Plotter', self)
new_plotter_action.setShortcut(QKeySequence('Ctrl+Shift+P'))
new_plotter_action.setStatusTip('Open new graph plotter window')
new_plotter_action.triggered.connect(self._plotter_manager.spawn_plotter)

show_can_adapter_controls_action = QAction(get_icon('plug'), 'CAN &Adapter Control Panel', self)
show_can_adapter_controls_action = QAction(get_icon('fa6s.plug'), 'CAN &Adapter Control Panel', self)
show_can_adapter_controls_action.setShortcut(QKeySequence('Ctrl+Shift+A'))
show_can_adapter_controls_action.setStatusTip('Open CAN adapter control panel (if supported by the adapter)')
show_can_adapter_controls_action.triggered.connect(self._try_spawn_can_adapter_control_panel)
Expand Down Expand Up @@ -199,14 +199,14 @@ def __init__(self, node, iface_name, iface_kwargs):
#
# Help menu
#
dronecan_website_action = QAction(get_icon('globe'), 'Open DroneCAN &Website', self)
dronecan_website_action = QAction(get_icon('fa6s.globe'), 'Open DroneCAN &Website', self)
dronecan_website_action.triggered.connect(lambda: QDesktopServices.openUrl(QUrl('http://dronecan.org')))

show_log_directory_action = QAction(get_icon('pencil-square-o'), 'Open &Log Directory', self)
show_log_directory_action = QAction(get_icon('fa6.pen-to-square'), 'Open &Log Directory', self)
show_log_directory_action.triggered.connect(
lambda: QDesktopServices.openUrl(QUrl.fromLocalFile(os.path.dirname(log_file.name))))

about_action = QAction(get_icon('info'), '&About', self)
about_action = QAction(get_icon('fa6s.info'), '&About', self)
about_action.triggered.connect(lambda: AboutWindow(self).show())

help_menu = self.menuBar().addMenu('&Help')
Expand Down
2 changes: 1 addition & 1 deletion dronecan_gui_tool/panels/RTK_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,4 +200,4 @@ def spawn(parent, node):

return _singleton

get_icon = partial(get_icon, 'asterisk')
get_icon = partial(get_icon, 'fa6s.asterisk')
2 changes: 1 addition & 1 deletion dronecan_gui_tool/panels/RemoteID_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,4 +213,4 @@ def spawn(parent, node):
return _singleton


get_icon = partial(get_icon, 'asterisk')
get_icon = partial(get_icon, 'fa6s.asterisk')
8 changes: 4 additions & 4 deletions dronecan_gui_tool/panels/actuator_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(self, parent):
self._spinbox.setSingleStep(0.001)
self._spinbox.valueChanged.connect(lambda: self._slider.setValue(self._spinbox.value()*1000.0))

self._zero_button = make_icon_button('hand-stop-o', 'Zero setpoint', self, text = 'Zero', on_clicked=self.zero)
self._zero_button = make_icon_button('fa6.hand', 'Zero setpoint', self, text = 'Zero', on_clicked=self.zero)

self._actuator_id = QSpinBox(self)
self._actuator_id.setMinimum(0)
Expand Down Expand Up @@ -109,10 +109,10 @@ def __init__(self, parent, node):
self._bcast_interval.valueChanged.connect(
lambda: self._bcast_timer.setInterval(self._bcast_interval.value() * 1e3))

self._stop_all = make_icon_button('hand-stop-o', 'Zero all channels', self, text='Zero All',
self._stop_all = make_icon_button('fa6.hand', 'Zero all channels', self, text='Zero All',
on_clicked=self._do_stop_all)

self._pause = make_icon_button('pause', 'Pause publishing', self, checkable=True, text='Pause')
self._pause = make_icon_button('fa6s.pause', 'Pause publishing', self, checkable=True, text='Pause')

self._msg_viewer = QPlainTextEdit(self)
self._msg_viewer.setReadOnly(True)
Expand Down Expand Up @@ -219,4 +219,4 @@ def spawn(parent, node):
return _singleton


get_icon = partial(get_icon, 'asterisk')
get_icon = partial(get_icon, 'fa6s.asterisk')
8 changes: 4 additions & 4 deletions dronecan_gui_tool/panels/esc_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def __init__(self, esc_index, parent):
self._spinbox.setValue(0)
self._spinbox.valueChanged.connect(lambda: self._slider.setValue(self._spinbox.value()))

self._zero_button = make_icon_button('hand-stop-o', 'Zero setpoint', self, on_clicked=self.zero)
self._zero_button = make_icon_button('fa6.hand', 'Zero setpoint', self, on_clicked=self.zero)

self._index_label = QLabel(f'Index: {self._index}', self)
self._error_count_label = QLabel('Err: NC', self)
Expand Down Expand Up @@ -149,10 +149,10 @@ def __init__(self, parent, node):
self._bcast_rate.valueChanged.connect(
lambda: self._bcast_timer.setInterval(int(1e3 / self._bcast_rate.value())))

self._stop_all = make_icon_button('hand-stop-o', 'Zero all channels', self, text='Stop All',
self._stop_all = make_icon_button('fa6.hand', 'Zero all channels', self, text='Stop All',
on_clicked=self._do_stop_all)

self._pause = make_icon_button('pause', 'Pause publishing', self, checkable=True, text='Pause')
self._pause = make_icon_button('fa6s.pause', 'Pause publishing', self, checkable=True, text='Pause')

self._msg_viewer = QPlainTextEdit(self)
self._msg_viewer.setReadOnly(True)
Expand Down Expand Up @@ -371,4 +371,4 @@ def spawn(parent, node):
return _singleton


get_icon = partial(get_icon, 'asterisk')
get_icon = partial(get_icon, 'fa6s.asterisk')
2 changes: 1 addition & 1 deletion dronecan_gui_tool/panels/hobbywing_esc.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,4 +317,4 @@ def spawn(parent, node):
return _singleton


get_icon = partial(get_icon, 'asterisk')
get_icon = partial(get_icon, 'fa6s.asterisk')
2 changes: 1 addition & 1 deletion dronecan_gui_tool/panels/rc_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,4 +380,4 @@ def spawn(parent, node):

return _singleton

get_icon = partial(get_icon, 'asterisk')
get_icon = partial(get_icon, 'fa6s.asterisk')
2 changes: 1 addition & 1 deletion dronecan_gui_tool/panels/serial_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -647,4 +647,4 @@ def spawn(parent, node):

return _singleton

get_icon = partial(get_icon, 'asterisk')
get_icon = partial(get_icon, 'fa6s.asterisk')
2 changes: 1 addition & 1 deletion dronecan_gui_tool/panels/stats_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,4 @@ def spawn(parent, node):

return _singleton

get_icon = partial(get_icon, 'asterisk')
get_icon = partial(get_icon, 'fa6s.asterisk')
32 changes: 16 additions & 16 deletions dronecan_gui_tool/widgets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,22 +279,22 @@ def __init__(self, parent):
self._default_search_direction = 'down'

self.show_search_bar_button = \
make_icon_button('search', 'Show search bar', self, checkable=True,
make_icon_button('fa6s.magnifying-glass', 'Show search bar', self, checkable=True,
on_clicked=lambda: self.setVisible(self.show_search_bar_button.isChecked()))

self._bar = SearchBarComboBox(self)
self._bar.on_commit = lambda: self._do_search(self._default_search_direction)

self._use_regex = make_icon_button('code', 'Search using regular expressions', self,
self._use_regex = make_icon_button('fa6s.code', 'Search using regular expressions', self,
checkable=True)

self._case_sensitive = make_icon_button('text-height', 'Search query is case sensitive', self,
self._case_sensitive = make_icon_button('fa6s.text-height', 'Search query is case sensitive', self,
checkable=True)

self._button_search_down = make_icon_button('caret-down', 'Search down', self,
self._button_search_down = make_icon_button('fa6s.caret-down', 'Search down', self,
on_clicked=partial(self._do_search, 'down'))

self._button_search_up = make_icon_button('caret-up', 'Search up', self,
self._button_search_up = make_icon_button('fa6s.caret-up', 'Search up', self,
on_clicked=partial(self._do_search, 'up'))

self.on_search = lambda *_: None
Expand Down Expand Up @@ -348,23 +348,23 @@ def __init__(self, parent, pattern_completion_model):
self.on_commit = lambda: None
self.on_remove = lambda _: None

self._remove_button = make_icon_button('remove', 'Remove this filter', self,
self._remove_button = make_icon_button('fa6s.filter-circle-xmark', 'Remove this filter', self,
on_clicked=lambda: self.on_remove(self))

self._bar = SearchBarComboBox(self, pattern_completion_model)
self._bar.on_commit = self._on_commit
self._bar.setFocus(Qt.OtherFocusReason)

self._apply_button = make_icon_button('check', 'Apply this filter expression [Enter]', self,
self._apply_button = make_icon_button('fa6s.check', 'Apply this filter expression [Enter]', self,
on_clicked=self._on_commit)

self._inverse_button = make_icon_button('random', 'Negate filter', self, checkable=True,
self._inverse_button = make_icon_button('fa6s.shuffle', 'Negate filter', self, checkable=True,
on_clicked=self._on_commit)

self._regex_button = make_icon_button('code', 'Use regular expressions', self, checkable=True,
self._regex_button = make_icon_button('fa6s.code', 'Use regular expressions', self, checkable=True,
checked=True, on_clicked=self._on_commit)

self._case_sensitive_button = make_icon_button('text-height', 'Filter expression is case sensitive', self,
self._case_sensitive_button = make_icon_button('fa6s.text-height', 'Filter expression is case sensitive', self,
checkable=True, on_clicked=self._on_commit)

layout = QHBoxLayout(self)
Expand Down Expand Up @@ -396,7 +396,7 @@ def make_matcher(self):
def __init__(self, parent):
super(FilterBar, self).__init__(parent)

self.add_filter_button = make_icon_button('filter', 'Add filter', self, on_clicked=self._on_add_filter)
self.add_filter_button = make_icon_button('fa6s.filter', 'Add filter', self, on_clicked=self._on_add_filter)

self.on_filter = lambda *_: None

Expand Down Expand Up @@ -465,12 +465,12 @@ def __init__(self, parent, started_by_default=False, pre_redraw_hook=None, **tab
self._table = BasicTable(self, **table_options)
self._table.selectionModel().selectionChanged.connect(self._call_on_selection_changed)

self._clear_button = make_icon_button('trash-o', 'Clear', self, on_clicked=self._clear)
self._clear_button = make_icon_button('fa6s.trash', 'Clear', self, on_clicked=self._clear)

self._pause = make_icon_button('pause', 'Pause updates; data received while paused will not be lost', self,
self._pause = make_icon_button('fa6s.pause', 'Pause updates; data received while paused will not be lost', self,
checkable=True)

self._start_button = make_icon_button('video-camera', 'Start/stop capturing', self,
self._start_button = make_icon_button('fa6s.video', 'Start/stop capturing', self,
checkable=True,
checked=started_by_default,
on_clicked=self._on_start_button_clicked)
Expand All @@ -481,7 +481,7 @@ def __init__(self, parent, started_by_default=False, pre_redraw_hook=None, **tab
self._filter_bar = FilterBar(self)
self._filter_bar.on_filter = self._table.set_filter

self._row_count = LabelWithIcon(get_icon('list'), '0', self)
self._row_count = LabelWithIcon(get_icon('fa6s.list'), '0', self)
self._row_count.setToolTip('Row count')

self._redraw_timer = QTimer(self)
Expand Down Expand Up @@ -588,7 +588,7 @@ def custom_area_layout(self):


def get_icon(name):
return qtawesome.icon('fa.' + name)
return qtawesome.icon(name)


def make_icon_button(icon_name, tool_tip, parent, checkable=False, checked=False, on_clicked=None, text=''):
Expand Down
2 changes: 1 addition & 1 deletion dronecan_gui_tool/widgets/about_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def __init__(self, parent):
#
# Window layout
#
self._exit_button = QPushButton(get_icon('check'), 'OK', self)
self._exit_button = QPushButton(get_icon('fa6s.check'), 'OK', self)
self._exit_button.clicked.connect(self.close)

layout = QVBoxLayout(self)
Expand Down
4 changes: 2 additions & 2 deletions dronecan_gui_tool/widgets/bus_monitor/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ def flip_row_mark(row, col):
if col == 0:
item = self._log_widget.table.item(row, col)
if item.icon().isNull():
item.setIcon(get_icon('circle'))
item.setIcon(get_icon('fa6s.circle'))
flash(self, 'Row %d was marked, click again to unmark', row, duration=3)
else:
item.setIcon(QIcon())
Expand Down Expand Up @@ -421,7 +421,7 @@ def _context_menu_requested(self, pos):

row_index = self._log_widget.table.rowAt(pos.y())
if row_index >= 0:
action_show_definition = QAction(get_icon('file-code-o'), 'Open data type &definition', self)
action_show_definition = QAction(get_icon('fa6.file-code'), 'Open data type &definition', self)
action_show_definition.triggered.connect(lambda: self._show_data_type_definition(row_index))
menu.addAction(action_show_definition)
menu.popup(self._log_widget.table.mapToGlobal(pos))
Expand Down
20 changes: 10 additions & 10 deletions dronecan_gui_tool/widgets/can_adapter_control_panel/slcan_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def __init__(self, parent, cli_iface):

self._table = StateTable(self)

self._reload_button = make_icon_button('refresh', 'Reload state information from the adapter', self,
self._reload_button = make_icon_button('fa6s.arrows-rotate', 'Reload state information from the adapter', self,
on_clicked=self._do_reload, text='Reload')

self._auto_reload_checkbox = QCheckBox('Auto reload every [sec]:', self)
Expand Down Expand Up @@ -223,10 +223,10 @@ def __init__(self, parent, model, cli_iface, store_callback):
else:
raise ValueError('Unsupported value type %r' % model.type)

self._ok_button = make_icon_button('check', 'Send changes to the device', self,
self._ok_button = make_icon_button('fa6s.check', 'Send changes to the device', self,
text='OK', on_clicked=self._do_ok)

self._cancel_button = make_icon_button('remove', 'Discard changes and close this window', self,
self._cancel_button = make_icon_button('fa6s.xmark', 'Discard changes and close this window', self,
text='Cancel', on_clicked=self.close)

layout = QVBoxLayout(self)
Expand Down Expand Up @@ -281,15 +281,15 @@ def __init__(self, parent, cli_iface):

self._have_unsaved_changes = False

self._fetch_button = make_icon_button('refresh',
self._fetch_button = make_icon_button('fa6s.arrows-roatate',
'Fetch configuration from the adapter',
self, on_clicked=self._do_fetch, text='Fetch')

self._store_button = make_icon_button('database',
self._store_button = make_icon_button('fa6s.database',
'Store the current configuration into non-volatile memory on the adapter',
self, on_clicked=self._do_store, text='Store')

self._erase_button = make_icon_button('eraser',
self._erase_button = make_icon_button('fa6s.eraser',
'Erase configuration from the non-volatile memory',
self, on_clicked=self._do_erase, text='Erase')

Expand Down Expand Up @@ -389,7 +389,7 @@ def __init__(self, parent, cli_iface):

self._command_line.setCompleter(self._command_line_completer)

self._execute_button = make_icon_button('flash', 'Execute command', self, on_clicked=self._do_execute)
self._execute_button = make_icon_button('fa6s.bolt', 'Execute command', self, on_clicked=self._do_execute)

self._response_box = QPlainTextEdit(self)
self._response_box.setToolTip('Command output will be printed here')
Expand Down Expand Up @@ -448,9 +448,9 @@ def __init__(self, parent, cli_iface, iface_name):
self._cli_widget = CLIWidget(self, self._cli_iface)

self._tab_widget = QTabWidget(self)
self._tab_widget.addTab(self._state_widget, get_icon('dashboard'), 'Adapter State')
self._tab_widget.addTab(self._config_widget, get_icon('wrench'), 'Configuration')
self._tab_widget.addTab(self._cli_widget, get_icon('terminal'), 'Command Line')
self._tab_widget.addTab(self._state_widget, get_icon('fa6s.gauge-high'), 'Adapter State')
self._tab_widget.addTab(self._config_widget, get_icon('fa6s.wrench'), 'Configuration')
self._tab_widget.addTab(self._cli_widget, get_icon('fa6s.terminal'), 'Command Line')

self._status_bar = QStatusBar(self)
self._status_bar.setSizeGripEnabled(False)
Expand Down
4 changes: 2 additions & 2 deletions dronecan_gui_tool/widgets/dynamic_node_id_allocator.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def __init__(self, parent, node, node_monitor):
self._allocation_table_update_timer.start(500)
self._allocation_table_update_timer.timeout.connect(self._update_table)

self._start_stop_button = make_icon_button('rocket', 'Launch/stop the dynamic node ID allocation server', self,
self._start_stop_button = make_icon_button('fa6s.rocket', 'Launch/stop the dynamic node ID allocation server', self,
checkable=True)
self._start_stop_button.clicked.connect(self._on_start_stop_button)

Expand All @@ -58,7 +58,7 @@ def __init__(self, parent, node, node_monitor):
self._database_file.addItem(self._database_file.currentText())
self._database_file.on_commit = self._on_start_stop_button

self._select_database_file = make_icon_button('folder-open-o', 'Open allocation table file', self,
self._select_database_file = make_icon_button('fa6.folder-open', 'Open allocation table file', self,
on_clicked=self._on_select_database_file)

db_file_completer = QCompleter()
Expand Down
Loading