Changelog for SDK 2020 (v.1.0.0)#
This release includes major changes in the SDK, various new features, and fixes of known and reported issues.
Below is the list of the changes in SAMSON SDK per library and per class.
Inspector#
Introduced many new widgets and new functionality in the Inspector (you can now expose even more and with more functionality):
- expose functions via buttons (e.g. to update, reset, run calculations, etc):
SB_ATTRIBUTE_PUSH_BUTTON
,SB_ATTRIBUTE_PUSH_BUTTON_CONST
,SB_ATTRIBUTE_PUSH_BUTTON_STATIC
. - expose rich text attributes (supports html):
SB_ATTRIBUTE_RICH_TEXT_EDIT_READ_ONLY
,SB_ATTRIBUTE_RICH_TEXT_EDIT_READ_WRITE
,SB_ATTRIBUTE_RICH_TEXT_EDIT_READ_WRITE_CLEAR
. - allow resetting of attributes to their default value by the user (you will need to provide a special function that will provide the default value):
SB_ATTRIBUTE_READ_WRITE_RESET
- resettable value,SB_ATTRIBUTE_READ_WRITE_RESET_RANGE
- resettable value with the fixed rabge,SB_ATTRIBUTE_READ_WRITE_RESET_RANGE_SLIDER
- resettable value with the fixed range represented as a slider,SB_ATTRIBUTE_READ_WRITE_RESET_LIST
- resettable combo box. - new convenience definitions of attributes:
SB_ATTRIBUTE_SPIN_BOX
- spin box,SB_ATTRIBUTE_SPIN_BOX_RESET
- a spin box with a resettable value,SB_ATTRIBUTE_SLIDER
- a slider,SB_ATTRIBUTE_SLIDER_RESET
- a resettable slider,SB_ATTRIBUTE_COMBO_BOX
- select from a list using a combo box,SB_ATTRIBUTE_COMBO_BOX_RESET
- a combo box with the resettable value.
Now you can also disable attributes thanks to SBCClassAttribute::setEnabled
and SBCClassAttribute::isEnabled
functions and modify their tool tips using SBCClassAttribute::setToolTip
and SBCClassAttribute::getToolTip
. Access this functions via the class proxy:
getProxy()->getInterface()->getAttribute("Dimension")->setEnabled(false);
getProxy()->getInterface()->getAttribute("Dimension")->setToolTip("You cannot modify the dimension when the scale is set to ...");
Core library group#
Class#
See changes in the Inspector.
Serializer#
Now you can serialize a rich text (e.g. html text), e.g. you can save html text in a SAMSON document, thanks to new functions: SBCSerializer::writeStringElementInBase64
and SBCSerializer::readStringElementFromBase64
.
DataModel library group#
SBDDataGraph library#
SBNode#
A new node type: SBNode::Note
.
Change in the functionality of SBNode::isIn
functions - they now also check whether a given node belongs to a group stored in the node.
New functionality: SBNode::descendsFrom
and the according predicate DescendsFrom.
SBDDocument library#
A new node SBNote
that allows to store notes in a SAMSON document (e.g. descriptions of experiments, inlcuding html text). See its functionality here: SBDDocumentNote
.
SBDDocumentFolder#
Associated new functions: SBDDocumentFolder::getNoteList
.
SBDDocumentEvent#
New document events associated with SBNote
: SBDDocumentEvent::NoteAdded
, SBDDocumentEvent::NoteRemoved
, SBDDocumentEvent::NoteChanged
.
Facade library group#
SAMSON#
SAMSON 1.0.0 introduces User plans. Developers might access the user's plan thanks to SAMSON::getUserPlan
and SAMSON::getUserPlanString
.
Developers can now access the public version and public name informations using SAMSON::getPublicVersionNumber
and SAMSON::getPublicName
.
Now you can connect to global document's signals using SAMSON::connectDocumentSignalToSlot
, SAMSON::documentSignalIsConnectedToSlot
, and SAMSON::disconnectDocumentSignalFromSlot
. This is particularly useful if you want to listen to the SBDDocumentEvent::DocumentAdded
, SBDDocumentEvent::DocumentRemoved
, SBDDocumentEvent::ActiveDocumentChanged
signals.
New GUI functionality:
SAMSON::getFileNamesFromUser
- get multiple filenames from the userSAMSON::getElementsFromUser
- get multiple periodic table elements from the userSAMSON::getColorbar
- get a pixmap with a colorbar for a given color palette
New display functionality:
SAMSON::getMultipleBondDisplayFlag
SAMSON::getVanDerWaalsAtomRadiusFlag
SAMSON::getVanDerWaalsAtomRadiusRatio
And finaly, a functionality to create jobs:
SAMSON::createJob
- create a new job.
GUI library group#
App library#
Apps now might have tool tips when they are shown in SAMSON menu and shortcuts as well. Just overload the following functions in your apps: SBGApp::getShortcut
and SBGApp::getToolTip
.
Window library#
New functionality in SBGWindowDialog
:
SBGWindowDialog::getPlainTextFromUser
SBGWindowDialog::getFileNamesFromUser
SBGWindowDialog::getSaveFileNameFromUser
Modeling library group#
Structural Model library#
SBAtom#
New functionality in SBAtom
:
SBAtom::isInBackbone
,SBAtom::getBackbone
The according predicate has been added: IsInBackbone.
Changed functionality in SBAtom
: SBAtom::isFromAminoAcidBackbone
and SBAtom::isFromNucleicAcidBackbone
functions now check not only based on the atom name but also whether it is in a backbone. To check only based on the atom name use the following functions: SBAtom::hasAminoAcidBackboneAtomName
, SBAtom::hasNucleicAcidBackboneAtomName
. The according predicates have been added: HasAminoAcidBackboneAtomName, HasNucleicAcidBackboneAtomName.
SBBond#
New functionality in SBBond
: SBBond::getDisplacement
- returns the displacement used for display when multiple bond rendering is turned on.
SBResidue#
New functionality in SBResidue
: SBResidue::getResidueTypeFullName
.
Visual Model library#
SBMVisualModel#
New functions in SBVisualModel
that corresponds to SBMesh
: SBVisualModel::canCreateMesh
and SBVisualModel::createMesh
. If you develop a visual model and want for users to make it possible to create a mesh out of it you will need to override these functions.
SBMVisualModelMesh#
New function in SBMesh
, e.g.: SBMesh::getSurfaceVector, SBMesh::clone
, SBMesh::canCreateMesh
, SBMesh::createMesh
, SBMesh::getDefaultScale
, etc.
SBMVisualModelSurface#
New functions in SBSurface
that returns surface data making it possible to export surfaces (meshes) in OBJ files (see the SBSurface
class description).