sptk2 logo
SPTK Home Page
Public Member Functions | List of all members
sptk::CColumn Class Reference

Class CColumn represents a column descriptor for CListView. More...

#include <CColumn.h>

Public Member Functions

 CColumn (const std::string &cname="", VariantDataType type=VariantDataType::VAR_STRING, int32_t cwidth=100, bool cvisible=true)
 Constructor. More...
 
 CColumn (const CColumn &col)=default
 Copy constructor. More...
 
String name () const
 Returns column name.
 
int16_t width () const
 Returns column width in pixels.
 
void width (int16_t w)
 Sets column width in pixels. More...
 
bool visible () const
 Returns column visibility.
 
void visible (bool v)
 Sets column visibility. More...
 
bool autoWidth () const
 Returns Column auto width flag.
 
void autoWidth (bool v)
 Sets column auto width flag. More...
 
VariantDataType type () const
 Returns column data type.
 
void load (const xdoc::SNode &node)
 Loads column information. More...
 
void save (const xdoc::SNode &node) const
 Saves column information. More...
 

Detailed Description

Class CColumn represents a column descriptor for CListView.

Constructor & Destructor Documentation

◆ CColumn() [1/2]

sptk::CColumn::CColumn ( const std::string &  cname = "",
VariantDataType  type = VariantDataType::VAR_STRING,
int32_t  cwidth = 100,
bool  cvisible = true 
)

Constructor.

Parameters
cnameColumn name
typeColumn data type
cwidthColumn width, or -1 for auto-width
cvisibleColumn visibility

◆ CColumn() [2/2]

sptk::CColumn::CColumn ( const CColumn col)
default

Copy constructor.

Parameters
colSource column object

Member Function Documentation

◆ autoWidth()

void sptk::CColumn::autoWidth ( bool  v)
inline

Sets column auto width flag.

Parameters
vAuto-width flag

◆ load()

void sptk::CColumn::load ( const xdoc::SNode &  node)

Loads column information.

Loads information about column from the registry.

Parameters
nodeXML node to load column information from

◆ save()

void sptk::CColumn::save ( const xdoc::SNode &  node) const

Saves column information.

Saves information about column from the registry.

Parameters
nodeXML node to unload column information to

◆ visible()

void sptk::CColumn::visible ( bool  v)
inline

Sets column visibility.

Parameters
vVisibility flag

◆ width()

void sptk::CColumn::width ( int16_t  w)
inline

Sets column width in pixels.

Parameters
wColumn width in pixels

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

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