libyui-qt-pkg  2.45.6
 All Classes Functions Variables Enumerations
YQPkgDiskUsageWarningDialog.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: YQPkgDiskUsageWarningDialog.h
35 
36  Author: Stefan Hundhammer <sh@suse.de>
37 
38 /-*/
39 
40 
41 #ifndef YQPkgDiskUsageWarningDialog_h
42 #define YQPkgDiskUsageWarningDialog_h
43 
44 #include <qdialog.h>
45 
46 
47 class YQPkgDiskUsageList;
48 
49 
50 /**
51  * Warning dialog about partitions that are getting full or overflowing.
52  **/
53 class YQPkgDiskUsageWarningDialog : public QDialog
54 {
55  Q_OBJECT
56 
57 public:
58  /**
59  * Static convenience method: Post a disk usage warning with text
60  * 'message', a list of partitions that are at least 'thresholdPercent'
61  * full and one ( default ) or two buttons.
62  *
63  * Returns 'true' if the user accepted ( i.e. clicked the 'accept' button )
64  * and 'false' if the user rejected ( i.e. clicked the 'reject' button or
65  * the window manager close button ).
66  **/
67  static bool diskUsageWarning( const QString & message,
68  int thresholdPercent,
69  const QString & acceptButtonLabel,
70  const QString & rejectButtonLabel = QString::null );
71 protected:
72 
73  /**
74  * Constructor: Creates a disk usage warning dialog with text 'message' on
75  * top, a list of partitions that are at least 'thresholdPercent' full and
76  * one ( default ) or two buttons.
77  *
78  * Not meant for public use. Applications should use the static
79  * 'diskUsageWarning' method instead.
80  **/
81  YQPkgDiskUsageWarningDialog( QWidget * parent,
82  const QString & message,
83  int thresholdPercent,
84  const QString & acceptButtonLabel,
85  const QString & rejectButtonLabel = QString::null );
86 };
87 
88 
89 #endif // ifndef YQPkgDiskUsageWarningDialog_h
YQPkgDiskUsageWarningDialog(QWidget *parent, const QString &message, int thresholdPercent, const QString &acceptButtonLabel, const QString &rejectButtonLabel=QString::null)
Constructor: Creates a disk usage warning dialog with text 'message' on top, a list of partitions tha...
Warning dialog about partitions that are getting full or overflowing.
static bool diskUsageWarning(const QString &message, int thresholdPercent, const QString &acceptButtonLabel, const QString &rejectButtonLabel=QString::null)
Static convenience method: Post a disk usage warning with text 'message', a list of partitions that a...
List of disk usage of all attached partitions.