Created
December 6, 2015 01:40
-
-
Save LeftRadio/fc44492838d3fc94fe46 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from ngl_utils.nplugins.python.ngl_base_qplugin import NGL_BasePlugin | |
from ngl_greed import NGL_Greed | |
class NGL_GreedPlugin(NGL_BasePlugin): | |
"""NGL_GreedPlugin(NGL_BasePlugin) | |
Provides a Python custom plugin for Qt Designer by implementing the | |
QDesignerCustomWidgetPlugin via a PyQt-specific custom plugin class. | |
""" | |
# This factory method creates new instances of custom widget with the | |
# appropriate parent. | |
def createWidget(self, parent): | |
widget = NGL_Greed(parent) | |
return widget | |
# This method returns the name of the custom widget class that is provided | |
# by this plugin. | |
def name(self): | |
return "NGL_Greed" | |
# Returns the name of the group in Qt Designer's widget box that this | |
# widget belongs to. | |
def group(self): | |
return "NGL Widgets" | |
# Returns an XML description of a custom widget instance that describes | |
def domXml(self): | |
return '<widget class="NGL_Greed" name="nglGreed" />\n' | |
# Returns the module containing the custom widget class. It may include | |
# a module path. | |
def includeFile(self): | |
return ".ngl_greed" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment