CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
CFxUITableWidget Class Reference

#include <FxUITableWidget.h>

Inheritance diagram for CFxUITableWidget:
CFxUITableView CFxUIBaseView CFxUIObject

Public Member Functions

 CFxUITableWidget ()
 
 ~CFxUITableWidget ()
 
int rowCount () const
 
int columnCount () const
 
void setRowCount (int rows)
 
void setColumnCount (int columns)
 
int currentRow () const
 
void insertRow (int row)
 
void removeRow (int row)
 
CFxUITableWidgetItemitem (int row, int column)
 
void setItem (int row, int column, CFxUITableWidgetItem *item)
 
void setHorizontalHeaderItem (int column, CFxUITableWidgetItem *item)
 
CFxUITableWidgetItemhorizontalHeaderItem (int column)
 
void setCurrentCell (int row, int column)
 
void clearContents ()
 
std::vector< CFxUITableWidgetItem * > findItems (CFxString name, FxUIMatchFlag matchFlag)
 
- Public Member Functions inherited from CFxUITableView
 CFxUITableView ()
 
 ~CFxUITableView ()
 
void setHorizontalHeaderResizeSection (CFxUITableView::UIHeaderResizeMode mode, int iColumn)
 
void setHorizontalHeaderStretchLastSection (bool bEnable)
 
void setVerticalHeaderStretchLastSection (bool bEnable)
 
void setHorizontalScrollBarPolicy (CFxUIBaseView::UIScrollBarPolicy mode)
 
void setVerticalScrollBarPolicy (CFxUIBaseView::UIScrollBarPolicy mode)
 
void setSortingEnabled (bool bEnable)
 
void sortByColumn (int column, int order)
 
void setSelectionBehavior (CFxUITableView::UISelectionBehavior behavior)
 
void setSelectionMode (CFxUITableView::UISelectionMode mode)
 
void setColumnWidth (int iColumn, int iWidth)
 
int columnWidth (int iColumn) const
 
void setModel (CFxUIAbstractItemModel *model)
 
CFxUIAbstractItemModelgetModel ()
 
void setCurrentIndex (CFxUIModelIndex index)
 
CFxUIModelIndex currentIndex () const
 
void clearSelection ()
 
std::vector< CFxUIModelIndexselectedIndexes () const
 
void selectRow (CFxUITableView::UISelectionFlag flag, CFxUIModelIndex index)
 
void setVerticalHeaderHidden (bool bHide)
 
void setHorzHeaderHidden (bool bHide)
 
void setHorzScrollBarDisable (bool bDisable)
 
void setColumnHidden (int iColumn, bool bHide)
 
void openPersistentEditor (const CFxUIModelIndex &index)
 
CFxUISignal< void(const CFxUIModelIndex &)> & itemClicked ()
 
CFxUISignal< void(CFxUIModelIndex, CFxUITableView::UIMouseClickEvent)> & mouseClicked ()
 
CFxUISignal< void(void)> & selectionChanged ()
 
void setShowGrid (bool visible, int mask=CFxUIModelIndex::Horizontal|CFxUIModelIndex::Vertical)
 
bool showGrid ()
 
- Public Member Functions inherited from CFxUIBaseView
 CFxUIBaseView ()
 
virtual ~CFxUIBaseView ()
 
void setDisabled (bool on)
 
void setEnabled (bool on)
 
bool isEnabled () const
 
CFxUIPalette::FxUIColorRole backgroundRole ()
 
void setPalette (const CFxUIPalette &)
 
const CFxUIPalettepalette () const
 
bool isVisible ()
 
void setVisible (bool bVisible)
 
bool isHidden ()
 
void setHidden (bool bHidden)
 
bool hasFocus () const
 
void setFocus ()
 
void setFocus (int iReason)
 
void setFocusPolicy (int iPolicy)
 
int width ()
 
void setWidth (int w)
 
int height ()
 
void setHeight (int h)
 
void update ()
 
void setBusyState (bool bBusy=false)
 
void resize (int w, int h)
 
void setCornerRadius (float radius)
 
void setBorderWidth (float width)
 
void setBorderWidth (float left, float top, float right, float bottom)
 
void setBorderColor (int r, int g, int b)
 
virtual void showEvent (CFxUIShowEvent *event)
 
virtual void hideEvent (CFxUIHideEvent *event)
 
virtual void paintEvent (CFxUIPaintEvent *event)
 
virtual void resizeEvent (CFxUIResizeEvent *event)
 
virtual void focusInEvent (CFxUIFocusEvent *focusInEvent)
 
virtual void focusOutEvent (CFxUIFocusEvent *focusOutEvent)
 
virtual void mousePressEvent (CFxUIMouseEvent *mouseEvent)
 
void setEventAccepted (bool bAccepted=false)
 
void setEventRejected (bool bRejected=false)
 
void addView (CFxUIBaseView *pChild, float fWeight=0.0)
 
void insertView (CFxUIBaseView *pChild, int index=0, float fWeight=0.0)
 
int indexOf (CFxUIBaseView *pChild)
 
void removeView (CFxUIBaseView *pChild)
 
void setPreferableSize (int w, int h)
 
void setMinimumWidth (int iWidth)
 
void setMinimumHeight (int iHeight)
 
void setMinimumSize (const CFxUISize &size)
 
void setMaximumWidth (int iWidth)
 
void setMaximumHeight (int iHeight)
 
void setMaximumSize (const CFxUISize &size)
 
int minimumWidth ()
 
int minimumHeight ()
 
int maximumWidth ()
 
int maximumHeight ()
 
void setToolTip (const CFxUIString &sToolTip)
 
const CFxUIString toolTip ()
 
bool underMouse ()
 
void setMask (const CFxUIRegion &region)
 
void move (const CFxUIPoint &pos)
 
CFxUISize sizeHint () const
 
CFxUIPoint mapToGlobal (const CFxUIPoint &pos)
 
void setMargin (int left, int top, int right, int bottom)
 
void setParentWidget (CFxUIBaseView *pParent)
 
float getViewOpacity () const
 
void setViewOpacity (const float &opacity)
 
CFxUISignal< void(void)> & aboutToPassEventToParent ()
 
CFxUISignal< void(void)> & aboutToShow ()
 
CFxUISignal< void(void)> & hoverEnter ()
 
CFxUISignal< void(void)> & hoverLeave ()
 
CFxUISignal< void(bool)> & visibilityChanged ()
 
- Public Member Functions inherited from CFxUIObject
 CFxUIObject ()
 
virtual ~CFxUIObject ()
 
FxNativeHandle getHandle () const
 
void setHandle (FxNativeHandle handle)
 
void setParent (CFxUIObject *parent)
 
CFxUIObjectparent ()
 
const CFxUIObjectparent () const
 
void setObjectName (const CFxUIString &objectName)
 
CFxUIString objectName () const
 
bool setProperty (const char *name, const CFxUIVariant &value)
 
CFxUIVariant property (const char *name)
 
CFxUIList< CFxUIObject * > children () const
 
template<typename T>
CFxUIList< T > findChildren (const CFxUIString &name=CFxUIString())
 
void blockSignals (bool block)
 
bool signalsBlocked () const
 

Additional Inherited Members

- Public Types inherited from CFxUITableView
enum  UISelectionBehavior { SelectItems , SelectRows , SelectColumns }
 
enum  UISelectionMode {
  NoSelection , SingleSelection , MultiSelection , ExtendedSelection ,
  ContiguousSelection
}
 
enum  UIHeaderResizeMode {
  Interactive , Stretch , Fixed , ResizeToContents ,
  Custom = Fixed
}
 
enum  UISelectionFlag {
  NoUpdate = 0x0000 , Clear = 0x0001 , Select = 0x0002 , Deselect = 0x0004 ,
  Rows = 0x0020 , Columns = 0x0040 , ClearAndSelect = Clear | Select
}
 
enum  UIMouseClickEvent { None = 0 , Left = 1 , Middle = 2 , Right = 4 }
 
- Public Types inherited from CFxUIBaseView
enum  TextAlignment {
  AlignLeft = 0x0001 , AlignRight = 0x0002 , AlignHCenter = 0x0004 , AlignJustify = 0x0008 ,
  AlignTop = 0x0020 , AlignBottom = 0x0040 , AlignVCenter = 0x0080 , AlignBaseline = 0x0100 ,
  AlignCenter = AlignVCenter | AlignHCenter
}
 
enum  FocusPolicyType {
  eNoFocus = 0 , eTabFocus = 0x1 , eClickFocus = 0x2 , eStrongFocus = eTabFocus | eClickFocus | 0x8 ,
  eWheelFocus = eStrongFocus | 0x4 , eKeyboardOnSetfocus = 0x10
}
 
enum  UIWidthSizePolicy {
  eExpanding = -1 , eXS = 0 , eS , eM ,
  eL , eXL
}
 
enum  UIScrollBarPolicy { eScrollBarAsNeeded = 0 , eScrollBarAlwaysOff , eScrollBarAlwaysOn }
 
- Static Public Member Functions inherited from CFxUIBaseView
static void setTabOrder (CFxUIObject *first, CFxUIObject *second)
 
- Protected Member Functions inherited from CFxUIObject
CFxUIObjectsender ()
 
- Protected Attributes inherited from CFxUIObject
CFxUIObjectImpl * m_pImpl
 
CFxUIObjectData * m_pData
 

Detailed Description

Class CFxUITableWidget provides a default model/view implementation of a table widget.

Definition at line 54 of file FxUITableWidget.h.

Constructor & Destructor Documentation

◆ CFxUITableWidget()

CFxUITableWidget::CFxUITableWidget ( )

Constructor

◆ ~CFxUITableWidget()

CFxUITableWidget::~CFxUITableWidget ( )

Destructor

Member Function Documentation

◆ clearContents()

void CFxUITableWidget::clearContents ( )

Clears the contents, i.e. all visible entries are hidden afterwards. The items are not automatically deleted.

◆ columnCount()

int CFxUITableWidget::columnCount ( ) const

Gets the number of of columns available in the table widget.

Returns
the number of columns.

◆ currentRow()

int CFxUITableWidget::currentRow ( ) const

Gets the current row which is set when clicked or tapped.

◆ findItems()

std::vector< CFxUITableWidgetItem * > CFxUITableWidget::findItems ( CFxString name,
FxUIMatchFlag matchFlag )

Reserved for future use

Parameters
_name_name of items to search for.
_matchFlag_flags for searching.
Returns
a list of all items matching the specified parameters.

◆ horizontalHeaderItem()

CFxUITableWidgetItem * CFxUITableWidget::horizontalHeaderItem ( int column)

Gets the item displayed at the specified column of the horizontal header.

Parameters
_column_the 0-based index of the column used for the item.
Returns
the currently visible at the specified position in the header.

◆ insertRow()

void CFxUITableWidget::insertRow ( int row)

Inserts an empty row above of the specified row. The inserted row is at the end if it the specified row is the number of rows. The number of rows reserved for use is automatically incremented by 1.

Parameters
_row_the 0-based index of the first row to be moved down.

◆ item()

CFxUITableWidgetItem * CFxUITableWidget::item ( int row,
int column )

Gets the item currently set at the specified row and column.

Parameters
_row_the 0-based index of the row used for the item.
_column_the 0-based index of the column used for the item.
Returns
the item currently visible at the specified position.

◆ removeRow()

void CFxUITableWidget::removeRow ( int row)

Removes the specified row. Any items contained in the specified row are not automatically cleaned up and must be explicitly deleted beforehand if not referenced anymore. The number of rows reserved for use is automatically decremented by 1.

Parameters
_row_the 0-based index of the first row to be moved down.

◆ rowCount()

int CFxUITableWidget::rowCount ( ) const

Gets the number of of row available in the table widget.

Returns
the number of rows.

◆ setColumnCount()

void CFxUITableWidget::setColumnCount ( int columns)

Sets the number of of columns available for use in the table widget. This method reserves memory space for storing the required data. Setting items in a column larger than the specified value implicitly expands the reserved memory space.

Parameters
_columns_the number of columns to reserve.

◆ setCurrentCell()

void CFxUITableWidget::setCurrentCell ( int row,
int column )

Sets the current position to the specified row and column.

Parameters
_row_the 0-based index of the row.
_column_the 0-based index of the column.

◆ setHorizontalHeaderItem()

void CFxUITableWidget::setHorizontalHeaderItem ( int column,
CFxUITableWidgetItem * item )

Sets an item in the horizontal header for the specified column. Any item that was previously displayed at the specified position is not automatically deleted.

Parameters
_column_the 0-based index of the column used for the item.
_item_the new item to be displayed at the specified position in the header.

◆ setItem()

void CFxUITableWidget::setItem ( int row,
int column,
CFxUITableWidgetItem * item )

Sets the item at the specified row and column. Any item that was previously displayed at the specified position is not automatically deleted.

Parameters
_row_the 0-based index of the row used for the item.
_column_the 0-based index of the column used for the item.
_item_the new item to be displayed at the specified position.

◆ setRowCount()

void CFxUITableWidget::setRowCount ( int rows)

Sets the number of of rows available for use in the table widget. This method reserves memory space for storing the data. Setting items in a row larger than the specified value implicitly expands the reserved memory space.

Parameters
_rows_the number of rows to reserve.

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