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

NCFileSelection Class Reference

#include <NCFileSelection.h>

Inheritance diagram for NCFileSelection:

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

Public Types

enum  NCFileSelectionType { T_Overview, T_Detailed, T_Unknown }

Public Member Functions

 NCFileSelection (NCWidget *parent, const YWidgetOpt &opt, NCFileSelectionType type, const YCPString &iniDir)
virtual ~NCFileSelection ()
NCFileInfo getFileInfo (int index)
void setTableType (NCFileSelectionType type)
virtual void addLine (const vector< string > &elements, const NCFileInfo &fileInfo)
unsigned int getNumLines ()
void drawList ()
virtual void itemsCleared ()
virtual void fillHeader ()=0
virtual bool createListEntry (const NCFileInfo &fileInfo)=0
string getCurrentDir ()
virtual bool fillList ()=0
void setStartDir (const YCPString &start)

Protected Member Functions

void setCurrentDir ()
string getCurrentLine ()
NCursesEvent handleKeyEvents (wint_t key)

Protected Attributes

string startDir
string currentDir
NCFileSelectionType tableType

Private Member Functions

NCFileSelection & operator= (const NCFileSelection &)
 NCFileSelection (const NCFileSelection &)
NCFileSelectionTag * getTag (const int &index)

Detailed Description

The class which provides methods to handle a list of files or directories.


Member Enumeration Documentation

enum NCFileSelection::NCFileSelectionType
 

Enumerator:
T_Overview 
T_Detailed 
T_Unknown 


Constructor & Destructor Documentation

NCFileSelection::NCFileSelection (  const NCFileSelection &   )  [private]
 

NCFileSelection::NCFileSelection (  NCWidget *  parent,
const YWidgetOpt &  opt,
NCFileSelectionType  type,
const YCPString &  iniDir
) 
 

Constructor

NCFileSelection::~NCFileSelection (   )  [virtual]
 


Member Function Documentation

void NCFileSelection::addLine (  const vector< string > &  elements,
const NCFileInfo &  fileInfo
)  [virtual]
 

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

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

virtual bool NCFileSelection::createListEntry (  const NCFileInfo &  fileInfo  )  [pure virtual]
 

Creates a line in the package table.

Parameters:
pkgPtr The package pointer
Returns:
bool

Implemented in NCFileTable, and NCDirectoryTable.

void NCFileSelection::drawList (   )  [inline]
 

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

virtual void NCFileSelection::fillHeader (   )  [pure virtual]
 

Fills the header of the table

Returns:
void

Implemented in NCFileTable, and NCDirectoryTable.

virtual bool NCFileSelection::fillList (   )  [pure virtual]
 

Fill the list of diretcories or files

Returns:
bool List successfully filled

Implemented in NCFileTable, and NCDirectoryTable.

string NCFileSelection::getCurrentDir (   )  [inline]
 

Get the current directory

Returns:
string The currently selected directory

string NCFileSelection::getCurrentLine (   )  [protected]
 

NCFileInfo NCFileSelection::getFileInfo (  int  index  ) 
 

Get the file info.

Parameters:
index The list index
Returns:
fileInfo Information about the file (directory)

unsigned int NCFileSelection::getNumLines (   )  [inline]
 

Get number of lines ( list entries )

NCFileSelectionTag * NCFileSelection::getTag (  const int &  index  )  [private]
 

NCursesEvent NCFileSelection::handleKeyEvents (  wint_t  key  )  [protected]
 

void NCFileSelection::itemsCleared (   )  [virtual]
 

Clears the package list

Reimplemented from NCTable.

NCFileSelection& NCFileSelection::operator= (  const NCFileSelection &   )  [private]
 

void NCFileSelection::setCurrentDir (   )  [protected]
 

void NCFileSelection::setStartDir (  const YCPString &  start  )  [inline]
 

Set the start directory

void NCFileSelection::setTableType (  NCFileSelectionType  type  )  [inline]
 

Set the type of the table widget

Parameters:
type Possible values: NCFileSelection::T_Overview, NCFileSelection::T_Detailed


Member Data Documentation

string NCFileSelection::currentDir [protected]
 

string NCFileSelection::startDir [protected]
 

NCFileSelectionType NCFileSelection::tableType [protected]
 


The documentation for this class was generated from the following files:
Generated on Wed Sep 14 10:52:55 2005 for yast2-ncurses by  doxygen 1.4.4