libyui-qt-pkg  2.45.27
YQPkgDescriptionDialog.h
1 /**************************************************************************
2 Copyright (C) 2000 - 2010 Novell, Inc.
3 All Rights Reserved.
4 
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9 
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14 
15 You should have received a copy of the GNU General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 
19 **************************************************************************/
20 
21 
22 /*---------------------------------------------------------------------\
23 | |
24 | __ __ ____ _____ ____ |
25 | \ \ / /_ _/ ___|_ _|___ \ |
26 | \ V / _` \___ \ | | __) | |
27 | | | (_| |___) || | / __/ |
28 | |_|\__,_|____/ |_| |_____| |
29 | |
30 | core system |
31 | (C) SuSE GmbH |
32 \----------------------------------------------------------------------/
33 
34  File: YQPkgDescriptionDialog.h
35 
36  Author: Stefan Hundhammer <sh@suse.de>
37 
38 /-*/
39 
40 
41 #ifndef YQPkgDescriptionDialog_h
42 #define YQPkgDescriptionDialog_h
43 
44 #include <qdialog.h>
45 
46 
47 class YQPkgList;
49 
50 
51 /**
52  * Pkg status and description as a standalone popup dialog.
53  **/
54 class YQPkgDescriptionDialog : public QDialog
55 {
56  Q_OBJECT
57 
58 public:
59 
60  /**
61  * Static convenience method: Post a description dialog for pkg 'pkgName'.
62  **/
63  static void showDescriptionDialog( const QString & pkgName );
64 
65  /**
66  * Returns the preferred size.
67  *
68  * Reimplemented from QWidget to limit the dialog to the screen dimensions.
69  **/
70  virtual QSize sizeHint () const;
71 
72 
73 protected:
74 
75  /**
76  * Constructor: Creates a description dialog for all packages that match 'pkgName'.
77  **/
78  YQPkgDescriptionDialog( QWidget * parent,
79  const QString & pkgName );
80 
81  /**
82  * Apply the filter criteria: Fill the pkg list with pkgs that match the
83  * specified package name.
84  **/
85  void filter( const QString & pkgName );
86 
87  /**
88  * Returns 'true' if the pkg list is empty.
89  * This is only meaningful after calling 'filter()' !
90  **/
91  bool isEmpty() const;
92 
93 
94  // Data members
95 
96  YQPkgList * _pkgList;
97  YQPkgDescriptionView * _pkgDescription;
98 };
99 
100 
101 #endif // ifndef YQPkgDescriptionDialog_h
Display the description of a ZyppObj derived object along with its name and summary.
YQPkgDescriptionDialog(QWidget *parent, const QString &pkgName)
Constructor: Creates a description dialog for all packages that match &#39;pkgName&#39;.
virtual QSize sizeHint() const
Returns the preferred size.
Display a list of zypp::Package objects.
Definition: YQPkgList.h:54
bool isEmpty() const
Returns &#39;true&#39; if the pkg list is empty.
Pkg status and description as a standalone popup dialog.
static void showDescriptionDialog(const QString &pkgName)
Static convenience method: Post a description dialog for pkg &#39;pkgName&#39;.
void filter(const QString &pkgName)
Apply the filter criteria: Fill the pkg list with pkgs that match the specified package name...