SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
An object to hold view configuration settings. More...
#include <qtDiagramViewConfiguration.h>
Public Member Functions | |
qtDiagramViewConfiguration (const smtk::view::Configuration &viewConfig) | |
QColor | backgroundFillColor () const |
QColor | backgroundGridColor () const |
QColor | activeTaskColor () const |
Return the color used to indicate the task is active. | |
QColor | selectionColor () const |
Return the color used to indicate the item is selected. | |
QColor | colorForState (smtk::task::State state) const |
Return the color used to indicate the task's state. More... | |
QColor | baseNodeColor () const |
Return the base color used for a node. More... | |
QColor | portNodeColor () const |
Return the base color used for a task port node. More... | |
QColor | textColor () const |
Return the color used to display text. More... | |
QColor | backgroundColor () const |
Return the color used for the background. More... | |
QColor | borderColor () const |
Return the color used for the node's border when not selected or active. More... | |
QColor | colorFromToken (const smtk::string::Token &token) const |
Return the color associated with a string token. More... | |
QColor | colorForArcType (smtk::string::Token arcType) const |
Note that this method will take light/dark mode into consideration. | |
QColor | colorForArcStatus (qtPreviewArc::ArcStatus status) const |
qreal | nodeWidth () const |
qreal | nodeRadius () const |
qreal | nodeHeadlineHeight () const |
qreal | nodeHeadlinePadding () const |
qreal | nodeBorderThickness () const |
int | nodeFontSize () const |
int | nodeLayer () const |
qreal | arcWidth () const |
qreal | arcOutline () const |
int | arcLayer () const |
qreal | arrowStemLength () const |
qreal | arrowHeadLength () const |
qreal | arrowTipAspectRatio () const |
int | constructionLayer () const |
Protected Attributes | |
std::unordered_map< smtk::string::Token, QColor > | m_lightPalette |
std::unordered_map< smtk::string::Token, QColor > | m_darkPalette |
QColor | m_backgroundFillColor |
QColor | m_backgroundGridColor |
QColor | m_selectionColor |
QColor | m_activeTaskColor |
std::array< QColor, static_cast< int >qtPreviewArc::ArcStatus::Valid)+1 > | m_colorForArcStatus |
std::unordered_map< smtk::string::Token, QColor > | m_colorForArcType |
qreal | m_nodeWidth { 300. } |
qreal | m_nodeRadius { 4. } |
qreal | m_nodeHeadlineHeight { 13 } |
qreal | m_nodeHeadlinePadding { 4. } |
qreal | m_nodeBorderThickness { 4. } |
int | m_nodeFontSize { 13 } |
int | m_nodeLayer { 10 } |
qreal | m_arcWidth { 4. } |
qreal | m_arcOutline { 1. } |
int | m_arcLayer { 5 } |
qreal | m_arrowStemLength { 16. } |
qreal | m_arrowHeadLength { 12. } |
qreal | m_arrowTipAspectRatio { 2. } |
int | m_constructionLayer { 15 } |
An object to hold view configuration settings.
This class extracts settings used to render the task view from a view::Configuration
instance and makes them quickly accessible to the Qt classes that render tasks.
QColor smtk::extension::qtDiagramViewConfiguration::backgroundColor | ( | ) | const |
Return the color used for the background.
Note that this method will take light/dark mode into consideration.
QColor smtk::extension::qtDiagramViewConfiguration::baseNodeColor | ( | ) | const |
Return the base color used for a node.
Note that this method will take light/dark mode into consideration.
QColor smtk::extension::qtDiagramViewConfiguration::borderColor | ( | ) | const |
Return the color used for the node's border when not selected or active.
Note that this method will take light/dark mode into consideration.
QColor smtk::extension::qtDiagramViewConfiguration::colorForState | ( | smtk::task::State | state | ) | const |
Return the color used to indicate the task's state.
Note that this method will take light/dark mode into consideration.
QColor smtk::extension::qtDiagramViewConfiguration::colorFromToken | ( | const smtk::string::Token & | token | ) | const |
Return the color associated with a string token.
If the token is not found in the configuration's palette, a consistent color will be returned based on its integer value.
Note that this method will take light/dark mode into consideration.
QColor smtk::extension::qtDiagramViewConfiguration::portNodeColor | ( | ) | const |
Return the base color used for a task port node.
Note that this method will take light/dark mode into consideration.
QColor smtk::extension::qtDiagramViewConfiguration::textColor | ( | ) | const |
Return the color used to display text.
Note that this method will take light/dark mode into consideration.