swift
Public Member Functions | List of all members
swift::gui::models::CColumns Class Reference

Header data for a table. More...

Inheritance diagram for swift::gui::models::CColumns:
[legend]

Public Member Functions

 CColumns (const QString &translationContext, QObject *parent=nullptr)
 Columns constructors. More...
 
void addColumn (const CColumn &column)
 Add a column.
 
void addColumnIncognito (const CColumn &column)
 Add a column as incognito enabled.
 
QString propertyIndexToColumnName (const swift::misc::CPropertyIndex &propertyIndex, bool i18n=false) const
 Property index to name.
 
QString columnToName (int column, bool i18n=false) const
 Column index to name.
 
swift::misc::CPropertyIndex columnToPropertyIndex (int column) const
 Column to property index.
 
swift::misc::CPropertyIndex columnToSortPropertyIndex (int column) const
 Column to property index for sort, considers. More...
 
int propertyIndexToColumn (const swift::misc::CPropertyIndex &propertyIndex) const
 Property index to column.
 
int nameToPropertyIndex (const QString &name) const
 Column index to name.
 
int size () const
 Size (number of columns)
 
bool hasAlignment (const QModelIndex &index) const
 Alignment for this column?
 
bool isEditable (const QModelIndex &index) const
 Is this column editable?
 
bool isEditable (int column) const
 Is this column editable?
 
bool isSortable (const QModelIndex &index) const
 Sortable column?
 
bool isSortable (int column) const
 Sortable column?
 
bool isValidColumn (const QModelIndex &index) const
 Valid column?
 
bool isValidColumn (int column) const
 Valid column?
 
swift::misc::CVariant getAlignment (const QModelIndex &index) const
 Aligment as CVariant.
 
const CDefaultFormattergetFormatter (const QModelIndex &index) const
 Formatter.
 
const CColumnat (int columnNumber) const
 Column at position.
 
void clear ()
 Clear.
 
const QList< CColumn > & columns () const
 Columns.
 
bool hasAnyWidthPercentage () const
 Any column with width percentage?
 
void setWidthPercentages (const QList< int > &percentages)
 Set the width percentages.
 
QList< int > calculateWidths (int totalWidth) const
 Calculate the absolute width.
 
void insertEmptyColumn ()
 Insert an empty column.
 
bool endsWithEmptyColumn () const
 Ending with an empty column.
 
void setColumns (const QList< CColumn > &columns)
 Set columns.
 
void setColumns (const CColumns &columns)
 Set columns.
 

Detailed Description

Header data for a table.

Definition at line 159 of file columns.h.

Constructor & Destructor Documentation

◆ CColumns()

swift::gui::models::CColumns::CColumns ( const QString &  translationContext,
QObject *  parent = nullptr 
)

Columns constructors.

Parameters
translationContext
parent

Definition at line 94 of file columns.cpp.

Member Function Documentation

◆ columnToSortPropertyIndex()

CPropertyIndex swift::gui::models::CColumns::columnToSortPropertyIndex ( int  column) const

Column to property index for sort, considers.

See also
CColumn::getSo

Definition at line 135 of file columns.cpp.


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