|
libyui-ncurses-pkg
2.48.9
|
The package table class. More...
#include <NCPkgTable.h>


Public Member Functions | |
| NCPkgTable (YWidget *parent, YTableHeader *tableHeader) | |
| Constructor. | |
| virtual void | addLine (ZyppStatus status, const std::vector< std::string > &elements, ZyppObj objPtr, ZyppSel slbPtr) |
| This method is called to add a line to the package list. More... | |
| void | drawList () |
| Draws the package list (has to be called after the loop with addLine() calls) | |
| virtual void | itemsCleared () |
| Clears the package list. | |
| virtual void | cellChanged (int index, int colnum, const std::string &newtext) |
| Changes the contents of a certain cell in table. More... | |
| NClabel | getCellContents (int index, int colnum) |
| Returns the contents of a certain cell in table. More... | |
| virtual NCursesEvent | wHandleInput (wint_t key) |
| Handles the events concerning the package table (e.g. More... | |
| void | setPackager (NCPackageSelector *pkg) |
| Sets the member variable PackageSelector *packager. More... | |
| bool | changeStatus (ZyppStatus newstat, const ZyppSel &slbPtr, ZyppObj objPtr, bool singleChange) |
| Informs the package manager about the status change of the currently selected package and updates the states of all packages in the list. More... | |
| bool | changeObjStatus (int key) |
| bool | changeListObjStatus (NCPkgTableListAction key) |
| bool | toggleObjStatus () |
| bool | updateTable () |
| Set the status information if status has changed. More... | |
| ZyppStatus | getStatus (int index) |
| Gets the currently displayed package status. More... | |
| bool | setTableType (NCPkgTableType type, NCPkgStatusStrategy *strategy) |
| Sets the type of the table and the status strategy (which means call particular methods to set/get the status for different zypp::ResObjects (zypp::Patch, zypp::Package or available zypp::Package) More... | |
| NCPkgTableType | getTableType () |
| ZyppObj | getDataPointer (int index) |
| Gets the data pointer of a certain package. More... | |
| ZyppSel | getSelPointer (int index) |
| Gets the selectable pointer of a certain package. More... | |
| unsigned int | getNumLines () |
| Returns the number of lines in the table (the table size) More... | |
| void | fillHeader () |
| Fills the header of the table. More... | |
| bool | createListEntry (ZyppPkg pkgPtr, ZyppSel slbPtr) |
| Creates a line in the package table. More... | |
| bool | createPatchEntry (ZyppPatch pkgPtr, ZyppSel slbPtr) |
| Creates a line in the YOU patch table. More... | |
| bool | createInfoEntry (std::string text) |
| Creates a line in the table shwing an info text. More... | |
| bool | showInformation () |
| Show the corresponding information (e.g. More... | |
| void | setVisibleInfo (NCPkgTableInfoType info) |
| NCPkgTableInfoType | VisibleInfo () |
| bool | fillAvailableList (ZyppSel slb) |
| bool | fillSummaryList (NCPkgTableListType type) |
| void | updateInfo (ZyppObj pkgPtr, ZyppSel slbPtr, NCPkgTableInfoType mode) |
The package table class.
Provides methods to fill the table, set the status info and so on. Has a connection to the PackageSelector which is used to do changes which affect other widgets.
Definition at line 207 of file NCPkgTable.h.
|
virtual |
This method is called to add a line to the package list.
| status | The package status (first column of the table) |
| elements | A std::vector<std::string> containing the package data |
| objPtr | The pointer to the packagemanager object |
| objPtr | The pointer to the selectable object |
Definition at line 156 of file NCPkgTable.cc.
|
virtual |
Changes the contents of a certain cell in table.
| index | The table line |
| column | The column |
| newtext | The new text void |
Definition at line 198 of file NCPkgTable.cc.
| bool NCPkgTable::changeStatus | ( | ZyppStatus | newstat, |
| const ZyppSel & | slbPtr, | ||
| ZyppObj | objPtr, | ||
| bool | singleChange | ||
| ) |
Informs the package manager about the status change of the currently selected package and updates the states of all packages in the list.
| newstat | The new status |
| slbPtr | The pointer to the object to change |
| objPtr | is candidatePtr or what the user selected instead of it. |
Definition at line 212 of file NCPkgTable.cc.

| bool NCPkgTable::createInfoEntry | ( | std::string | text | ) |
Creates a line in the table shwing an info text.
| text | The information |
Definition at line 704 of file NCPkgTable.cc.

| bool NCPkgTable::createListEntry | ( | ZyppPkg | pkgPtr, |
| ZyppSel | slbPtr | ||
| ) |
Creates a line in the package table.
| pkgPtr | The package pointer |
| slbPtr | The selectable pointer |
Definition at line 550 of file NCPkgTable.cc.

| bool NCPkgTable::createPatchEntry | ( | ZyppPatch | pkgPtr, |
| ZyppSel | slbPtr | ||
| ) |
Creates a line in the YOU patch table.
| pkgPtr | The YOU patch pointer |
Definition at line 723 of file NCPkgTable.cc.

| void NCPkgTable::fillHeader | ( | ) |
| NClabel NCPkgTable::getCellContents | ( | int | index, |
| int | colnum | ||
| ) |
Returns the contents of a certain cell in table.
| index | The table line |
| column | The column NClabel |
| ZyppObj NCPkgTable::getDataPointer | ( | int | index | ) |
Gets the data pointer of a certain package.
| index | The index in package table (the line) |
Definition at line 874 of file NCPkgTable.cc.
|
inline |
Returns the number of lines in the table (the table size)
Definition at line 415 of file NCPkgTable.h.
| ZyppSel NCPkgTable::getSelPointer | ( | int | index | ) |
Gets the selectable pointer of a certain package.
| index | The index in package table (the line) |
Definition at line 884 of file NCPkgTable.cc.
| ZyppStatus NCPkgTable::getStatus | ( | int | index | ) |
Gets the currently displayed package status.
| index | The index in package table (the line) |
Definition at line 864 of file NCPkgTable.cc.
|
inline |
Sets the member variable PackageSelector *packager.
| pkg | The PackageSelector pointer |
Definition at line 332 of file NCPkgTable.h.
|
inline |
Sets the type of the table and the status strategy (which means call particular methods to set/get the status for different zypp::ResObjects (zypp::Patch, zypp::Package or available zypp::Package)
| type | The type (see enum NCPkgTableType) |
| strategy | The certain strategy (available strategies see NCPkgStatusStrategy.h). Has to be allocated with new - is deleted by NCPkgTable. |
Definition at line 384 of file NCPkgTable.h.
| bool NCPkgTable::showInformation | ( | ) |
Show the corresponding information (e.g.
the package description).
Definition at line 762 of file NCPkgTable.cc.

| bool NCPkgTable::updateTable | ( | ) |
Set the status information if status has changed.
Definition at line 369 of file NCPkgTable.cc.

|
virtual |
Handles the events concerning the package table (e.g.
scroll the list, change the package status, ...)
| key | The key which is pressed |
Reimplemented in NCPkgFilterPattern.
Definition at line 800 of file NCPkgTable.cc.
