Quintiq file version 2.0
|
#parent: PanelGoal/CustomDrawDataLayerStrategy
|
Response OnDrawObject (
|
KPIWeight object
|
) id:Response_PanelGoal_CustomDrawDataLayerStrategy_OnDrawObject
|
{
|
#keys: '[127710.2.19056862]'
|
CanBindMultiple: false
|
DefinitionID: 'Responsedef_WebCustomDrawDataLayer_OnDrawObject'
|
QuillAction
|
{
|
Body:
|
[*
|
//Write constraint text
|
|
surface.Pen().Color( Color::Black() );
|
surface.Font().Size( 10 );
|
|
//Write the title out of the region so that it does not trigger tooltip
|
x := -100
|
y := 0;
|
|
//Write the goal titles only for the first goal
|
title := ifexpr( object.StrategyLevel().Level() = 1, 'Constraints:', 'Priority ' + [String]( object.StrategyLevel().Level() - 1) + ':' );
|
if( not isnull( object.AsFirstKPIWeightInLevel() ) )
|
{
|
surface.Font().Bold( true );
|
surface.TextZoom( x, y, title );
|
}
|
|
//Write the goal names
|
x := 20;
|
image := '';
|
if( object.KPI().IsAccount() )
|
{
|
image := "MONEY";
|
if( object.KPI().astype( Account ).AccountTypeName() = Translations::MP_Account_AccountTypePreference() )
|
{
|
image := "PREFERENCES";
|
}
|
}
|
if( not ( object.Strategy().IsBounded() and object.Strategy().IsValidKPIWeight() )
|
and object.KPI().IsMaximize()
|
and object.Level() = 1 )
|
{
|
image := "WARNING";
|
}
|
else if( not object.IsValidKPIUsedByOptimizer() )
|
{
|
image := "GEAR_WARNING";
|
}
|
|
surface.Image( x-25, y, 20, 20, image );
|
surface.Font().Bold( false );
|
surface.TextZoom( x, y, object.KPIName() );
|
*]
|
GroupServerCalls: false
|
}
|
}
|