Update SDK to 310: Support multiple Shading Controls#236
Draft
Update SDK to 310: Support multiple Shading Controls#236
Conversation
jmarrec
commented
Sep 17, 2020
FindOpenStudioSDK.cmake
Outdated
| set(OPENSTUDIO_BASELINK_CI | ||
| # "http://openstudio-ci-builds.s3-website-us-west-2.amazonaws.com/develop" | ||
| "http://openstudio-ci-builds.s3-website-us-west-2.amazonaws.com/PR-4080" | ||
| "http://openstudio-ci-builds.s3-website-us-west-2.amazonaws.com/PR-4066" |
Collaborator
Author
There was a problem hiding this comment.
TODO: need to update hash for Windows but Jenkins build is pending
Comment on lines
416
to
423
| // TODO: this field will update depending fields, like clearing the Setpoint / Setpoint2 / ScheduleName | ||
| // So when value changes, we should trigger a row refresh | ||
| addComboBoxColumn<std::string, model::ShadingControl>( | ||
| Heading(QString(SHADINGTYPE)), static_cast<std::string (*)(const std::string&)>(&openstudio::toString), | ||
| std::function<std::vector<std::string>()>(&model::ShadingControl::shadingControlTypeValues), | ||
| CastNullAdapter<model::ShadingControl>(&model::ShadingControl::shadingControlType), | ||
| CastNullAdapter<model::ShadingControl>(&model::ShadingControl::setShadingControlType) | ||
| ); |
Comment on lines
515
to
527
| addNameLineEditColumn(Heading(QString(SUBSURFACENAME)), true, false, // Is Inspectable, but not Deletable | ||
| CastNullAdapter<model::ModelObject>(&model::ModelObject::name), | ||
| CastNullAdapter<model::ModelObject>(&model::ModelObject::setName), | ||
| boost::optional<std::function<void(model::ModelObject*)>>( | ||
| std::function<void(model::ModelObject*)>([](model::ModelObject* t_mo) { | ||
| if (auto ss = t_mo->optionalCast<model::SubSurface>()) { | ||
| // TODO: Ideally we should remove the subSurface only from the current Shading Control, but I don't see how... | ||
| ss->removeAllShadingControls(); | ||
| } | ||
| })), | ||
| DataSource(subSurfaces, false, | ||
| QSharedPointer<DropZoneConcept>(new DropZoneConceptImpl<model::ModelObject, model::ShadingControl>( | ||
| Heading(SUBSURFACENAME), getter, setter, reset)))); |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #235
Moved Shading Controls to a subtab on the Facility Tab. It's probably not the perfect implementation, but it's not bad