Import LinuxCNC source tree
This commit is contained in:
56
lib/python/qtvcp/plugins/status_adjustment_bar_plugin.py
Normal file
56
lib/python/qtvcp/plugins/status_adjustment_bar_plugin.py
Normal file
@@ -0,0 +1,56 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
from qtpy.QtGui import QIcon, QPixmap
|
||||
from qtpy.QtDesigner import QPyDesignerCustomWidgetPlugin
|
||||
from qtvcp.widgets.adjustment_bar import StatusAdjustmentBar
|
||||
from qtvcp.widgets.qtvcp_icons import Icon
|
||||
|
||||
ICON = Icon()
|
||||
|
||||
|
||||
class StatusAdjustmentBarPlugin(QPyDesignerCustomWidgetPlugin):
|
||||
|
||||
def __init__(self, parent=None):
|
||||
super(StatusAdjustmentBarPlugin, self).__init__(parent)
|
||||
|
||||
self.initialized = False
|
||||
|
||||
def initialize(self, formEditor):
|
||||
if self.initialized:
|
||||
return
|
||||
self.initialized = True
|
||||
|
||||
def isInitialized(self):
|
||||
return self.initialized
|
||||
|
||||
def createWidget(self, parent):
|
||||
widget = StatusAdjustmentBar(parent)
|
||||
widget.buildWidget()
|
||||
return widget
|
||||
|
||||
def name(self):
|
||||
return "StatusAdjustmentBar"
|
||||
|
||||
def group(self):
|
||||
return "Linuxcnc - Controller"
|
||||
|
||||
def icon(self):
|
||||
return QIcon(QPixmap(ICON.get_path('statusadjustmentbar')))
|
||||
|
||||
def toolTip(self):
|
||||
return ""
|
||||
|
||||
def whatsThis(self):
|
||||
return ""
|
||||
|
||||
def isContainer(self):
|
||||
return False
|
||||
|
||||
# Returns an XML description of a custom widget instance that describes
|
||||
# default values for its properties. Each custom widget created by this
|
||||
# plugin will be configured using this description.
|
||||
def domXml(self):
|
||||
return '<widget class="StatusAdjustmentBar" name="statusadjustmentbar" />\n'
|
||||
|
||||
def includeFile(self):
|
||||
return "qtvcp.widgets.adjustment_bar"
|
||||
Reference in New Issue
Block a user