]> icculus.org git repositories - duncan/yast2-qt4.git/blob - src/pkg/YQPkgDescriptionView.h
- Don't create layouts with parent. Qt 4.x automatically reparents
[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 <QUrl>
24 #include "YQPkgGenericDetailsView.h"
25
26
27 /**
28  * @short Display the description of a ZyppObj derived object along with its
29  * name and summary.
30  **/
31 class YQPkgDescriptionView : public YQPkgGenericDetailsView
32 {
33     Q_OBJECT
34
35 public:
36
37     /**
38      * Constructor
39      **/
40     YQPkgDescriptionView( QWidget * parent );
41
42     /**
43      * Destructor
44      **/
45     virtual ~YQPkgDescriptionView();
46
47     /**
48      * Show details for the specified package:
49      * In this case the package description.
50      * Overwritten from YQPkgGenericDetailsView.
51      **/
52     virtual void showDetails( ZyppSel selectable );
53
54     /**
55      * Get the document pointed to by a hyperlink.
56      *
57      * Reimplemented from QTextBrowser to avoid having an empty text each time
58      * the user clicks on a hyperlink.
59      **/
60     virtual void setSource( const QUrl & name );
61
62 protected:
63
64     /**
65      * Format a multi-line text into paragraphs
66      **/
67     QString simpleHtmlParagraphs( QString text );
68     
69     /**
70      * Show information for a hyperlinked object,
71      * e.g., a "pkg:somepkg" link to another package.
72      **/
73     void showLink( const QUrl & url );
74 };
75
76
77 #endif // ifndef YQPkgDescriptionView_h