CFx SDK Documentation  2023 SP0
Public Types | Public Member Functions | List of all members
CFxUITableView Class Reference

#include <FxUITableView.h>

Inheritance diagram for CFxUITableView:
CFxUIBaseView CFxUIObject

Public Types

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
}
 
- 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 {
  eXS = 0 , eS , eM , eL ,
  eXL
}
 

Public Member Functions

 CFxUITableView ()
 
 ~CFxUITableView ()
 
void setHorizontalHeaderResizeSection (CFxUITableView::UIHeaderResizeMode mode, int iColumn)
 
void setHorizontalHeaderStretchLastSection (bool bEnable)
 
void setSortingEnabled (bool bEnable)
 
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 selectRow (CFxUITableView::UISelectionFlag flag, CFxUIModelIndex index)
 
void setVerticalHeaderHidden (bool bHide)
 
void setHorzScrollBarDisable (bool bDisable)
 
void setColumnHidden (int iColumn, bool bHide)
 
void openPersistentEditor (const CFxUIModelIndex &index)
 
CFxUISignal< void(const CFxUIModelIndex &)> & itemClicked ()
 
CFxUISignal< void(void)> & selectionChanged ()
 
- Public Member Functions inherited from CFxUIBaseView
 CFxUIBaseView ()
 
virtual ~CFxUIBaseView ()
 
void setDisabled (bool on)
 
void setEnabled (bool on)
 
bool isEnabled () const
 
CFxUIPalette::ColorRole backgroundRole ()
 
void setPalette (const CFxUIPalette &)
 
const CFxUIPalettepalette () const
 
bool isVisible ()
 
void setVisible (bool bVisible)
 
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)
 
void setEventAccepted (bool bAccepted=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 ()
 
CFxUISignal< void(void)> & aboutToPassEventToParent ()
 
CFxUISignal< void(void)> & aboutToShow ()
 
CFxUISignal< void(void)> & hoverEnter ()
 
CFxUISignal< void(void)> & hoverLeave ()
 
- 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

- 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 CFxUITableView provides a default model/view implementation of a tree view.

Definition at line 27 of file FxUITableView.h.

Member Enumeration Documentation

◆ UIHeaderResizeMode

This enum defines the behavior of the header sections.

Enumerator
Interactive 

The user can resize the section.

Stretch 

HeaderView will automatically resize the section to fill the available space.

Fixed 

The user cannot resize the section.

ResizeToContents 

HeaderView will automatically resize the section to its optimal size based on the contents of the entire column or row.

Custom 

Use Fixed instead.

Definition at line 59 of file FxUITableView.h.

◆ UISelectionBehavior

This enum type defines the selection behavior of items in FxUITreeView.

Enumerator
SelectItems 

This enum selects the single items.

SelectRows 

This enum selects only the rows.

SelectColumns 

This enum selects only the columns.

Definition at line 34 of file FxUITableView.h.

◆ UISelectionFlag

This enum defines way the selection will be updated.

Enumerator
NoUpdate 

No selection will be made.

Clear 

The complete selection will be cleared.

Select 

All specified indexes will be selected.

Deselect 

All specified indexes will be deselected.

Rows 

All indexes will be expanded to span rows.

Columns 

All indexes will be expanded to span columns.

ClearAndSelect 

A combination of Clear and Select, provided for convenience.

Definition at line 71 of file FxUITableView.h.

◆ UISelectionMode

This enum indicates how the view responds to user selections.

Enumerator
NoSelection 

Items cannot be selected.

SingleSelection 

When the user selects an item, any already-selected item becomes unselected, and the user cannot unselect the selected item by clicking on it.

MultiSelection 

When the user selects an item in the usual way, the selection status of that item is toggled and the other items are left alone. Multiple items can be toggled by dragging the mouse over them.

ExtendedSelection 

If the user presses the Ctrl key when clicking on an item, the clicked item gets toggled and all other items are left untouched. If the user presses the Shift key while clicking on an item, all items between the current item and the clicked item are selected or unselected, depending on the state of the clicked item. Multiple items can be selected by dragging the mouse over them.

ContiguousSelection 

If the user presses the Shift key while clicking on an item, all items between the current item and the clicked item are selected or unselected, depending on the state of the clicked item.

Definition at line 44 of file FxUITableView.h.

Constructor & Destructor Documentation

◆ CFxUITableView()

CFxUITableView::CFxUITableView ( )

Constructor

◆ ~CFxUITableView()

CFxUITableView::~CFxUITableView ( )

Destructor

Member Function Documentation

◆ columnWidth()

int CFxUITableView::columnWidth ( int  iColumn) const

Gets the column width.

Returns
the width.

◆ currentIndex()

CFxUIModelIndex CFxUITableView::currentIndex ( ) const

Gets the current index of item.

Returns
the index.

◆ getModel()

CFxUIAbstractItemModel* CFxUITableView::getModel ( )

◆ itemClicked()

CFxUISignal<void( const CFxUIModelIndex& )>& CFxUITableView::itemClicked ( )

Signal is emitted when item is clicked.

◆ openPersistentEditor()

void CFxUITableView::openPersistentEditor ( const CFxUIModelIndex index)

Opens a persistent editor at given index.

Parameters
indexInput.

◆ selectionChanged()

CFxUISignal<void(void)>& CFxUITableView::selectionChanged ( )

Signal is emitted when selection of view is changed.

◆ selectRow()

void CFxUITableView::selectRow ( CFxUITableView::UISelectionFlag  flag,
CFxUIModelIndex  index 
)

Sets the row selected.

Parameters
firstflag Input.This enum is of type CFxUITableView::UISelectionFlag.
secondindex Input. Selects the row at provided index.

◆ setColumnHidden()

void CFxUITableView::setColumnHidden ( int  iColumn,
bool  bHide 
)

Sets the column hidden.

Parameters
firstiColumn Input.
secondbHide Input. If true, column is hidden.

◆ setColumnWidth()

void CFxUITableView::setColumnWidth ( int  iColumn,
int  iWidth 
)

Sets the width of the given column to the width specified.

Parameters
firstiColumn Input.
secondiWidth Input.

◆ setCurrentIndex()

void CFxUITableView::setCurrentIndex ( CFxUIModelIndex  index)

Sets the current item to be the item at index.

Parameters
<em>index</em>Input.

◆ setHorizontalHeaderResizeSection()

void CFxUITableView::setHorizontalHeaderResizeSection ( CFxUITableView::UIHeaderResizeMode  mode,
int  iColumn 
)

Sets the resize mode for column.

Parameters
firstmode Input. This is an enum defined in CFxUITableView::UIHeaderResizeMode.
secondiColumn Input.

◆ setHorizontalHeaderStretchLastSection()

void CFxUITableView::setHorizontalHeaderStretchLastSection ( bool  bEnable)

Sets whether the last visible section in the header takes up all the available space.

Parameters
<em>bEnable</em>Input.

◆ setHorzScrollBarDisable()

void CFxUITableView::setHorzScrollBarDisable ( bool  bDisable)

Sets the Horizontal scrollbar disable.

Parameters
bDisableInput. If true, Horizontal scrollbar is disabled.

◆ setModel()

void CFxUITableView::setModel ( CFxUIAbstractItemModel model)

Sets the model for the view to present.

Parameters
<em>model</em>Input.

◆ setSelectionBehavior()

void CFxUITableView::setSelectionBehavior ( CFxUITableView::UISelectionBehavior  behavior)

Sets the selection behavior for tree.

Parameters
<em>behavior</em>Input. This is an enum defined in CFxUITableView::UISelectionBehavior.

◆ setSelectionMode()

void CFxUITableView::setSelectionMode ( CFxUITableView::UISelectionMode  mode)

Sets the selection mode for tree.

Parameters
<em>mode</em>Input. This is an enum defined in CFxUITableView::UISelectionMode.

◆ setSortingEnabled()

void CFxUITableView::setSortingEnabled ( bool  bEnable)

Sets whether whether sorting is enabled.

Parameters
<em>bEnable</em>Input. If true, sorting is enabled for the tree; if false, sorting is not enabled.

◆ setVerticalHeaderHidden()

void CFxUITableView::setVerticalHeaderHidden ( bool  bHide)

Sets the vertical header hidden.

Parameters
bHideInput. If true, header is hidden.

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