CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
CFxUIListView Class Reference

#include <FxUIListView.h>

Inheritance diagram for CFxUIListView:
CFxUIBaseView CFxUIObject

Public Types

enum  UISelectionMode {
  NoSelection , SingleSelection , MultiSelection , ExtendedSelection ,
  ContiguousSelection
}
 
enum  UISelectionFlag {
  NoUpdate = 0x0000 , Clear = 0x0001 , Select = 0x0002 , Deselect = 0x0004 ,
  ClearAndSelect = Clear | Select
}
 
enum  UIElideMode {
  WrapElide , TrailingEllipsisElide , CenteredEllipsisElide , CentredEllipsisElide = CenteredEllipsisElide ,
  LeadingEllipsisElide , ShrinkElide
}
 
- 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
}
 

Public Member Functions

 CFxUIListView ()
 
 ~CFxUIListView ()
 
void setSelectionMode (CFxUIListView::UISelectionMode mode)
 
void setModel (CFxUIAbstractItemModel *model)
 
CFxUIAbstractItemModelgetModel ()
 
void setCurrentIndex (CFxUIModelIndex index)
 
CFxUIModelIndex currentIndex () const
 
void setHorzScrollBarDisable (bool bDisable)
 
void setFilter (const CFxUIString &regExp)
 
void setElideMode (const CFxUIListView::UIElideMode mode)
 
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 ()
 
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

- 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 39 of file FxUIListView.h.

Member Enumeration Documentation

◆ UIElideMode

This enum defines the way how to shorten text content that does not fit into one line.

Enumerator
WrapElide 

Do not shorten the text, the text will be wrapped into the next line.

TrailingEllipsisElide 

Replace last characters by "..." if text does not fit.

CenteredEllipsisElide 

Replace middle characters by "..." if text does not fit.

CentredEllipsisElide 

same as CenteredEllipsisElide.

LeadingEllipsisElide 

Replace first characters by "..." if text does not fit.

ShrinkElide 

Reduce font size until text fits.

Definition at line 72 of file FxUIListView.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.

ClearAndSelect 

A combination of Clear and Select, provided for convenience.

Definition at line 61 of file FxUIListView.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 46 of file FxUIListView.h.

Constructor & Destructor Documentation

◆ CFxUIListView()

CFxUIListView::CFxUIListView ( )

Constructor

◆ ~CFxUIListView()

CFxUIListView::~CFxUIListView ( )

Destructor

Member Function Documentation

◆ currentIndex()

CFxUIModelIndex CFxUIListView::currentIndex ( ) const

Gets the current index of item.

Returns
the index.

◆ getModel()

CFxUIAbstractItemModel * CFxUIListView::getModel ( )

◆ itemClicked()

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

Signal is emitted when item is clicked.

◆ selectionChanged()

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

Signal is emitted when selection of view is changed.

◆ setCurrentIndex()

void CFxUIListView::setCurrentIndex ( CFxUIModelIndex  index)

Sets the current item to be the item at index.

Parameters
_index_Input.

◆ setElideMode()

void CFxUIListView::setElideMode ( const CFxUIListView::UIElideMode  mode)

Define the way how to shorten texts that do not fit into one line.

Parameters
modeInput. The way how to shorten lines that do not fit.

◆ setFilter()

void CFxUIListView::setFilter ( const CFxUIString regExp)

◆ setHorzScrollBarDisable()

void CFxUIListView::setHorzScrollBarDisable ( bool  bDisable)

Sets the Horizontal scrollbar disable.

Parameters
bDisableInput. If true, Horizontal scrollbar is disabled.

◆ setModel()

void CFxUIListView::setModel ( CFxUIAbstractItemModel model)

Sets the model for the view to present.

Parameters
modelInput.

◆ setSelectionMode()

void CFxUIListView::setSelectionMode ( CFxUIListView::UISelectionMode  mode)

Sets the selection mode for tree.

Parameters
modeInput. This is an enum defined in CFxUITableView::UISelectionMode.

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