]> icculus.org git repositories - duncan/yast2-qt4.git/blob - src/pkg/YQPkgDescriptionView.h
restart qt4 porting
[duncan/yast2-qt4.git] / src / pkg / YQPkgDescriptionView.h
1 /*---------------------------------------------------------------------\
2 |                                                                      |
3 |                      __   __    ____ _____ ____                      |
4 |                      \ \ / /_ _/ ___|_   _|___ \                     |
5 |                       \ V / _` \___ \ | |   __) |                    |
6 |                        | | (_| |___) || |  / __/                     |
7 |                        |_|\__,_|____/ |_| |_____|                    |
8 |                                                                      |
9 |                               core system                            |
10 |                                                        (C) SuSE GmbH |
11 \----------------------------------------------------------------------/
12
13   File:       YQPkgDescriptionView.h
14
15   Author:     Stefan Hundhammer <sh@suse.de>
16
17 /-*/
18
19
20 #ifndef YQPkgDescriptionView_h
21 #define YQPkgDescriptionView_h
22
23 #include "YQPkgGenericDetailsView.h"
24
25
26 /**
27  * @short Display the description of a ZyppObj derived object along with its
28  * name and summary.
29  **/
30 class YQPkgDescriptionView : public YQPkgGenericDetailsView
31 {
32     Q_OBJECT
33
34 public:
35
36     /**
37      * Constructor
38      **/
39     YQPkgDescriptionView( QWidget * parent );
40
41     /**
42      * Destructor
43      **/
44     virtual ~YQPkgDescriptionView();
45
46     /**
47      * Show details for the specified package:
48      * In this case the package description.
49      * Overwritten from YQPkgGenericDetailsView.
50      **/
51     virtual void showDetails( ZyppSel selectable );
52
53     /**
54      * Get the document pointed to by a hyperlink.
55      *
56      * Reimplemented from QTextBrowser to avoid having an empty text each time
57      * the user clicks on a hyperlink.
58      **/
59     virtual void setSource( const QString & name );
60
61 protected:
62
63     /**
64      * Format a multi-line text into paragraphs
65      **/
66     QString simpleHtmlParagraphs( QString text );
67     
68     /**
69      * Show information for a hyperlinked object,
70      * e.g., a "pkg:somepkg" link to another package.
71      **/
72     void showLink( const QString & url );
73 };
74
75
76 #endif // ifndef YQPkgDescriptionView_h