libyui-ncurses-pkg  2.50.8
NCPackageSelector Class Reference

Public Types

enum  FilterMode {
  Patterns, Languages, Repositories, Services,
  Search, Summary, PkgClassification
}
 

Public Member Functions

 NCPackageSelector (long modeFlags)
 The package selector class handles the events and holds the data needed for the package selection. More...
 
virtual ~NCPackageSelector ()
 Destructor.
 
void setFlags (long modeFlags)
 
void readSysconfig ()
 
void writeSysconfig ()
 
void createPkgLayout (YWidget *parent, NCPkgTable::NCPkgTableType type)
 Create layout for the PackageSelector. More...
 
void createYouLayout (YWidget *parent)
 Create layout for the Online Update. More...
 
bool anyRetractedPkgInstalled ()
 Return 'true' if any package is installed in a retracted version.
 
NCPkgTablePackageList ()
 
NCPkgPopupDepsDepsPopup ()
 
NCPkgDiskspacediskSpacePopup ()
 
YLabel * PackageLabel ()
 
YLabel * PatternLabel ()
 
NCPkgPackageDetailsInfoText ()
 
void setInfoText (NCPkgPackageDetails *itext)
 
NCPkgTableVersionsList ()
 
void setVersionsList (NCPkgTable *table)
 
NCPkgTablePatchPkgs ()
 
NCPkgTablePatchPkgsVersions ()
 
YReplacePoint * ReplacePoint ()
 
NCRichText * FilterDescription ()
 
NCPkgSearchSettingsSearchSettings ()
 
bool checkNow (bool *ok)
 
bool systemVerification (bool *ok)
 
bool doInstallRecommended (bool *ok)
 
bool fillPatchList (NCPkgMenuFilter::PatchFilter filter)
 Fills the package table with YOU patches matching the filter. More...
 
bool fillUpdateList ()
 Fills the package table with packages with update problems. More...
 
bool fillPatchPackages (NCPkgTable *pkgTable, ZyppObj youPatch)
 Fills the list of packages belonging to the youPatch. More...
 
bool fillPatchSearchList (const std::string &expr, bool checkName, bool checkSum)
 Fills the package table with packages matching the search expression. More...
 
bool fillDefaultList ()
 Fills the default package table.
 
bool isYouMode ()
 
bool isUpdateMode ()
 
bool isRepoMgrEnabled ()
 
bool isTestMode ()
 
bool isOnlineSearchEnabled ()
 
std::string ActionAtExit ()
 
void setActionAtExit (std::string action)
 
bool isCleanDepsOnRemove ()
 
void setCleanDepsOnRemove (bool on)
 
bool isAllowVendorChange ()
 
void setAllowVendorChange (bool on)
 
bool isInstallRecommended ()
 
void setInstallRecommended (bool on)
 
bool InstallRecommended ()
 
bool isVerifySystem ()
 
void setVerifySystem (bool on)
 
bool VerifySystem ()
 
bool isAutoCheck ()
 
void setAutoCheck (bool check)
 
bool AutoCheck ()
 
bool handleEvent (const NCursesEvent &event)
 Handle the given event. More...
 
void showPatchPkgVersions ()
 Creates an NCPkgTable widget and shows all versions of all packages belonging to a patch. More...
 
void showPatchPackages ()
 Creates an NCPkgTable widget and shows all packages belonging to a patch. More...
 
void showVersionsList ()
 Creates an NCPkgTable widget and shows all verions a the selected package. More...
 
void showInformation ()
 Creates an NCRichText widget for package (patch) information. More...
 
void clearInfoArea ()
 
wrect deleteReplacePoint ()
 
void replaceFilter (FilterMode mode)
 
void replaceFilterDescr (bool b)
 
bool OkButtonHandler (const NCursesEvent &event)
 Handler function for "OK button pressed". More...
 
bool CancelHandler (const NCursesEvent &event)
 Handler function for "Cancel button pressed". More...
 
bool LinkHandler (std::string link)
 Handles hyperlinks in package description. More...
 
bool showPackageDependencies (bool doit)
 Checks and shows the dependencies. More...
 
void showSelectionDependencies ()
 Checks and shows the selectiondependencies.
 
void updatePackageList ()
 Updates the status in list of packages.
 
bool checkPatch (ZyppPatch patch, ZyppSel selectable, NCPkgMenuFilter::PatchFilter filter)
 Check if 'patch' matches the selected filter. More...
 
bool showLicensePopup (std::string pkgName, std::string license)
 Shows 'End User License Agreement' popup with license text. More...
 
void showDiskSpace ()
 Calls the package mananager (updateDu()) and shows the required disk space.
 
void showDownloadSize ()
 Shows the total download size.
 
void saveState ()
 Check for changes.
 
void restoreState ()
 
bool diffState ()
 
bool showPendingLicenseAgreements ()
 Check for license.
 
bool showPendingLicenseAgreements (ZyppPoolIterator begin, ZyppPoolIterator end)
 
bool showLicenseAgreement (ZyppSel &slbPtr, std::string licenseText)
 Show popup with license. More...
 
std::set< std::string > getVerifiedPkgs ()
 Get list of packages already selected for automatic changes (usually via 'verify system' call) More...
 
void insertVerifiedPkg (std::string pkgname)
 Insert package name into the list of already selected for automatic changes. More...
 
void clearVerifiedPkgs ()
 Empty the std::set of packages selected for automatic changes. More...
 

Friends

std::ostream & operator<< (std::ostream &STREAM, const NCPackageSelector &OBJ)
 

Detailed Description

Definition at line 112 of file NCPackageSelector.h.

Constructor & Destructor Documentation

◆ NCPackageSelector()

NCPackageSelector::NCPackageSelector ( long  modeFlags)

The package selector class handles the events and holds the data needed for the package selection.

Parameters
uiThe NCurses UI
optThe widget options

Definition at line 110 of file NCPackageSelector.cc.

Here is the call graph for this function:

Member Function Documentation

◆ CancelHandler()

bool NCPackageSelector::CancelHandler ( const NCursesEvent &  event)

Handler function for "Cancel button pressed".

Parameters
eventThe Ncurses event
Returns
bool

Definition at line 1220 of file NCPackageSelector.cc.

Here is the call graph for this function:

◆ checkPatch()

bool NCPackageSelector::checkPatch ( ZyppPatch  patch,
ZyppSel  selectable,
NCPkgMenuFilter::PatchFilter  filter 
)

Check if 'patch' matches the selected filter.

Returns true if there is a match, false otherwise or if 'patch' is 0.

Returns
bool

Definition at line 782 of file NCPackageSelector.cc.

Here is the call graph for this function:

◆ clearVerifiedPkgs()

void NCPackageSelector::clearVerifiedPkgs ( )
inline

Empty the std::set of packages selected for automatic changes.

Returns
void

Definition at line 512 of file NCPackageSelector.h.

◆ createPkgLayout()

void NCPackageSelector::createPkgLayout ( YWidget *  parent,
NCPkgTable::NCPkgTableType  type 
)

Create layout for the PackageSelector.

Parameters
parentParent is PackageSelectorStart
typeThe package table type
Returns
void

Definition at line 1736 of file NCPackageSelector.cc.

Here is the call graph for this function:

◆ createYouLayout()

void NCPackageSelector::createYouLayout ( YWidget *  parent)

Create layout for the Online Update.

Parameters
parentParent is PackageSelectorStart
Returns
void

Definition at line 1653 of file NCPackageSelector.cc.

Here is the call graph for this function:

◆ fillPatchList()

bool NCPackageSelector::fillPatchList ( NCPkgMenuFilter::PatchFilter  filter)

Fills the package table with YOU patches matching the filter.

Parameters
filter
Returns
bool

Definition at line 592 of file NCPackageSelector.cc.

Here is the call graph for this function:

◆ fillPatchPackages()

bool NCPackageSelector::fillPatchPackages ( NCPkgTable pkgTable,
ZyppObj  youPatch 
)

Fills the list of packages belonging to the youPatch.

Parameters
pkgTableThe table widget
youPatchShow all packages belonging to the patch
Returns
bool

Definition at line 712 of file NCPackageSelector.cc.

Here is the call graph for this function:

◆ fillPatchSearchList()

bool NCPackageSelector::fillPatchSearchList ( const std::string &  expr,
bool  checkName,
bool  checkSum 
)

Fills the package table with packages matching the search expression.

Parameters
exprThe search expression
ignoreCaseIgnore case (true or false)
checkNameSearch in package name (true or false)
checkSummaryCheck the summary (true or false)
checkProvidesCheck in Provides (true or false)
checkRequiresCheck in Requires (true or false)
Returns
bool

Definition at line 540 of file NCPackageSelector.cc.

Here is the call graph for this function:

◆ fillUpdateList()

bool NCPackageSelector::fillUpdateList ( )

Fills the package table with packages with update problems.

Returns
bool

Definition at line 659 of file NCPackageSelector.cc.

Here is the call graph for this function:

◆ getVerifiedPkgs()

std::set<std::string> NCPackageSelector::getVerifiedPkgs ( )
inline

Get list of packages already selected for automatic changes (usually via 'verify system' call)

Returns
std::set <std::string>

Definition at line 494 of file NCPackageSelector.h.

◆ handleEvent()

bool NCPackageSelector::handleEvent ( const NCursesEvent &  event)

Handle the given event.

For the given event (the widget-id is contained in the event) the corresponding handler is executed.

Parameters
eventThe NCurses event
Returns
bool

Definition at line 471 of file NCPackageSelector.cc.

Here is the call graph for this function:

◆ insertVerifiedPkg()

void NCPackageSelector::insertVerifiedPkg ( std::string  pkgname)
inline

Insert package name into the list of already selected for automatic changes.

Parameters
pkgnamePackage name

Definition at line 503 of file NCPackageSelector.h.

◆ LinkHandler()

bool NCPackageSelector::LinkHandler ( std::string  link)

Handles hyperlinks in package description.

Parameters
linkThe link
Returns
bool

Definition at line 1178 of file NCPackageSelector.cc.

◆ OkButtonHandler()

bool NCPackageSelector::OkButtonHandler ( const NCursesEvent &  event)

Handler function for "OK button pressed".

Parameters
eventThe Ncurses event
Returns
bool

Definition at line 1262 of file NCPackageSelector.cc.

Here is the call graph for this function:

◆ showInformation()

void NCPackageSelector::showInformation ( )

Creates an NCRichText widget for package (patch) information.

Returns
void

Definition at line 894 of file NCPackageSelector.cc.

◆ showLicenseAgreement()

bool NCPackageSelector::showLicenseAgreement ( ZyppSel &  slbPtr,
std::string  licenseText 
)

Show popup with license.

Returns
bool

Definition at line 1421 of file NCPackageSelector.cc.

Here is the call graph for this function:

◆ showLicensePopup()

bool NCPackageSelector::showLicensePopup ( std::string  pkgName,
std::string  license 
)

Shows 'End User License Agreement' popup with license text.

Parameters
pkgNamethe package name
licensethe license text
Returns
bool license confirmed?

Definition at line 1491 of file NCPackageSelector.cc.

Here is the call graph for this function:

◆ showPackageDependencies()

bool NCPackageSelector::showPackageDependencies ( bool  doit)

Checks and shows the dependencies.

Parameters
doittrue: do the check, false: only check if auto check is on

Definition at line 1470 of file NCPackageSelector.cc.

◆ showPatchPackages()

void NCPackageSelector::showPatchPackages ( )

Creates an NCPkgTable widget and shows all packages belonging to a patch.

Returns
void

Definition at line 952 of file NCPackageSelector.cc.

Here is the call graph for this function:

◆ showPatchPkgVersions()

void NCPackageSelector::showPatchPkgVersions ( )

Creates an NCPkgTable widget and shows all versions of all packages belonging to a patch.

Returns
void

Definition at line 988 of file NCPackageSelector.cc.

Here is the call graph for this function:

◆ showVersionsList()

void NCPackageSelector::showVersionsList ( )

Creates an NCPkgTable widget and shows all verions a the selected package.

Returns
void

Definition at line 917 of file NCPackageSelector.cc.

Here is the call graph for this function:

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