1
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2026-03-12 03:37:56 +01:00

fix(plugins): Qt Designer plugins icons adjusted

This commit is contained in:
2024-07-21 21:57:45 +02:00
parent 06fab0eab9
commit f4844d2e06
51 changed files with 445 additions and 29 deletions

View File

@@ -1,11 +1,14 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import os
from qtpy.QtDesigner import QDesignerCustomWidgetInterface
from qtpy.QtGui import QIcon
from tictactoe import TicTacToe
from tictactoetaskmenu import TicTacToeTaskMenuFactory
import bec_widgets
DOM_XML = """
<ui language='c++'>
<widget class='TicTacToe' name='ticTacToe'>
@@ -24,6 +27,8 @@ DOM_XML = """
</ui>
"""
MODULE_PATH = os.path.dirname(bec_widgets.__file__)
class TicTacToePlugin(QDesignerCustomWidgetInterface): # pragma: no cover
def __init__(self):
@@ -38,10 +43,11 @@ class TicTacToePlugin(QDesignerCustomWidgetInterface): # pragma: no cover
return DOM_XML
def group(self):
return ""
return "Games"
def icon(self):
return QIcon()
icon_path = os.path.join(MODULE_PATH, "assets", "designer_icons", "games.png")
return QIcon(icon_path)
def includeFile(self):
return "tictactoe"