42 #define YUILogComponent "qt-pkg"
46 #include "YQPkgFileListView.h"
47 #include "YQPkgDescriptionDialog.h"
70 _selectable = selectable;
81 ZyppPkg installed = tryCastToZyppPkg( selectable->installedObj() );
88 zypp::Package::FileList f( installed->filelist() );
89 std::list<std::string> tmp( f.begin(), f.end() );
94 html +=
"<p><i>" + _(
"Information only available for installed packages." ) +
"</i></p>";
105 unsigned line_count = 0;
107 for ( list<string>::const_iterator it = fileList.begin();
108 it != fileList.end() && line_count < MAX_LINES;
113 if ( line.contains(
"/bin/" ) ||
114 line.contains(
"/sbin/" ) )
116 line =
"<b>" + line +
"</b>";
119 html += line +
"<br>";
122 if ( fileList.size() > MAX_LINES )
130 html +=
"<br>" + _(
"%1 files total" ).arg( (
unsigned long) fileList.size() );
133 return "<p>" + html +
"</p>";
137 #include "YQPkgFileListView.moc"
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.
virtual void showDetails(ZyppSel selectable)
Show details for the specified package: In this case the package description.
static QString htmlEscape(const QString &plainText)
Escapes characters special to HTML in a ( plain text ) string, such as: '<' -> '<' '>' -> '>...
QString formatFileList(const list< string > &fileList) const
Format a file list in HTML.
YQPkgFileListView(QWidget *parent)
Constructor.
virtual ~YQPkgFileListView()
Destructor.