aboutsummaryrefslogtreecommitdiff
path: root/components/color.py
diff options
context:
space:
mode:
authorBrianna2017-06-23 07:18:46 -0400
committerGitHub2017-06-23 07:18:46 -0400
commit5607bff61faacb4decd641275fbf17f2e08413ad (patch)
treed8294bae70979f1134410f7794ca74a395f125ab /components/color.py
parent8c9914850e9987d4f05e8b88dedb058ffbb4f53f (diff)
parent7d4fb7843849f8a90de13c1a1cb93ca9428fd3b1 (diff)
Merge pull request #32 from djfun/newgui-commandline
making commandline features from master work with the new component system
Diffstat (limited to 'components/color.py')
-rw-r--r--components/color.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/components/color.py b/components/color.py
index cb75839..5ffcdea 100644
--- a/components/color.py
+++ b/components/color.py
@@ -233,3 +233,14 @@ class Component(__base__.Component):
else:
self.page.lineEdit_color2.setText(RGBstring)
self.page.pushButton_color2.setStyleSheet(btnStyle)
+
+ def commandHelp(self):
+ print('Specify a color:\n color=255,255,255')
+
+ def command(self, arg):
+ if not arg.startswith('preset=') and '=' in arg:
+ key, arg = arg.split('=', 1)
+ if key == 'color':
+ self.page.lineEdit_color1.setText(arg)
+ return
+ super().command(arg)