-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding the 2nd set of functionality and many more widgets
- Loading branch information
Showing
4 changed files
with
34 additions
and
23 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,14 +70,19 @@ def update(self, values): | |
|
||
def get_usable_value(self): | ||
val = self.get_value() | ||
if val=='None' or val=='' or val is None: | ||
return None | ||
if val in ('True', 'False'): | ||
return bool(val) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
jamartinh
via email
Author
Owner
|
||
|
||
try: | ||
return float(val) | ||
if float(val) == int(val): | ||
return int(val) | ||
else: | ||
return float(val) | ||
except ValueError: | ||
return val | ||
|
||
def get_param_name(self, parent, name): | ||
return str(parent) + "__" + name | ||
|
||
|
||
def create_auto_combobox(parent_widget, values, callback_func = None): | ||
combo = QtGui.QComboBox(parent_widget) | ||
|
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
Is this intended?