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()
static QString htmlHeading(ZyppSel selectable, bool showVersion=false)
Abstract base class for details views. Handles generic stuff like HTML formatting, Qt slots and display only if this view is visible at all ( it may be hidden if it's part of a QTabWidget ).
static QString cell(QString contents)
YQPkgChangeLogView(QWidget *parent)
static QString htmlEscape(const QString &plainText)
static QString table(const QString &contents)
virtual void showDetails(ZyppSel selectable)
static QString row(const QString &contents)
static QString htmlStart()
QString changeLogTable(const zypp::Changelog &changeLog) const