42 #define YUILogComponent "qt-pkg"
46 #include "YQPkgChangeLogView.h"
47 #include "YQPkgDescriptionDialog.h"
68 _selectable = selectable;
79 ZyppPkg installed = tryCastToZyppPkg( selectable->installedObj() );
87 html +=
"<p><i>" + _(
"Information only available for installed packages." ) +
"</i></p>";
100 for ( zypp::Changelog::const_iterator it = changeLog.begin();
101 it != changeLog.end();
104 QString changes =
htmlEscape( fromUTF8( (*it).text() ) );
105 changes.replace(
"\n",
"<br>" );
106 changes.replace(
" ",
" " );
109 cell( (*it).date() ) +
110 cell( (*it).author() ) +
111 "<td valign='top'>" + changes +
"</td>"
115 return html.isEmpty() ?
"" :
table( html );
119 #include "YQPkgChangeLogView.moc"
virtual ~YQPkgChangeLogView()
Destructor.
static QString htmlHeading(ZyppSel selectable, bool showVersion=false)
Returns a uniform heading in HTML format for the specified selectable: name and summary or name...
Abstract base class for details views.
static QString cell(QString contents)
Returns a string containing a HTML table cell with 'contents'.
YQPkgChangeLogView(QWidget *parent)
Constructor.
static QString htmlEscape(const QString &plainText)
Escapes characters special to HTML in a ( plain text ) string, such as: '<' -> '<' '>' -> '>' '&' -> ...
static QString table(const QString &contents)
Returns a string containing a HTML table with 'contents'.
virtual void showDetails(ZyppSel selectable)
Show details for the specified package: In this case the package description.
static QString row(const QString &contents)
Returns a string containing a HTML table row with 'contents'.
static QString htmlStart()
starts the html tag and set the style
QString changeLogTable(const zypp::Changelog &changeLog) const
Format a change log list in HTML.