mirror of
https://github.com/bec-project/bec_widgets.git
synced 2025-07-14 03:31:50 +02:00
feat(designer): added designer icon factory
This commit is contained in:
@ -2,13 +2,12 @@
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
||||
import os
|
||||
|
||||
from bec_qthemes import material_icon
|
||||
from qtpy.QtDesigner import QDesignerCustomWidgetInterface
|
||||
from qtpy.QtGui import QGuiApplication, QIcon
|
||||
|
||||
import bec_widgets
|
||||
from bec_widgets.examples.plugin_example_pyside.tictactoe import TicTacToe
|
||||
from bec_widgets.examples.plugin_example_pyside.tictactoetaskmenu import TicTacToeTaskMenuFactory
|
||||
from bec_widgets.utils.bec_designer import designer_material_icon
|
||||
|
||||
DOM_XML = """
|
||||
<ui language='c++'>
|
||||
@ -47,9 +46,7 @@ class TicTacToePlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
||||
return "Games"
|
||||
|
||||
def icon(self):
|
||||
palette = QGuiApplication.palette()
|
||||
pixmap = material_icon("sports_esports", color=palette.text().color(), filled=True)
|
||||
return QIcon(pixmap)
|
||||
return designer_material_icon("sports_esports")
|
||||
|
||||
def includeFile(self):
|
||||
return "tictactoe"
|
||||
|
@ -6,7 +6,9 @@ import sys
|
||||
import sysconfig
|
||||
from pathlib import Path
|
||||
|
||||
from bec_qthemes import material_icon
|
||||
from qtpy import PYSIDE6
|
||||
from qtpy.QtGui import QIcon
|
||||
|
||||
if PYSIDE6:
|
||||
from PySide6.scripts.pyside_tool import (
|
||||
@ -21,6 +23,19 @@ if PYSIDE6:
|
||||
import bec_widgets
|
||||
|
||||
|
||||
def designer_material_icon(icon_name: str) -> QIcon:
|
||||
"""
|
||||
Create a QIcon for the BECDesigner with the given material icon name.
|
||||
|
||||
Args:
|
||||
icon_name (str): The name of the material icon.
|
||||
|
||||
Returns:
|
||||
QIcon: The QIcon for the material icon.
|
||||
"""
|
||||
return QIcon(material_icon(icon_name, filled=True, convert_to_pixmap=True))
|
||||
|
||||
|
||||
def list_editable_packages() -> set[str]:
|
||||
"""
|
||||
List all editable packages in the environment.
|
||||
|
@ -2,11 +2,10 @@
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
||||
import os
|
||||
|
||||
from bec_qthemes import material_icon
|
||||
from qtpy.QtDesigner import QDesignerCustomWidgetInterface
|
||||
from qtpy.QtGui import QGuiApplication, QIcon
|
||||
|
||||
import bec_widgets
|
||||
from bec_widgets.utils.bec_designer import designer_material_icon
|
||||
from bec_widgets.widgets.bec_queue.bec_queue import BECQueue
|
||||
|
||||
DOM_XML = """
|
||||
@ -35,9 +34,7 @@ class BECQueuePlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
||||
return "BEC Services"
|
||||
|
||||
def icon(self):
|
||||
palette = QGuiApplication.palette()
|
||||
pixmap = material_icon("edit_note", color=palette.text().color(), filled=True)
|
||||
return QIcon(pixmap)
|
||||
return designer_material_icon("edit_note")
|
||||
|
||||
def includeFile(self):
|
||||
return "bec_queue"
|
||||
|
@ -2,11 +2,10 @@
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
||||
import os
|
||||
|
||||
from bec_qthemes import material_icon
|
||||
from qtpy.QtDesigner import QDesignerCustomWidgetInterface
|
||||
from qtpy.QtGui import QGuiApplication, QIcon
|
||||
|
||||
import bec_widgets
|
||||
from bec_widgets.utils.bec_designer import designer_material_icon
|
||||
from bec_widgets.widgets.bec_status_box.bec_status_box import BECStatusBox
|
||||
|
||||
DOM_XML = """
|
||||
@ -35,9 +34,7 @@ class BECStatusBoxPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
||||
return "BEC Services"
|
||||
|
||||
def icon(self):
|
||||
palette = QGuiApplication.palette()
|
||||
pixmap = material_icon("dns", color=palette.text().color(), filled=True)
|
||||
return QIcon(pixmap)
|
||||
return designer_material_icon("dns")
|
||||
|
||||
def includeFile(self):
|
||||
return "bec_status_box"
|
||||
|
@ -1,10 +1,9 @@
|
||||
import os
|
||||
|
||||
from bec_qthemes import material_icon
|
||||
from qtpy.QtDesigner import QDesignerCustomWidgetInterface
|
||||
from qtpy.QtGui import QGuiApplication, QIcon
|
||||
|
||||
import bec_widgets
|
||||
from bec_widgets.utils.bec_designer import designer_material_icon
|
||||
from bec_widgets.widgets.color_button.color_button import ColorButton
|
||||
|
||||
DOM_XML = """
|
||||
@ -32,9 +31,7 @@ class ColorButtonPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
||||
return "BEC Buttons"
|
||||
|
||||
def icon(self):
|
||||
palette = QGuiApplication.palette()
|
||||
pixmap = material_icon("colors", color=palette.text().color(), filled=True)
|
||||
return QIcon(pixmap)
|
||||
return designer_material_icon("colors")
|
||||
|
||||
def includeFile(self):
|
||||
return "color_button"
|
||||
|
@ -2,11 +2,10 @@
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
||||
import os
|
||||
|
||||
from bec_qthemes import material_icon
|
||||
from qtpy.QtDesigner import QDesignerCustomWidgetInterface
|
||||
from qtpy.QtGui import QGuiApplication, QIcon
|
||||
|
||||
import bec_widgets
|
||||
from bec_widgets.utils.bec_designer import designer_material_icon
|
||||
from bec_widgets.widgets.colormap_selector.colormap_selector import ColormapSelector
|
||||
|
||||
DOM_XML = """
|
||||
@ -35,9 +34,7 @@ class ColormapSelectorPlugin(QDesignerCustomWidgetInterface): # pragma: no cove
|
||||
return "BEC Buttons"
|
||||
|
||||
def icon(self):
|
||||
palette = QGuiApplication.palette()
|
||||
pixmap = material_icon("palette", color=palette.text().color(), filled=True)
|
||||
return QIcon(pixmap)
|
||||
return designer_material_icon("palette")
|
||||
|
||||
def includeFile(self):
|
||||
return "colormap_selector"
|
||||
|
@ -1,10 +1,9 @@
|
||||
# Copyright (C) 2022 The Qt Company Ltd.
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
||||
|
||||
from bec_qthemes import material_icon
|
||||
from qtpy.QtDesigner import QDesignerCustomWidgetInterface
|
||||
from qtpy.QtGui import QGuiApplication, QIcon
|
||||
|
||||
from bec_widgets.utils.bec_designer import designer_material_icon
|
||||
from bec_widgets.widgets.device_browser.device_browser import DeviceBrowser
|
||||
|
||||
DOM_XML = """
|
||||
@ -31,9 +30,7 @@ class DeviceBrowserPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
||||
return "BEC Services"
|
||||
|
||||
def icon(self):
|
||||
palette = QGuiApplication.palette()
|
||||
pixmap = material_icon("lists", color=palette.text().color(), filled=True)
|
||||
return QIcon(pixmap)
|
||||
return designer_material_icon("lists")
|
||||
|
||||
def includeFile(self):
|
||||
return "device_browser"
|
||||
|
@ -2,11 +2,10 @@
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
||||
import os
|
||||
|
||||
from bec_qthemes import material_icon
|
||||
from qtpy.QtDesigner import QDesignerCustomWidgetInterface
|
||||
from qtpy.QtGui import QGuiApplication, QIcon
|
||||
|
||||
import bec_widgets
|
||||
from bec_widgets.utils.bec_designer import designer_material_icon
|
||||
from bec_widgets.widgets.device_combobox.device_combobox import DeviceComboBox
|
||||
|
||||
DOM_XML = """
|
||||
@ -35,9 +34,7 @@ class DeviceComboBoxPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
||||
return "Device Control"
|
||||
|
||||
def icon(self):
|
||||
palette = QGuiApplication.palette()
|
||||
pixmap = material_icon("list_alt", color=palette.text().color(), filled=True)
|
||||
return QIcon(pixmap)
|
||||
return designer_material_icon("list_alt")
|
||||
|
||||
def includeFile(self):
|
||||
return "device_combobox"
|
||||
|
@ -2,11 +2,10 @@
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
||||
import os
|
||||
|
||||
from bec_qthemes import material_icon
|
||||
from qtpy.QtDesigner import QDesignerCustomWidgetInterface
|
||||
from qtpy.QtGui import QGuiApplication, QIcon
|
||||
|
||||
import bec_widgets
|
||||
from bec_widgets.utils.bec_designer import designer_material_icon
|
||||
from bec_widgets.widgets.device_line_edit.device_line_edit import DeviceLineEdit
|
||||
|
||||
DOM_XML = """
|
||||
@ -35,9 +34,7 @@ class DeviceLineEditPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
||||
return "Device Control"
|
||||
|
||||
def icon(self):
|
||||
palette = QGuiApplication.palette()
|
||||
pixmap = material_icon("edit_note", color=palette.text().color(), filled=True)
|
||||
return QIcon(pixmap)
|
||||
return designer_material_icon("edit_note")
|
||||
|
||||
def includeFile(self):
|
||||
return "device_line_edit"
|
||||
|
@ -2,11 +2,10 @@
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
||||
import os
|
||||
|
||||
from bec_qthemes import material_icon
|
||||
from qtpy.QtDesigner import QDesignerCustomWidgetInterface
|
||||
from qtpy.QtGui import QGuiApplication, QIcon
|
||||
|
||||
import bec_widgets
|
||||
from bec_widgets.utils.bec_designer import designer_material_icon
|
||||
from bec_widgets.widgets.dock import BECDockArea
|
||||
|
||||
DOM_XML = """
|
||||
@ -35,9 +34,7 @@ class BECDockAreaPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
||||
return "BEC Plots"
|
||||
|
||||
def icon(self):
|
||||
palette = QGuiApplication.palette()
|
||||
pixmap = material_icon("widgets", color=palette.text().color(), filled=True)
|
||||
return QIcon(pixmap)
|
||||
return designer_material_icon("widgets")
|
||||
|
||||
def includeFile(self):
|
||||
return "dock_area"
|
||||
|
@ -2,11 +2,10 @@
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
||||
import os
|
||||
|
||||
from bec_qthemes import material_icon
|
||||
from qtpy.QtDesigner import QDesignerCustomWidgetInterface
|
||||
from qtpy.QtGui import QGuiApplication, QIcon
|
||||
|
||||
import bec_widgets
|
||||
from bec_widgets.utils.bec_designer import designer_material_icon
|
||||
from bec_widgets.widgets.image.image_widget import BECImageWidget
|
||||
|
||||
DOM_XML = """
|
||||
@ -35,9 +34,7 @@ class BECImageWidgetPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
||||
return "BEC Plots"
|
||||
|
||||
def icon(self):
|
||||
palette = QGuiApplication.palette()
|
||||
pixmap = material_icon("image", color=palette.text().color(), filled=True)
|
||||
return QIcon(pixmap)
|
||||
return designer_material_icon("image")
|
||||
|
||||
def includeFile(self):
|
||||
return "bec_image_widget"
|
||||
|
@ -1,10 +1,9 @@
|
||||
import os
|
||||
|
||||
from bec_qthemes import material_icon
|
||||
from qtpy.QtDesigner import QDesignerCustomWidgetInterface
|
||||
from qtpy.QtGui import QGuiApplication, QIcon
|
||||
|
||||
import bec_widgets
|
||||
from bec_widgets.utils.bec_designer import designer_material_icon
|
||||
from bec_widgets.widgets.motor_map.motor_map_widget import BECMotorMapWidget
|
||||
|
||||
DOM_XML = """
|
||||
@ -33,9 +32,7 @@ class BECMotorMapWidgetPlugin(QDesignerCustomWidgetInterface): # pragma: no cov
|
||||
return "BEC Plots"
|
||||
|
||||
def icon(self):
|
||||
palette = QGuiApplication.palette()
|
||||
pixmap = material_icon("my_location", color=palette.text().color(), filled=True)
|
||||
return QIcon(pixmap)
|
||||
return designer_material_icon("my_location")
|
||||
|
||||
def includeFile(self):
|
||||
return "bec_motor_map_widget"
|
||||
|
@ -2,11 +2,10 @@
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
||||
import os
|
||||
|
||||
from bec_qthemes import material_icon
|
||||
from qtpy.QtDesigner import QDesignerCustomWidgetInterface
|
||||
from qtpy.QtGui import QGuiApplication, QIcon
|
||||
|
||||
import bec_widgets
|
||||
from bec_widgets.utils.bec_designer import designer_material_icon
|
||||
from bec_widgets.widgets.position_indicator.position_indicator import PositionIndicator
|
||||
|
||||
DOM_XML = """
|
||||
@ -35,9 +34,7 @@ class PositionIndicatorPlugin(QDesignerCustomWidgetInterface): # pragma: no cov
|
||||
return "BEC Utils"
|
||||
|
||||
def icon(self):
|
||||
palette = QGuiApplication.palette()
|
||||
pixmap = material_icon("horizontal_distribute", color=palette.text().color(), filled=True)
|
||||
return QIcon(pixmap)
|
||||
return designer_material_icon("horizontal_distribute")
|
||||
|
||||
def includeFile(self):
|
||||
return "position_indicator"
|
||||
|
@ -3,10 +3,9 @@
|
||||
|
||||
import os
|
||||
|
||||
from bec_qthemes import material_icon
|
||||
from qtpy.QtDesigner import QDesignerCustomWidgetInterface
|
||||
from qtpy.QtGui import QGuiApplication, QIcon
|
||||
|
||||
from bec_widgets.utils.bec_designer import designer_material_icon
|
||||
from bec_widgets.widgets.positioner_box.positioner_box import PositionerBox
|
||||
|
||||
DOM_XML = """
|
||||
@ -34,9 +33,7 @@ class PositionerBoxPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
||||
return "Device Control"
|
||||
|
||||
def icon(self):
|
||||
palette = QGuiApplication.palette()
|
||||
pixmap = material_icon("switch_right", color=palette.text().color(), filled=True)
|
||||
return QIcon(pixmap)
|
||||
return designer_material_icon("switch_right")
|
||||
|
||||
def includeFile(self):
|
||||
return "positioner_box"
|
||||
|
@ -3,10 +3,9 @@
|
||||
|
||||
import os
|
||||
|
||||
from bec_qthemes import material_icon
|
||||
from qtpy.QtDesigner import QDesignerCustomWidgetInterface
|
||||
from qtpy.QtGui import QGuiApplication, QIcon
|
||||
|
||||
from bec_widgets.utils.bec_designer import designer_material_icon
|
||||
from bec_widgets.widgets.positioner_box.positioner_control_line import PositionerControlLine
|
||||
|
||||
DOM_XML = """
|
||||
@ -34,9 +33,7 @@ class PositionerControlLinePlugin(QDesignerCustomWidgetInterface): # pragma: no
|
||||
return "Device Control"
|
||||
|
||||
def icon(self):
|
||||
palette = QGuiApplication.palette()
|
||||
pixmap = material_icon("switch_left", color=palette.text().color(), filled=True)
|
||||
return QIcon(pixmap)
|
||||
return designer_material_icon("switch_left")
|
||||
|
||||
def includeFile(self):
|
||||
return "positioner_control_line"
|
||||
|
@ -2,11 +2,10 @@
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
||||
import os
|
||||
|
||||
from bec_qthemes import material_icon
|
||||
from qtpy.QtDesigner import QDesignerCustomWidgetInterface
|
||||
from qtpy.QtGui import QGuiApplication, QIcon
|
||||
|
||||
import bec_widgets
|
||||
from bec_widgets.utils.bec_designer import designer_material_icon
|
||||
from bec_widgets.widgets.ring_progress_bar.ring_progress_bar import RingProgressBar
|
||||
|
||||
DOM_XML = """
|
||||
@ -34,9 +33,7 @@ class RingProgressBarPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
||||
return "BEC Utils"
|
||||
|
||||
def icon(self):
|
||||
palette = QGuiApplication.palette()
|
||||
pixmap = material_icon("track_changes", color=palette.text().color(), filled=True)
|
||||
return QIcon(pixmap)
|
||||
return designer_material_icon("track_changes")
|
||||
|
||||
def includeFile(self):
|
||||
return "ring_progress_bar"
|
||||
|
@ -2,11 +2,10 @@
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
||||
import os
|
||||
|
||||
from bec_qthemes import material_icon
|
||||
from qtpy.QtDesigner import QDesignerCustomWidgetInterface
|
||||
from qtpy.QtGui import QGuiApplication, QIcon
|
||||
|
||||
import bec_widgets
|
||||
from bec_widgets.utils.bec_designer import designer_material_icon
|
||||
from bec_widgets.widgets.scan_control.scan_control import ScanControl
|
||||
|
||||
DOM_XML = """
|
||||
@ -34,9 +33,7 @@ class ScanControlPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
||||
return "Device Control"
|
||||
|
||||
def icon(self):
|
||||
palette = QGuiApplication.palette()
|
||||
pixmap = material_icon("stacked_line_chart", color=palette.text().color(), filled=True)
|
||||
return QIcon(pixmap)
|
||||
return designer_material_icon("stacked_line_chart")
|
||||
|
||||
def includeFile(self):
|
||||
return "scan_control"
|
||||
|
@ -2,11 +2,10 @@
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
||||
import os
|
||||
|
||||
from bec_qthemes import material_icon
|
||||
from qtpy.QtDesigner import QDesignerCustomWidgetInterface
|
||||
from qtpy.QtGui import QGuiApplication, QIcon
|
||||
|
||||
import bec_widgets
|
||||
from bec_widgets.utils.bec_designer import designer_material_icon
|
||||
from bec_widgets.widgets.spinner.spinner import SpinnerWidget
|
||||
|
||||
DOM_XML = """
|
||||
@ -35,9 +34,7 @@ class SpinnerWidgetPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
||||
return "BEC Utils"
|
||||
|
||||
def icon(self):
|
||||
palette = QGuiApplication.palette()
|
||||
pixmap = material_icon("progress_activity", color=palette.text().color(), filled=True)
|
||||
return QIcon(pixmap)
|
||||
return designer_material_icon("progress_activity")
|
||||
|
||||
def includeFile(self):
|
||||
return "spinner_widget"
|
||||
|
@ -2,11 +2,10 @@
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
||||
import os
|
||||
|
||||
from bec_qthemes import material_icon
|
||||
from qtpy.QtDesigner import QDesignerCustomWidgetInterface
|
||||
from qtpy.QtGui import QGuiApplication, QIcon
|
||||
|
||||
import bec_widgets
|
||||
from bec_widgets.utils.bec_designer import designer_material_icon
|
||||
from bec_widgets.widgets.stop_button.stop_button import StopButton
|
||||
|
||||
DOM_XML = """
|
||||
@ -35,9 +34,7 @@ class StopButtonPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
||||
return "BEC Utils"
|
||||
|
||||
def icon(self):
|
||||
palette = QGuiApplication.palette()
|
||||
pixmap = material_icon("dangerous", color=palette.text().color(), filled=True)
|
||||
return QIcon(pixmap)
|
||||
return designer_material_icon("dangerous")
|
||||
|
||||
def includeFile(self):
|
||||
return "stop_button"
|
||||
|
@ -2,11 +2,10 @@
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
||||
import os
|
||||
|
||||
from bec_qthemes import material_icon
|
||||
from qtpy.QtDesigner import QDesignerCustomWidgetInterface
|
||||
from qtpy.QtGui import QGuiApplication, QIcon
|
||||
|
||||
import bec_widgets
|
||||
from bec_widgets.utils.bec_designer import designer_material_icon
|
||||
from bec_widgets.widgets.text_box.text_box import TextBox
|
||||
|
||||
DOM_XML = """
|
||||
@ -34,9 +33,7 @@ class TextBoxPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
||||
return "BEC Utils"
|
||||
|
||||
def icon(self):
|
||||
palette = QGuiApplication.palette()
|
||||
pixmap = material_icon("chat", color=palette.text().color(), filled=True)
|
||||
return QIcon(pixmap)
|
||||
return designer_material_icon("chat")
|
||||
|
||||
def includeFile(self):
|
||||
return "text_box"
|
||||
|
@ -2,11 +2,10 @@
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
||||
import os
|
||||
|
||||
from bec_qthemes import material_icon
|
||||
from qtpy.QtDesigner import QDesignerCustomWidgetInterface
|
||||
from qtpy.QtGui import QGuiApplication, QIcon
|
||||
|
||||
import bec_widgets
|
||||
from bec_widgets.utils.bec_designer import designer_material_icon
|
||||
from bec_widgets.widgets.toggle.toggle import ToggleSwitch
|
||||
|
||||
DOM_XML = """
|
||||
@ -35,9 +34,7 @@ class ToggleSwitchPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
||||
return "BEC Utils"
|
||||
|
||||
def icon(self):
|
||||
palette = QGuiApplication.palette()
|
||||
pixmap = material_icon("toggle_on", color=palette.text().color(), filled=True)
|
||||
return QIcon(pixmap)
|
||||
return designer_material_icon("toggle_on")
|
||||
|
||||
def includeFile(self):
|
||||
return "toggle_switch"
|
||||
|
@ -2,11 +2,10 @@
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
||||
import os
|
||||
|
||||
from bec_qthemes import material_icon
|
||||
from qtpy.QtDesigner import QDesignerCustomWidgetInterface
|
||||
from qtpy.QtGui import QGuiApplication, QIcon
|
||||
|
||||
import bec_widgets
|
||||
from bec_widgets.utils.bec_designer import designer_material_icon
|
||||
from bec_widgets.widgets.vscode.vscode import VSCodeEditor
|
||||
|
||||
DOM_XML = """
|
||||
@ -35,9 +34,7 @@ class VSCodeEditorPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
||||
return "BEC Developer"
|
||||
|
||||
def icon(self):
|
||||
palette = QGuiApplication.palette()
|
||||
pixmap = material_icon("developer_mode_tv", color=palette.text().color(), filled=True)
|
||||
return QIcon(pixmap)
|
||||
return designer_material_icon("developer_mode_tv")
|
||||
|
||||
def includeFile(self):
|
||||
return "vs_code_editor"
|
||||
|
@ -2,11 +2,10 @@
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
||||
import os
|
||||
|
||||
from bec_qthemes import material_icon
|
||||
from qtpy.QtDesigner import QDesignerCustomWidgetInterface
|
||||
from qtpy.QtGui import QGuiApplication, QIcon
|
||||
|
||||
import bec_widgets
|
||||
from bec_widgets.utils.bec_designer import designer_material_icon
|
||||
from bec_widgets.widgets.waveform.waveform_widget import BECWaveformWidget
|
||||
|
||||
DOM_XML = """
|
||||
@ -35,9 +34,7 @@ class BECWaveformWidgetPlugin(QDesignerCustomWidgetInterface): # pragma: no cov
|
||||
return "BEC Plots"
|
||||
|
||||
def icon(self):
|
||||
palette = QGuiApplication.palette()
|
||||
pixmap = material_icon("show_chart", color=palette.text().color(), filled=True)
|
||||
return QIcon(pixmap)
|
||||
return designer_material_icon("show_chart")
|
||||
|
||||
def includeFile(self):
|
||||
return "bec_waveform_widget"
|
||||
|
@ -2,11 +2,10 @@
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
||||
import os
|
||||
|
||||
from bec_qthemes import material_icon
|
||||
from qtpy.QtDesigner import QDesignerCustomWidgetInterface
|
||||
from qtpy.QtGui import QGuiApplication, QIcon
|
||||
|
||||
import bec_widgets
|
||||
from bec_widgets.utils.bec_designer import designer_material_icon
|
||||
from bec_widgets.widgets.website.website import WebsiteWidget
|
||||
|
||||
DOM_XML = """
|
||||
@ -34,9 +33,7 @@ class WebsiteWidgetPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
||||
return "BEC Utils"
|
||||
|
||||
def icon(self):
|
||||
palette = QGuiApplication.palette()
|
||||
pixmap = material_icon("travel_explore", color=palette.text().color(), filled=True)
|
||||
return QIcon(pixmap)
|
||||
return designer_material_icon("travel_explore")
|
||||
|
||||
def includeFile(self):
|
||||
return "website_widget"
|
||||
|
Reference in New Issue
Block a user