libyui-qt-pkg  2.42.5
 All Classes Functions Variables Enumerations
YQPkgChangesDialog Class Reference

#include <YQPkgChangesDialog.h>

Inheritance diagram for YQPkgChangesDialog:
Collaboration diagram for YQPkgChangesDialog:

Public Types

enum  FilterIndex { FilterIndexAll = 0, FilterIndexUser = 1, FilterIndexAutomatic = 2 }
 
enum  Filter { FilterNone = 0x0, FilterUser = 0x1, FilterAutomatic = 0x2, FilterAll = 0x1 | 0x2 }
 
enum  Option { OptionNone = 0x0, OptionAutoAcceptIfEmpty = 0x1 }
 

Public Member Functions

 Q_DECLARE_FLAGS (Filters, Filter)
 
 Q_DECLARE_FLAGS (Options, Option)
 
void setFilter (Filters f)
 
void setFilter (const QRegExp &regexp, Filters f)
 
virtual QSize sizeHint () const
 

Static Public Member Functions

static bool showChangesDialog (QWidget *parent, const QString &message, const QString &acceptButtonLabel, const QString &rejectButtonLabel=QString::null, Filters f=FilterAutomatic, Options o=OptionAutoAcceptIfEmpty)
 
static bool showChangesDialog (QWidget *parent, const QString &message, const QRegExp &regexp, const QString &acceptButtonLabel, const QString &rejectButtonLabel=QString::null, Filters f=FilterAutomatic, Options o=OptionAutoAcceptIfEmpty)
 

Protected Slots

void slotFilterChanged (int index)
 

Protected Member Functions

 YQPkgChangesDialog (QWidget *parent, const QString &message, const QString &acceptButtonLabel, const QString &rejectButtonLabel=QString::null)
 
void filter (Filters f=FilterAutomatic)
 
void filter (const QRegExp &regexp, Filters f=FilterAutomatic)
 
virtual bool extraFilter (ZyppSel sel, ZyppPkg pkg)
 
bool isEmpty () const
 

Protected Attributes

QComboBox * _filter
 
YQPkgList_pkgList
 

Detailed Description

Changes dialog: Show a dialog with a list of packages that are changed. By default, only packages with an "auto" status ( not set via selections ) are displayed.

Definition at line 57 of file YQPkgChangesDialog.h.

Member Enumeration Documentation

Filters

Definition at line 76 of file YQPkgChangesDialog.h.

filter combobox entries

Definition at line 66 of file YQPkgChangesDialog.h.

Options

Definition at line 88 of file YQPkgChangesDialog.h.

Constructor & Destructor Documentation

YQPkgChangesDialog::YQPkgChangesDialog ( QWidget *  parent,
const QString &  message,
const QString &  acceptButtonLabel,
const QString &  rejectButtonLabel = QString::null 
)
protected

Constructor: Creates a changes dialog with text 'message' on top, a list packages with an "auto" status that is not set via selections and one ( default ) or two buttons.

Not meant for public use. Applications should use the static 'showChangesDialog' method instead.

This constructor does not call filter() yet - this is the caller's responsibility.

Definition at line 68 of file YQPkgChangesDialog.cc.

Here is the call graph for this function:

Member Function Documentation

bool YQPkgChangesDialog::extraFilter ( ZyppSel  sel,
ZyppPkg  pkg 
)
protectedvirtual

extra filter for child classes

Reimplemented in YQPkgUnsupportedPackagesDialog.

Definition at line 302 of file YQPkgChangesDialog.cc.

void YQPkgChangesDialog::filter ( Filters  f = FilterAutomatic)
protected

Apply the filter criteria: Fill the pkg list with pkgs that have a "modify" status ( install, update, delete ) set by automatic ( i.e. via the dependency solver ), by application ( i.e. via software selections ) or manually by the user.

Definition at line 167 of file YQPkgChangesDialog.cc.

void YQPkgChangesDialog::filter ( const QRegExp &  regexp,
Filters  f = FilterAutomatic 
)
protected

Apply the filter criteria: Fill the pkg list with pkgs that have a "modify" status ( install, update, delete ) set by automatic ( i.e. via the dependency solver ), by application ( i.e. via software selections ) or manually by the user and whose name matches 'regexp'.

Definition at line 231 of file YQPkgChangesDialog.cc.

Here is the call graph for this function:

bool YQPkgChangesDialog::isEmpty ( ) const
protected

Returns 'true' if the pkg list is empty. This is only meaningful after calling 'filter()' !

Definition at line 308 of file YQPkgChangesDialog.cc.

void YQPkgChangesDialog::setFilter ( Filters  f)

Set the current filter This will change the combo box current selected filter and update the list

Definition at line 191 of file YQPkgChangesDialog.cc.

void YQPkgChangesDialog::setFilter ( const QRegExp &  regexp,
Filters  f 
)

Set the current filter This will change the combo box current selected filter and update the list

Definition at line 197 of file YQPkgChangesDialog.cc.

Here is the call graph for this function:

bool YQPkgChangesDialog::showChangesDialog ( QWidget *  parent,
const QString &  message,
const QString &  acceptButtonLabel,
const QString &  rejectButtonLabel = QString::null,
Filters  f = FilterAutomatic,
Options  o = OptionAutoAcceptIfEmpty 
)
static

Static convenience method: Post a changes dialog with text 'message', a list of changed packages and one ( default ) or two buttons.

Returns 'true' if the user accepted ( i.e. clicked the 'accept' button ) and 'false' if the user rejected ( i.e. clicked the 'reject' button or the window manager close button ).

If the list is empty ( i.e., there are no packages with an "auto" status ), the dialog is not shown at all ( and returns 'true' ) - unless 'showIfListEmpty' is 'true'.

Definition at line 322 of file YQPkgChangesDialog.cc.

Here is the call graph for this function:

bool YQPkgChangesDialog::showChangesDialog ( QWidget *  parent,
const QString &  message,
const QRegExp &  regexp,
const QString &  acceptButtonLabel,
const QString &  rejectButtonLabel = QString::null,
Filters  f = FilterAutomatic,
Options  o = OptionAutoAcceptIfEmpty 
)
static

Static convenience method: Post a changes dialog with text 'message', a list of changed packages whose names match the specified regular expression 'regexp' and one ( default ) or two buttons.

Returns 'true' if the user accepted ( i.e. clicked the 'accept' button ) and 'false' if the user rejected ( i.e. clicked the 'reject' button or the window manager close button ).

If the list is empty ( i.e., there are no packages with an "auto" status ), the dialog is not shown at all ( and returns 'true' ) - unless 'showIfListEmpty' is 'true'.

Definition at line 350 of file YQPkgChangesDialog.cc.

Here is the call graph for this function:

QSize YQPkgChangesDialog::sizeHint ( ) const
virtual

Returns the preferred size.

Reimplemented from QWidget to limit the dialog to the screen dimensions.

Definition at line 315 of file YQPkgChangesDialog.cc.

void YQPkgChangesDialog::slotFilterChanged ( int  index)
protectedslot

called when the filter is changed

Definition at line 173 of file YQPkgChangesDialog.cc.

Here is the call graph for this function:


The documentation for this class was generated from the following files: