libyui-ncurses  2.44.1
NCFileSelection Class Reference

#include <NCFileSelection.h>

Inheritance diagram for NCFileSelection:
Collaboration diagram for NCFileSelection:

List of all members.

Public Types

enum  NCFileSelectionType { T_Overview, T_Detailed, T_Unknown }

Public Member Functions

 NCFileSelection (YWidget *parent, YTableHeader *tableHeader, NCFileSelectionType type, const std::string &iniDir)
NCFileInfogetFileInfo (int index)
void setTableType (NCFileSelectionType type)
virtual void addLine (const std::vector< std::string > &elements, NCFileInfo *fileInfo)
unsigned int getNumLines ()
void drawList ()
virtual void deleteAllItems ()
virtual void fillHeader ()=0
virtual bool createListEntry (NCFileInfo *fileInfo)=0
std::string getCurrentDir ()
virtual bool fillList ()=0
void setStartDir (const std::string &start)

Protected Member Functions

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

Protected Attributes

std::string startDir
std::string currentDir
NCFileSelectionType tableType

Detailed Description

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

Definition at line 103 of file NCFileSelection.h.


Constructor & Destructor Documentation

NCFileSelection::NCFileSelection ( YWidget *  parent,
YTableHeader *  tableHeader,
NCFileSelectionType  type,
const std::string &  iniDir 
)

Constructor

Definition at line 164 of file NCFileSelection.cc.


Member Function Documentation

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

Creates a line in the package table.

Implemented in NCDirectoryTable, and NCFileTable.

void NCFileSelection::deleteAllItems ( ) [virtual]

Clears the package std::list

Reimplemented from NCTable.

Definition at line 276 of file NCFileSelection.cc.

void NCFileSelection::drawList ( ) [inline]

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

Definition at line 170 of file NCFileSelection.h.

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

Fills the header of the table

Implemented in NCDirectoryTable, and NCFileTable.

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

Fill the std::list of diretcories or files Returns 'true' on success.

Implemented in NCDirectoryTable, and NCFileTable.

std::string NCFileSelection::getCurrentDir ( ) [inline]

Get the current directory return: The currently selected directory

Definition at line 191 of file NCFileSelection.h.

Get the file info. index: The std::list index return: fileInfo Information about the file (directory)

Definition at line 357 of file NCFileSelection.cc.

unsigned int NCFileSelection::getNumLines ( ) [inline]

Get number of lines ( std::list entries )

Definition at line 164 of file NCFileSelection.h.

Here is the call graph for this function:

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

Set the start directory

Definition at line 202 of file NCFileSelection.h.

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

Set the type of the table widget type: Possible values: NCFileSelection::T_Overview, NCFileSelection::T_Detailed

Definition at line 156 of file NCFileSelection.h.


The documentation for this class was generated from the following files:
 All Classes Functions Variables