Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

NCPkgTable Class Reference

#include <NCPkgTable.h>

Inheritance diagram for NCPkgTable:

NCTable YTable NCPadWidget YWidget NCWidget NCSchrollCB tnode< NCWidget * > NCursesError List of all members.

Public Types

enum  NCPkgTableType {
  T_Packages, T_Availables, T_Patches, T_Dependency,
  T_SelDependency, T_Update, T_PatchPkgs, T_DepsPackages,
  T_Selections, T_Unknown
}
enum  NCPkgTableListAction {
  A_Install, A_DontInstall, A_Delete, A_DontDelete,
  A_Update, A_DontUpdate, A_Unknown
}
enum  NCPkgTableListType { L_Changes, L_Installed, L_Unknown }

Public Member Functions

 NCPkgTable (NCWidget *parent, const YWidgetOpt &opt)
virtual ~NCPkgTable ()
virtual void addLine (PMSelectable::UI_Status status, const vector< string > &elements, PMObjectPtr objPtr)
void drawList ()
virtual void itemsCleared ()
virtual void cellChanged (int index, int colnum, const YCPString &newtext)
NClabel getCellContents (int index, int colnum)
virtual NCursesEvent wHandleInput (wint_t key)
void setPackager (PackageSelector *pkg)
bool changeStatus (PMSelectable::UI_Status newstat, const PMObjectPtr &objPtr, bool singleChange)
bool changeObjStatus (int key)
bool changeListObjStatus (NCPkgTableListAction key)
bool toggleObjStatus ()
bool updateTable ()
PMSelectable::UI_Status getStatus (int index)
PMSelectable::UI_Status getAvailableStatus (const PMObjectPtr &objPtr)
bool SourceInstall (bool install)
bool setTableType (NCPkgTableType type, ObjectStatStrategy *strategy)
PMObjectPtr getDataPointer (int index)
unsigned int getNumLines ()
bool fillDefaultList ()
void fillHeader ()
bool createListEntry (PMPackagePtr pkgPtr)
bool createPatchEntry (PMYouPatchPtr pkgPtr)
bool createInfoEntry (string text)
bool showInformation ()

Private Member Functions

NCPkgTableoperator= (const NCPkgTable &)
 NCPkgTable (const NCPkgTable &)
NCPkgTableTaggetTag (const int &index)

Private Attributes

PackageSelectorpackager
ObjectStatStrategystatusStrategy
NCPkgTableType tableType

Detailed Description

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.


Member Enumeration Documentation

enum NCPkgTable::NCPkgTableListAction
 

Enumeration values:
A_Install 
A_DontInstall 
A_Delete 
A_DontDelete 
A_Update 
A_DontUpdate 
A_Unknown 

enum NCPkgTable::NCPkgTableListType
 

Enumeration values:
L_Changes 
L_Installed 
L_Unknown 

enum NCPkgTable::NCPkgTableType
 

Enumeration values:
T_Packages 
T_Availables 
T_Patches 
T_Dependency 
T_SelDependency 
T_Update 
T_PatchPkgs 
T_DepsPackages 
T_Selections 
T_Unknown 


Constructor & Destructor Documentation

NCPkgTable::NCPkgTable const NCPkgTable  )  [private]
 

NCPkgTable::NCPkgTable NCWidget parent,
const YWidgetOpt opt
 

Constructor

NCPkgTable::~NCPkgTable  )  [virtual]
 


Member Function Documentation

void NCPkgTable::addLine PMSelectable::UI_Status  status,
const vector< string > &  elements,
PMObjectPtr  objPtr
[virtual]
 

This method is called to add a line to the package list.

Parameters:
status The package status (first column of the table)
elements A vector<string> containing the package data
objPtr The pointer to the packagemanager object void

void NCPkgTable::cellChanged int  index,
int  colnum,
const YCPString newtext
[virtual]
 

Changes the contents of a certain cell in table

Parameters:
index The table line
column The column
newtext The new text void

Reimplemented from NCTable.

bool NCPkgTable::changeListObjStatus NCPkgTableListAction  key  ) 
 

bool NCPkgTable::changeObjStatus int  key  ) 
 

bool NCPkgTable::changeStatus PMSelectable::UI_Status  newstat,
const PMObjectPtr &  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

Parameters:
newstat The new status
objPtr The pointer to the object to change
Returns:
bool

bool NCPkgTable::createInfoEntry string  text  ) 
 

Creates a line in the table shwing an info text.

Parameters:
text The information
Returns:
bool

bool NCPkgTable::createListEntry PMPackagePtr  pkgPtr  ) 
 

Creates a line in the package table.

Parameters:
pkgPtr The package pointer
Returns:
bool

bool NCPkgTable::createPatchEntry PMYouPatchPtr  pkgPtr  ) 
 

Creates a line in the YOU patch table.

Parameters:
pkgPtr The YOU patch pointer
Returns:
bool

void NCPkgTable::drawList  )  [inline]
 

Draws the package list (has to be called after the loop with addLine() calls)

bool NCPkgTable::fillDefaultList  ) 
 

Shows default list (packages of default RPM group or patch list)

Returns:
bool

void NCPkgTable::fillHeader  ) 
 

Fills the header of the table

Returns:
void

PMSelectable::UI_Status NCPkgTable::getAvailableStatus const PMObjectPtr &  objPtr  ) 
 

Gets the package status of an available package.

Parameters:
objPtr The certain package
Returns:
PMSelectable::UI_Status

NClabel NCPkgTable::getCellContents int  index,
int  colnum
 

Returns the contents of a certain cell in table

Parameters:
index The table line
column The column NClabel

PMObjectPtr NCPkgTable::getDataPointer int  index  ) 
 

Gets the data pointer of a certain package.

Parameters:
index The index in package table (the line)
Returns:
PMObjectPtr

unsigned int NCPkgTable::getNumLines  )  [inline]
 

Returns the number of lines in the table (the table size)

Returns:
unsigned int

PMSelectable::UI_Status NCPkgTable::getStatus int  index  ) 
 

Gets the currently displayed package status.

Parameters:
index The index in package table (the line)
Returns:
PMSelectable::UI_Status

NCPkgTableTag * NCPkgTable::getTag const int &  index  )  [private]
 

void NCPkgTable::itemsCleared  )  [virtual]
 

Clears the package list

Reimplemented from NCTable.

NCPkgTable& NCPkgTable::operator= const NCPkgTable  )  [private]
 

void NCPkgTable::setPackager PackageSelector pkg  )  [inline]
 

Sets the member variable PackageSelector *packager

Parameters:
pkg The PackageSelector pointer
Returns:
void

bool NCPkgTable::setTableType NCPkgTableType  type,
ObjectStatStrategy strategy
[inline]
 

Sets the type of the table and the status strategy (which means call particular methods to set/get the status for different PMObjects (PMYouPatch, PMPackage or available PMPackage)

Parameters:
type The type (see enum NCPkgTableType)
strategy The certain strategy (available strategies see ObjectStatStrategy.h). Has to be allocated with new - is deleted by NCPkgTable.
Returns:
bool

bool NCPkgTable::showInformation  ) 
 

Show the corresponding information (e.g. the package description).

Returns:
bool

bool NCPkgTable::SourceInstall bool  install  ) 
 

Toggles the installation of the source package.

Parameters:
install 
Returns:
bool

bool NCPkgTable::toggleObjStatus  ) 
 

bool NCPkgTable::updateTable  ) 
 

Set the status information if status has changed

Returns:
bool

NCursesEvent NCPkgTable::wHandleInput wint_t  key  )  [virtual]
 

Handles the events concerning the package table (e.g. scroll the list, change the package status, ...)

Parameters:
key The key which is pressed
Returns:
NCursesEvent

Reimplemented from NCTable.


Member Data Documentation

PackageSelector* NCPkgTable::packager [private]
 

ObjectStatStrategy* NCPkgTable::statusStrategy [private]
 

NCPkgTableType NCPkgTable::tableType [private]
 


The documentation for this class was generated from the following files:
Generated on Wed Sep 5 17:18:56 2007 for yast2-ncurses by doxygen 1.3.6