1 /*---------------------------------------------------------------------\
3 | __ __ ____ _____ ____ |
4 | \ \ / /_ _/ ___|_ _|___ \ |
5 | \ V / _` \___ \ | | __) | |
6 | | | (_| |___) || | / __/ |
7 | |_|\__,_|____/ |_| |_____| |
11 \----------------------------------------------------------------------/
13 File: YQPkgDependenciesView.h
15 Author: Stefan Hundhammer <sh@suse.de>
20 #ifndef YQPkgDependenciesView_h
21 #define YQPkgDependenciesView_h
24 #include "YQPkgGenericDetailsView.h"
30 * @short Display technical details ( very much like 'rpm -qi' ) for a zypp::Package
31 * object - the installed instance, the candidate instance or both ( in two
32 * columns ) if both exist. All other available instances are ignored.
34 class YQPkgDependenciesView : public YQPkgGenericDetailsView
43 YQPkgDependenciesView( QWidget * parent );
49 virtual ~YQPkgDependenciesView();
55 * Show details for the specified selectable:
56 * In this case technical data, very much like "rpm -qi".
57 * Overwritten from YQPkgGenericDetailsView.
59 virtual void showDetails( ZyppSel selectable );
62 * Returns a string containing a HTML table for technical details for one
65 QString simpleTable( ZyppObj pkg );
69 * Returns a string containing a HTML table for technical details for two
70 * package instances: The installed instance and an alternate instance.
71 * (usually the candidate instance).
73 QString complexTable( ZyppObj installed,
77 * Format a zypp::CapSet (describing zypp::Dep::REQUIRES etc.)
78 * with a heading in HTML lines.
80 * Returns an empty string if capSet is empty.
82 static QString row( const QString & heading,
83 const zypp::CapSet & capSet );
87 * Format two zypp::CapSets (describing zypp::Dep::REQUIRES etc.)
88 * with a heading in HTML lines.
90 * Returns an empty string both capSets are empty.
92 static QString row( const QString & heading,
93 const zypp::CapSet & capSet1,
94 const zypp::CapSet & capSet2 );
97 * Returns a string containing a HTML table row with 'contents'.
99 * Required here to avoid inheritance ambiguities.
101 static QString row( const QString & contents )
102 { return YQPkgGenericDetailsView::row( contents ); }
105 * Format a zypp::CapSet (describing zypp::Dep::REQUIRES etc.)
106 * in HTML lines, separated with <BR>.
107 * Returns an empty string if capSet is empty.
109 static QString htmlLines( const zypp::CapSet & capSet );
113 #endif // ifndef YQPkgDependenciesView_h