]> icculus.org git repositories - duncan/yast2-qt4.git/blob - src/pkg/YQPkgDescriptionDialog.h
don't create QObjects in ycp thread - make timeouts work
[duncan/yast2-qt4.git] / src / pkg / YQPkgDescriptionDialog.h
1 /*---------------------------------------------------------------------\
2 |                                                                      |
3 |                      __   __    ____ _____ ____                      |
4 |                      \ \ / /_ _/ ___|_   _|___ \                     |
5 |                       \ V / _` \___ \ | |   __) |                    |
6 |                        | | (_| |___) || |  / __/                     |
7 |                        |_|\__,_|____/ |_| |_____|                    |
8 |                                                                      |
9 |                               core system                            |
10 |                                                        (C) SuSE GmbH |
11 \----------------------------------------------------------------------/
12
13   File:       YQPkgDescriptionDialog.h
14
15   Author:     Stefan Hundhammer <sh@suse.de>
16
17 /-*/
18
19
20 #ifndef YQPkgDescriptionDialog_h
21 #define YQPkgDescriptionDialog_h
22
23 #include <qdialog.h>
24
25
26 class YQPkgList;
27 class YQPkgDescriptionView;
28
29
30 /**
31  * Pkg status and description as a standalone popup dialog.
32  **/
33 class YQPkgDescriptionDialog : public QDialog
34 {
35     Q_OBJECT
36
37 public:
38
39     /**
40      * Static convenience method: Post a description dialog for pkg 'pkgName'.
41      **/
42     static void showDescriptionDialog( const QString & pkgName );
43
44     /**
45      * Returns the preferred size.
46      *
47      * Reimplemented from QWidget to limit the dialog to the screen dimensions.
48      **/
49     virtual QSize sizeHint () const;
50
51     
52 protected:
53
54     /**
55      * Constructor: Creates a description dialog for all packages that match 'pkgName'.
56      **/
57     YQPkgDescriptionDialog( QWidget *           parent,
58                             const QString &     pkgName );
59
60     /**
61      * Apply the filter criteria: Fill the pkg list with pkgs that match the
62      * specified package name.  
63      **/
64     void filter( const QString & pkgName );
65
66     /**
67      * Returns 'true' if the pkg list is empty.
68      * This is only meaningful after calling 'filter()' !
69      **/
70     bool isEmpty() const;
71
72
73     // Data members
74
75     YQPkgList *                 _pkgList;
76     YQPkgDescriptionView *      _pkgDescription;
77 };
78
79
80 #endif // ifndef YQPkgDescriptionDialog_h