sptk2 logo
SPTK Home Page
Public Member Functions | Static Protected Member Functions | Static Protected Attributes | Friends | List of all members
sptk::CListViewRows Class Reference

#include <CListViewRows.h>

Public Member Functions

 CListViewRows ()
 
 ~CListViewRows ()
 
void clear ()
 
void truncate (uint32_t count)
 
void remove (uint32_t index)
 
uint32_t add (CPackedStrings *row)
 
uint32_t insert (uint32_t index, CPackedStrings *row)
 
uint32_t update (uint32_t index, CPackedStrings *row)
 
CPackedStringsoperator[] (uint32_t index) const
 
int32_t indexOf (CPackedStrings *row) const
 
uint32_t size () const
 
void sort ()
 
int32_t sortColumn () const
 
void sortColumn (int column, VariantDataType ctype, bool sortNow)
 
bool sortAscending () const
 
void sortAscending (bool ascending, bool sortNow)
 
int32_t fullHeight () const
 

Static Protected Member Functions

static bool compare_strings (const PPackedStrings &, const PPackedStrings &)
 
static bool compare_integers (const PPackedStrings &, const PPackedStrings &)
 
static bool compare_floats (const PPackedStrings &, const PPackedStrings &)
 
static bool compare_dates (const PPackedStrings &, const PPackedStrings &)
 
static bool compare_datetimes (const PPackedStrings &, const PPackedStrings &)
 

Static Protected Attributes

static int currentSortColumn
 

Friends

class CListView
 

Detailed Description

The list of CPackedStrings * used inside CListView as the list of rows.

Constructor & Destructor Documentation

◆ CListViewRows()

sptk::CListViewRows::CListViewRows ( )

Default constructor

◆ ~CListViewRows()

sptk::CListViewRows::~CListViewRows ( )

Destructor

Member Function Documentation

◆ add()

uint32_t sptk::CListViewRows::add ( CPackedStrings row)

Adds the new row.

Parameters
rowCPackedStrings *, the new row pointer
Returns
row index

◆ clear()

void sptk::CListViewRows::clear ( )

destroys all the rows and removes them from the list

◆ compare_dates()

static bool sptk::CListViewRows::compare_dates ( const PPackedStrings ,
const PPackedStrings  
)
staticprotected

The date data compare function

◆ compare_datetimes()

static bool sptk::CListViewRows::compare_datetimes ( const PPackedStrings ,
const PPackedStrings  
)
staticprotected

The date and time data compare function

◆ compare_floats()

static bool sptk::CListViewRows::compare_floats ( const PPackedStrings ,
const PPackedStrings  
)
staticprotected

The float data compare function

◆ compare_integers()

static bool sptk::CListViewRows::compare_integers ( const PPackedStrings ,
const PPackedStrings  
)
staticprotected

The integer data compare function

◆ compare_strings()

static bool sptk::CListViewRows::compare_strings ( const PPackedStrings ,
const PPackedStrings  
)
staticprotected

The string data compare function

◆ fullHeight()

int32_t sptk::CListViewRows::fullHeight ( ) const
inline

Returns summary height of all the rows

◆ indexOf()

int32_t sptk::CListViewRows::indexOf ( CPackedStrings row) const

Finds the row

Parameters
rowCPackedStrings *, the row pointer
Returns
the row index, or -1 if not found

◆ insert()

uint32_t sptk::CListViewRows::insert ( uint32_t  index,
CPackedStrings row 
)

Inserts the new row.

Parameters
indexuint32_t, insert position
rowCPackedStrings *, the new row pointer
Returns
row index

◆ operator[]()

CPackedStrings * sptk::CListViewRows::operator[] ( uint32_t  index) const
inline

Row access by row index

Parameters
indexuint32_t, row index
Returns
row pointer, or 0L if index is out of range

◆ remove()

void sptk::CListViewRows::remove ( uint32_t  index)

Removes a row

Parameters
indexuint32_t, row index

◆ size()

uint32_t sptk::CListViewRows::size ( ) const
inline

Returns the row count

Referenced by sptk::CListView::size().

◆ sort()

void sptk::CListViewRows::sort ( )

Sorts rows

Referenced by sptk::CListView::sort().

◆ sortAscending() [1/2]

bool sptk::CListViewRows::sortAscending ( ) const
inline

Returns the sort direction - ascending/descending

Referenced by sptk::CListView::sortAscending().

◆ sortAscending() [2/2]

void sptk::CListViewRows::sortAscending ( bool  ascending,
bool  sortNow 
)

Sets the sort direction - ascending/descending

Parameters
ascendingbool, sort direction - ascending/descending
sortNowbool, true if you want to sort immediatedly

◆ sortColumn() [1/2]

int32_t sptk::CListViewRows::sortColumn ( ) const
inline

Returns the sort column number

◆ sortColumn() [2/2]

void sptk::CListViewRows::sortColumn ( int  column,
VariantDataType  ctype,
bool  sortNow 
)

Sets the sort column

Parameters
columnint, sort column number (-1 means 'unsorted')
ctypeVariantType, the sort column data type
sortNowbool, true if you want to sort immediatedly

◆ truncate()

void sptk::CListViewRows::truncate ( uint32_t  count)

Truncates a row list

Parameters
countuint32_t, the maximum list size

◆ update()

uint32_t sptk::CListViewRows::update ( uint32_t  index,
CPackedStrings row 
)

Updates the row by replacing it with a new one.

Parameters
indexuint32_t, row index
rowCPackedStrings *, the new row pointer
Returns
row index

Member Data Documentation

◆ currentSortColumn

int sptk::CListViewRows::currentSortColumn
staticprotected

The sort column number for the sort functions


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

Fri Oct 14 2022 09:58:37: SPTK 5.4.1