本文整理汇总了C++中SslCertificate::type方法的典型用法代码示例。如果您正苦于以下问题:C++ SslCertificate::type方法的具体用法?C++ SslCertificate::type怎么用?C++ SslCertificate::type使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SslCertificate
的用法示例。
在下文中一共展示了SslCertificate::type方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sa
SignatureWidget::SignatureWidget( const DigiDocSignature &signature, unsigned int signnum, QWidget *parent )
: QLabel( parent )
, num( signnum )
, s( signature )
{
setObjectName( QString("signatureWidget%1").arg(signnum) );
setSizePolicy( QSizePolicy::Ignored, QSizePolicy::Preferred );
setWordWrap( true );
setTextInteractionFlags( Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse );
connect( this, SIGNAL(linkActivated(QString)), SLOT(link(QString)) );
const SslCertificate cert = s.cert();
QString accessibility, content, tooltip;
QTextStream sa( &accessibility );
QTextStream sc( &content );
QTextStream st( &tooltip );
if( cert.type() & SslCertificate::TempelType )
sc << "<img src=\":/images/ico_stamp_blue_16.png\">";
else
sc << "<img src=\":/images/ico_person_blue_16.png\">";
sc << "<b>" << Qt::escape( cert.toString( cert.showCN() ? "CN" : "GN SN" ) ) << "</b>";
if( !s.location().isEmpty() )
{
sa << " " << tr("Location") << " " << s.location();
sc << "<br />" << Qt::escape( s.location() );
st << Qt::escape( s.location() ) << "<br />";
}
if( !s.role().isEmpty() )
{
sa << " " << tr("Role") << " " << s.role();
sc << "<br />" << Qt::escape( s.role() );
st << Qt::escape( s.role() ) << "<br />";
}
DateTime date( s.dateTime().toLocalTime() );
if( !date.isNull() )
{
sa << " " << tr("Signed on") << " "
<< date.formatDate( "dd. MMMM yyyy" ) << " "
<< tr("time") << " "
<< date.toString( "hh:mm" );
sc << "<br />" << tr("Signed on") << " "
<< date.formatDate( "dd. MMMM yyyy" ) << " "
<< tr("time") << " "
<< date.toString( "hh:mm" );
st << tr("Signed on") << " "
<< date.formatDate( "dd. MMMM yyyy" ) << " "
<< tr("time") << " "
<< date.toString( "hh:mm" );
}
setToolTip( tooltip );
sa << " " << tr("Signature is") << " ";
sc << "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\"><tr>";
sc << "<td>" << tr("Signature is") << " ";
switch( s.validate() )
{
case DigiDocSignature::Valid:
sa << tr("valid");
sc << "<font color=\"green\">" << tr("valid");
break;
case DigiDocSignature::Warning:
sa << tr("valid") << " (" << tr("Warnings") << ")";
sc << "<font color=\"green\">" << tr("valid") << "</font> <font>(" << tr("Warnings") << ")";
break;
case DigiDocSignature::Test:
sa << tr("valid") << " (" << tr("Test signature") << ")";
sc << "<font color=\"green\">" << tr("valid") << "</font> <font>(" << tr("Test signature") << ")";
break;
case DigiDocSignature::Invalid:
sa << tr("not valid");
sc << "<font color=\"red\">" << tr("not valid");
break;
case DigiDocSignature::Unknown:
sa << tr("unknown");
sc << "<font color=\"red\">" << tr("unknown");
break;
}
sc << "</font>";
sc << "</td><td align=\"right\">";
sc << "<a href=\"details\" style=\"color: #509B00\" title=\"" << tr("Show details") << "\">" << tr("Show details") << "</a>";
sc << "</td></tr><tr><td></td>";
sc << "<td align=\"right\">";
if( s.parent()->isSupported() )
sc << "<a href=\"remove\" style=\"color: #509B00\" title=\"" << tr("Remove") << "\">" << tr("Remove") << "</a>";
sc << "</td></tr></table>";
setText( content );
setAccessibleName( tr("Signature") + " " + cert.toString( cert.showCN() ? "CN" : "GN SN" ) );
setAccessibleDescription( accessibility );
}