diff options
| author | Brianna | 2017-06-23 07:18:46 -0400 |
|---|---|---|
| committer | GitHub | 2017-06-23 07:18:46 -0400 |
| commit | 5607bff61faacb4decd641275fbf17f2e08413ad (patch) | |
| tree | d8294bae70979f1134410f7794ca74a395f125ab /components/original.py | |
| parent | 8c9914850e9987d4f05e8b88dedb058ffbb4f53f (diff) | |
| parent | 7d4fb7843849f8a90de13c1a1cb93ca9428fd3b1 (diff) | |
Merge pull request #32 from djfun/newgui-commandline
making commandline features from master work with the new component system
Diffstat (limited to 'components/original.py')
| -rw-r--r-- | components/original.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/components/original.py b/components/original.py index 5e2f9d4..6222157 100644 --- a/components/original.py +++ b/components/original.py @@ -183,3 +183,22 @@ class Component(__base__.Component): return im + def command(self, arg): + if not arg.startswith('preset=') and '=' in arg: + key, arg = arg.split('=', 1) + if key == 'color': + self.page.lineEdit_visColor.setText(arg) + return + elif key == 'layout': + if arg == 'classic': + self.page.comboBox_visLayout.setCurrentIndex(0) + elif arg == 'split': + self.page.comboBox_visLayout.setCurrentIndex(1) + elif arg == 'bottom': + self.page.comboBox_visLayout.setCurrentIndex(2) + return + super().command(arg) + + def commandHelp(self): + print('Give a layout name:\n layout=[classic/split/bottom]') + print('Specify a color:\n color=255,255,255') |
