forked from qt-creator/qt-creator
ModelingLib: Hide areStackingRoles() in cpp
Make it static. Change-Id: I05786425ade0d942b0e83349dc959a5dce72813e Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -253,6 +253,34 @@ const Style *DefaultStyleEngine::applyObjectStyle(const Style *baseStyle, StyleE
|
|||||||
return derivedStyle;
|
return derivedStyle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool areStackingRoles(DObject::VisualPrimaryRole rhsPrimaryRole,
|
||||||
|
DObject::VisualSecondaryRole rhsSecondaryRole,
|
||||||
|
DObject::VisualPrimaryRole lhsPrimaryRole,
|
||||||
|
DObject::VisualSecondaryRole lhsSecondaryRols)
|
||||||
|
{
|
||||||
|
switch (rhsSecondaryRole) {
|
||||||
|
case DObject::SecondaryRoleNone:
|
||||||
|
case DObject::SecondaryRoleLighter:
|
||||||
|
case DObject::SecondaryRoleDarker:
|
||||||
|
case DObject::SecondaryRoleFlat:
|
||||||
|
switch (lhsSecondaryRols) {
|
||||||
|
case DObject::SecondaryRoleNone:
|
||||||
|
case DObject::SecondaryRoleLighter:
|
||||||
|
case DObject::SecondaryRoleDarker:
|
||||||
|
case DObject::SecondaryRoleFlat:
|
||||||
|
return lhsPrimaryRole == rhsPrimaryRole;
|
||||||
|
case DObject::SecondaryRoleSoften:
|
||||||
|
case DObject::SecondaryRoleOutline:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case DObject::SecondaryRoleSoften:
|
||||||
|
case DObject::SecondaryRoleOutline:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
const Style *DefaultStyleEngine::applyObjectStyle(const Style *baseStyle, const StyledObject &styledObject,
|
const Style *DefaultStyleEngine::applyObjectStyle(const Style *baseStyle, const StyledObject &styledObject,
|
||||||
const Parameters *parameters)
|
const Parameters *parameters)
|
||||||
{
|
{
|
||||||
@@ -471,34 +499,6 @@ DefaultStyleEngine::ElementType DefaultStyleEngine::objectType(const DObject *ob
|
|||||||
return elementType;
|
return elementType;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DefaultStyleEngine::areStackingRoles(DObject::VisualPrimaryRole rhsPrimaryRole,
|
|
||||||
DObject::VisualSecondaryRole rhsSecondaryRole,
|
|
||||||
DObject::VisualPrimaryRole lhsPrimaryRole,
|
|
||||||
DObject::VisualSecondaryRole lhsSecondaryRols)
|
|
||||||
{
|
|
||||||
switch (rhsSecondaryRole) {
|
|
||||||
case DObject::SecondaryRoleNone:
|
|
||||||
case DObject::SecondaryRoleLighter:
|
|
||||||
case DObject::SecondaryRoleDarker:
|
|
||||||
case DObject::SecondaryRoleFlat:
|
|
||||||
switch (lhsSecondaryRols) {
|
|
||||||
case DObject::SecondaryRoleNone:
|
|
||||||
case DObject::SecondaryRoleLighter:
|
|
||||||
case DObject::SecondaryRoleDarker:
|
|
||||||
case DObject::SecondaryRoleFlat:
|
|
||||||
return lhsPrimaryRole == rhsPrimaryRole;
|
|
||||||
case DObject::SecondaryRoleSoften:
|
|
||||||
case DObject::SecondaryRoleOutline:
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case DObject::SecondaryRoleSoften:
|
|
||||||
case DObject::SecondaryRoleOutline:
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
QColor DefaultStyleEngine::baseColor(ElementType elementType, ObjectVisuals objectVisuals)
|
QColor DefaultStyleEngine::baseColor(ElementType elementType, ObjectVisuals objectVisuals)
|
||||||
{
|
{
|
||||||
if (objectVisuals.visualSecondaryRole() == DObject::SecondaryRoleOutline)
|
if (objectVisuals.visualSecondaryRole() == DObject::SecondaryRoleOutline)
|
||||||
|
|||||||
@@ -54,11 +54,6 @@ private:
|
|||||||
|
|
||||||
ElementType objectType(const DObject *object);
|
ElementType objectType(const DObject *object);
|
||||||
|
|
||||||
bool areStackingRoles(DObject::VisualPrimaryRole rhsPrimaryRole,
|
|
||||||
DObject::VisualSecondaryRole rhsSecondaryRole,
|
|
||||||
DObject::VisualPrimaryRole lhsPrimaryRole,
|
|
||||||
DObject::VisualSecondaryRole lhsSecondaryRols);
|
|
||||||
|
|
||||||
QColor baseColor(ElementType elementType, ObjectVisuals objectVisuals);
|
QColor baseColor(ElementType elementType, ObjectVisuals objectVisuals);
|
||||||
QColor lineColor(ElementType elementType, const ObjectVisuals &objectVisuals);
|
QColor lineColor(ElementType elementType, const ObjectVisuals &objectVisuals);
|
||||||
QColor fillColor(ElementType elementType, const ObjectVisuals &objectVisuals);
|
QColor fillColor(ElementType elementType, const ObjectVisuals &objectVisuals);
|
||||||
|
|||||||
Reference in New Issue
Block a user