CheckMark, CrossMark symbols introduced

This commit is contained in:
Uwe Rathmann 2022-07-01 12:39:28 +02:00
parent f06e47613a
commit 5545d124e8
2 changed files with 37 additions and 1 deletions

View File

@ -187,6 +187,25 @@ static void qskInformationGraphic( QPainter* painter )
painter->drawPath( path );
}
static void qskCheckMarkGraphic( QPainter* painter )
{
QPainterPath path;
path.moveTo( 0.0, 0.5 );
path.lineTo( 0.33, 1.0 );
path.lineTo( 1.0, 0.0 );
painter->setPen( QPen( Qt::black, 0.2 ) );
painter->drawPath( path );
}
static void qskCrossMarkGraphic( QPainter* painter )
{
painter->setPen( QPen( Qt::black, 0.2 ) );
painter->drawLine( 0.0, 0.0, 1.0, 1.0 );
painter->drawLine( 0.0, 1.0, 1.0, 0.0 );
}
QskGraphic QskStandardSymbol::graphic( Type symbolType )
{
static QskGraphic graphics[ SymbolTypeCount ];
@ -227,11 +246,25 @@ QskGraphic QskStandardSymbol::graphic( Type symbolType )
break;
}
case QskStandardSymbol::Information:
default:
{
qskInformationGraphic( &painter );
break;
}
case QskStandardSymbol::CheckMark:
{
qskCheckMarkGraphic( &painter );
break;
}
case QskStandardSymbol::CrossMark:
{
qskCrossMarkGraphic( &painter );
break;
}
case QskStandardSymbol::NoSymbol:
case QskStandardSymbol::SymbolTypeCount:
{
break;
}
}
}

View File

@ -27,6 +27,9 @@ namespace QskStandardSymbol
Critical,
Question,
CheckMark,
CrossMark,
SymbolTypeCount
};