Logo Search packages:      
Sourcecode: mailody-kde4 version File versions  Download package

void TotalView::print (  ) 

guess what...

Definition at line 103 of file messageview.cpp.

References body(), Mailody::MessageData::cc(), Mailody::MessageBodyView::externalImage(), Mailody::MessageBodyView::fixedfont(), msg(), Mailody::MessageData::sender_full(), Mailody::MessageData::subject(), Mailody::MessageData::to(), and Mailody::MessageData::vDate().

{
    QString msgheadersdata;
    msgheadersdata += "<table border=1 cellspacing=0 "
                      "cellpadding=0 width=100%>";
    msgheadersdata += "<tr><td colspan=2 bgcolor=\"#dddddd\"><b><h2>"
                      + msg()->subject() + "<h2></b></td>";
    msgheadersdata += "</tr>";
    msgheadersdata += "<tr><td align=right><b>" + i18n( "From:" ) + "</b></td>";
    msgheadersdata += "    <td width=\"100%\">" + msg()->sender_full( true )
                      + "</td>";
    msgheadersdata += "</tr>";
    msgheadersdata += "<tr><td align=right><b>" + i18n( "To:" ) + "</b></td>";
    msgheadersdata += "    <td width=\"100%\">" + msg()->to() + "</td>";
    msgheadersdata += "</tr>";
    if ( !msg()->cc().isEmpty() ) {
        msgheadersdata += "<tr><td align=right><b>" + i18n( "Cc:" )
                          + "</b></td>";
        msgheadersdata += "    <td width=\"100%\">" + msg()->cc() + "</td>";
        msgheadersdata += "</tr>";
    }
    msgheadersdata += "<tr><td align=right><b>" + i18n( "Date:" ) + "</b></td>";
    msgheadersdata += "    <td width=\"100%\">" + msg()->vDate() + "</td>";
    msgheadersdata += "</tr></table>";

    KHTMLPart* newPart = new KHTMLPart( this );
    newPart->setJScriptEnabled( false );
    newPart->setJavaEnabled( false );
    newPart->setMetaRefreshEnabled( false );
    newPart->setPluginsEnabled( false );
    newPart->setOnlyLocalReferences( !m_body->externalImage() );
    m_body->fixedfont()
    ? newPart->setStandardFont( KGlobalSettings::fixedFont().family() )
    : newPart->setStandardFont( KGlobalSettings::generalFont().family() );

    newPart->begin();
    newPart->write( msgheadersdata );
    newPart->write( "<br><br>" );
    newPart->write( msg()->body() );
    newPart->end();
    newPart->view()->print();
    delete newPart;
}


Generated by  Doxygen 1.6.0   Back to index