aboutsummaryrefslogtreecommitdiff
path: root/src/component.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/component.py')
-rw-r--r--src/component.py31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/component.py b/src/component.py
index adb170e..7842bd6 100644
--- a/src/component.py
+++ b/src/component.py
@@ -112,37 +112,6 @@ class Component(QtCore.QObject):
def commandHelp(self):
'''Print help text for this Component's commandline arguments'''
- def pickColor(self):
- '''
- Use color picker to get color input from the user,
- and return this as an RGB string and QPushButton stylesheet.
- In a subclass apply stylesheet to any color selection widgets
- '''
- dialog = QtWidgets.QColorDialog()
- dialog.setOption(QtWidgets.QColorDialog.ShowAlphaChannel, True)
- color = dialog.getColor()
- if color.isValid():
- RGBstring = '%s,%s,%s' % (
- str(color.red()), str(color.green()), str(color.blue()))
- btnStyle = "QPushButton{background-color: %s; outline: none;}" \
- % color.name()
- return RGBstring, btnStyle
- else:
- return None, None
-
- def RGBFromString(self, string):
- '''Turns an RGB string like "255, 255, 255" into a tuple'''
- try:
- tup = tuple([int(i) for i in string.split(',')])
- if len(tup) != 3:
- raise ValueError
- for i in tup:
- if i > 255 or i < 0:
- raise ValueError
- return tup
- except:
- return (255, 255, 255)
-
def loadUi(self, filename):
return uic.loadUi(os.path.join(self.core.componentsPath, filename))