sptk2 logo
SPTK Home Page

sptk::CDirectoryDS Class Reference
[GUI Classes]

Directory datasource. More...

#include <CDirectoryDS.h>

Inheritance diagram for sptk::CDirectoryDS:

sptk::CMemoryDS sptk::CDataSource

List of all members.

Public Member Functions

 CDirectoryDS ()
 Default Constructor.
virtual ~CDirectoryDS ()
 Destructor.
int showPolicy () const
void showPolicy (int type)
 Sets current show policy, see CDirectoryDSpolicies for more information.
void directory (std::string d)
 Returns current directory.
const std::string & directory () const
 Sets current directory.
void pattern (std::string pattern)
 Sets pattern in format like: "*.txt;*.csv;*.xls".
const std::string pattern () const
 Returns pattern in format like: "*.txt;*.csv;*.xls".
virtual bool open ()
 Opens the directory and fills in the dataset.

Protected Member Functions

std::string getFileType (const struct stat &st, CSmallPixmapType &image, const char *fname) const


Detailed Description

Directory datasource.

A datasource with the list of files and directories along with their attributes. It works just as any other datasource. You set up the parameters, call open() and may use the list. Method close() should be called aftewards to release any allocated resourses.


Member Function Documentation

std::string sptk::CDirectoryDS::getFileType ( const struct stat &  st,
CSmallPixmapType image,
const char *  fname 
) const [protected]

Sets up an appropriate image and a name for the file type

Parameters:
st const struct stat &, the file type information
image CSmallPixmapType&, the image type
fname const char *, file name
Returns:
the file type name

int sptk::CDirectoryDS::showPolicy (  )  const [inline]

Returns current show policy,

See also:
CDirectoryDSpolicies for more information
Returns:
current show policy


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

Mon Mar 5 11:55:56 2012: SPTK 3.5.7